/* ============================================
   PrepTutorAI Landing Page — Playful Design System
   ============================================ */

/* --- Custom Properties --- */
:root {
    /* Backgrounds (light base) */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F6FF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFF8F0;
    --bg-elevated: #F0EDFF;

    /* Text */
    --text-primary: #1A1135;
    --text-secondary: #5C5470;
    --text-muted: #6B6780; /* upgraded from #9490A8 for WCAG AA contrast on white bg */

    /* Multi-color accents */
    --color-coral: #FF6B6B;
    --color-coral-dark: #E85555;
    --color-cyan: #00D4FF;
    --color-yellow: #FFD93D;
    --color-pink: #FF36AB;
    --color-lime: #7BED6F;
    --color-purple: #8B5CF6;
    --color-blue: #3B82F6;

    /* Gradients */
    --gradient-cta: linear-gradient(135deg, #FF6B6B 0%, #FF36AB 100%);
    --gradient-hero: linear-gradient(135deg, #FF6B6B 0%, #FFD93D 25%, #7BED6F 50%, #00D4FF 75%, #8B5CF6 100%);
    --gradient-text: linear-gradient(135deg, #FF6B6B 0%, #8B5CF6 50%, #00D4FF 100%);

    /* Borders */
    --border-subtle: rgba(0, 0, 0, 0.04);
    --border-card: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(255, 107, 107, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.1);
    --shadow-glow-coral: 0 8px 30px rgba(255, 107, 107, 0.3);
    --shadow-glow-purple: 0 8px 30px rgba(139, 92, 246, 0.2);
    --shadow-glow-cyan: 0 8px 30px rgba(0, 212, 255, 0.2);

    /* Spacing */
    --section-py: clamp(5rem, 10vw, 8rem);
    --container-px: clamp(1.25rem, 4vw, 2rem);
    --container-max: 1200px;

    /* Typography */
    --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Fredoka', 'Nunito', sans-serif;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* Landing-page friendly type scope — ui-rounded puts rounded system glyphs
   first so the landing feels warm without loading an external web font. */
.landing--friendly-type {
    font-family: ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.landing--friendly-type p,
.landing--friendly-type li,
.landing--friendly-type blockquote {
    line-height: 1.7;
    letter-spacing: 0.01em;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

ul, ol {
    list-style: none;
}

/* --- Skip link (WCAG 2.4.1) ---
   a.skip-link specificity beats the generic .skip-link in accessibility.css
   (loaded after this file) so the branded landing styles win the cascade. */
a.skip-link {
    position: absolute;
    top: -48px;
    left: 0;
    background: var(--color-coral);
    color: #fff;
    padding: 10px 18px;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-weight: 700;
    font-size: 0.875rem;
    transition: top 120ms ease;
}
a.skip-link:focus,
a.skip-link:focus-visible,
a.skip-link:active {
    top: 0;
    outline: 3px solid #1A1135;
    outline-offset: 2px;
}

/* --- Main content landmark — skip-link focus target (#main-content) --- */
main {
    display: block;
}

#main-content {
    /* Offset programmatic focus/scroll past the fixed navbar */
    scroll-margin-top: 5rem;
}

/* --- In-page anchor focus targets (hash-nav destinations) --- */
#hero,
#exam-catalog,
#how-it-works,
#features,
#pricing,
#who-its-for,
#testimonials,
#faq,
#cta-final {
    scroll-margin-top: 5rem;
}

/* Suppress visible focus ring on non-interactive landmark targets —
   these receive programmatic focus for screen-reader placement only. */
[tabindex="-1"]:focus {
    outline: none;
}

/* --- Focus States --- */
:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* --- Screen reader only (WCAG utility) --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.section {
    padding: var(--section-py) 0;
    position: relative;
    overflow: hidden;
}

.container--narrow {
    max-width: 760px;
}

/* Legal sections (Terms / Privacy) */
.legal {
    background: var(--bg-secondary);
}

.legal__body {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    text-align: left;
}

.legal__body h3 {
    color: var(--text-primary);
    font-family: var(--font-heading, inherit);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 1.75rem 0 0.5rem;
}

.legal__body h3:first-child {
    margin-top: 0;
}

.legal__body p {
    margin: 0 0 0.75rem;
}

.legal__body a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal__body a:hover {
    color: #FF36AB;
}

.legal__contact {
    margin-top: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Brand wordmark — coral→pink gradient logo text, matching the SVG mark.
   Falls back to a solid brand colour where background-clip: text is
   unsupported so the wordmark always stays legible. */
.brand-gradient {
    display: inline-block;
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--color-pink);
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .brand-gradient {
        -webkit-text-fill-color: var(--color-pink);
        color: var(--color-pink);
    }
}

/* Dedicated wordmark gradient — applied to the PrepTutorAI text in nav and
   footer logos so it can be targeted independently of .brand-gradient.
   Multi-stop gradient with a subtle shimmer animation (brand-gradient-shift)
   that cycles continuously. Disabled under prefers-reduced-motion. */
.brand__wordmark-gradient {
    display: inline-block;
    background: linear-gradient(
        90deg,
        #FF6B6B 0%,
        #FF36AB 22%,
        #8B5CF6 44%,
        #00D4FF 66%,
        #FF36AB 88%,
        #FF6B6B 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--color-pink);
    animation: brand-gradient-shift 5s linear infinite;
}

@keyframes brand-gradient-shift {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .brand__wordmark-gradient {
        -webkit-text-fill-color: var(--color-pink);
        color: var(--color-pink);
    }
}

/* BEM modifier — applied directly to the visible wordmark element so it can be
   targeted and overridden independently of the base brand-mark__word styles. */
.brand__wordmark--gradient {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF36AB 55%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--color-pink);
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .brand__wordmark--gradient {
        -webkit-text-fill-color: var(--color-pink);
        color: var(--color-pink);
    }
}

/* Shared rounded type brand system — wordmark and hero headline use the same
   Fredoka rounded-geometric font stack so they feel like one design system. */
.brand__wordmark--rounded,
.hero__headline--rounded {
    font-family: var(--font-heading);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.brand__wordmark--rounded {
    letter-spacing: -0.01em;
}

.hero__headline--rounded {
    letter-spacing: -0.02em;
}

/* Brand lockup — mark + wordmark treated as one visual unit */
.brand-lockup {
    /* Inherits .navbar__logo flex layout — no layout override needed */
}

/* Brand logo — primary nav lockup; replaces .navbar__logo on the <a> in the header.
   Includes all layout, hover, focus, aria-current, and responsive styles so the
   footer (which keeps .navbar__logo) is unaffected. */
.brand__logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
    position: relative;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 107, 0.04);
    border: 1px solid transparent;
    transition:
        background var(--duration-fast) var(--ease-out),
        border-color var(--duration-fast) var(--ease-out);
}

.brand__logo:hover {
    background: rgba(255, 107, 107, 0.07);
    border-color: rgba(255, 107, 107, 0.12);
}

.brand__logo:hover .brand-mark__icon,
.brand__logo:focus-visible .brand-mark__icon {
    box-shadow:
        0 0 0 2px rgba(255, 107, 107, 0.30),
        0 4px 22px rgba(255, 107, 107, 0.50),
        0 2px 8px rgba(0, 0, 0, 0.15);
    transform: scale(1.07);
}

.brand__logo:hover .brand-mark__word,
.brand__logo:focus-visible .brand-mark__word {
    opacity: 0.85;
    filter: drop-shadow(0 1px 5px rgba(255, 107, 107, 0.28));
}

.brand__logo:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.2);
}

.brand__logo[aria-current="page"] {
    position: relative;
}

.brand__logo[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-coral);
    border-radius: 1px;
    opacity: 0.6;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Brand mark SVG — compact rounded icon matching the site gradient palette */
.brand-mark__svg {
    border-radius: 10px;
    flex-shrink: 0;
}

/* Brand mark icon — elevated SVG tile with coral glow ring and border shadow */
.brand-mark__icon {
    display: block;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(255, 107, 107, 0.18),
        0 2px 14px rgba(255, 107, 107, 0.32),
        0 1px 4px rgba(0, 0, 0, 0.12);
    transition: box-shadow var(--duration-normal) var(--ease-spring),
                transform var(--duration-normal) var(--ease-spring);
    will-change: box-shadow, transform;
}

.brand-lockup:hover .brand-mark__icon,
.brand-lockup:focus-visible .brand-mark__icon {
    box-shadow:
        0 0 0 2px rgba(255, 107, 107, 0.30),
        0 4px 22px rgba(255, 107, 107, 0.50),
        0 2px 8px rgba(0, 0, 0, 0.15);
    transform: scale(1.07);
}

/* Brand mark word — gradient text with browser-safe clipping, solid fallback, and
   a subtle warm drop-shadow that reads as depth against light backgrounds.
   The three-stop gradient matches the SVG icon palette so mark + word read as
   one visual unit. Solid fallback colour preserves legibility in non-clip browsers. */
.brand-mark__word {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF36AB 55%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--color-pink);
    user-select: none;
    filter: drop-shadow(0 1px 2px rgba(255, 107, 107, 0.15));
    transition: opacity var(--duration-normal) var(--ease-out),
                filter var(--duration-normal) var(--ease-out);
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .brand-mark__word {
        -webkit-text-fill-color: var(--color-pink);
        color: var(--color-pink);
    }
}

.brand-lockup:hover .brand-mark__word,
.brand-lockup:focus-visible .brand-mark__word {
    opacity: 0.85;
    filter: drop-shadow(0 1px 5px rgba(255, 107, 107, 0.28));
}

/* Brand wordmark gradient — clipped three-stop gradient for added depth */
.brand-wordmark--gradient {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF36AB 55%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--color-pink);
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .brand-wordmark--gradient {
        -webkit-text-fill-color: var(--color-pink);
        color: var(--color-pink);
    }
}

/* --- Section Headers --- */
.section__header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto clamp(3rem, 6vw, 4.5rem);
}

.section__badge {
    display: inline-block;
    padding: 0.4rem 1.25rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.15);
    color: var(--color-coral);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section__subtitle {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    padding: 0.8rem 1.75rem;
    transition: all var(--duration-normal) var(--ease-spring);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn--primary {
    background: var(--gradient-cta);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.35);
    border: none;
}

.btn--primary:hover {
    box-shadow: 0 8px 35px rgba(255, 107, 107, 0.5);
    transform: translateY(-2px) scale(1.03);
}

.btn--primary:active {
    transform: translateY(0) scale(0.98);
}

.btn--ghost {
    background: rgba(26, 17, 53, 0.04);
    color: var(--text-primary);
    border: 2px solid var(--border-card);
}

.btn--ghost:hover {
    background: rgba(255, 107, 107, 0.06);
    border-color: var(--color-coral);
    color: var(--color-coral);
}

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-card);
}

.btn--outline:hover {
    background: rgba(255, 107, 107, 0.06);
    border-color: var(--color-coral);
    color: var(--color-coral);
    transform: translateY(-2px);
}

.btn--sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
}

.btn--full {
    width: 100%;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all var(--duration-normal) var(--ease-out);
    background: transparent;
}

.navbar[hidden] { display: none !important; }

.navbar--scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

/* Branded gradient accent line layered over the scrolled-state border */
.navbar--scrolled::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 107, 107, 0.32) 25%,
        rgba(255, 54, 171, 0.22) 55%,
        rgba(139, 92, 246, 0.18) 78%,
        transparent 100%);
    pointer-events: none;
}

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

.navbar__logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.navbar__ai-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-coral);
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.25);
    border-radius: var(--radius-full);
    padding: 0.15em 0.55em;
    line-height: 1.6;
    white-space: nowrap;
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

/* Desktop: the [hidden] attribute used to also hide the menu here, which
   left visitors looking at a logo with no nav. The attribute is now only
   honored inside the mobile media query below — desktop always shows the
   inline menu, mobile keeps the slide-out drawer behavior. */
.navbar__menu[hidden] { display: flex; }

.navbar__helper { display: none; }

.navbar__link {
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.navbar__link:hover {
    color: var(--color-coral);
    background: rgba(255, 107, 107, 0.06);
}

.navbar__link--login {
    margin-left: 0.25rem;
    border: 1.5px solid var(--border-card);
    color: var(--text-primary);
}

.navbar__link--login:hover {
    border-color: var(--border-hover);
    color: var(--color-coral);
    background: rgba(255, 107, 107, 0.06);
}

.navbar__cta {
    margin-left: 0.75rem;
}

/* Explicit focus rings for the header/hero interactive elements. Setting the
   outline values here (not just inheriting the generic :focus-visible rule)
   keeps the indicators visible even when /static/accessibility.css's generic
   :focus-visible rule loads after this stylesheet — element-targeted rules
   win on specificity, so the coral ring can't be weakened. */
.navbar__logo:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.2);
}

/* Current-page marker — a subtle coral underline on the home logo link.
   Uses ::after so it doesn't disturb hover or focus-visible box-shadow. */
.navbar__logo[aria-current="page"] {
    position: relative;
}

.navbar__logo[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-coral);
    border-radius: 1px;
    opacity: 0.6;
}

/* Focus ring matches pill shape of each nav control */
.navbar__link:focus-visible,
.navbar__link--login:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 3px;
    border-radius: var(--radius-full);
    box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.2);
}

.navbar__cta:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 4px;
    border-radius: var(--radius-full);
    box-shadow: 0 0 0 5px rgba(255, 107, 107, 0.2);
}

.navbar__helper {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-right: 0.5rem;
}

/* Hero call-to-action buttons — a thicker ring plus a soft halo keeps focus
   obvious on both the light hero and the dark final-CTA section. */
.hero__actions .btn:focus-visible {
    outline: 3px solid var(--color-coral);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.25);
}

/* Dark CTA section — white ring keeps focus unmistakable against the dark gradient */
.cta-final .btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25);
}

/* Hamburger */
.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    height: 28px;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    margin-left: auto;
}

/* Stable right-alignment hook — reinforces margin-left: auto with order so
   the toggle always sits at the trailing edge regardless of flex strategy */
.landing-header__toggle--right {
    order: 10;
    margin-left: auto;
}

.navbar__toggle-bar {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--duration-normal) var(--ease-out);
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(2) {
    opacity: 0;
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.navbar__toggle:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-top: 5rem;
}

/* Top-of-hero aurora — a barely-perceptible warm tint that bridges the fixed
   navbar and the hero surface so the header reads as a unified brand zone. */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg,
        rgba(255, 107, 107, 0.055) 0%,
        rgba(255, 54, 171, 0.025) 50%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.hero__bg-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 55% at 20% 50%, rgba(255, 107, 107, 0.11) 0%, transparent 60%),
        radial-gradient(ellipse 55% 65% at 80% 30%, rgba(0, 212, 255, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 45% 45% at 60% 80%, rgba(139, 92, 246, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 35% 35% at 10% 20%, rgba(255, 217, 61, 0.06) 0%, transparent 50%);
    pointer-events: none;
    animation: gradient-drift 20s ease-in-out infinite alternate;
}

@keyframes gradient-drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -10px) scale(1.02); }
    100% { transform: translate(-10px, 15px) scale(1.01); }
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.25rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(123, 237, 111, 0.12), rgba(0, 212, 255, 0.12));
    border: 1px solid rgba(123, 237, 111, 0.2);
    color: #16a34a;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: pulse-scale 3s ease-in-out infinite;
}

.hero__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    animation: pulse-dot 2s ease-in-out infinite;
}

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

@keyframes pulse-scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero__title-boring {
    display: block;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: var(--color-coral);
    text-decoration-thickness: 3px;
}

.hero__title-fun {
    display: block;
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__typewriter {
    color: var(--color-coral);
    border-right: 3px solid var(--color-coral);
    padding-right: 4px;
    animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { border-color: var(--color-coral); }
    50% { border-color: transparent; }
}

.hero__tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero__subtitle-accent {
    color: #ff5ca8;
    font-weight: 700;
    text-shadow: 0 0 18px rgba(255, 92, 168, 0.35);
}

.hero__fast-track {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero__fast-track-copy {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.hero__fast-track-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-coral);
    text-decoration: underline;
    text-decoration-color: rgba(255, 107, 107, 0.4);
    text-underline-offset: 3px;
    white-space: nowrap;
    transition: color var(--duration-fast) var(--ease-out),
                text-decoration-color var(--duration-fast) var(--ease-out);
}

.hero__fast-track-link:hover {
    color: var(--color-coral-dark);
    text-decoration-color: var(--color-coral-dark);
}

.hero__fast-track-link:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.hero__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero__stats {
    display: flex;
    gap: 2.5rem;
}

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

.hero__stat-figure {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    line-height: 1;
    font-family: var(--font-heading);
    font-weight: 700;
}

.hero__stat-number {
    font-size: 1.9rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.hero__stat-suffix {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 0.05em;
}

.hero__stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Hero Floating Elements */
.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 400px;
}

/* Dashboard-mockup illustration: one big "student card" centered, two
   smaller accent cards floating around it. Sets the marketing tone —
   "this is what your dashboard looks like" — without leaning on
   fabricated screenshots. Height is driven by the card itself so the
   accent pills always hug the card edges, never float in empty space. */
.hero__illustration {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.hero__card {
    background: #FFFFFF;
    border: 1px solid var(--border-card, rgba(26, 17, 53, 0.08));
    border-radius: 20px;
    box-shadow:
        0 24px 48px -16px rgba(45, 27, 105, 0.18),
        0 4px 12px -4px rgba(45, 27, 105, 0.08);
}

.hero__card--main {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    z-index: 2;
}

.hero__card-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.hero__card-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px -2px rgba(255, 54, 171, 0.25);
}

.hero__card-avatar svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hero__card-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--color-ink, #1A1135);
    line-height: 1.2;
}

.hero__card-sub {
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--color-ink-muted, #6B6780);
    line-height: 1.3;
}

.hero__card-progress + .hero__card-progress {
    margin-top: 0.25rem;
}

.hero__card-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-ink, #1A1135);
    margin-bottom: 0.4rem;
}

.hero__card-progress-label span:last-child {
    color: var(--color-coral, #FF6B6B);
    font-variant-numeric: tabular-nums;
}

.hero__card-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(26, 17, 53, 0.06);
    overflow: hidden;
}

.hero__card-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #FF6B6B 0%, #FF36AB 55%, #8B5CF6 100%);
}

.hero__card-streak {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFF8E7, #FFFFFF);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #B45309;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Accent cards float in front of / behind the main card */
.hero__card--float {
    position: absolute;
    z-index: 3;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    animation: hero-float 6.5s ease-in-out infinite;
}

.hero__card--xp {
    top: -1.25rem;
    left: -1.5rem;
    color: #5B21B6;
    background: linear-gradient(135deg, #F0EDFF, #FFFFFF);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 12px 24px -10px rgba(91, 33, 182, 0.25);
    animation-delay: -1s;
}

.hero__card--badge {
    bottom: -1.25rem;
    right: -1.25rem;
    color: #B45309;
    background: linear-gradient(135deg, #FFFDF0, #FFFFFF);
    border: 1px solid rgba(255, 217, 61, 0.35);
    box-shadow: 0 12px 24px -10px rgba(245, 158, 11, 0.3);
    animation-delay: -3s;
}

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

/* On narrow screens drop the floating offsets so cards never escape the
   viewport edge. */
@media (max-width: 720px) {
    .hero__illustration { max-width: 360px; }
    .hero__card--xp     { top: -0.75rem; left: -0.5rem; }
    .hero__card--badge  { bottom: -0.75rem; right: -0.5rem; }
}

/* Hero Particle Container */
.hero__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hero__particle {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0;
    animation: particle-float linear infinite;
    pointer-events: none;
}

@keyframes particle-float {
    0% { opacity: 0; transform: translateY(100%) rotate(0deg); }
    10% { opacity: 0.3; }
    90% { opacity: 0.15; }
    100% { opacity: 0; transform: translateY(-100vh) rotate(360deg); }
}

/* Hero decorative gradient blobs — soft radial art layered behind hero content */
.hero-gradient {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
    z-index: 0;
}

.hero-gradient--left {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle at center,
        rgba(255, 107, 107, 0.26) 0%,
        rgba(255, 54, 171, 0.12) 50%,
        transparent 70%);
    top: -130px;
    left: -230px;
    will-change: transform;
}

.hero-gradient--right {
    width: 560px;
    height: 560px;
    background: radial-gradient(circle at center,
        rgba(0, 212, 255, 0.21) 0%,
        rgba(139, 92, 246, 0.12) 50%,
        transparent 70%);
    top: 20px;
    right: -170px;
    will-change: transform;
}

/* Hero glow accents — secondary depth layer that reinforces the gradient palette */
.hero__glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.hero__glow--left {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle at center,
        rgba(255, 107, 107, 0.13) 0%,
        rgba(255, 54, 171, 0.06) 50%,
        transparent 70%);
    filter: blur(60px);
    top: 8%;
    left: -110px;
}

.hero__glow--right {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at center,
        rgba(139, 92, 246, 0.12) 0%,
        rgba(0, 212, 255, 0.06) 50%,
        transparent 70%);
    filter: blur(60px);
    bottom: 8%;
    right: -90px;
}

/* Hero brand gradient layers — second decorative depth layer using the brand palette.
   Positioned around hero content to frame the composition with colour depth.
   Layers behind all content (z-index 0) and are never interactive. */
.hero__gradient {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: hero-gradient-drift 22s ease-in-out infinite alternate;
    will-change: transform;
}

.hero__gradient--left {
    width: 580px;
    height: 580px;
    background: radial-gradient(circle at 40% 40%,
        rgba(255, 107, 107, 0.16) 0%,
        rgba(255, 54, 171, 0.09) 45%,
        transparent 68%);
    filter: blur(72px);
    top: -100px;
    left: -180px;
    animation-direction: alternate;
}

.hero__gradient--right {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 60% 38%,
        rgba(139, 92, 246, 0.13) 0%,
        rgba(0, 212, 255, 0.09) 50%,
        transparent 70%);
    filter: blur(72px);
    top: 50px;
    right: -150px;
    animation-direction: alternate-reverse;
}

@keyframes hero-gradient-drift {
    0%   { transform: translate(0, 0) scale(1); }
    40%  { transform: translate(12px, -8px) scale(1.03); }
    100% { transform: translate(-6px, 14px) scale(1.015); }
}

/* ============================================
   Social Proof
   ============================================ */
.social-proof {
    padding: 2.5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.social-proof__label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.social-proof__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-proof__item {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    transition: all var(--duration-normal) var(--ease-spring);
}

.social-proof__item:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-sm);
    color: var(--color-coral);
    border-color: var(--border-hover);
}

/* ============================================
   Exam Catalog
   ============================================ */
.exam-catalog {
    background: var(--bg-primary);
}

.exam-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.exam-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all var(--duration-normal) var(--ease-spring);
}

.exam-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.exam-card--featured {
    border-color: var(--color-coral);
    box-shadow: var(--shadow-glow-coral);
    position: relative;
}

.exam-card--featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-cta);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.875rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    pointer-events: none;
}

.exam-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.exam-card__badge--ged {
    background: rgba(0, 212, 255, 0.1);
    color: var(--color-cyan);
    border: 1px solid rgba(0, 212, 255, 0.25);
}

.exam-card__badge--sat {
    background: rgba(255, 107, 107, 0.1);
    color: var(--color-coral);
    border: 1px solid rgba(255, 107, 107, 0.25);
}

.exam-card__badge--act {
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-purple);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.exam-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.exam-card__desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.exam-card__subjects {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
    padding: 0;
    margin: 0;
}

.exam-card__subjects li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
}

.exam-card__subjects li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-lime);
    font-size: 0.8125rem;
    font-weight: 700;
}

.exam-card__cta {
    margin-top: auto;
    text-align: center;
    text-decoration: none;
}

.exam-card__cta:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 4px;
    border-radius: var(--radius-full);
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
    background: var(--bg-primary);
}

.how-it-works::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--color-cyan);
    opacity: 0.04;
    filter: blur(100px);
    top: -150px;
    right: -150px;
    pointer-events: none;
}

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

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

.step__number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.step__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(139, 92, 246, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--color-coral);
    transition: all var(--duration-normal) var(--ease-spring);
}

.step:hover .step__icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-glow-coral);
}

.step__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step__desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step__connector {
    display: flex;
    align-items: center;
    padding-top: 5rem;
    flex-shrink: 0;
}

/* ============================================
   Features
   ============================================ */
.features {
    background: var(--bg-secondary);
}

.features::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--color-purple);
    opacity: 0.04;
    filter: blur(120px);
    bottom: -200px;
    left: -200px;
    pointer-events: none;
}

.features::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--color-yellow);
    opacity: 0.05;
    filter: blur(100px);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--duration-normal) var(--ease-spring);
    position: relative;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: transform var(--duration-normal) var(--ease-spring);
}

.feature-card:hover .feature-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-card__icon--coral { background: rgba(255, 107, 107, 0.12); color: var(--color-coral); }
.feature-card__icon--blue { background: rgba(59, 130, 246, 0.12); color: var(--color-blue); }
.feature-card__icon--yellow { background: rgba(255, 217, 61, 0.15); color: #D97706; }
.feature-card__icon--green { background: rgba(123, 237, 111, 0.12); color: #16a34a; }
.feature-card__icon--pink { background: rgba(255, 54, 171, 0.1); color: var(--color-pink); }
.feature-card__icon--cyan { background: rgba(0, 212, 255, 0.1); color: #0891B2; }

/* Legacy icon class support */
.feature-card__icon--purple { background: rgba(139, 92, 246, 0.12); color: var(--color-purple); }
.feature-card__icon--amber { background: rgba(255, 217, 61, 0.15); color: #D97706; }

.feature-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card__desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   Pricing
   ============================================ */
.pricing {
    background: var(--bg-primary);
}

.pricing::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--color-coral);
    opacity: 0.04;
    filter: blur(100px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.pricing__toggle {
    display: inline-flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-top: 1.5rem;
    position: relative;
    border: 1px solid var(--border-card);
}

.pricing__toggle-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing__toggle-btn--active {
    color: var(--text-primary);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.pricing__toggle-btn:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 3px;
    border-radius: var(--radius-full);
}

.pricing__toggle-save {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--gradient-cta);
    color: #fff;
    font-weight: 700;
}

.pricing__microcopy {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 0;
    text-align: center;
}

.pricing__microcopy--sub {
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.pricing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

/* 4-card exam grid (GED, Bundle [featured], SAT, ACT) */
.pricing__grid--exams {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1300px;
    gap: 1.25rem;
}

.pricing-card__exam-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.pricing-card__exam-badge--ged {
    background: linear-gradient(135deg, #DBF7FF, #FFFFFF);
    color: #0EA5E9;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.pricing-card__exam-badge--sat {
    background: linear-gradient(135deg, #FFE7E7, #FFFFFF);
    color: #FF6B6B;
    border: 1px solid rgba(255, 107, 107, 0.25);
}

.pricing-card__exam-badge--act {
    background: linear-gradient(135deg, #EEE7FF, #FFFFFF);
    color: #8B5CF6;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.pricing-card__exam-badge--bundle {
    background: linear-gradient(135deg, #FFE7E7 0%, #FCE0FF 50%, #EEE7FF 100%);
    color: #C026D3;
    border: 1px solid rgba(192, 38, 211, 0.25);
}

.pricing-card__access {
    margin: 0.5rem 0 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing__footnote {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.pricing__footnote strong { color: var(--text-primary); }

@media (max-width: 1100px) {
    .pricing__grid--exams {
        grid-template-columns: repeat(2, 1fr);
        max-width: 720px;
    }
}

@media (max-width: 640px) {
    .pricing__grid--exams {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

.pricing-card {
    background: var(--bg-card);
    border: 2px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--duration-normal) var(--ease-spring);
    position: relative;
}

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

.pricing-card--featured {
    border-color: var(--color-coral);
    background: linear-gradient(180deg, rgba(255, 107, 107, 0.03) 0%, var(--bg-card) 100%);
    box-shadow: var(--shadow-glow-coral);
    transform: scale(1.02);
}

.pricing-card--featured:hover {
    transform: scale(1.02) translateY(-4px);
}

.pricing-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    background: var(--gradient-cta);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    animation: pulse-scale 2.5s ease-in-out infinite;
    pointer-events: none;
}

.pricing-card__header {
    margin-bottom: 1.25rem;
}

.pricing-card__name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pricing-card__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pricing-card__price {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.pricing-card__amount {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: all var(--duration-normal) var(--ease-out);
}

.pricing-card__period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pricing-card__features {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-card__features li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pricing-card__features li svg {
    flex-shrink: 0;
}

/* Selected plan state — added by initPlanHydration() when user clicks a plan */
.pricing-card--selected {
    border-color: var(--color-purple);
    box-shadow: 0 0 0 2px var(--color-purple), var(--shadow-glow-coral);
    transform: translateY(-4px);
}

.pricing-card--featured.pricing-card--selected {
    transform: scale(1.02) translateY(-4px);
}

/* Disabled plan button — shown when Stripe price not yet configured */
.pricing-card .btn--disabled,
.pricing-card a.btn[disabled],
.pricing-card button.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Audience
   ============================================ */
.audience {
    background: var(--bg-secondary);
}

.audience::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--color-lime);
    opacity: 0.05;
    filter: blur(100px);
    top: -100px;
    left: -100px;
    pointer-events: none;
}

.audience__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.audience-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--duration-normal) var(--ease-spring);
}

.audience-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.audience-card__icon {
    margin: 0 auto 1.25rem;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--duration-normal) var(--ease-spring);
}

.audience-card:hover .audience-card__icon {
    transform: scale(1.15) rotate(-3deg);
}

.audience-card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.audience-card__desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.audience-card__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.audience-card__tags li {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(139, 92, 246, 0.08));
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-purple);
}

/* ============================================
   Testimonials
   ============================================ */
.testimonials {
    background: var(--bg-primary);
}

.testimonials::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--color-pink);
    opacity: 0.03;
    filter: blur(120px);
    bottom: -200px;
    right: -200px;
    pointer-events: none;
}

.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--duration-normal) var(--ease-spring);
}

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

.testimonial-card__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 1rem;
}

.testimonial-card__quote {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-cta);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    flex-shrink: 0;
}
img.testimonial-card__avatar {
    display: block;
    background: none;
}

.testimonial-card__name {
    font-weight: 700;
    font-size: 0.9rem;
}

.testimonial-card__role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Clarity testimonial — new-user social proof card */
.testimonial-clarity {
    margin-top: clamp(1.5rem, 3vw, 2rem);
    margin-left: auto;
    margin-right: auto;
    max-width: 680px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    transition: all var(--duration-normal) var(--ease-spring);
}

.testimonial-clarity:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-clarity__heading {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-coral);
    margin-bottom: 0.875rem;
}

.testimonial-clarity__quote {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
    margin: 0;
}

.testimonial-clarity__quote p {
    margin: 0 0 0.75rem;
}

.testimonial-clarity__quote footer {
    font-style: normal;
}

.testimonial-clarity__cite {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    font-style: normal;
}

@media (max-width: 375px) {
    .testimonial-clarity {
        padding: 1.5rem;
    }
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    background: var(--bg-secondary);
}

.faq__list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

.faq-item:hover {
    border-color: rgba(255, 107, 107, 0.15);
}

.faq-item--open {
    border-color: rgba(255, 107, 107, 0.2);
    box-shadow: var(--shadow-sm);
}

.faq-item__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    transition: color var(--duration-fast) var(--ease-out);
}

.faq-item__trigger:hover {
    color: var(--color-coral);
}

.faq-item__icon {
    flex-shrink: 0;
    transition: transform var(--duration-normal) var(--ease-spring);
    color: var(--text-muted);
}

.faq-item--open .faq-item__icon {
    transform: rotate(180deg);
    color: var(--color-coral);
}

.faq-item__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-normal) var(--ease-out);
}

.faq-item__content p {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   Final CTA
   ============================================ */
.cta-final {
    background: var(--bg-primary);
}

.cta-final__inner {
    text-align: center;
    padding: clamp(3rem, 6vw, 5rem);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #1A1135 0%, #2D1B69 50%, #1A1135 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cta-final__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    animation: gradient-drift 15s ease-in-out infinite alternate;
}

.cta-final__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-final__subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

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

.cta-final__note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-card);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__brand {
    max-width: 280px;
}

.footer__tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    line-height: 1.6;
}

.footer__heading {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer__links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(92, 84, 112, 0.35);
    transition: color var(--duration-fast) var(--ease-out),
                text-decoration-color var(--duration-fast) var(--ease-out);
}

.footer__links a:hover {
    color: var(--color-coral);
    text-decoration-color: var(--color-coral);
}

.footer__link--admin {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.75;
}

.footer__link--admin:hover {
    color: var(--text-secondary) !important;
    opacity: 1;
}

.footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--border-card);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer__social {
    display: flex;
    gap: 1rem;
}

.footer__social a {
    color: var(--text-muted);
    transition: all var(--duration-fast) var(--ease-out);
}

.footer__social a:hover {
    color: var(--color-coral);
    transform: translateY(-2px);
}

/* ============================================
   Scroll Animations
   ============================================
   Default state is INVISIBLE so JS can fade content in on scroll.
   The .js-ready class is set on <html> by landing/app.js the moment
   initScrollAnimations() takes over — until then, OR if the script
   never runs (HTTP error, JS error, no-JS user), .animate-on-scroll
   stays visible so the landing page is never blank. */
html:not(.js-ready) .animate-on-scroll {
    opacity: 1;
    transform: none;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-spring);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.steps .step:nth-child(1) .animate-on-scroll,
.steps .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.steps .step:nth-child(2) .animate-on-scroll,
.steps .animate-on-scroll:nth-child(3) { transition-delay: 100ms; }
.steps .step:nth-child(3) .animate-on-scroll,
.steps .animate-on-scroll:nth-child(5) { transition-delay: 200ms; }
.steps .step:nth-child(4) .animate-on-scroll,
.steps .animate-on-scroll:nth-child(7) { transition-delay: 300ms; }

.features__grid .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.features__grid .animate-on-scroll:nth-child(2) { transition-delay: 80ms; }
.features__grid .animate-on-scroll:nth-child(3) { transition-delay: 160ms; }
.features__grid .animate-on-scroll:nth-child(4) { transition-delay: 240ms; }
.features__grid .animate-on-scroll:nth-child(5) { transition-delay: 320ms; }
.features__grid .animate-on-scroll:nth-child(6) { transition-delay: 400ms; }

/* ============================================
   Confetti
   ============================================ */
.confetti-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: confetti-burst 1.2s ease-out forwards;
}

@keyframes confetti-burst {
    0% {
        opacity: 1;
        transform: translate(var(--dx, 0), var(--dy, 0)) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--dx, 0) * 3), calc(var(--dy, 0) * 3 + 100px)) scale(0.3) rotate(720deg);
    }
}

/* ============================================
   Responsive
   ============================================ */

/* min-width: 1024px — desktop brand lockup enhancement */
@media (min-width: 1024px) {
    .brand-mark__icon {
        width: 36px;
        height: 36px;
    }

    .navbar__logo {
        font-size: 1.45rem;
        gap: 0.75rem;
    }

    .brand__logo {
        font-size: 1.45rem;
        gap: 0.75rem;
    }
}

@media (max-width: 1024px) {
    .hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
    }

    .hero__visual {
        display: none;
    }

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

    /* Pricing + audience are 3-card grids — at tablet sizes keep the
       triplet on one row when there's still room, then drop straight
       to single column below the mobile breakpoint. A 2-col layout
       would leave card #3 stranded alone. */
    .pricing__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .audience__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

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

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .navbar__toggle {
        display: flex;
    }

    .navbar__menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem max(1.5rem, env(safe-area-inset-right)) 2rem 1.5rem;
        gap: 0.25rem;
        transform: translateX(100%);
        transition: transform var(--duration-normal) var(--ease-out);
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .navbar__toggle {
        touch-action: manipulation;
        min-width: 44px;
        min-height: 44px;
    }

    .navbar__toggle--mobile-right {
        margin-inline-start: auto;
        padding-inline-end: max(0.75rem, env(safe-area-inset-right));
        min-width: 44px;
        min-height: 44px;
    }

    .navbar__menu--open {
        transform: translateX(0);
    }

    /* Mobile only — honor the [hidden] attribute the JS toggles. */
    .navbar__menu[hidden] { display: none !important; }

    .navbar__helper { display: block; }

    .navbar__link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }

    .navbar__cta {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
        width: 100%;
        justify-content: center;
    }

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

    .step__connector {
        display: none;
    }

    .step {
        max-width: 100%;
    }

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

    .pricing__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-card--featured {
        transform: none;
    }

    .pricing-card--featured:hover {
        transform: translateY(-4px);
    }

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

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

    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .exam-catalog__grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .exam-card--featured {
        transform: none;
    }

    .exam-card--featured:hover {
        transform: translateY(-4px);
    }

    /* Hero brand gradient layers — shrink blobs at tablet and below so they
       don't create distracting horizontal overflow on narrow viewports */
    .hero__gradient--left {
        width: 300px;
        height: 300px;
        left: -100px;
        top: -40px;
    }

    .hero__gradient--right {
        width: 260px;
        height: 260px;
        right: -80px;
        top: 20px;
    }
}

/* ============================================
   640px — mid-size phones
   ============================================ */
@media (max-width: 640px) {
    .section__title {
        font-size: clamp(1.625rem, 5vw, 2rem);
    }

    /* Hero — center stack and tighten vertical rhythm */
    .hero__content {
        text-align: center;
    }

    .hero__badge {
        margin-bottom: 1rem;
    }

    .hero__title {
        font-size: clamp(2rem, 7vw, 2.75rem);
        line-height: 1.06;
        letter-spacing: -0.01em;
        margin-bottom: 1rem;
    }

    .hero__title-line {
        display: block;
    }

    .hero__tagline {
        font-size: clamp(1rem, 4.5vw, 1.25rem);
        line-height: 1.4;
        margin-bottom: 0.75rem;
        max-width: 88%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__subtitle {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
        max-width: 88%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        margin-bottom: 2rem;
    }

    /* Brand lockup — tighten gap and shrink SVG mark on narrow screens */
    .brand-lockup {
        gap: 0.45rem;
    }

    .brand-mark__svg {
        width: 26px;
        height: 26px;
    }

    /* Hero gradient blobs — shrink so they don't bleed horizontally */
    .hero-gradient--left {
        width: 320px;
        height: 320px;
        left: -120px;
        top: -60px;
    }

    .hero-gradient--right {
        width: 270px;
        height: 270px;
        right: -80px;
        top: 20px;
    }

    /* Hero glow accents — shrink to avoid horizontal overflow at narrow widths */
    .hero__glow--left {
        width: 260px;
        height: 260px;
        left: -80px;
    }

    .hero__glow--right {
        width: 200px;
        height: 200px;
        right: -60px;
    }

    /* Brand mark icon — lighten shadow on small screens */
    .brand-mark__icon {
        box-shadow: 0 1px 6px rgba(255, 107, 107, 0.22);
    }

    /* Brand wordmark — scale down and drop the AI Tutor badge so the longer
       "Learning That Doesn't Suck" wordmark fits on one line next to the mark. */
    .navbar__logo {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .brand__logo {
        font-size: 1rem;
        gap: 0.5rem;
        padding: 0.15rem 0.35rem;
    }

    .navbar__ai-label {
        display: none;
    }

    .btn {
        min-height: 44px;
    }

    .faq-item__trigger {
        min-height: 44px;
    }

    .pricing__grid {
        max-width: 360px;
    }

    .testimonials__grid {
        gap: 1rem;
    }

    /* Hero brand lockup — centered as one branded unit on narrow screens.
       Reordered so logo mark and brand phrase are visually adjacent (caption
       drops below), making the two elements read as one joined lockup. */
    .hero__brand-lockup {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero__brand-svg {
        width: 36px;
        height: 36px;
    }

    .hero__brand-wordmark {
        font-size: 1.35rem;
    }

    .hero__brand-logo {
        order: 1;
        justify-content: center;
        margin-bottom: 0.2rem;
    }

    .hero__brand-phrase {
        order: 2;
        line-height: 1.1;
        letter-spacing: -0.02em;
        margin-bottom: 0.5rem;
        max-width: 92%;
        margin-left: auto;
        margin-right: auto;
    }

    .brand-caption {
        order: 3;
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================
   480px — small phones / large iPhone SE
   Tighten spacing and remove centered max-width
   constraints so content fills the viewport edge-to-edge.
   ============================================ */
@media (max-width: 480px) {
    /* Exam catalog — remove the 400 px centering cap so cards fill the viewport */
    .exam-catalog__grid {
        max-width: 100%;
        gap: 1rem;
    }

    .exam-card {
        padding: 1.5rem 1.25rem;
    }

    /* Pricing — remove centering cap */
    .pricing__grid {
        max-width: 100%;
    }

    /* Audience — already 1-col from 768 px; tighten gap */
    .audience__grid {
        gap: 1rem;
    }

    /* Section header subtitle — slightly smaller so it stays readable */
    .section__subtitle {
        font-size: 0.9375rem;
    }

    /* Social proof bar — tighter spacing */
    .social-proof__logos {
        gap: 0.625rem;
    }
}

@media (max-width: 400px) {
    .hero__title {
        font-size: 2rem;
    }

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

    .social-proof__logos {
        gap: 0.5rem;
    }

    .social-proof__item {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
    }
}

/* ============================================
   414px — iPhone 8 Plus / large iPhone SE / most mid-range Android
   ============================================ */
@media (max-width: 414px) {
    html {
        font-size: 15px;
    }

    body {
        font-size: 15px;
        line-height: 1.55;
    }

    /* Container side gutters — reclaim horizontal space */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Section vertical rhythm — tighter on small screens */
    .section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Hero — denser layout */
    .hero {
        padding-top: 5rem;
        padding-bottom: 3rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    /* Hero — intermediate title size between 480px and 375px */
    .hero__title {
        font-size: 2.125rem;
    }

    /* Section headers — slightly tighter */
    .section__title {
        font-size: 1.75rem;
    }

    /* Cards — reduce inner padding to recover content width */
    .feature-card,
    .pricing-card,
    .audience-card,
    .testimonial-card,
    .exam-card {
        padding: 1.625rem 1.375rem;
    }

    /* Pricing toggle — comfortable tap size at this width */
    .pricing__toggle-btn {
        padding: 0.45rem 1.1rem;
        font-size: 0.84375rem;
    }

    /* All buttons — enforce 44px minimum touch-target height */
    .btn {
        min-height: 44px;
    }

    /* Remove 300ms tap delay on interactive controls */
    .btn,
    .navbar__toggle,
    .faq-item__trigger,
    .pricing__toggle-btn {
        touch-action: manipulation;
    }

    /* Navbar toggle — comfortable tap target */
    .navbar__toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }

    /* Hide non-essential decorative elements at small widths */
    .hero__floater,
    .hero__particle,
    .hero__shape {
        display: none;
    }

    /* FAQ — comfortable tap targets */
    .faq-item__trigger {
        padding: 1rem;
        min-height: 48px;
        font-size: 0.9375rem;
    }

    /* Pricing and audience card CTAs — full width */
    .pricing-card .btn,
    .audience-card .btn {
        width: 100%;
        justify-content: center;
    }

    /* Signup modal — slightly tighter inner padding */
    .signup-modal__box {
        padding: 2rem 1.5rem 1.75rem;
    }

    /* Input font-size ≥ 16px prevents iOS Safari auto-zoom on focus */
    .signup-modal__input {
        font-size: 1rem;
        min-height: 44px;
    }

    .signup-modal__submit {
        width: 100%;
        min-height: 48px;
    }

    /* Social proof — tighten gap but not as aggressively as 375px */
    .social-proof__logos {
        gap: 0.5625rem;
    }

    /* Footer — comfortable spacing before 375px tightening */
    .footer {
        padding: 3rem 0 1.5rem;
    }
}

/* --- Signup Modal --- */
.signup-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.signup-modal[hidden] {
    display: none;
}

.signup-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 17, 53, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.signup-modal__box {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-card);
    text-align: center;
    animation: modalSlideIn var(--duration-normal) var(--ease-spring);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.signup-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--duration-fast), background var(--duration-fast);
    line-height: 1;
}

.signup-modal__close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.signup-modal__logo {
    margin-bottom: 1rem;
}

.signup-modal__title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.signup-modal__subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}

.signup-modal__form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.signup-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.signup-modal__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.signup-modal__required {
    color: var(--color-coral);
}

.signup-modal__input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
    outline: none;
}

.signup-modal__input::placeholder {
    color: var(--text-muted);
}

.signup-modal__input:focus {
    border-color: var(--color-coral);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.signup-modal__input:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 2px;
}

.signup-modal__error {
    font-size: 0.875rem;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.875rem;
    margin: 0;
}

.signup-modal__error[hidden] {
    display: none;
}

.signup-modal__submit {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.signup-modal__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.signup-modal__login {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1.25rem;
    text-align: center;
}

.signup-modal__login a {
    color: var(--color-coral);
    font-weight: 600;
    text-decoration: none;
}

.signup-modal__login a:hover {
    text-decoration: underline;
}

/* Testimonials grid — surfaces approved survey-submitted testimonials.
   Empty section is hidden by the JS in app.js. */
.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 16px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 140ms ease, border-color 140ms ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 107, 0.30);
}

.testimonial-card__stars {
    color: #FBBF24;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.testimonial-card__quote {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--color-text, #f6f6fb);
    font-style: italic;
}

.testimonial-card__quote::before {
    content: '"';
    color: #FF6B6B;
    font-size: 1.4rem;
    margin-right: 2px;
    font-weight: 700;
}

.testimonial-card__quote::after {
    content: '"';
    color: #FF6B6B;
    font-size: 1.4rem;
    margin-left: 2px;
    font-weight: 700;
}

.testimonial-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.testimonial-card__name {
    font-size: 0.92rem;
    color: var(--color-text-soft, #c4c4d2);
    font-weight: 600;
}

.testimonial-card__exam-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 54, 171, 0.15));
    color: #FF6B6B;
    border: 1px solid rgba(255, 107, 107, 0.30);
}

/* Parent-buyer call-out strip below the pricing grid. Surfaces a path
   into the parent signup flow that previously only existed behind a
   direct API call. */
.parent-cta {
    margin: 32px auto 0;
    max-width: 880px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(0, 212, 255, 0.08));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 16px;
}

.parent-cta__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: rgba(139, 92, 246, 0.15);
    border-radius: 14px;
}

.parent-cta__title {
    margin: 0 0 4px;
    font-size: 1.15em;
    font-weight: 700;
    color: var(--color-text, #f6f6fb);
}

.parent-cta__desc {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.45;
    color: var(--color-text-soft, #c4c4d2);
}

.parent-cta__btn {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .parent-cta {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 14px;
        padding: 22px 20px;
    }
    .parent-cta__icon {
        justify-self: center;
    }
}

/* Role toggle inside the signup modal — "It's for me" vs "Buying for my kid".
   When the parent option is active, the form swaps to /api/auth/register/parent
   and shows post-signup help on inviting the child. */
.signup-modal__role-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.signup-modal__role {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--color-text-soft, #c4c4d2);
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.signup-modal__role:hover {
    color: var(--color-text, #f6f6fb);
}

.signup-modal__role--active {
    background: linear-gradient(135deg, var(--color-coral, #FF6B6B), var(--color-pink, #FF36AB));
    color: #fff;
    box-shadow: 0 2px 12px -4px rgba(255, 54, 171, 0.6);
}

.signup-modal__role--active:hover {
    color: #fff;
}

/* ============================================
   375px — Smallest viewport refinements
   ============================================ */
@media (max-width: 375px) {
    /* Tighten spacing tokens */
    :root {
        --section-py: 3rem;
        --container-px: 1rem;
    }

    /* Hero */
    .hero {
        padding-top: 4rem;
    }

    .hero__title {
        font-size: 1.75rem;
        letter-spacing: -0.01em;
    }

    .hero__subtitle {
        font-size: 0.95rem;
    }

    .hero__stat-number {
        font-size: 1.5rem;
    }

    /* Full-width slide-out menu so the page isn't half-covered */
    .navbar__menu {
        width: 100%;
    }

    /* Section headers */
    .section__title {
        font-size: 1.625rem;
    }

    .section__header {
        margin-bottom: 2rem;
    }

    /* Reduce card inner padding to gain content width */
    .feature-card,
    .pricing-card,
    .audience-card,
    .testimonial-card,
    .exam-card {
        padding: 1.5rem;
    }

    /* Pricing toggle — slightly smaller to fit comfortably */
    .pricing__toggle-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8125rem;
    }

    /* CTA section — less aggressive padding */
    .cta-final__inner {
        padding: 2rem 1.25rem;
    }

    /* FAQ — tighter trigger and body padding */
    .faq-item__trigger {
        padding: 1rem 1.25rem;
        font-size: 0.875rem;
    }

    .faq-item__content p {
        padding: 0 1.25rem 1rem;
    }

    /* Footer */
    .footer {
        padding: 2.5rem 0 1.25rem;
    }

    .footer__grid {
        gap: 1.5rem;
    }

    /* Enlarge social icon tap targets to meet 44×44px minimum */
    .footer__social a {
        padding: 0.75rem;
        margin: -0.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Signup modal — flush to screen edges, reduced inner padding */
    .signup-modal {
        padding: 0.5rem;
    }

    .signup-modal__box {
        padding: 2rem 1.25rem 1.5rem;
        max-width: 100%;
    }

    /* ---- Touch & accessibility additions ---- */

    /* iOS Safari auto-zooms inputs with font-size < 16px; force 1rem to prevent it */
    .signup-modal__input {
        font-size: 1rem;
    }

    /* Navbar logo — smaller font so "PrepTutorAI" fits on one
       line next to the 26 px mark and the 44 px hamburger at 375 px. */
    .navbar__logo {
        font-size: 0.95rem;
        gap: 0.4rem;
    }

    .brand__logo {
        font-size: 0.95rem;
        gap: 0.4rem;
        padding: 0.12rem 0.3rem;
    }

    /* Brand lockup keyed to the canonical PrepTutorAI aria-label — keeps the icon,
       wordmark, and AI badge on a single line so the brand name never wraps at 375 px. */
    .brand__logo[aria-label="PrepTutorAI"] {
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .navbar__logo-icon {
        width: 26px;
        height: 26px;
    }

    /* AI Tutor badge — hidden (already hidden at 640 px; kept here as guard) */
    .navbar__ai-label {
        display: none;
    }

    /* Navbar toggle — pad out to ≥44×44 px tap target while keeping bars visually 28×28 */
    .navbar__toggle {
        width: 44px;
        height: 44px;
        padding: 8px;
        box-sizing: border-box;
    }

    /* All buttons — enforce the 44 px minimum touch-target height */
    .btn {
        min-height: 44px;
    }

    /* Remove 300 ms tap delay on interactive controls */
    .btn,
    .navbar__toggle,
    .faq-item__trigger,
    .pricing__toggle-btn {
        touch-action: manipulation;
    }

    /* Hero badge — allow line wrap rather than overflowing on very narrow viewports */
    .hero__badge {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.4rem 1rem;
    }

    /* Pricing amount — tighten down so it never clips the card edge */
    .pricing-card__amount {
        font-size: 2rem;
    }

    /* Footer brand column — remove fixed max-width so it fills the single-column layout */
    .footer__brand {
        max-width: 100%;
    }

    /* Hero stats — explicit centre-align so numbers + labels sit centred in column layout */
    .hero__stat {
        align-items: center;
        text-align: center;
    }

    /* Step icons — trim from 64 px to 56 px to recover vertical breathing room */
    .step__icon {
        width: 56px;
        height: 56px;
    }

    /* Audience card icons — trim from 72 px to 56 px; avoids wasting vertical space
       on single-column cards where the icon dominates the card height */
    .audience-card__icon {
        width: 56px;
        height: 56px;
    }

    /* Audience tags — slightly tighter gap so chips don't orphan on their own line */
    .audience-card__tags {
        gap: 0.375rem;
    }

    /* Section badge — allow wrapping on very narrow viewports instead of overflowing */
    .section__badge {
        white-space: normal;
        text-align: center;
    }

    /* Final CTA — stack and centre the button so it fills the available width */
    .cta-final__actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .cta-final__actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ============================================
   Hero Quick Jump — compact in-page nav helper
   ============================================ */
.hero__quick-jump {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 107, 107, 0.05);
    border: 1px solid rgba(255, 107, 107, 0.14);
    margin-bottom: 1.5rem;
}

.hero__quick-jump-copy {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.hero__quick-jump-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero__quick-jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hero__quick-jump-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-coral);
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    transition: background var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
    touch-action: manipulation;
}

.hero__quick-jump-link:hover {
    background: rgba(255, 107, 107, 0.14);
    border-color: rgba(255, 107, 107, 0.35);
    transform: translateY(-1px);
}

.hero__quick-jump-link:focus-visible {
    outline: 2px solid var(--color-coral);
    outline-offset: 3px;
    border-radius: var(--radius-full);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.18);
}

@media (max-width: 640px) {
    .hero__quick-jump {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }
}

@media (max-width: 375px) {
    .hero__quick-jump {
        padding: 0.75rem 1rem;
    }

    .hero__quick-jump-links {
        width: 100%;
        justify-content: center;
    }

    .hero__quick-jump-link {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }

    .hero__typewriter {
        animation: none;
        border-color: var(--color-coral);
    }

    .hero__floater {
        animation: none;
    }

    .hero__particle {
        display: none;
    }

    /* Mobile nav drawer — disable slide-in animation for motion-sensitive users;
       drawer is still functional, just opens without the translateX transition */
    .navbar__menu {
        transition: none;
    }

    /* Hero gradient blobs — purely static; no animation runs, confirmed here */
    .hero-gradient {
        animation: none;
        transition: none;
    }

    /* Hero glow accents — purely static under reduced motion */
    .hero__glow {
        animation: none;
        transition: none;
    }

    /* Hero brand gradient layers — freeze the drift animation for motion-sensitive users */
    .hero__gradient {
        animation: none;
        transition: none;
        transform: none;
    }

    /* Brand mark — no transitions or scale transforms under reduced motion */
    .brand-mark__svg,
    .brand-mark__icon,
    .brand-mark__word {
        transition: none;
    }

    .brand-lockup:hover .brand-mark__icon,
    .brand-lockup:focus-visible .brand-mark__icon {
        transform: none;
    }

    /* Wordmark shimmer — freeze gradient position; logo stays legible and static */
    .brand__wordmark-gradient {
        animation: none;
        background-position: 0% center;
    }
}

/* --- Hero brand logo block --- */
.hero__brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.hero__brand-svg {
    flex-shrink: 0;
    filter: drop-shadow(0 4px 16px rgba(255, 107, 107, 0.35));
}

.hero__brand-wordmark {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    display: inline-block;
}

/* --- Hero playful copy --- */
.hero__playful-copy {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 600;
    color: var(--color-coral);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

/* --- Hero brand phrase --- */
.hero__brand-phrase {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
}

.hero__brand-phrase-sub {
    font-size: clamp(0.9rem, 1.7vw, 1rem);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.brand-caption {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    line-height: 1.3;
    margin-bottom: 1.25rem;
}

@media (max-width: 375px) {
    .hero__brand-logo {
        gap: 0.5rem;
    }
    /* Reduced from 1.35 rem so "PrepTutorAI" fits on one line
       next to the 36 px SVG mark at 375 px (15 px base = 16.5 px effective). */
    .hero__brand-wordmark {
        font-size: 1.1rem;
    }
    .hero__brand-phrase {
        font-size: 1.1rem;
        max-width: 100%;
    }
    .brand-caption {
        max-width: 100%;
    }
}

/* ============================================
   Landing Error Banner
   — shown by JS when the bootstrap fails;
     hidden by default via the HTML [hidden] attr.
   ============================================ */
#landing-error-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: linear-gradient(135deg, #1A1135 0%, #2D1B69 100%);
    color: #fff;
    border-bottom: 2px solid var(--color-coral);
    padding: 0.75rem 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition:
        transform var(--duration-normal) var(--ease-out),
        opacity var(--duration-normal) var(--ease-out);
}

#landing-error-banner[hidden] {
    display: none;
}

.landing-error-banner__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

#landing-error-message {
    font-size: 0.9375rem;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

#landing-error-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    background: var(--gradient-cta);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.35);
    transition:
        box-shadow var(--duration-fast) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}

#landing-error-retry:hover {
    box-shadow: 0 4px 18px rgba(255, 107, 107, 0.55);
    transform: translateY(-1px);
}

#landing-error-retry:active {
    transform: translateY(0);
}

#landing-error-retry:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.45);
}

@media (max-width: 375px) {
    .landing-error-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    #landing-error-retry {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    #landing-error-banner {
        transition: none;
    }
}

