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

/* CSS VARIABLES */
:root {
	--header-height: 5rem;

	/* Colors */
	--primary-color: #4d5bff;
	--primary-color-alt: #6976ff;
	--background-color: #0a0a1a;
	--surface-color: #14142b;
	--text-color: #eaeafb;
	--text-color-light: #a0a0d0;
	--white-color: #ffffff;
	--container-color: #0a0a1a;

	/* Fonts */
	--body-font: 'Inter', sans-serif;
	--title-font: 'Poppins', sans-serif;

	--h1-font-size: 2rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.125rem;
	--normal-font-size: 0.9rem;
	--small-font-size: 0.8rem;

	/* Font weight */
	--font-medium: 500;
	--font-bold: 700;

	/* Margins */
	--mb-0-5: 0.5rem;
	--mb-1: 1rem;
	--mb-1-5: 1.5rem;
	--mb-2: 2rem;

	/* Z-index */
	--z-fixed: 100;
	--z-tooltip: 10;
}

@media screen and (min-width: 768px) {
	:root {
		--h1-font-size: 2.5rem;
		--h2-font-size: 1.75rem;
		--h3-font-size: 1.25rem;
		--normal-font-size: 1rem;
		--small-font-size: 0.875rem;
	}
}

@media screen and (min-width: 1024px) {
	:root {
		--h1-font-size: 3rem;
		--h2-font-size: 2rem;
		--h3-font-size: 1.375rem;
		--normal-font-size: 1.125rem;
		--small-font-size: 0.9rem;
	}
}

/* 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);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: inherit;
}

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

button {
	cursor: pointer;
	border: none;
	outline: none;
	background: none;
}

/* REUSABLE CSS CLASSES */
.container {
	max-width: 1120px;
	margin-left: var(--mb-1-5);
	margin-right: var(--mb-1-5);
}

.section {
	padding: 6rem 0 2rem;
}

.section__title {
	font-size: var(--h1-font-size);
	text-align: center;
	margin-bottom: var(--mb-2);
}

/* LOGO */
.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	color: var(--white-color);
	font-size: 1.125rem;
}

/* HEADER */
.header {
	width: 100%;
	background-color: transparent;
	position: fixed;
	top: 0;
	left: 0;
	z-index: var(--z-fixed);
	transition: background-color 0.3s, box-shadow 0.3s;
}

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

.header__toggle {
	color: var(--white-color);
	font-size: 1.25rem;
	display: none; /* Hidden on desktop */
	position: relative;
	z-index: 101; /* Higher than mobile menu to stay on top */
}

.nav__list {
	display: flex;
	gap: 2.5rem;
}

.nav__link {
	color: var(--text-color-light);
	font-weight: var(--font-medium);
	position: relative;
	transition: color 0.3s;
}

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

.nav__link::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--primary-color);
	transition: width 0.3s ease-in-out;
}

.nav__link:hover::after {
	width: 100%;
}

/* Add background and shadow on scroll */
.scroll-header {
	background-color: rgba(10, 10, 26, 0.8);
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px hsla(252, 57%, 16%, 0.2);
}

/* MOBILE MENU */
@media screen and (max-width: 767px) {
	.header__toggle {
		display: block;
	}

	.header__nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 70%;
		height: 100vh;
		background-color: var(--surface-color);
		padding: 4rem 2rem 0;
		z-index: var(--z-fixed);
		transition: right 0.4s ease;
		box-shadow: -2px 0 12px hsla(252, 57%, 16%, 0.3);
	}

	.nav--show {
		right: 0;
	}

	.nav__list {
		flex-direction: column;
		gap: 2rem;
	}
	.nav__link {
		font-size: var(--normal-font-size);
	}
}

/* FOOTER */
.footer {
	background-color: var(--surface-color);
	padding-top: 5rem;
}

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

.footer__column--about {
	max-width: 350px;
}
.footer__logo {
	margin-bottom: var(--mb-1);
}

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

.footer__title {
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-1-5);
	color: var(--white-color);
}

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

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

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

.footer__list--contact li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--text-color-light);
}
.footer__list--contact i {
	color: var(--primary-color);
}

.footer__bottom {
	margin-top: 4rem;
	padding: 1.5rem 0;
	border-top: 1px solid rgba(160, 160, 208, 0.1);
}

.footer__bottom-container {
	text-align: center;
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

/* BREAKPOINTS */
@media screen and (min-width: 768px) {
	body {
		margin: 0;
	}
	.container {
		margin-left: auto;
		margin-right: auto;
	}
}

@media screen and (min-width: 1024px) {
	.header,
	.footer__container,
	.footer__bottom-container {
		padding-left: 1rem;
		padding-right: 1rem;
	}
}

/*=============== BUTTONS ===============*/
.button {
	display: inline-block;
	padding: 1rem 2rem;
	border-radius: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-medium);
	transition: background-color 0.3s, transform 0.3s;
	text-align: center;
}

.button--primary {
	background-color: var(--primary-color);
	color: var(--white-color);
}

.button--primary:hover {
	background-color: var(--primary-color-alt);
	transform: translateY(-3px);
}

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

.hero__canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
}

.hero__container {
	display: grid;
	align-items: center;
	gap: 2rem;
	grid-template-columns: 1fr;
	position: relative; /* Ensure content is above canvas */
	z-index: 2;
}

.hero__data {
	text-align: center;
}

.hero__title {
	font-size: var(--h2-font-size);
	margin-bottom: var(--mb-1-5);
	line-height: 1.3;
}

.hero__title-accent {
	color: var(--primary-color);
}

.hero__description {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	margin-bottom: var(--mb-2);
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.6;
}

.hero__image-container {
	display: none; /* Hide image on mobile by default */
}

/* BREAKPOINTS FOR HERO */
@media screen and (min-width: 768px) {
	.hero {
		min-height: 90vh;
	}
	.hero__container {
		grid-template-columns: 1.2fr 0.8fr;
		gap: 3rem;
	}
	.hero__data {
		text-align: left;
	}
	.hero__title {
		font-size: var(--h2-font-size);
	}
	.hero__description {
		font-size: var(--normal-font-size);
		margin-left: 0;
		margin-right: 0;
	}
	.hero__image-container {
		display: block;
	}
	.hero__image {
		width: 100%;
		border-radius: 1rem;
		animation: float 4s ease-in-out infinite;
	}
}

@keyframes float {
	0% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-20px);
	}
	100% {
		transform: translateY(0px);
	}
}

/*=============== FEATURES ===============*/
.features {
	background-color: var(--surface-color);
}

.features__grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	margin-top: 4rem;
}

.features__card {
	background-color: var(--background-color);
	padding: 2.5rem 2rem;
	border: 1px solid var(--surface-color);
	border-radius: 1rem;
	text-align: center;
	transition: transform 0.3s, box-shadow 0.3s;
}

.features__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 24px hsla(252, 100%, 65%, 0.1);
}

.features__card-icon {
	display: inline-flex;
	padding: 1rem;
	background: linear-gradient(
		145deg,
		var(--primary-color),
		var(--primary-color-alt)
	);
	border-radius: 50%;
	margin-bottom: var(--mb-1-5);
	color: var(--white-color);
}

.features__card-icon i {
	width: 32px;
	height: 32px;
}

.features__card-title {
	font-size: var(--normal-font-size);
	margin-bottom: var(--mb-0-5);
	font-weight: var(--font-medium);
}

.features__card-description {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
}

/*=============== HOW IT WORKS ===============*/
.how-it-works__container {
	display: grid;
	gap: 4rem 2rem;
	padding-top: 4rem;
}

.how-it-works__step {
	position: relative;
}

.how-it-works__content {
	background-color: var(--surface-color);
	padding: 2.5rem 2rem;
	border-radius: 1rem;
	border: 1px solid transparent;
	transition: border 0.3s;
}

.how-it-works__content:hover {
	border-color: var(--primary-color);
}

.how-it-works__number {
	position: absolute;
	top: -2.5rem;
	left: 1.5rem;
	font-size: 5rem;
	font-weight: var(--font-bold);
	font-family: var(--title-font);
	color: rgba(77, 91, 255, 0.1);
	z-index: 0;
}

.how-it-works__title {
	font-size: var(--normal-font-size);
	margin-bottom: var(--mb-1);
	position: relative;
	z-index: 1;
	font-weight: var(--font-medium);
}

.how-it-works__description {
	color: var(--text-color-light);
	position: relative;
	z-index: 1;
}

@media screen and (min-width: 768px) {
	.how-it-works__container {
		grid-template-columns: repeat(3, 1fr);
	}

	.how-it-works__step {
		margin-top: 0;
	}

	/* Decorative connecting line */
	.how-it-works__step:not(:last-child)::after {
		content: '';
		position: absolute;
		width: 60%;
		height: 2px;
		background-image: linear-gradient(
			to right,
			var(--primary-color) 50%,
			transparent 50%
		);
		background-size: 10px 2px;
		background-repeat: repeat-x;
		top: 50%;
		right: -30%;
		transform: translateY(-50%);
	}
}

@media screen and (max-width: 767px) {
	.how-it-works__step:not(:last-child)::after {
		content: '';
		position: absolute;
		height: 60%;
		width: 2px;
		background-image: linear-gradient(
			to bottom,
			var(--primary-color) 50%,
			transparent 50%
		);
		background-size: 2px 10px;
		background-repeat: repeat-y;
		bottom: -30%;
		left: 2rem;
		transform: translateX(-50%);
	}
}

/*=============== USE CASES ===============*/
.use-cases {
	background-color: var(--surface-color);
}

.use-cases__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 3rem;
}

.use-cases__tab {
	background-color: transparent;
	border: 1px solid var(--surface-color);
	color: var(--text-color-light);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.use-cases__tab:hover {
	background-color: var(--surface-color);
	color: var(--white-color);
}

.use-cases__tab--active {
	background-color: var(--primary-color);
	color: var(--white-color);
	border-color: var(--primary-color);
}
.use-cases__tab--active:hover {
	background-color: var(--primary-color-alt);
}

.use-cases__panel {
	display: none; /* Hidden by default */
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

.use-cases__panel--active {
	display: grid; /* Shown when active */
	animation: fadeIn 0.5s ease;
}

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

.use-cases__panel-image img {
	border-radius: 1rem;
	width: 100%;
}

.use-cases__panel-title {
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-1);
}

.use-cases__panel-description {
	color: var(--text-color-light);
	margin-bottom: var(--mb-1-5);
}

.use-cases__panel-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.use-cases__panel-list li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.use-cases__panel-list i {
	color: var(--primary-color);
}

@media screen and (min-width: 768px) {
	.use-cases__panel {
		grid-template-columns: repeat(2, 1fr);
		gap: 4rem;
	}
}

/*=============== FAQ ===============*/
.faq__container {
	max-width: 768px;
	margin: 3rem auto 0;
	display: grid;
	gap: 1.5rem;
}

.faq__item {
	background-color: var(--surface-color);
	border-radius: 0.5rem;
	padding: 1.25rem;
	border: 1px solid var(--surface-color);
	transition: border 0.3s;
}

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

.faq__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	cursor: pointer;
}

.faq__question {
	font-size: var(--small-font-size);
	font-family: var(--body-font);
	font-weight: var(--font-medium);
}

.faq__icon {
	transition: transform 0.4s;
}

.faq__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease-out;
}

.faq__answer {
	padding-top: 1.25rem;
	color: var(--text-color-light);
	border-top: 1px solid var(--background-color);
	margin-top: 1.25rem;
}

/* Accordion open state */
.faq__item.faq--open .faq__icon {
	transform: rotate(180deg);
}

/*=============== CONTACT ===============*/
.contact__container {
	display: grid;
	gap: 3rem;
	background-color: var(--surface-color);
	padding: 3rem 2rem;
	border-radius: 1rem;
}

.contact__description {
	color: var(--text-color-light);
	margin-top: var(--mb-1-5);
}

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

.form__group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form__label {
	font-weight: var(--font-medium);
	color: var(--text-color-light);
	font-size: var(--small-font-size);
}

.form__input {
	width: 100%;
	padding: 1rem;
	border: 1px solid var(--background-color);
	background-color: var(--background-color);
	color: var(--text-color);
	border-radius: 0.5rem;
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	transition: border-color 0.3s;
}

.form__input:focus {
	outline: none;
	border-color: var(--primary-color);
}

.form__group--checkbox {
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
}

.form__checkbox {
	width: 1.25rem;
	height: 1.25rem;
	accent-color: var(--primary-color);
}

.form__label--checkbox {
	font-size: var(--small-font-size);
}

.form__label--checkbox a {
	color: var(--primary-color);
	text-decoration: underline;
}
.form__label--checkbox a:hover {
	text-decoration: none;
}

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

.form__success-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 2rem;
	background-color: var(--background-color);
	border-radius: 1rem;
	border: 1px solid var(--primary-color);
	color: var(--text-color);
}
.form__success-message i {
	color: var(--primary-color);
	display: block;
	width: 48px;
	height: 48px;
	margin: 0 auto 1rem;
}

@media screen and (min-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr 1fr;
		padding: 4rem;
		gap: 5rem;
	}
}

/*=============== COOKIE POP-UP ===============*/
.cookie {
	position: fixed;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: var(--z-fixed);
	background-color: var(--surface-color);
	padding: 1.5rem 2rem;
	border-radius: 0.75rem;
	box-shadow: 0 4px 16px hsla(252, 57%, 16%, 0.4);
	width: calc(100% - 3rem);
	max-width: 600px;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.4s, visibility 0.4s, transform 0.4s;
}

.cookie--hidden {
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 150%);
}

.cookie__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	text-align: center;
}

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

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

.cookie__button {
	padding: 0.75rem 1.5rem;
}

@media screen and (min-width: 768px) {
	.cookie__container {
		flex-direction: row;
		justify-content: space-between;
	}
}

/*=============== POLICY & TEXT PAGES ===============*/
.pages {
	padding: calc(var(--header-height) + 4rem) 0 4rem;
}

.pages .container {
	max-width: 800px; /* Optimal width for reading text */
}

.pages h1 {
	font-size: var(--h2-font-size);
	margin-bottom: 2rem;
}

.pages h2 {
	font-size: var(--h3-font-size);
	margin-top: 2.5rem;
	margin-bottom: 1rem;
}

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

.pages a {
	color: var(--primary-color);
	text-decoration: underline;
	font-weight: var(--font-medium);
}

.pages a:hover {
	text-decoration: none;
}

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

.pages li {
	margin-bottom: 1rem;
	color: var(--text-color-light);
	font-size: var(--normal-font-size);
	line-height: 1.6;
}

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