/* =========================================
   AIRCODE DESIGN SYSTEM
   Tokens, components, and layout
   ========================================= */

:root {
    /* ---- COLOR PALETTE ---- */
    --color-black: #000000;
    --color-green: #c2ea66;
    --color-white: #eae9e5;
    --color-orange: #ff6f3c;
    --color-surface: #FFFFFF;
    --color-text-primary: #121212;
    --color-text-muted: #5A5A5A;
    --color-footer-bg: #1e1e1e;
    --color-footer-text: #A8A8A8;

    /* ---- TYPOGRAPHY ---- */
    --font-ui: 'Inter', system-ui, sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.85rem;
    --text-base: 1rem;
    --text-md: 1.1rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --text-hero: clamp(4rem, 10vw, 10rem);

    /* ---- SPACING (8px base) ---- */
    --space-1: 0.25rem;
    /*  4px */
    --space-2: 0.5rem;
    /*  8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.5rem;
    /* 24px */
    --space-6: 2rem;
    /* 32px */
    --space-7: 3rem;
    /* 48px */
    --space-8: 4rem;
    /* 64px */
    --space-9: 6rem;
    /* 96px */

    /* ---- BORDER RADIUS ---- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --radius-pill: 50px;
    --radius-full: 50%;

    /* ---- SHADOWS ---- */
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 16px 48px rgba(0, 0, 0, 0.15);

    /* ---- ANIMATION ---- */
    --ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 700ms;
}

/* =========================================
   RESET & BASE
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-ui);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================================
   APP CONTAINER
   ========================================= */
.app-container {
    background-color: var(--color-surface);
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   NAVIGATION BAR
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) var(--space-8);
    background-color: var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    margin-left: 0;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    will-change: width, top, margin-left, padding, border-radius;
    /* All geometry at identical timing so forward = perfect reverse */
    transition:
        width 420ms cubic-bezier(0.4, 0, 0.2, 1),
        margin-left 420ms cubic-bezier(0.4, 0, 0.2, 1),
        top 420ms cubic-bezier(0.4, 0, 0.2, 1),
        border-radius 420ms cubic-bezier(0.4, 0, 0.2, 1),
        padding 420ms cubic-bezier(0.4, 0, 0.2, 1),
        background-color 300ms ease,
        box-shadow 300ms ease,
        border-color 300ms ease,
        backdrop-filter 300ms ease;
}

.navbar.scrolled {
    top: 20px;
    width: 70%;
    /* Explicit value — margin:0 auto can't be interpolated by CSS */
    margin-left: 15%;
    padding: var(--space-4) var(--space-7);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: var(--text-xl);
    letter-spacing: -0.02em;
    color: #2c2c2c;
    line-height: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-6);
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: var(--text-base);
    transition: color var(--duration-fast) ease,
        transform var(--duration-fast) var(--ease-bounce);
    display: inline-block;
}

.nav-links a:hover {
    color: var(--color-text-muted);
    transform: translateY(-3px);
}

/* =========================================
   MAIN BODY
   ========================================= */
.main-body {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    margin: 0 var(--space-5) var(--space-5) var(--space-5);
    overflow: hidden;
    transition:
        margin 420ms cubic-bezier(0.4, 0, 0.2, 1),
        border-radius 420ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.main-body.scrolled {
    margin: 0;
    border-radius: 0;
}

/* =========================================
   HERO SECTION
   ========================================= */
.aircode-new-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    position: relative;
    /* Fill exactly the viewport so features are below the fold */
    min-height: calc(100svh - 80px);
    overflow: hidden;
    transition: min-height 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Background ambient orbs */
.hero-orb {
    position: absolute;
    border-radius: var(--radius-full);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.hero-orb--green {
    width: 380px;
    height: 380px;
    background: rgba(194, 234, 102, 0.22);
    top: 5%;
    left: -4%;
}

.hero-orb--orange {
    width: 300px;
    height: 300px;
    background: rgba(255, 111, 60, 0.15);
    bottom: 10%;
    right: 0%;
}

/* =========================================
   HERO DOODLES
   ========================================= */
.hero-doodles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.doodle {
    position: absolute;
    opacity: 0.55;
}

.text-green {
    color: var(--color-green);
}

.text-orange {
    color: var(--color-orange);
}

.d1 {
    font-size: 80px;
    top: 10%;
    left: 8%;
    animation: float-doodle 7s infinite ease-in-out;
}

.d2 {
    font-size: 60px;
    top: 25%;
    right: 12%;
    animation: float-doodle-reverse 6s infinite ease-in-out;
}

.d3 {
    font-size: 90px;
    bottom: 25%;
    left: 20%;
    animation: float-doodle 8s infinite ease-in-out;
}

.d4 {
    font-size: 50px;
    bottom: 20%;
    right: 28%;
    animation: float-doodle-reverse 5s infinite ease-in-out;
}

.d5 {
    font-size: 70px;
    top: 15%;
    right: 35%;
    animation: float-doodle 9s infinite ease-in-out;
}

.d6 {
    font-size: 60px;
    bottom: 15%;
    left: 35%;
    animation: float-doodle-reverse 7s infinite ease-in-out;
}

.d7 {
    font-size: 65px;
    top: 50%;
    right: 10%;
    animation: float-doodle 6.5s infinite ease-in-out;
}

@keyframes float-doodle {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    33% {
        transform: translateY(-20px) rotate(15deg) scale(1.05);
    }

    66% {
        transform: translateY(20px) rotate(-10deg) scale(0.95);
    }
}

@keyframes float-doodle-reverse {

    0%,
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }

    33% {
        transform: translateY(20px) rotate(-20deg) scale(1.05);
    }

    66% {
        transform: translateY(-20px) rotate(20deg) scale(0.95);
    }
}

/* =========================================
   HERO TOP CONTENT
   ========================================= */
.hero-top-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2;
    /* No uniform gap — individual golden-ratio margins below */
    gap: 0;
}

/* ---- STATUS BADGE ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background-color: var(--color-green);
    color: var(--color-black);
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-subtle);
    user-select: none;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    background-color: var(--color-black);
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.75);
    }
}

/* ---- HEADLINE ---- */
.huge-title {
    font-family: var(--font-ui);
    font-size: var(--text-hero);
    font-weight: 800;
    color: #2c2c2c;
    line-height: 1;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    /* φ: badge → title = 13px */
    margin: 13px 0 0 0;
}

/* ---- TAGLINE ---- */
.tagline {
    font-family: var(--font-ui);
    font-size: var(--text-xl);
    color: var(--color-text-muted);
    font-weight: 500;
    /* φ: title → tagline = 21px */
    margin: 21px 0 0 0;
}

.highlight-smarter {
    color: var(--color-black);
    font-weight: 700;
    background-color: var(--color-green);
    padding: 0 var(--space-2);
    border-radius: 4px;
}

/* =========================================
   HERO CTA BUTTON
   ========================================= */
.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* φ: tagline → button = 34px */
    margin-top: 34px;
}

.btn-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background-color: var(--color-green);
    color: var(--color-black);
    text-decoration: none;
    padding: var(--space-4) var(--space-7);
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: var(--text-lg);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(194, 234, 102, 0.4);
    transition: background-color var(--duration-fast) ease,
        transform var(--duration-fast) var(--ease-bounce),
        box-shadow var(--duration-fast) ease;
}

.btn-hero-cta:hover {
    background-color: #b5e053;
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(194, 234, 102, 0.55);
}

.btn-hero-cta i {
    font-size: var(--text-base);
    transition: transform var(--duration-fast) var(--ease-bounce);
}

.btn-hero-cta:hover i {
    transform: translate(2px, -2px);
}

/* =========================================
   EMAIL CAPTURE (legacy)
   ========================================= */
.email-capture {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    max-width: 480px;
}

.email-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: var(--color-surface);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-medium);
    padding: var(--space-2);
    gap: var(--space-2);
    border: 1.5px solid rgba(0, 0, 0, 0.07);
    transition: box-shadow var(--duration-normal) var(--ease-smooth),
        border-color var(--duration-normal) ease;
}

.email-form:focus-within {
    box-shadow: var(--shadow-strong);
    border-color: var(--color-green);
}

.email-input-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    padding: var(--space-2) var(--space-4);
}

.input-icon {
    color: var(--color-text-muted);
    font-size: var(--text-base);
    flex-shrink: 0;
}

.email-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: 400;
    color: var(--color-text-primary);
    min-width: 0;
}

.email-input::placeholder {
    color: #b0b0b0;
    font-family: 'Courier New', monospace;
    font-size: var(--text-sm);
}

.btn-notify {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background-color: var(--color-green);
    color: var(--color-black);
    border: none;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-bounce),
        box-shadow var(--duration-fast) var(--ease-smooth),
        background-color var(--duration-fast) ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-notify:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 234, 102, 0.5);
    background-color: #b5e053;
}

.btn-notify:active {
    transform: translateY(0);
}

.btn-notify--loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Form success state */
.form-success {
    display: none;
    align-items: center;
    gap: var(--space-3);
    background-color: var(--color-green);
    color: var(--color-black);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: var(--text-base);
    box-shadow: var(--shadow-medium);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--duration-normal) var(--ease-smooth),
        transform var(--duration-normal) var(--ease-smooth);
}

.form-success i {
    font-size: var(--text-xl);
}

.form-success--visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Reassurance copy below input */
.form-reassurance {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-weight: 400;
    text-align: center;
}

/* =========================================
   HERO BOTTOM — "KNOW MORE"
   ========================================= */
.hero-bottom-content {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: var(--space-6);
    z-index: 2;
}

.btn-know-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-family: var(--font-ui);
    font-size: var(--text-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: opacity var(--duration-fast) ease;
}

.btn-know-more i {
    font-size: var(--text-xl);
    animation: bounce 2s infinite;
}

.btn-know-more:hover {
    opacity: 0.6;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background-color: var(--color-footer-bg);
    width: 100%;
    padding: var(--space-5) var(--space-8);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-footer .footer-content p {
    font-size: var(--text-sm);
    color: var(--color-footer-text);
    font-weight: 500;
}


/* =========================================
   FEATURES SECTION — Light, inside main-body
   ========================================= */
.features-section {
    background-color: transparent;
    /* inherits main-body sandy #eae9e5 */
    padding: var(--space-8) var(--space-8) var(--space-9) var(--space-8);
    position: relative;
}

.features-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-8);
    align-items: center;
}

/* ---- Section header ---- */
.features-header {
    margin-bottom: var(--space-6);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background-color: var(--color-green);
    color: var(--color-black);
    font-weight: 700;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-4);
}

.section-title {
    font-family: var(--font-ui);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #2c2c2c;
    line-height: 1.18;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-3);
}

.section-sub {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    line-height: 1.75;
    max-width: 46ch;
}

/* ---- Feature list ---- */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1.5px solid transparent;
    transition: background-color var(--duration-normal) var(--ease-smooth),
        border-color var(--duration-normal) var(--ease-smooth),
        transform var(--duration-fast) var(--ease-bounce),
        box-shadow var(--duration-fast) ease;
    cursor: default;
}

.feature-item:hover {
    background-color: rgba(255, 255, 255, 0.75);
    border-color: rgba(194, 234, 102, 0.5);
    transform: translateX(4px);
    box-shadow: var(--shadow-subtle);
}

.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background-color: var(--color-green);
    color: var(--color-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    flex-shrink: 0;
    transition: background-color var(--duration-fast) ease;
}

.feature-item:hover .feature-icon {
    background-color: var(--color-orange);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-label {
    font-size: var(--text-base);
    font-weight: 700;
    color: #2c2c2c;
    line-height: 1.3;
}

.feature-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ---- CTA button ---- */
.btn-open-aircode {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    background-color: #2c2c2c;
    color: #ffffff;
    text-decoration: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: 700;
    transition: background-color var(--duration-fast) ease,
        transform var(--duration-fast) var(--ease-bounce),
        box-shadow var(--duration-fast) ease;
}

.btn-open-aircode:hover {
    background-color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44, 44, 44, 0.22);
}

.btn-open-aircode i {
    font-size: var(--text-sm);
    transition: transform var(--duration-fast) var(--ease-bounce);
}

.btn-open-aircode:hover i {
    transform: translate(2px, -2px);
}

/* ---- IDE image panel ---- */
.features-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ide-image-wrap {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.ide-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18),
        0 4px 16px rgba(0, 0, 0, 0.1);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media screen and (max-width: 768px) {
    .navbar {
        padding: var(--space-4) var(--space-5);
    }

    .navbar.scrolled {
        width: 90%;
        top: 12px;
    }

    .nav-links {
        gap: var(--space-4);
    }

    .nav-links a {
        font-size: var(--text-sm);
    }

    .main-body {
        margin: 0 var(--space-3) var(--space-3) var(--space-3);
    }

    .aircode-new-hero {
        padding: var(--space-5) var(--space-4);
    }

    .email-form {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }

    .email-input-wrap {
        padding: var(--space-3) var(--space-4);
    }

    .btn-notify {
        justify-content: center;
        padding: var(--space-4) var(--space-5);
        border-radius: var(--radius-lg);
    }

    .hero-orb--green {
        width: 220px;
        height: 220px;
    }

    .hero-orb--orange {
        width: 180px;
        height: 180px;
    }

    /* Hide some doodles on small screens to reduce clutter */
    .d3,
    .d5,
    .d6 {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    /* Features section: stack to single column */
    .features-section {
        padding: var(--space-7) var(--space-5);
    }

    .features-inner {
        grid-template-columns: 1fr;
        gap: var(--space-7);
    }

    .features-right {
        order: -1;
    }

    .section-title {
        font-size: var(--text-xl);
    }
}

@media screen and (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .huge-title {
        letter-spacing: -0.04em;
    }

    .email-capture {
        max-width: 100%;
        padding: 0 var(--space-2);
    }
}