/* ============================================
   LearnFI — Foundations
   Theme variables, reset, layout, components
   ============================================ */

:root {
    /* Colors */
    --color-bg: #0b1220;
    --color-bg-alt: #111a2e;
    --color-surface: #18243d;
    --color-text: #e6ecf5;
    --color-text-muted: #9aa7bd;
    --color-primary: #4f8cff;
    --color-primary-hover: #6ba0ff;
    --color-accent: #5eead4;
    --color-border: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.65;
    --letter-spacing-tight: -0.02em;
    --letter-spacing-tighter: -0.03em;

    /* Layout */
    --container-max: 1140px;
    --container-narrow: 720px;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-xxl: 6rem;

    /* Misc */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.25);
    --transition: 200ms ease;
}

/* ----- Word reveal spans for hero title ----- */
.word-inner {
    display: inline-block;
    will-change: transform, opacity;
}

/* ----- GSAP initial states (only when JS is available) ----- */
.has-js .hero-phone-glow,
.has-js .orb,
.has-js .scroll-indicator,
.has-js .hero-eyebrow,
.has-js .hero-stats,
.has-js .hero-title .word-inner,
.has-js .hero-subtitle,
.has-js .hero-actions,
.has-js .hero-note,
.has-js .hero-visual .phone-frame,
.has-js .phone-showcase .phone-frame,
.has-js .card,
.has-js .steps li,
.has-js .pricing-card,
.has-js .section-title,
.has-js .section-lede,
.has-js .cta-eyebrow,
.has-js .cta-heading,
.has-js .cta-sub,
.has-js .store-badges,
.has-js .legal-content {
    opacity: 0;
}

/* ----- Reset ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 100px;
}

::selection {
    background: rgba(79, 140, 255, 0.35);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #05070f;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1a2340, #0f1628);
    border-radius: 10px;
    border: 2px solid #05070f;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2a3450, #1a2340);
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background: linear-gradient(125deg, #05070f 0%, #0a0f28 30%, #07101f 55%, #0c081c 80%, #05070f 100%);
    background-size: 220% 220%;
    background-attachment: fixed;
    animation: bg-shift 28s ease-in-out infinite;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dot grid texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Vignette for premium darkening at edges */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

/* Ensure content sits above the overlays */
.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

@keyframes bg-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    body {
        animation: none;
    }
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

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

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    line-height: 1.1;
    letter-spacing: var(--letter-spacing-tight);
    margin: 0 0 var(--space-sm);
    font-weight: 800;
}

h1 {
    letter-spacing: var(--letter-spacing-tighter);
    font-weight: 900;
}

/* Custom selection */
::selection {
    background: rgba(94, 234, 212, 0.25);
    color: #fff;
}

/* Page entrance fade */
.has-js body {
    animation: page-fade-in 0.6s ease both;
}

@keyframes page-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

p {
    margin: 0 0 var(--space-sm);
    color: var(--color-text-muted);
}

/* ----- Layout ----- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container.narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-xxl) 0;
}

.section-alt {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    margin-bottom: var(--space-sm);
    letter-spacing: var(--letter-spacing-tighter);
    font-weight: 800;
    display: inline-block;
    position: relative;
    padding-bottom: 0.6rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title.is-visible::after {
    width: 100%;
}

.section-lede {
    font-size: 1.15rem;
    margin-bottom: var(--space-xl);
    color: var(--color-text-muted);
    max-width: 620px;
}

/* ----- Header / Nav ----- */
.site-header {
    position: sticky;
    top: var(--space-md);
    z-index: 100;
    background: transparent;
    padding: var(--space-md) var(--space-md) 0;
    margin-bottom: var(--space-md);
    transition: transform 0.35s ease;
    will-change: transform;
}

.site-header.is-hidden {
    transform: translateY(calc(-100% - 40px));
}

.nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.45rem 0.55rem 0.45rem 0.95rem;
    gap: var(--space-lg);
    background: rgba(10, 12, 22, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: var(--letter-spacing-tight);
    transition: opacity 0.3s ease;
}

.brand:hover {
    color: var(--color-text);
    opacity: 0.85;
}

.brand-name {
    background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-menu > li > a:not(.btn) {
    position: relative;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.nav-menu > li > a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.nav-menu > li > a:not(.btn):hover {
    color: var(--color-text);
}

.nav-menu > li > a:not(.btn):hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ----- Buttons ----- */
.btn {
    position: relative;
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3),
                box-shadow 0.3s ease,
                background 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease;
    overflow: hidden;
    isolation: isolate;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 30%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 70%
    );
    transition: left 0.7s ease;
    pointer-events: none;
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-arrow {
    display: inline-block;
    margin-left: 0.35rem;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4);
    position: relative;
    z-index: 2;
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #6ba0ff);
    color: #fff;
    box-shadow:
        0 4px 18px rgba(79, 140, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow:
        0 10px 30px rgba(79, 140, 255, 0.5),
        0 0 40px rgba(94, 234, 212, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(94, 234, 212, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ----- Hero ----- */
.hero {
    padding: clamp(4rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 6rem);
    position: relative;
    overflow: hidden;
    min-height: min(90vh, 900px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

[data-parallax] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ----- Hero floating orbs ----- */
.hero-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    will-change: transform;
}

.orb-1 {
    width: 320px;
    height: 320px;
    background: rgba(79, 140, 255, 0.4);
    top: 10%;
    left: -5%;
    animation: orb-drift-1 22s ease-in-out infinite alternate;
}

.orb-2 {
    width: 260px;
    height: 260px;
    background: rgba(94, 234, 212, 0.3);
    top: 60%;
    right: 5%;
    animation: orb-drift-2 18s ease-in-out infinite alternate;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(168, 85, 247, 0.3);
    top: 20%;
    right: 25%;
    animation: orb-drift-3 25s ease-in-out infinite alternate;
}

@keyframes orb-drift-1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes orb-drift-2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -30px) scale(0.9); }
}
@keyframes orb-drift-3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -50px) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
    .orb { animation: none; }
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.hero-eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 12px var(--color-accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.25);
    }
}

.hero-title {
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    margin-bottom: var(--space-md);
    line-height: 1.05;
    letter-spacing: var(--letter-spacing-tighter);
    font-weight: 900;
}

.hero-title .gradient-text .word-inner,
.hero-title .gradient-text:not(:has(.word-inner)) {
    background: linear-gradient(120deg, #6ba0ff 0%, #5eead4 50%, #a78bfa 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradient-text-shift 6s ease-in-out infinite;
}

@keyframes gradient-text-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: var(--space-lg);
    max-width: 560px;
    color: rgba(230, 236, 245, 0.75);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.hero-note {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-lg);
}

/* ----- Hero stats strip ----- */
.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: var(--space-md);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: var(--letter-spacing-tight);
    font-feature-settings: 'tnum';
    line-height: 1;
}

.stat-decimal {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

.stat-star {
    font-size: 1.1rem;
    margin-left: 0.2rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Rotating conic glow behind the phone */
.hero-phone-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 620px;
    border-radius: 60px;
    background: conic-gradient(
        from 0deg,
        rgba(79, 140, 255, 0.45),
        rgba(94, 234, 212, 0.35),
        rgba(168, 85, 247, 0.35),
        rgba(79, 140, 255, 0.45)
    );
    filter: blur(50px);
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
    animation: glow-spin 10s linear infinite;
    transform-origin: center center;
    transform: translate(-50%, -50%);
}

@keyframes glow-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-visual .phone-frame {
    position: relative;
    z-index: 2;
    animation: phone-float 6s ease-in-out infinite;
}

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

/* Scroll down indicator */
.scroll-indicator {
    display: flex;
    justify-content: center;
    padding-top: var(--space-lg);
    position: relative;
    z-index: 1;
}

.scroll-line {
    width: 1px;
    height: 48px;
    position: relative;
    overflow: hidden;
}

.scroll-line::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--color-accent), transparent);
    animation: scroll-line-move 2s ease-in-out infinite;
}

@keyframes scroll-line-move {
    0%   { top: -100%; }
    100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual .phone-frame,
    .hero-phone-glow { animation: none; }
    .hero-phone-glow { transform: translate(-50%, -50%); }
    .scroll-line::before { animation: none; top: 0; }
    .orb { animation: none; }
}

/* ----- iPhone frame component ----- */
.phone-frame {
    width: 280px;
    aspect-ratio: 9 / 19.5;
    border-radius: 48px;
    padding: 8px;
    background: linear-gradient(145deg, #2a2d38 0%, #0a0c12 50%, #2a2d38 100%);
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.6),
        0 15px 30px -10px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
    position: relative;
    margin: 0;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 40px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dynamic-island {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 95px;
    height: 28px;
    background: #000;
    border-radius: 20px;
    z-index: 2;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ----- Interactive hotspots on phone screens ----- */
.phone-hotspot {
    position: absolute;
    background: transparent;
    border-radius: 16px;
    cursor: pointer;
    z-index: 3;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    animation: hotspot-pulse 2.4s ease-in-out infinite;
}

@keyframes hotspot-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(94, 234, 212, 0);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.15);
    }
}

.phone-hotspot:hover {
    animation: none;
}

.phone-hotspot:hover {
    background: rgba(94, 234, 212, 0.18);
    box-shadow:
        0 0 30px 4px rgba(94, 234, 212, 0.55),
        0 0 60px 10px rgba(79, 140, 255, 0.25),
        inset 0 0 24px rgba(94, 234, 212, 0.35);
}

/* "Resume Learning" button on the hero screenshot.
   Tune the % values to align with where the button sits in your screenshot. */
.phone-hotspot-resume {
    top: 38.7%;
    left: 11%;
    right: 11%;
    height: 3.8%;
}

.phone-frame figcaption {
    position: absolute;
    bottom: -2.5rem;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease 0.1s, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s;
    pointer-events: none;
    white-space: nowrap;
}

.phone-frame:hover figcaption {
    opacity: 1;
    transform: translateY(0);
    color: var(--color-text);
}

/* ----- Phone showcase (3 phones in a fan) ----- */
.phone-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-top: var(--space-lg);
    padding-bottom: var(--space-xl);
    perspective: 1500px;
}

.phone-showcase .phone-frame {
    width: 240px;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.65s ease,
                box-shadow 0.65s ease;
}

.phone-frame-side {
    margin: 0 -30px;
    z-index: 1;
}

.phone-showcase > .phone-frame:nth-child(1) {
    transform: rotate(-8deg) translateY(20px);
}

.phone-showcase > .phone-frame:nth-child(3) {
    transform: rotate(8deg) translateY(20px);
}

.phone-frame-center {
    z-index: 3;
    transform: scale(1.05);
}

/* Dim non-hovered phones when any phone is hovered */
.phone-showcase:hover .phone-frame {
    filter: brightness(0.55) saturate(0.6);
}

/* The hovered phone glows and lifts */
.phone-showcase .phone-frame:hover {
    filter: brightness(1.08) saturate(1.1);
    z-index: 5;
    box-shadow:
        0 50px 100px -25px rgba(0, 0, 0, 0.7),
        0 0 60px -5px rgba(79, 140, 255, 0.12);
}

.phone-showcase > .phone-frame:nth-child(1):hover {
    transform: rotate(-4deg) translateY(-6px) scale(1.06);
}

.phone-showcase .phone-frame-center:hover {
    transform: scale(1.1) translateY(-6px);
}

.phone-showcase > .phone-frame:nth-child(3):hover {
    transform: rotate(4deg) translateY(-6px) scale(1.06);
}

/* ----- Cards ----- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
}

.card {
    position: relative;
    background: rgba(24, 36, 61, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2),
                border-color 0.3s ease,
                background 0.3s ease,
                box-shadow 0.4s ease;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 1px;
    background: linear-gradient(135deg, rgba(79, 140, 255, 0), rgba(94, 234, 212, 0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(28, 42, 70, 0.55);
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.5),
        0 0 40px -5px rgba(79, 140, 255, 0.2);
}

.card:hover::before {
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.6), rgba(94, 234, 212, 0.6));
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 1.7rem;
    margin-bottom: var(--space-md);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.18), rgba(94, 234, 212, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5),
                background 0.4s ease,
                box-shadow 0.4s ease;
}

.card:hover .card-icon {
    transform: scale(1.08) rotate(-4deg);
    background: linear-gradient(135deg, rgba(79, 140, 255, 0.3), rgba(94, 234, 212, 0.22));
    box-shadow: 0 12px 30px rgba(79, 140, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-tight);
}

.card p {
    line-height: 1.6;
}

.card h3 {
    font-size: 1.25rem;
}

/* ----- Steps ----- */
.steps {
    display: grid;
    gap: var(--space-lg);
    max-width: var(--container-narrow);
    position: relative;
}

/* Connecting line between step numbers */
.steps::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 44px;
    bottom: 44px;
    width: 2px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent), var(--color-primary));
    opacity: 0.25;
    border-radius: 2px;
}

.steps li {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    position: relative;
}

.step-num {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #6ba0ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(79, 140, 255, 0.4);
    transition: transform 0.3s ease;
}

.step-num::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(79, 140, 255, 0.4);
    animation: step-ring 3s ease-in-out infinite;
}

@keyframes step-ring {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

.steps li:hover .step-num {
    transform: scale(1.08) rotate(-4deg);
}

.steps h3 {
    font-size: 1.1rem;
}

/* ----- Pricing ----- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: rgba(24, 36, 61, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.2),
                box-shadow 0.4s ease,
                border-color 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-6px);
    border-color: rgba(94, 234, 212, 0.3);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

.pricing-card-featured:hover {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 1px var(--color-primary),
        0 20px 60px -10px rgba(79, 140, 255, 0.4);
}

.pricing-card-featured {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 1px var(--color-primary),
        0 0 40px -10px rgba(79, 140, 255, 0.3),
        var(--shadow-md);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--color-primary), #5eead4);
    color: #0b1220;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(94, 234, 212, 0.4);
    animation: badge-pulse 2.8s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(94, 234, 212, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(94, 234, 212, 0.7), 0 0 40px rgba(79, 140, 255, 0.3);
    }
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.price {
    margin: 0 0 var(--space-xs);
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text);
}

.price-period {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.price-alt {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.pricing-features {
    margin: var(--space-md) 0;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.4rem 0;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓  ";
    color: var(--color-accent);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(94, 234, 212, 0.5);
}

.pricing-features li.feature-locked {
    color: rgba(154, 167, 189, 0.5);
    text-decoration: line-through;
    text-decoration-color: rgba(154, 167, 189, 0.3);
}

.pricing-features li.feature-locked::before {
    content: "✕  ";
    color: #f87171;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
}

.btn-block {
    display: block;
    text-align: center;
    width: 100%;
}

.pricing-note {
    text-align: center;
    font-size: 0.85rem;
    margin-top: var(--space-lg);
    color: var(--color-text-muted);
}

/* ----- CTA ----- */
.section-cta {
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: var(--space-xxl) 0;
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 140, 255, 0.12), transparent 70%);
    pointer-events: none;
}

.cta-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.cta-heading {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: var(--space-md);
    letter-spacing: var(--letter-spacing-tighter);
}

.gradient-text-cta {
    background: linear-gradient(120deg, #6ba0ff 0%, #5eead4 50%, #a78bfa 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradient-text-shift 6s ease-in-out infinite;
}

.cta-sub {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 480px;
    margin: 0 auto var(--space-lg);
    line-height: 1.6;
}

/* ----- Waitlist form ----- */
.waitlist-form {
    display: flex;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.waitlist-input {
    flex: 1;
    min-width: 260px;
    padding: 0.95rem 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.waitlist-input::placeholder {
    color: var(--color-text-muted);
}

.waitlist-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}

.waitlist-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.waitlist-btn {
    white-space: nowrap;
    padding: 0.95rem 1.6rem;
}

.waitlist-btn.is-loading {
    opacity: 0.8;
    pointer-events: none;
}

.waitlist-btn.is-loading .btn-arrow {
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.waitlist-status {
    min-height: 28px;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
    color: var(--color-text-muted);
}

.waitlist-status.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.waitlist-status.is-success {
    color: var(--color-accent);
}

.waitlist-status.is-error {
    color: #f87171;
}

.waitlist-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    opacity: 0.7;
}

.section-cta h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.store-badges {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.store-icon {
    flex-shrink: 0;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.store-badge:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(79, 140, 255, 0.15);
}

.store-badge-disabled {
    background: transparent;
    color: var(--color-text-muted);
    cursor: not-allowed;
    font-weight: 500;
    border-color: rgba(255, 255, 255, 0.06);
}

.store-badge-disabled:hover {
    color: var(--color-text-muted);
    border-color: rgba(255, 255, 255, 0.06);
    transform: none;
    box-shadow: none;
}

/* ----- Coming Soon Modal ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: var(--space-md);
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    background: rgba(18, 24, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 0 80px -20px rgba(79, 140, 255, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.modal-overlay.is-open .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text);
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-sm);
    animation: modal-icon-bounce 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.5) 0.3s both;
}

@keyframes modal-icon-bounce {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.modal-title {
    font-size: 1.75rem;
    margin-bottom: var(--space-xs);
    background: linear-gradient(120deg, #6ba0ff, #5eead4, #a78bfa);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradient-text-shift 6s ease-in-out infinite;
}

.modal-text {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-form {
    display: none;
    max-width: 100%;
    margin: 0 auto;
}

.modal.is-form-active #modal-notify-btn {
    display: none;
}

.modal.is-form-active .modal-form {
    display: flex;
    animation: modal-form-reveal 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes modal-form-reveal {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal .waitlist-input {
    min-width: 0;
}

.modal .waitlist-status {
    margin-top: var(--space-sm);
    margin-bottom: 0;
}

/* ----- Legal pages ----- */
.legal-page {
    padding: var(--space-xl) 0 var(--space-xxl);
}

.legal-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.legal-content h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-xs);
}

.legal-content .last-updated {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

.legal-content h2 {
    font-size: 1.4rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.legal-content h3 {
    font-size: 1.1rem;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.legal-content p,
.legal-content li {
    color: var(--color-text-muted);
}

.legal-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0 0 var(--space-sm);
}

.legal-content li {
    margin-bottom: 0.4rem;
}

.legal-content a {
    color: var(--color-primary);
}

.legal-content strong {
    color: var(--color-text);
}

/* ----- Footer ----- */
.site-footer {
    padding: var(--space-xl) 0 var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(3, 4, 8, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-footer::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    margin: 0 auto var(--space-lg);
    border-radius: 2px;
    opacity: 0.5;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-inner p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    position: relative;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

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

.footer-links a:hover::after {
    transform: scaleX(1);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .phone-frame {
        width: 240px;
    }

    .phone-showcase {
        flex-direction: column;
        gap: var(--space-xl);
        padding-bottom: var(--space-md);
    }

    .phone-showcase .phone-frame,
    .phone-showcase > .phone-frame:nth-child(1),
    .phone-showcase > .phone-frame:nth-child(3),
    .phone-frame-center {
        margin: 0;
        transform: none;
        width: 220px;
    }

    .phone-showcase:hover .phone-frame {
        filter: none;
    }

    .phone-showcase .phone-frame:hover,
    .phone-showcase > .phone-frame:nth-child(1):hover,
    .phone-showcase > .phone-frame:nth-child(3):hover {
        transform: translateY(-4px);
        filter: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 50%;
        transform: translateX(-50%);
        width: min(280px, calc(100vw - 2 * var(--space-md)));
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        background: rgba(6, 8, 15, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        padding: var(--space-md);
        gap: var(--space-sm);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .site-nav {
        position: static;
    }

    .section {
        padding: var(--space-xl) 0;
    }
}
