@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

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

:root {
    --primary: #0ADAFF;
    --primary-glow: rgba(10, 218, 255, 0.15);
    --primary-dim: rgba(10, 218, 255, 0.6);
    --surface: #0a0a0a;
    --surface-raised: #111111;
    --surface-card: #0f0f0f;
    --surface-overlay: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-primary: #f0f0f0;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-tertiary: rgba(255, 255, 255, 0.35);
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface);
    overflow-x: hidden;
}

/* ── Grain overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px;
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in grids */
.feature-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.feature-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.hiw-steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.hiw-steps .reveal:nth-child(3) { transition-delay: 0.16s; }
.hiw-steps .reveal:nth-child(4) { transition-delay: 0.24s; }
.hiw-steps .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Shared ── */
.section-label {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-dim);
    margin-bottom: 1.25rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Navbar ── */
nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 960px;
    z-index: 100;
    padding: 0;
    animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nav-container {
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.7rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    width: fit-content;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 0.15rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border-radius: 25px;
    transition: color 0.3s, background 0.3s;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--surface-overlay);
}

.download-btn {
    background: var(--text-primary);
    color: var(--surface) !important;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    letter-spacing: 0.01em;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 24px var(--primary-glow);
    background: var(--primary) !important;
    color: var(--surface) !important;
}

.download-btn svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

/* ── Hero Section ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5% 4rem;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    background: radial-gradient(circle, rgba(10, 218, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 6s ease-in-out infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -15%;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(10, 218, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 8s ease-in-out 2s infinite;
    pointer-events: none;
}

.hero-container {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-dim);
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-label::before,
.hero-label::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--primary-dim);
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--text-primary);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero h1 em,
h2 em {
    font-style: italic;
    color: var(--primary);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.app-store-link {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-store-link:hover {
    transform: translateY(-3px) scale(1.03);
}

.app-store-badge {
    height: 56px;
    width: auto;
    display: block;
}

.hero-note {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

/* ── Stats Bar ── */
.stats {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface-raised);
    padding: 3rem 5%;
}

.stats-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1;
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    vertical-align: top;
    line-height: 1;
}

.star-icon {
    color: var(--primary);
    vertical-align: middle;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border-light);
}

/* ── Features Section ── */
.features {
    padding: 7rem 5%;
    background: var(--surface);
    text-align: center;
}

.features-container {
    max-width: 1100px;
    margin: 0 auto;
}

.features h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 3.5rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.4s;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(10, 218, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(10, 218, 255, 0.06);
}

.feature-card--highlight {
    border-color: rgba(10, 218, 255, 0.1);
    background: linear-gradient(180deg, rgba(10, 218, 255, 0.03) 0%, var(--surface-card) 50%);
}

.feature-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    color: var(--primary);
}

.feature-svg {
    width: 28px;
    height: 28px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    margin-bottom: 0.85rem;
    color: var(--text-primary);
    font-weight: 400;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    list-style: none;
}

.feature-tags li {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    transition: border-color 0.3s, color 0.3s;
}

.feature-card:hover .feature-tags li {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

/* ── How It Works ── */
.how-it-works {
    padding: 7rem 5%;
    background: var(--surface-raised);
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.hiw-container {
    max-width: 1000px;
    margin: 0 auto;
}

.how-it-works h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 4rem;
}

.hiw-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.hiw-step {
    flex: 1;
    max-width: 280px;
    text-align: center;
    padding: 0 1.25rem;
}

.hiw-step-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--primary);
    opacity: 0.25;
    line-height: 1;
    margin-bottom: 1.25rem;
}

.hiw-step h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.hiw-step p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hiw-connector {
    flex-shrink: 0;
    width: 50px;
    margin-top: 2.2rem;
    color: var(--text-tertiary);
    opacity: 0.4;
}

.hiw-connector svg {
    width: 100%;
    height: auto;
}

/* ── Final CTA ── */
.final-cta {
    padding: 8rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(10, 218, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.final-cta-container {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
}

.final-cta h2 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.final-cta p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* ── Footer ── */
footer {
    background: var(--surface-raised);
    color: var(--text-primary);
    padding: 4rem 5% 2rem;
    border-top: 1px solid var(--border);
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.footer-brand p {
    color: var(--text-tertiary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.92rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

/* ── Content Pages (Privacy, Terms) ── */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 7rem 5% 4rem;
}

.content h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.last-updated {
    color: var(--text-tertiary);
    margin-bottom: 3rem;
    font-size: 0.9rem;
}

.content h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.content h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.content a:hover {
    border-bottom-color: var(--primary);
}

.content ul {
    margin-bottom: 1.5rem;
    margin-left: 2rem;
    color: var(--text-secondary);
}

.content li {
    margin-bottom: 0.5rem;
}

.content ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ── Back link ── */
.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 25px;
    transition: background 0.3s, color 0.3s;
}

.back-link:hover {
    background: var(--surface-overlay);
    color: var(--text-primary);
}

/* ── Mobile Menu ── */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    margin-left: auto;
    padding: 0.25rem;
    line-height: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .hiw-steps {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hiw-connector {
        transform: rotate(90deg);
        margin: 0;
        width: 40px;
    }

    .hiw-step {
        max-width: 360px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .stats-container {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 0 0 40%;
    }
}

@media (max-width: 768px) {
    nav {
        top: 1rem;
        width: calc(100% - 2rem);
    }

    .nav-container {
        padding: 0.6rem 1rem;
        width: 100%;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.92);
        backdrop-filter: blur(24px) saturate(1.4);
        -webkit-backdrop-filter: blur(24px) saturate(1.4);
        flex-direction: column;
        padding: 1rem;
        border-radius: 20px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
        border: 1px solid var(--border);
        gap: 0.25rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
        justify-content: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .download-btn svg {
        width: 12px;
        height: 12px;
    }

    .hero {
        min-height: auto;
        padding: 9rem 5% 5rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .app-store-badge {
        height: 50px;
    }

    .features,
    .how-it-works,
    .final-cta {
        padding: 5rem 5%;
    }
}

@media (max-width: 480px) {
    nav {
        top: 0.75rem;
        width: calc(100% - 1.5rem);
    }

    .nav-container {
        padding: 0.5rem 1rem;
        width: 100%;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero {
        padding: 8rem 5% 4rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .app-store-badge {
        height: 45px;
    }

    .hero-label {
        font-size: 0.7rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .stat-suffix {
        font-size: 1.6rem;
    }

    .stat-item {
        flex: 0 0 45%;
    }

    .features,
    .how-it-works,
    .final-cta {
        padding: 4rem 5%;
    }
}
