/* ============================================================
   Toured — Marketing Website Design System
   Glassmorphism / Liquid Glass aesthetic matching the iOS app
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
    /* Primary */
    --primary: #007AFF;
    --primary-dark: #0A84FF;
    --primary-gradient: linear-gradient(135deg, #007AFF, #0A84FF);
    --logo-gradient: linear-gradient(135deg, #00D8FF, #0054FF);
    --section-divider-gradient: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 216, 255, 0.45) 14%,
        rgba(0, 122, 255, 0.7) 50%,
        rgba(0, 84, 255, 0.45) 86%,
        transparent 100%
    );

    /* Semantic */
    --success: #34C759;
    --error: #FF3B30;
    --warning: #FF9500;
    --gold: #FFD700;
    --cyan: #00D8FF;

    /* Category Colors */
    --cat-campus: #34C759;
    --cat-academics: #AF52DE;
    --cat-student-life: #FF2D55;
    --cat-housing: #007AFF;
    --cat-dining: #FF9500;
    --cat-facilities: #FF9500;
    --cat-location: #32ADE6;

    /* Backgrounds */
    --bg-primary: #F2F2F7;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #E5E5EA;
    --bg-elevated: #FFFFFF;
    --bg-primary-gradient:
        radial-gradient(1000px 520px at 12% -8%, rgba(0, 122, 255, 0.09) 0%, transparent 62%),
        radial-gradient(900px 460px at 88% 112%, rgba(0, 216, 255, 0.07) 0%, transparent 64%),
        radial-gradient(820px 420px at 52% 42%, rgba(52, 199, 89, 0.055) 0%, transparent 66%),
        radial-gradient(760px 400px at 30% 78%, rgba(175, 82, 222, 0.045) 0%, transparent 68%),
        linear-gradient(180deg, #f7f8fc 0%, #eef0f6 100%);
    --section-dark-gradient:
        radial-gradient(1200px 600px at 15% -10%, rgba(0, 122, 255, 0.08) 0%, transparent 60%),
        radial-gradient(1000px 500px at 85% 110%, rgba(0, 216, 255, 0.06) 0%, transparent 65%),
        linear-gradient(180deg, #f4f5fa 0%, #eceef5 100%);
    --section-light-gradient:
        radial-gradient(900px 400px at 10% -20%, rgba(0, 122, 255, 0.05) 0%, transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f6f7fc 100%);

    /* Text */
    --text-primary: #1C1C1E;
    --text-secondary: #636366;
    --text-tertiary: #AEAEB2;
    --text-on-primary: #FFFFFF;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-subtle: rgba(255, 255, 255, 0.5);
    --glass-bg-prominent: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-highlight-top: rgba(255, 255, 255, 0.7);
    --glass-highlight-bottom: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(0, 0, 0, 0.08);

    /* Borders */
    --border-color: rgba(0, 0, 0, 0.06);
    --separator: rgba(60, 60, 67, 0.12);

    /* Spacing */
    --space-xxs: 2px;
    --space-xs: 4px;
    --space-s: 8px;
    --space-m: 16px;
    --space-l: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Radius */
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-l: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-s: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-m: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-l: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(0, 122, 255, 0.15);

    /* Typography */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --nav-height: 72px;
    --max-width: 1200px;
    --max-width-narrow: 800px;
}

/* --- Dark Mode --- */
[data-theme="dark"],
html:not([data-theme="light"]) {
    /* Only apply in system-dark if no explicit theme */
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --bg-primary: #000000;
        --bg-secondary: #1C1C1E;
        --bg-tertiary: #2C2C2E;
        --bg-elevated: #1C1C1E;
        --bg-primary-gradient:
            radial-gradient(1200px 620px at 12% -10%, rgba(0, 122, 255, 0.18) 0%, transparent 62%),
            radial-gradient(1000px 520px at 90% 110%, rgba(0, 216, 255, 0.14) 0%, transparent 64%),
            radial-gradient(920px 500px at 54% 40%, rgba(52, 199, 89, 0.105) 0%, transparent 66%),
            radial-gradient(860px 460px at 28% 78%, rgba(175, 82, 222, 0.085) 0%, transparent 68%),
            linear-gradient(180deg, #000000 0%, #06080d 100%);
        --section-dark-gradient:
            radial-gradient(1200px 620px at 12% -12%, rgba(0, 122, 255, 0.18) 0%, transparent 62%),
            radial-gradient(900px 480px at 92% 112%, rgba(0, 216, 255, 0.14) 0%, transparent 64%),
            linear-gradient(180deg, #000000 0%, #070a11 100%);
        --section-light-gradient:
            radial-gradient(1000px 480px at 10% -22%, rgba(0, 122, 255, 0.12) 0%, transparent 60%),
            linear-gradient(180deg, #1c1c1e 0%, #22242b 100%);

        --text-primary: #F2F2F7;
        --text-secondary: #A1A1A6;
        --text-tertiary: #636366;
        --text-on-primary: #FFFFFF;

        --glass-bg: rgba(28, 28, 30, 0.72);
        --glass-bg-subtle: rgba(28, 28, 30, 0.5);
        --glass-bg-prominent: rgba(28, 28, 30, 0.85);
        --glass-border: rgba(255, 255, 255, 0.1);
        --glass-highlight-top: rgba(255, 255, 255, 0.15);
        --glass-highlight-bottom: rgba(255, 255, 255, 0.05);
        --glass-shadow: rgba(0, 0, 0, 0.3);

        --border-color: rgba(255, 255, 255, 0.08);
        --separator: rgba(84, 84, 88, 0.36);

        --shadow-s: 0 1px 3px rgba(0, 0, 0, 0.2);
        --shadow-m: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-l: 0 8px 30px rgba(0, 0, 0, 0.4);
        --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
        --shadow-glow: 0 0 40px rgba(0, 122, 255, 0.25);
    }
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bg-elevated: #1C1C1E;
    --bg-primary-gradient:
        radial-gradient(1200px 620px at 12% -10%, rgba(0, 122, 255, 0.18) 0%, transparent 62%),
        radial-gradient(1000px 520px at 90% 110%, rgba(0, 216, 255, 0.14) 0%, transparent 64%),
        radial-gradient(920px 500px at 54% 40%, rgba(52, 199, 89, 0.105) 0%, transparent 66%),
        radial-gradient(860px 460px at 28% 78%, rgba(175, 82, 222, 0.085) 0%, transparent 68%),
        linear-gradient(180deg, #000000 0%, #06080d 100%);
    --section-dark-gradient:
        radial-gradient(1200px 620px at 12% -12%, rgba(0, 122, 255, 0.18) 0%, transparent 62%),
        radial-gradient(900px 480px at 92% 112%, rgba(0, 216, 255, 0.14) 0%, transparent 64%),
        linear-gradient(180deg, #000000 0%, #070a11 100%);
    --section-light-gradient:
        radial-gradient(1000px 480px at 10% -22%, rgba(0, 122, 255, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, #1c1c1e 0%, #22242b 100%);

    --text-primary: #F2F2F7;
    --text-secondary: #A1A1A6;
    --text-tertiary: #636366;
    --text-on-primary: #FFFFFF;

    --glass-bg: rgba(28, 28, 30, 0.72);
    --glass-bg-subtle: rgba(28, 28, 30, 0.5);
    --glass-bg-prominent: rgba(28, 28, 30, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight-top: rgba(255, 255, 255, 0.15);
    --glass-highlight-bottom: rgba(255, 255, 255, 0.05);
    --glass-shadow: rgba(0, 0, 0, 0.3);

    --border-color: rgba(255, 255, 255, 0.08);
    --separator: rgba(84, 84, 88, 0.36);

    --shadow-s: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-m: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-l: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 122, 255, 0.25);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    scroll-padding-top: calc(var(--nav-height) + env(safe-area-inset-top));
    overflow-x: clip;
}

html.menu-open,
html.menu-open body {
    overflow: hidden;
    touch-action: none;
    height: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    background-image: var(--bg-primary-gradient);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: scroll;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: clip;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

/* Subtle film grain across the full page, not just hero */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.05' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul, ol { list-style: none; }

/* --- Typography --- */
.text-display {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.text-title1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.text-title2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.text-title3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
}

.text-headline {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-body {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.6;
}

.text-body-lg {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
}

.text-caption {
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-tertiary);
}

.text-gradient {
    background: var(--logo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }

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

.container-narrow {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--space-l);
}

.section {
    padding: var(--space-4xl) 0;
    position: relative;
    background: transparent;
}

/* Inset section dividers (not edge-to-edge) */
main > .section + .section::before,
main > .section + .stats-bar::before,
main > .stats-bar + .section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(var(--max-width) - (var(--space-l) * 2)), 92vw);
    height: 2px;
    background: var(--section-divider-gradient);
    opacity: 1;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-4xl);
    padding-top: var(--space-l);
}

.section-header .text-body-lg {
    margin-top: var(--space-xl);
}

.section .text-title1 {
    margin-bottom: var(--space-xl);
}

/* --- Glass Effects --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-m);
}

.glass-subtle {
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--glass-border);
}

.glass-prominent {
    background: var(--glass-bg-prominent);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-l);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-s);
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-on-primary);
    box-shadow: var(--shadow-m), 0 0 20px rgba(0, 122, 255, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-l), 0 0 30px rgba(0, 122, 255, 0.3);
    color: var(--text-on-primary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: var(--shadow-s);
}

.btn-secondary:hover {
    background: var(--glass-bg-prominent);
    box-shadow: var(--shadow-m);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-glow {
    background: var(--primary);
    color: var(--text-on-primary);
    box-shadow: var(--shadow-m), 0 0 30px rgba(0, 122, 255, 0.3);
    animation: glowPulse 3s ease-in-out infinite;
}

.btn-glow:hover {
    box-shadow: var(--shadow-l), 0 0 50px rgba(0, 122, 255, 0.4);
    color: var(--text-on-primary);
}

@keyframes glowPulse {
    0%, 100% { box-shadow: var(--shadow-m), 0 0 30px rgba(0, 122, 255, 0.3); }
    50% { box-shadow: var(--shadow-m), 0 0 50px rgba(0, 122, 255, 0.45); }
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    z-index: 1000;
    transition: all var(--transition-base);
}

.nav.scrolled {
    background: var(--glass-bg-prominent);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-s);
}

.nav.scrolled .nav-links {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-l);
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    text-decoration: none;
    color: var(--text-primary);
    justify-self: start;
}

.nav-logo svg {
    width: 36px;
    height: 36px;
}

.nav-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 4px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-self: center;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--glass-bg-subtle);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--glass-bg-prominent);
    font-weight: 600;
    box-shadow: 0 1px 3px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight-top);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    justify-self: end;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--glass-bg-subtle);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.nav-cta {
    padding: 10px 22px;
    font-size: 0.9375rem;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    cursor: pointer;
    padding: 4px 0;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: calc(var(--nav-height) + env(safe-area-inset-top));
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg-prominent);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    z-index: 999;
    padding: var(--space-xl) var(--space-l);
    flex-direction: column;
    gap: var(--space-m);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-base),
                transform var(--transition-base),
                visibility 0s linear 250ms;
    display: flex;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    pointer-events: none;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity var(--transition-base),
                transform var(--transition-base),
                visibility 0s linear 0s;
    pointer-events: auto;
}

.mobile-menu a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: var(--space-m) 0;
    border-bottom: 1px solid var(--separator);
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + env(safe-area-inset-top) + var(--space-3xl)) 0 var(--space-4xl);
    overflow: hidden;
}

/* Visible divider where hero transitions into next section */
.hero::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(calc(var(--max-width) - (var(--space-l) * 2)), 92vw);
    height: 2px;
    background: var(--section-divider-gradient);
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: -12vh 0 -16vh 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.88;
}

.hero-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 216, 255, 0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: floatBlob1 20s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 84, 255, 0.12) 0%, transparent 70%);
    bottom: -50px;
    left: -100px;
    animation: floatBlob2 25s ease-in-out infinite;
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.05); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.hero-bg .blob-3 {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(175, 82, 222, 0.08) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation: floatBlob3 22s ease-in-out infinite;
}

@keyframes floatBlob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -20px) scale(1.05); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-l);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-s);
    padding: var(--space-s) var(--space-m);
    border-radius: var(--radius-full);
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-l);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
    margin-bottom: var(--space-l);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-secondary);
    max-width: 780px;
    margin: 0 auto 0;
    line-height: 1.6;
}

.hero-launch-date {
    margin: var(--space-m) auto var(--space-m);
}

.hero-buttons {
    display: flex;
    gap: var(--space-m);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-3xl);
    position: relative;
    z-index: 2;
}

/* Phone Mockup */
.phone-mockup-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin-top: var(--space-xl);
    pointer-events: none;
}

.phone-mockup {
    position: relative;
    width: 280px;
    border-radius: 44px;
    background: var(--bg-secondary);
    border: 4px solid var(--text-tertiary);
    overflow: hidden;
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-color);
}

.phone-mockup-img {
    height: auto;
}

.phone-mockup-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 40px;
}

/* Screenshot phone frame for feature panels */
.screenshot-phone {
    width: 260px;
    border-radius: 40px;
    overflow: hidden;
    border: 4px solid var(--text-tertiary);
    box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-color);
    background: #000;
}

.screenshot-phone img {
    width: 100%;
    height: auto;
    display: block;
}

/* Floating Stat Cards */
.floating-cards {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.float-card {
    position: absolute;
    padding: 14px 20px;
    border-radius: var(--radius-l);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-m);
    white-space: nowrap;
    pointer-events: none;
}

.float-card .float-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 2px;
}

.float-card .float-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.float-card:nth-child(1) {
    top: 12%;
    left: -12%;
    animation: floatCard1 6s ease-in-out infinite;
}

.float-card:nth-child(2) {
    top: 12%;
    right: -14%;
    animation: floatCard2 7s ease-in-out infinite;
}

.float-card:nth-child(3) {
    bottom: 22%;
    left: -12%;
    animation: floatCard3 8s ease-in-out infinite;
}

.float-card:nth-child(4) {
    bottom: 22%;
    right: -17%;
    animation: floatCard2 7.5s ease-in-out infinite;
}

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(0deg); }
}
@keyframes floatCard2 {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
}
@keyframes floatCard3 {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-14px) rotate(1deg); }
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(170px, auto);
    gap: var(--space-s);
}

.bento-card {
    border-radius: var(--radius-xl);
    padding: var(--space-l);
    position: relative;
    overflow: hidden;
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-l);
    border-color: rgba(0, 122, 255, 0.2);
    background: var(--glass-bg);
}

.bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
    padding: var(--space-l);
}

.bento-card.medium {
    grid-row: span 2;
}

.bento-card.wide {
    grid-column: span 2;
}

.bento-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-m);
    font-size: 1.5rem;
}

.bento-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-s);
}

.bento-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.bento-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-s);
    min-height: 88px;
}

.compare-visual {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compare-school {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-m);
    background: var(--glass-bg-subtle);
    border: 1px solid var(--glass-border);
    font-weight: 600;
    font-size: 0.875rem;
}

.compare-school-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.compare-vs {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Accent borders per card */
.bento-card[data-accent="blue"] { border-top: 3px solid var(--primary); }
.bento-card[data-accent="green"] { border-top: 3px solid var(--success); }
.bento-card[data-accent="purple"] { border-top: 3px solid var(--cat-academics); }
.bento-card[data-accent="orange"] { border-top: 3px solid var(--warning); }
.bento-card[data-accent="pink"] { border-top: 3px solid var(--cat-student-life); }
.bento-card[data-accent="cyan"] { border-top: 3px solid var(--cyan); }

/* Tighten spacing between overview -> map sections */
.section#features {
    padding-bottom: var(--space-l);
}

.section#features .section-header {
    padding-top: var(--space-3xl);
}

/* Free vs Premium (paywall-aligned) */
.section.pricing-section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

.section.pricing-section .section-header {
    margin-bottom: var(--space-l);
}

.pricing-card {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--space-l);
    border-radius: var(--radius-l);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.pricing-table th,
.pricing-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.pricing-table th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-bg-subtle);
}

.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2) {
    text-align: center;
    width: 5.5rem;
    font-variant-numeric: tabular-nums;
}

.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
    text-align: right;
    font-weight: 600;
    color: var(--success, #34c759);
}

.pricing-footnote {
    margin: var(--space-l) 0 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

@media (max-width: 480px) {
    .pricing-table th,
    .pricing-table td {
        padding: 10px 8px;
        font-size: 0.8125rem;
    }
}

/* Apply tighter vertical spacing to screenshot-driven sections only */
.section.map-section,
.section.rankings-section,
.section.live-visit-section,
.section.research-section {
    padding-top: var(--space-l);
    padding-bottom: var(--space-l);
}

/* Keep screenshot sections on shared page gradient */
.section.map-section,
.section.rankings-section {
    background: transparent;
}

/* --- Rankings Section --- */
.section.rankings-section {
    background: transparent;
}

.rankings-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
    margin-top: var(--space-l);
}

.rankings-highlight-item {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.rankings-highlight-item svg {
    flex-shrink: 0;
}

/* --- Live Visit Section --- */
.live-visit-section {
    background: transparent;
}

.feature-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    margin-bottom: var(--space-4xl);
}

.feature-panel:last-child {
    margin-bottom: 0;
}

.feature-panel.reversed {
    direction: rtl;
}

.feature-panel.reversed > * {
    direction: ltr;
}

.feature-text h3 {
    margin-bottom: var(--space-m);
}

.feature-text p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.6;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: var(--space-xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--separator);
}

.timeline-item {
    position: relative;
    padding: var(--space-m) 0;
    padding-left: var(--space-l);
}

.timeline-dot {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--bg-secondary);
}

.timeline-dot.active {
    animation: timelinePulse 2s ease-in-out infinite;
}

@keyframes timelinePulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 0 8px rgba(0, 122, 255, 0.1); }
    50% { box-shadow: 0 0 0 4px var(--bg-secondary), 0 0 0 12px rgba(0, 122, 255, 0.2); }
}

.timeline-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Feature Visual Panels */
.feature-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.collab-phones {
    display: flex;
    gap: var(--space-m);
    align-items: center;
    position: relative;
}

.collab-phones .mini-phone {
    width: 160px;
    height: 320px;
    border-radius: 28px;
    background: var(--bg-tertiary);
    border: 3px solid var(--text-tertiary);
    overflow: hidden;
    position: relative;
}

.mini-phone-screen {
    position: absolute;
    inset: 3px;
    border-radius: 24px;
    background: linear-gradient(160deg, #0a1628, #0d2847);
    display: flex;
    flex-direction: column;
    padding: 32px 10px 10px;
    gap: 8px;
}

.mini-phone-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-phone-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-phone-card .line {
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 5px;
}

.mini-phone-card .line.short { width: 60%; }
.mini-phone-card .line:last-child { margin-bottom: 0; }

.collab-connector {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    z-index: 2;
    box-shadow: var(--shadow-glow);
    animation: connectorPulse 2s ease-in-out infinite;
}

@keyframes connectorPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 122, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 122, 255, 0.5); }
}

/* --- Parents & Counselors Section --- */
.family-section {
    position: relative;
}

.family-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.family-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
}

.family-card {
    padding: var(--space-l);
    border-radius: var(--radius-xl);
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.family-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-m);
}

.family-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    margin-bottom: var(--space-s);
}

.family-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(0, 122, 255, 0.1);
}

.family-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

.family-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.family-card.highlight {
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(0, 122, 255, 0.05);
}

/* --- Research Section --- */
.research-section {
    background: transparent;
}

.fit-score {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(52, 199, 89, 0.12);
    color: var(--success);
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* --- Pricing Section --- */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-l);
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: all var(--transition-base);
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-l);
}

.pricing-card.featured {
    border-color: rgba(0, 122, 255, 0.3);
    position: relative;
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-tier {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-s);
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-xs);
}

.pricing-period {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-l);
}

.pricing-features {
    text-align: left;
    margin-bottom: var(--space-xl);
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: var(--space-s);
    padding: var(--space-s) 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.pricing-feature .check {
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.pricing-note {
    text-align: center;
    margin-top: var(--space-l);
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.pricing-note strong {
    color: var(--primary);
}

/* --- Stats Bar --- */
.stats-bar {
    position: relative;
    border: 0;
    background: transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-l);
    padding: var(--space-3xl) 0;
}

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

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: var(--logo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Final CTA --- */
.final-cta {
    position: relative;
    text-align: center;
    overflow: hidden;
}

.final-cta-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 216, 255, 0.08) 0%, rgba(0, 84, 255, 0.08) 100%);
    z-index: 0;
}

.final-cta .container {
    position: relative;
    z-index: 1;
}

.final-cta h2 {
    margin-bottom: var(--space-m);
}

.final-cta p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
}

/* --- Footer --- */
.footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-left {
    display: flex;
    align-items: center;
    gap: var(--space-l);
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

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

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: var(--glass-bg-subtle);
}

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

.footer-contact a {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* --- Support Page --- */
.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-m);
    margin-bottom: var(--space-3xl);
}

.support-card {
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    text-align: center;
}

.support-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-l);
}

.support-card[data-accent="blue"] { border-top: 3px solid var(--primary); }
.support-card[data-accent="green"] { border-top: 3px solid var(--success); }
.support-card[data-accent="orange"] { border-top: 3px solid var(--warning); }

.support-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-m);
    background: var(--glass-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-m);
}

.support-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-s);
}

.support-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.support-faq {
    max-width: 700px;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}

.faq-item {
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-l);
    overflow: hidden;
    transition: box-shadow var(--transition-base);
}

.faq-item[open] {
    box-shadow: var(--shadow-m);
}

.faq-item summary {
    padding: var(--space-m) var(--space-l);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-left: var(--space-m);
    transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
    content: '\2212';
}

.faq-item p {
    padding: 0 var(--space-l) var(--space-m);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Legal Pages --- */
.section:has(.legal-wrap) {
    padding: 0;
}

.container.legal-wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: calc(var(--nav-height) + env(safe-area-inset-top) + var(--space-xl)) var(--space-l) var(--space-3xl);
}

.legal-header {
    text-align: center;
    margin-bottom: var(--space-l);
}

.legal-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.legal-date {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-l);
    border-bottom: 1px solid var(--border-color);
}

.legal-section {
    margin-bottom: var(--space-xl);
}

.legal-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-m);
    letter-spacing: -0.01em;
}

.legal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: var(--space-l);
    margin-bottom: var(--space-s);
}

.legal-section p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: var(--space-m);
}

.legal-section ul,
.legal-section ol {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    padding-left: var(--space-l);
    margin-bottom: var(--space-m);
    line-height: 1.7;
    list-style: disc;
}

.legal-section li {
    margin-bottom: var(--space-s);
}

.legal-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

.legal-card {
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-l);
    padding: var(--space-l);
    margin: var(--space-m) 0;
}

.legal-card p {
    margin-bottom: var(--space-s);
}

.legal-card p:last-child {
    margin-bottom: 0;
}

.legal-highlight {
    background: var(--glass-bg-subtle);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 122, 255, 0.25);
    border-radius: var(--radius-l);
    padding: var(--space-l);
    margin: var(--space-m) 0;
}

.legal-highlight p {
    margin-bottom: var(--space-s);
}

.legal-highlight p:last-child {
    margin-bottom: 0;
}

.legal-section table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-m) 0;
    font-size: 0.875rem;
}

.legal-section th,
.legal-section td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.legal-section th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--glass-bg-subtle);
}

/* --- Misc Visual Elements --- */

/* Live Visit icon */
.live-visit-icon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.live-visit-pin {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(0, 122, 255, 0.35));
}

.live-visit-ping {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: visitPing 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.live-visit-ping-delay {
    animation-delay: 1.25s;
}

@keyframes visitPing {
    0% { transform: translateX(-50%) scale(0.6); opacity: 0.8; }
    100% { transform: translateX(-50%) scale(2); opacity: 0; }
}

.live-visit-timer {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
    background: rgba(0, 122, 255, 0.1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

/* Collaboration icon */
.collab-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.collab-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collab-avatar-student {
    background: rgba(0, 122, 255, 0.15);
    color: var(--primary);
}

.collab-avatar-parent {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
}

.collab-sync {
    display: flex;
    gap: 4px;
    align-items: center;
}

.collab-sync-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    animation: syncPulse 1.4s ease-in-out infinite;
}

.collab-sync-dot-2 {
    animation-delay: 0.2s;
}

.collab-sync-dot-3 {
    animation-delay: 0.4s;
}

@keyframes syncPulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Mini star rating */
.mini-stars {
    display: flex;
    gap: 4px;
}

.mini-star {
    width: 20px;
    height: 20px;
    color: var(--gold);
}

.mini-star.empty {
    color: var(--text-tertiary);
    opacity: 0.3;
}

/* Stacked photos effect */
.stacked-photos {
    position: relative;
    width: 140px;
    height: 100px;
}

.stacked-photo {
    position: absolute;
    width: 100px;
    height: 80px;
    border-radius: var(--radius-m);
    border: 2px solid var(--bg-secondary);
    box-shadow: var(--shadow-s);
}

.stacked-photo:nth-child(1) {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: rotate(-6deg);
    z-index: 1;
}

.stacked-photo:nth-child(2) {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    left: 20px;
    top: 5px;
    transform: rotate(2deg);
    z-index: 2;
}

.stacked-photo:nth-child(3) {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    left: 40px;
    top: -5px;
    transform: rotate(5deg);
    z-index: 3;
}

/* Cloud sync icon */
.sync-icon-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-arrows {
    animation: syncSpin 3s linear infinite;
    color: var(--cyan);
    font-size: 2rem;
}

@keyframes syncSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sortable list mini */
.mini-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 220px;
}

.mini-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-s);
    background: rgba(0, 122, 255, 0.06);
    border: 1px solid rgba(0, 122, 255, 0.1);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: transform var(--transition-fast);
}

.mini-list-item .grip {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.mini-list-item:hover {
    transform: translateX(4px);
}

/* --- Dynamic Island mockup --- */
.dynamic-island {
    width: 200px;
    padding: 10px 16px;
    background: #000;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.di-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: dotPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.di-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.di-timer {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

/* --- Mobile-First Touch & UX Optimizations --- */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
    }
    .mobile-menu {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Touch device: remove hover transforms that feel jarring on tap */
    .bento-card:hover {
        transform: none;
    }
    .family-card:hover {
        transform: none;
    }
    .mini-list-item:hover {
        transform: none;
    }
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
    /* Add active state for touch feedback */
    .btn:active {
        transform: scale(0.96);
        transition-duration: 100ms;
    }
    .bento-card:active {
        transform: scale(0.98);
        transition-duration: 100ms;
    }
}

/* Ensure all interactive elements have adequate touch targets */
.nav-link,
.mobile-link,
.footer-links a,
.footer-contact a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Improve mobile tap reliability and reduce accidental double-tap delays */
a,
button,
.btn,
.nav-link,
.mobile-link,
.theme-toggle,
.hamburger {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Smooth overscroll on iOS */
html {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
}

/* Prevent text size adjustment on orientation change */
body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* --- Responsive --- */
@media (max-width: 1199px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-card.large,
    .bento-card.wide {
        grid-column: span 2;
        grid-row: span 1;
    }
    .bento-card.medium {
        grid-row: span 1;
    }
    .float-card:nth-child(1) { left: 0; top: 12%; }
    .float-card:nth-child(2) { right: 0; top: 12%; }
    .float-card:nth-child(3) { left: 0; bottom: 22%; }
    .float-card:nth-child(4) { right: 0; bottom: 22%; }
}

@media (max-width: 768px) {
    .nav-inner {
        display: flex;
        justify-content: space-between;
    }
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-cta { display: none; }

    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + env(safe-area-inset-top) + var(--space-xl)) 0 var(--space-3xl);
    }

    .hero-content {
        padding: 0 var(--space-m);
    }

    .hero-subtitle {
        font-size: 1.0625rem;
        max-width: 500px;
    }

    .phone-mockup {
        width: 220px;
        border-radius: 36px;
    }

    .phone-mockup-img img { border-radius: 32px; }

    .screenshot-phone {
        width: 220px;
        border-radius: 34px;
    }

    .floating-cards { display: none; }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-card.large,
    .bento-card.medium,
    .bento-card.wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-card {
        padding: var(--space-l);
    }

    .bento-card.large {
        padding: var(--space-l);
    }

    .feature-panel {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .feature-panel.reversed {
        direction: ltr;
    }

    .feature-text p {
        font-size: 1rem;
    }

    .family-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .family-card {
        padding: var(--space-m);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        align-items: center;
        gap: var(--space-s);
    }

    .footer-links {
        justify-content: center;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

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

    .section-header {
        margin-bottom: var(--space-xl);
    }

    .section-header .text-body-lg {
        font-size: 1.0625rem;
    }

    .screenshot-phone {
        width: 200px;
        border-radius: 32px;
    }

    .fit-score {
        padding: 5px 10px;
        font-size: 0.8125rem;
    }

    /* Mobile menu: scrollable for small screens */
    .mobile-menu {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Timeline: tighter on mobile */
    .timeline {
        padding-left: var(--space-l);
    }

    .timeline-item {
        padding: var(--space-s) 0;
        padding-left: var(--space-m);
    }

    .timeline-item h4 {
        font-size: 0.9375rem;
    }

    .timeline-item p {
        font-size: 0.8125rem;
    }

    .timeline-dot {
        width: 20px;
        height: 20px;
        left: -22px;
    }

    .timeline-dot svg {
        width: 10px;
        height: 10px;
    }

    /* Better CTA section on mobile */
    .final-cta p {
        font-size: 1rem;
        padding: 0 var(--space-s);
    }

    /* Legal pages mobile */
    .container.legal-wrap {
        padding: calc(var(--nav-height) + env(safe-area-inset-top) + var(--space-m)) var(--space-m) var(--space-xl);
    }

    .legal-date {
        margin-bottom: var(--space-l);
        padding-bottom: var(--space-m);
    }

    .legal-section {
        margin-bottom: var(--space-l);
    }

    .legal-section h2 {
        font-size: 1.125rem;
    }

    .legal-section h3 {
        font-size: 0.9375rem;
    }

    .legal-section p {
        font-size: 0.875rem;
        line-height: 1.65;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .legal-section ul,
    .legal-section ol {
        font-size: 0.875rem;
        padding-left: var(--space-m);
    }

    .legal-section li {
        margin-bottom: var(--space-xs);
    }

    .legal-card,
    .legal-highlight {
        padding: var(--space-m);
        border-radius: var(--radius-m);
    }

    .legal-card p,
    .legal-highlight p {
        font-size: 0.875rem;
    }

    .legal-section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.8125rem;
    }

    .legal-section thead,
    .legal-section tbody,
    .legal-section tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .legal-section th,
    .legal-section td {
        padding: 8px 10px;
        font-size: 0.8125rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    :root {
        --space-l: 16px;
        --space-xl: 24px;
        --space-3xl: 48px;
        --space-4xl: 64px;
        --nav-height: 64px;
    }

    .container {
        padding: 0 var(--space-m);
    }

    .text-display {
        font-size: 2rem;
    }

    .text-title1 {
        font-size: 1.625rem;
    }

    .text-title2 {
        font-size: 1.375rem;
    }

    .text-body-lg {
        font-size: 1rem;
    }

    .hero {
        padding: calc(var(--nav-height) + env(safe-area-inset-top) + var(--space-m)) 0 var(--space-xl);
    }

    .nav-logo span {
        font-size: 1.125rem;
    }

    .nav-actions {
        gap: var(--space-s);
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
    }

    .hero-badge {
        font-size: 0.8125rem;
        padding: 6px 12px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--space-l);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--space-s);
        margin-bottom: var(--space-xl);
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 24px;
        font-size: 0.9375rem;
    }

    .phone-mockup {
        width: 200px;
        border-radius: 32px;
        border-width: 3px;
    }

    .phone-mockup-img img {
        border-radius: 28px;
    }

    .screenshot-phone {
        width: 200px;
        border-radius: 30px;
        border-width: 3px;
    }

    .btn {
        padding: 12px 22px;
        font-size: 0.9375rem;
    }

    /* Bento grid tighter */
    .bento-grid {
        gap: var(--space-s);
    }

    .bento-card,
    .bento-card.large {
        padding: var(--space-m);
    }

    .bento-card h3 {
        font-size: 1.125rem;
    }

    .bento-card p {
        font-size: 0.875rem;
    }

    .bento-visual {
        min-height: 80px;
    }

    /* Feature panels */
    .feature-panel {
        gap: var(--space-l);
        margin-bottom: var(--space-xl);
    }

    .feature-text p {
        font-size: 0.9375rem;
    }

    /* Screenshot phones smaller */
    .screenshot-phone {
        width: 180px;
        border-radius: 28px;
        border-width: 3px;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-m);
        padding: var(--space-xl) 0;
    }

    .stat-label {
        font-size: 0.8125rem;
    }


    .fit-score {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    /* Family cards */
    .family-card {
        padding: var(--space-m);
    }

    .family-card h4 {
        font-size: 1rem;
    }

    .family-card p {
        font-size: 0.875rem;
    }

    .family-card-icon {
        width: 38px;
        height: 38px;
    }

    .family-card-icon svg {
        width: 18px;
        height: 18px;
    }


    /* Footer */
    .footer {
        padding: var(--space-l) 0;
    }

    .footer-copy {
        font-size: 0.75rem;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-s);
    }

    .footer-links a {
        font-size: 0.8125rem;
        padding: 6px 12px;
    }

    /* Final CTA */
    .final-cta h2 {
        font-size: 1.5rem;
    }

    .final-cta p {
        font-size: 0.9375rem;
    }

    /* Legal pages small phone */
    .container.legal-wrap {
        padding: calc(var(--nav-height) + env(safe-area-inset-top) + var(--space-s)) var(--space-m) var(--space-l);
    }

    .legal-header h1 {
        font-size: 1.375rem;
    }

    .legal-date {
        font-size: 0.75rem;
    }

    .legal-section h2 {
        font-size: 1.0625rem;
    }

    .legal-section p,
    .legal-section ul,
    .legal-section ol {
        font-size: 0.8125rem;
        line-height: 1.6;
    }

    .legal-section ul,
    .legal-section ol {
        padding-left: var(--space-m);
    }

    .legal-card p,
    .legal-highlight p {
        font-size: 0.8125rem;
    }

    .legal-section table {
        font-size: 0.75rem;
    }

    .legal-section th,
    .legal-section td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}

/* Very small screens: iPhone SE, older devices */
@media (max-width: 375px) {
    :root {
        --space-m: 12px;
        --space-l: 14px;
        --space-xl: 20px;
    }

    .text-display {
        font-size: 1.75rem;
    }

    .text-title1 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .phone-mockup {
        width: 180px;
        border-radius: 28px;
    }

    .phone-mockup-img img {
        border-radius: 24px;
    }

    .screenshot-phone {
        width: 180px;
        border-radius: 26px;
    }

    .screenshot-phone {
        width: 160px;
        border-radius: 24px;
    }

    .bento-card h3 {
        font-size: 1rem;
    }

    .bento-card p {
        font-size: 0.8125rem;
    }


    .stats-grid {
        gap: var(--space-s);
    }

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

    .stat-label {
        font-size: 0.75rem;
    }

    .timeline {
        padding-left: var(--space-m);
    }

    .timeline-dot {
        width: 18px;
        height: 18px;
        left: -18px;
    }

    .timeline-dot svg {
        width: 8px;
        height: 8px;
    }

    .timeline-item h4 {
        font-size: 0.875rem;
    }

    .timeline-item p {
        font-size: 0.75rem;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + var(--space-m)) 0 var(--space-l);
    }

    .phone-mockup-container {
        display: none;
    }

    .hero-buttons {
        margin-bottom: var(--space-m);
    }

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