/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;700&family=Space+Grotesk:wght@500;700&display=swap');

/* ===== VARIABLES ===== */
:root {
	--header-height: 4.5rem;

	/* Colors */
	--background-color: #0d1117;
	--surface-color: #161b22;
	--text-color: #e6edf3;
	--primary-color: #39d353;
	--secondary-color: #30363d;
	--text-color-light: #8b949e;

	/* Fonts */
	--body-font: 'Manrope', sans-serif;
	--title-font: 'Space Grotesk', sans-serif;

	--h1-font-size: 2.5rem;
	--h2-font-size: 1.75rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/* z-index */
	--z-fixed: 100;
}

/* ===== BASE ===== */
* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	background-color: var(--background-color);
	color: var(--text-color);
}

h1,
h2,
h3 {
	font-family: var(--title-font);
	font-weight: 700;
	color: var(--text-color);
}

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: var(--text-color);
}

img,
svg {
	max-width: 100%;
	height: auto;
}

/* ===== REUSABLE CSS CLASSES ===== */
.container {
	max-width: 1120px;
	margin-left: 1.5rem;
	margin-right: 1.5rem;
}

/* ===== HEADER ===== */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: rgba(13, 17, 23, 0.8);
	backdrop-filter: blur(10px);
	z-index: var(--z-fixed);
	border-bottom: 1px solid var(--secondary-color);
}

.header__container {
	height: var(--header-height);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--text-color);
	transition: color 0.3s;
}

.logo:hover {
	color: var(--primary-color);
}

.header__burger-btn {
	display: none; /* Hidden on desktop */
	background: none;
	border: none;
	color: var(--text-color);
	cursor: pointer;
}

.header__nav-list {
	display: flex;
	gap: 2.5rem;
}

.header__nav-link {
	font-size: var(--normal-font-size);
	transition: color 0.3s;
}

.header__nav-link:hover {
	color: var(--primary-color);
}

/* ===== FOOTER ===== */
.footer {
	padding-top: 5rem;
	padding-bottom: 2rem;
	background-color: var(--surface-color);
	border-top: 1px solid var(--secondary-color);
}

.footer__container {
	display: grid;
	gap: 3rem;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer__column--info .footer__description {
	margin-top: 1rem;
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	max-width: 250px;
}

.footer__title {
	font-size: var(--h3-font-size);
	margin-bottom: 1.5rem;
}

.footer__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.footer__link {
	color: var(--text-color-light);
	font-size: var(--normal-font-size);
	transition: color 0.3s;
}

.footer__link:hover {
	color: var(--primary-color);
}

.footer__list--contacts li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.footer__icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin-top: 2px;
}

.footer__bottom {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--secondary-color);
	text-align: center;
	color: var(--text-color-light);
	font-size: var(--small-font-size);
}

/* ===== MEDIA QUERIES (Mobile-first) ===== */
@media screen and (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 80%;
		height: 100vh;
		background-color: var(--surface-color);
		padding: 2rem;
		transition: right 0.4s ease;
	}

	.header__nav.show-menu {
		right: 0;
	}

	.header__nav-list {
		flex-direction: column;
		gap: 2rem;
	}

	.header__burger-btn {
		display: block;
	}
}

@media screen and (min-width: 1140px) {
	.container {
		margin-left: auto;
		margin-right: auto;
	}
}

/* ===== BUTTON ===== */
.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: var(--primary-color);
	color: var(--background-color);
	padding: 1rem 2rem;
	border-radius: 0.5rem;
	font-family: var(--title-font);
	font-weight: 500;
	transition: transform 0.3s, box-shadow 0.3s;
}

.button:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px -10px var(--primary-color);
}

.button__icon {
	width: 20px;
	height: 20px;
	transition: transform 0.3s;
}

.button:hover .button__icon {
	transform: translateX(4px);
}

/* ===== HERO ===== */
.hero {
	padding-top: var(--header-height);
	height: 100vh;
	min-height: 700px;
	display: flex;
	align-items: center;
}

.hero__container {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	align-items: center;
	gap: 2rem;
}

.hero__title {
	font-size: 3.5rem; /* Increased size for impact */
	line-height: 1.2;
	margin-bottom: 1.5rem;
}

.hero__description {
	font-size: 1.125rem;
	color: var(--text-color-light);
	margin-bottom: 2.5rem;
	max-width: 500px;
}

#hero-canvas {
	width: 100%;
	height: 100%;
	cursor: crosshair;
}

/* ===== MEDIA QUERIES for HERO ===== */
@media screen and (max-width: 992px) {
	.hero__title {
		font-size: 2.75rem;
	}
}

@media screen and (max-width: 768px) {
	.hero {
		height: auto;
		padding: 6rem 0 4rem;
		text-align: center;
	}
	.hero__container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	.hero__description {
		margin-left: auto;
		margin-right: auto;
	}
	.hero__canvas-container {
		height: 300px;
		order: -1; /* Move canvas to the top on mobile */
	}
}

@media screen and (max-width: 375px) {
	.hero__title {
		font-size: 2.25rem;
	}
}

/* ===== REUSABLE SECTION STYLES ===== */
.section {
	padding: 6rem 0 2rem;
}

.section__header {
	text-align: center;
	margin-bottom: 4rem;
}

.section__title {
	font-size: var(--h2-font-size);
	margin-bottom: 0.75rem;
}

.section__subtitle {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	max-width: 600px;
	margin: 0 auto;
}

.grid {
	display: grid;
	gap: 1.5rem;
}

/* ===== CONCEPTS ===== */
.concepts__container {
	grid-template-columns: repeat(3, 1fr);
}

.concept-card {
	background-color: var(--surface-color);
	padding: 2.5rem 2rem;
	border-radius: 0.75rem;
	border: 1px solid var(--secondary-color);
	transition: transform 0.3s, border-color 0.3s;
}

.concept-card:hover {
	transform: translateY(-5px);
	border-color: var(--primary-color);
}

.concept-card__icon-wrapper {
	width: 60px;
	height: 60px;
	background-color: var(--background-color);
	border-radius: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.5rem;
}

.concept-card__icon-wrapper i {
	width: 32px;
	height: 32px;
	color: var(--primary-color);
}

.concept-card__title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.75rem;
}

.concept-card__description {
	color: var(--text-color-light);
	font-size: var(--normal-font-size);
	line-height: 1.6;
}

/* ===== MEDIA QUERIES for CONCEPTS ===== */
@media screen and (max-width: 992px) {
	.concepts__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 576px) {
	.concepts__container {
		grid-template-columns: 1fr;
	}
}

/* ===== TECHNOLOGIES ===== */
.technologies__container {
	background-color: var(--surface-color);
	border: 1px solid var(--secondary-color);
	border-radius: 0.75rem;
	padding: 2.5rem;
}

.technologies__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--secondary-color);
}

.technologies__tab {
	background: none;
	border: none;
	color: var(--text-color-light);
	font-family: var(--title-font);
	font-size: var(--normal-font-size);
	padding: 1rem 1.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	position: relative;
	border-bottom: 2px solid transparent;
	transition: color 0.3s;
}

.technologies__tab:hover {
	color: var(--text-color);
}

.technologies__tab.is-active {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
}

.technologies__tab-icon {
	width: 20px;
	height: 20px;
}

.technologies__content-item {
	display: none; /* Hidden by default */
	grid-template-columns: repeat(2, 1fr);
	align-items: center;
	gap: 3rem;
	animation: fadeIn 0.5s;
}

.technologies__content-item.is-active {
	display: grid; /* Shown when active */
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.technologies__image-wrapper {
	border-radius: 0.5rem;
	overflow: hidden;
}

.technologies__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.technologies__title {
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

.technologies__description {
	color: var(--text-color-light);
	line-height: 1.6;
	margin-bottom: 1.5rem;
}

.technologies__list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.technologies__list li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--text-color);
}

.technologies__list i {
	color: var(--primary-color);
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* ===== MEDIA QUERIES for TECHNOLOGIES ===== */
@media screen and (max-width: 768px) {
	.technologies__content-item {
		grid-template-columns: 1fr;
	}
	.technologies__image-wrapper {
		margin-bottom: 2rem;
	}
}
@media screen and (max-width: 576px) {
	.technologies__tabs {
		justify-content: center;
	}
	.technologies__tab {
		padding: 0.75rem 1rem;
	}
	.technologies__container {
		padding: 1.5rem;
	}
}

/* ===== APPLICATIONS (TIMELINE) ===== */
.timeline__container {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	padding: 2rem 0;
}

/* The central line */
.timeline__container::after {
	content: '';
	position: absolute;
	width: 3px;
	background-color: var(--secondary-color);
	top: 0;
	bottom: 0;
	left: 50%;
	margin-left: -1.5px;
}

.timeline__item {
	padding: 10px 40px;
	position: relative;
	width: 50%;
}

/* The circle on the timeline */
.timeline__item::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	right: -10px;
	background-color: var(--background-color);
	border: 3px solid var(--primary-color);
	top: 28px;
	border-radius: 50%;
	z-index: 1;
}

/* Positioning the items */
.timeline__item:nth-child(odd) {
	left: 0;
}

.timeline__item:nth-child(even) {
	left: 50%;
}

/* Adjusting the circle for even items */
.timeline__item:nth-child(even)::after {
	left: -10px;
}

.timeline__content {
	padding: 20px 30px;
	background-color: var(--surface-color);
	border: 1px solid var(--secondary-color);
	position: relative;
	border-radius: 0.5rem;
}

/* The triangle pointer */
.timeline__content::before {
	content: ' ';
	height: 0;
	position: absolute;
	top: 22px;
	width: 0;
	z-index: 1;
	border: medium solid var(--secondary-color);
}

.timeline__item:nth-child(odd) .timeline__content::before {
	right: -16px;
	border-width: 10px 0 10px 15px;
	border-color: transparent transparent transparent var(--secondary-color);
}
.timeline__item:nth-child(even) .timeline__content::before {
	left: -16px;
	border-width: 10px 15px 10px 0;
	border-color: transparent var(--secondary-color) transparent transparent;
}

.timeline__icon-wrapper {
	position: absolute;
	top: 25px;
	width: 26px;
	height: 26px;
	background: var(--background-color);
	z-index: 2;
	display: flex;
	justify-content: center;
	align-items: center;
}
.timeline__icon-wrapper i {
	color: var(--primary-color);
	width: 24px;
	height: 24px;
}

.timeline__item:nth-child(odd) .timeline__icon-wrapper {
	right: 28px;
}

.timeline__item:nth-child(even) .timeline__icon-wrapper {
	left: 28px;
}

.timeline__title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.5rem;
}

.timeline__description {
	color: var(--text-color-light);
	line-height: 1.6;
}

/* ===== MEDIA QUERIES for TIMELINE ===== */
@media screen and (max-width: 768px) {
	.timeline__container::after {
		left: 31px;
	}

	.timeline__item {
		width: 100%;
		padding-left: 70px;
		padding-right: 25px;
	}

	.timeline__item:nth-child(odd) {
		left: 0;
	}

	.timeline__item:nth-child(even) {
		left: 0;
	}

	.timeline__item::after {
		left: 21px;
	}

	.timeline__icon-wrapper {
		left: 60px;
	}

	.timeline__content::before {
		left: -16px;
		border-width: 10px 15px 10px 0;
		border-color: transparent var(--secondary-color) transparent transparent;
	}
}

/* ===== ETHICS (ACCORDION) ===== */
.accordion__container {
	max-width: 800px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.accordion__item {
	background-color: var(--surface-color);
	border: 1px solid var(--secondary-color);
	border-radius: 0.5rem;
	overflow: hidden;
	transition: all 0.3s;
}

.accordion__item.is-open {
	border-color: var(--primary-color);
}

.accordion__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 1.5rem;
	background: none;
	border: none;
	color: var(--text-color);
	cursor: pointer;
	text-align: left;
}

.accordion__question {
	font-family: var(--title-font);
	font-size: 1.125rem;
	font-weight: 500;
}

.accordion__icon {
	width: 24px;
	height: 24px;
	transition: transform 0.4s;
	flex-shrink: 0;
	margin-left: 1rem;
}

.accordion__item.is-open .accordion__icon {
	transform: rotate(180deg);
}

.accordion__content {
	display: grid;
	grid-template-rows: 0fr; /* Collapsed by default */
	transition: grid-template-rows 0.4s ease;
}

.accordion__item.is-open .accordion__content {
	grid-template-rows: 1fr; /* Expanded */
}

.accordion__answer {
	overflow: hidden;
	padding: 0 1.5rem 1.5rem 1.5rem;
	color: var(--text-color-light);
	line-height: 1.7;
}

/* ===== CONTACT ===== */
.contact__container {
	grid-template-columns: repeat(2, 1fr);
	align-items: center;
	gap: 3rem;
}

.contact__form-wrapper {
	background-color: var(--surface-color);
	padding: 2.5rem;
	border: 1px solid var(--secondary-color);
	border-radius: 0.75rem;
}

.contact__form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.contact__form-group {
	position: relative;
}

.contact__form-label {
	display: none;
	position: absolute;
	top: 0.9rem;
	left: 1rem;
	color: var(--text-color-light);
	font-size: var(--normal-font-size);
	transition: all 0.3s;
	pointer-events: none;
}

.contact__form-input {
	width: 100%;
	padding: 1.5rem 1rem 0.5rem;
	background-color: var(--background-color);
	border: 1px solid var(--secondary-color);
	border-radius: 0.5rem;
	color: var(--text-color);
	font-size: var(--normal-font-size);
	outline: none;
	transition: border-color 0.3s;
}

.contact__form-input:focus {
	border-color: var(--primary-color);
}

.contact__form-input:focus + .contact__form-label,
.contact__form-input:valid + .contact__form-label {
	top: 0.3rem;
	font-size: var(--small-font-size);
	color: var(--primary-color);
}

.contact__form-group--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.contact__form-checkbox {
	margin-top: 4px;
	accent-color: var(--primary-color);
	flex-shrink: 0;
}

.contact__form-checkbox-label {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

.contact__form-checkbox-label a {
	color: var(--primary-color);
	text-decoration: underline;
}

.contact__button {
	width: 100%;
	justify-content: center;
}

.contact__success-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 2rem;
	animation: fadeIn 0.5s;
}
.contact__success-message i {
	color: var(--primary-color);
	width: 60px;
	height: 60px;
	margin-bottom: 1rem;
}
.contact__success-message h3 {
	font-size: var(--h3-font-size);
	margin-bottom: 0.5rem;
}

/* ===== MEDIA QUERIES for CONTACT ===== */
@media screen and (max-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr;
		gap: 4rem;
		text-align: center;
	}
}

/* ===== COOKIE POP-UP ===== */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Hidden by default */
	left: 50%;
	transform: translateX(-50%);
	max-width: 900px;
	width: calc(100% - 3rem);
	background-color: var(--surface-color);
	padding: 1.5rem 2rem;
	border: 1px solid var(--secondary-color);
	border-radius: 0.75rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	z-index: var(--z-fixed);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-visible {
	bottom: 1.5rem;
}

.cookie-popup__text {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
}

.cookie-popup__text a {
	color: var(--primary-color);
	text-decoration: underline;
}

.cookie-popup__button {
	padding: 0.75rem 1.5rem;
	flex-shrink: 0;
}

/* ===== MEDIA QUERIES for COOKIE ===== */
@media screen and (max-width: 576px) {
	.cookie-popup {
		flex-direction: column;
		text-align: center;
		gap: 1rem;
	}
}

/* ===== GENERIC PAGES (Privacy, Terms, etc.) ===== */
.pages {
	padding: calc(var(--header-height) + 4rem) 0 6rem;
}

.pages .container {
	max-width: 800px;
}

.pages h1 {
	font-size: 1.5rem;
	text-align: center;
	margin-bottom: 3rem;
}

.pages h2 {
	font-size: 1.5rem;
	margin-top: 3rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--secondary-color);
	padding-bottom: 0.5rem;
}

.pages p {
	color: var(--text-color-light);
	line-height: 1.8;
	margin-bottom: 1.5rem;
}

.pages ul {
	list-style-type: disc;
	padding-left: 25px;
	margin-bottom: 1.5rem;
}

.pages li {
	color: var(--text-color-light);
	line-height: 1.8;
	margin-bottom: 0.75rem;
}

.pages a {
	color: var(--primary-color);
	text-decoration: underline;
	transition: color 0.3s;
}

.pages a:hover {
	color: var(--text-color);
}

.pages strong {
	color: var(--text-color);
	font-weight: 700;
}
