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

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

    /* Colors */
    --bg-color: #0B0E1B;
    --text-color: #F0F2F5;
    --text-color-muted: #A1A1AA;
    --primary-color: #4F46E5;
    --primary-color-hover: #4338CA;
    --surface-color: #1A1D2B;
    --border-color: #2D303E;

    /* Fonts */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Plus Jakarta Sans', sans-serif;

    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Other */
    --border-radius: 0.5rem;
    --container-width: 1120px;
    --transition-duration: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

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

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

a:hover {
    color: var(--primary-color-hover);
}

ul {
    list-style: none;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-color);
}

/* ==================== REUSABLE CLASSES ==================== */
.container {
    max-width: var(--container-width);
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

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

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

.header__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav__link {
    color: var(--text-color-muted);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav__link:hover, .nav__link.active-link {
    color: var(--text-color);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-duration);
}

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

.header__menu-button {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

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

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

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: inline-block;
    margin-bottom: 1rem;
}

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

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.footer__link {
    color: var(--text-color-muted);
    font-size: var(--small-font-size);
    transition: color var(--transition-duration);
}

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

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

.footer__icon {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

.footer__bottom {
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 1.5rem 0;
}

.footer__bottom p {
    color: var(--text-color-muted);
    font-size: var(--small-font-size);
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (max-width: 1140px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 768px) {
    .header__menu-button {
        display: block;
    }

    .header__nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 60%;
        height: 100vh;
        background-color: var(--surface-color);
        padding: 2rem;
        transition: right var(--transition-duration);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .header__nav.nav--open {
        right: 0;
    }
    
    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
}

/* ==================== REUSABLE CLASSES (ADDITIONS) ==================== */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 0.9rem 1.75rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: background-color var(--transition-duration);
}

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

.button__icon {
    width: 20px;
    height: 20px;
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-height); /* Offset for fixed header */
}

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

.hero__container {
    max-width: 700px;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--text-color-muted);
    margin-bottom: 2.5rem;
}

/* ==================== MEDIA QUERIES (ADDITIONS) ==================== */
@media screen and (max-width: 768px) {
    :root {
        --h1-font-size: 2rem;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }

    .hero__description {
        font-size: 1rem;
    }
}



/* ==================== REUSABLE CLASSES (ADDITIONS) ==================== */
.section {
    padding: 6rem 0 2rem;
    overflow: hidden; /* Prevents AOS horizontal scroll issue */
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

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

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

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

.cases__card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform var(--transition-duration), box-shadow var(--transition-duration);
}

.cases__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cases__card-image-wrapper {
    width: 100%;
    height: 200px;
    background-color: var(--surface-color);
}

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

.cases__card-content {
    padding: 1.5rem;
}

.cases__card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.cases__card-description {
    font-size: var(--small-font-size);
    color: var(--text-color-muted);
    line-height: 1.5;
}

/* ==================== MEDIA QUERIES (ADDITIONS) ==================== */
@media screen and (max-width: 768px) {
    .section {
        padding: 4rem 0 1rem;
    }
    .section__header {
        margin-bottom: 3rem;
    }
}



/* ==================== TOOLS ==================== */
.tools__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.tools__item {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform var(--transition-duration), border-color var(--transition-duration);
    color: var(--text-color); /* To ensure text inside link is correct color */
}

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

.tools__item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background-color: var(--bg-color);
    border-radius: 50%;
    color: var(--primary-color);
}

.tools__item-icon i {
    width: 24px;
    height: 24px;
}

.tools__item-content {
    flex-grow: 1;
}

.tools__item-title {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.tools__item-description {
    font-size: var(--small-font-size);
    color: var(--text-color-muted);
    line-height: 1.5;
}

.tools__item-tag {
    background-color: var(--primary-color-hover);
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    white-space: nowrap;
}

/* ==================== MEDIA QUERIES (ADDITIONS) ==================== */
@media screen and (max-width: 768px) {
    .tools__list {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .tools__item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .tools__item-tag {
        align-self: flex-start;
        margin-top: 0.5rem;
    }
}



/* ==================== HOW IT WORKS ==================== */
.how-it-works {
    background-color: var(--surface-color);
}

.how-it-works__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.how-it-works__step {
    background: var(--bg-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.how-it-works__step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.how-it-works__step-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background-color: var(--surface-color);
    color: var(--primary-color);
}

.how-it-works__step-icon i {
    width: 24px;
    height: 24px;
}

.how-it-works__step-title {
    font-size: 1.25rem;
}

.how-it-works__step-content p {
    color: var(--text-color-muted);
    line-height: 1.6;
}

/* Adding connecting arrows for larger screens */
@media screen and (min-width: 992px) {
    .how-it-works__step {
        position: relative;
    }

    .how-it-works__step:not(:last-child)::after {
        content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-arrow-right'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
        position: absolute;
        top: 50%;
        right: -2.2rem;
        transform: translateY(-50%);
        opacity: 0.5;
    }
}
@media screen and (max-width: 991px) and (min-width: 641px) {
    /* Arrow for the first item in a 2-column layout */
    .how-it-works__step:first-child::after {
        content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-arrow-right'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
        position: absolute;
        top: 50%;
        right: -2.2rem;
        transform: translateY(-50%);
        opacity: 0.5;
    }
}

/* ==================== FAQ ==================== */
.faq__accordion {
    max-width: 750px;
    margin: 0 auto;
}

.faq__item {
    border-bottom: 1px solid var(--border-color);
}

.faq__item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    cursor: pointer;
    gap: 1rem;
}

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

.faq__item-icon {
    flex-shrink: 0;
    transition: transform var(--transition-duration);
    color: var(--primary-color);
}

.faq__item-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding-bottom 0.4s ease-out;
}

.faq__item-content p {
    color: var(--text-color-muted);
    line-height: 1.7;
}

/* Active state for accordion item */
.faq__item.is-active .faq__item-icon {
    transform: rotate(180deg);
}

.faq__item.is-active .faq__item-content {
    max-height: 200px; /* Adjust if content is longer */
    padding-bottom: 1.5rem;
}


/* ==================== CONTACT ==================== */
.contact {
    background-color: var(--surface-color);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.contact__info-title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

.contact__info-description {
    color: var(--text-color-muted);
    margin-bottom: 2rem;
}

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

.contact__info-list a, .contact__info-list span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color-muted);
}
.contact__info-list a:hover {
    color: var(--primary-color);
}

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

.form__group {
    display: flex;
    flex-direction: column;
}

.form__label {
    margin-bottom: 0.5rem;
    font-size: var(--small-font-size);
    color: var(--text-color-muted);
}

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

.form__input:focus {
    outline: none;
    border-color: var(--primary-color);
}
/* Removes number input arrows */
.form__input[type=number]::-webkit-inner-spin-button, 
.form__input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
.form__input[type=number] {
  -moz-appearance: textfield;
}


.form__group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}
.form__group--checkbox label {
    margin: 0;
    font-size: var(--small-font-size);
}
.form__group--checkbox input {
    width: auto;
}

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

.form__success-message {
    display: none; /* Hidden by default */
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #22C55E;
    background-color: rgba(34, 197, 94, 0.1);
    color: #A3E6B8;
    border-radius: var(--border-radius);
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}
.form__success-message.is-visible {
    display: flex; /* Shown with JS */
}

/* ==================== MEDIA QUERIES (ADDITIONS) ==================== */
@media screen and (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
    }
}



/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    z-index: 110;
    transform: translateY(0);
    transition: transform var(--transition-duration) ease-in-out;
}

.cookie-popup.is-hidden {
    transform: translateY(100%);
}

.cookie-popup__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

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

.cookie-popup__button {
    flex-shrink: 0;
}

/* ==================== POLICY PAGES STYLES ==================== */
.pages {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

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

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

.pages ul {
    color: var(--text-color-muted);
    line-height: 1.8;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.pages li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

.pages li::before {
    content: '•';
    position: absolute;
    left: -0.5rem;
    top: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    line-height: 1;
}

.pages a {
    text-decoration: underline;
}

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

/* Fixes for mobile layout of cookie popup and pages */
@media screen and (max-width: 768px) {
    .cookie-popup__container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}