/* =====================================================================
   Study Cafe — Landing page styles (scoped under #view-landing)
   Integrated from "landing page/css/theme.css" + "landing page/css/styles.css".
   All selectors are prefixed with #view-landing so this cannot affect
   the auth / onboarding / dashboard / profile views.
   ===================================================================== */

/* ---------------------------------------------------------------------
   Theme tokens (verbatim — shared values are identical to the app's :root)
   --------------------------------------------------------------------- */
:root {
    --bg-dark: #080B11;
    --surface-dark: #111622;
    --border-subtle: #1E2638;
    --gold-primary: #E5B869;
    --gold-gradient: linear-gradient(135deg, #F5D089 0%, #C8963E 100%);
    --text-white: #FFFFFF;
    --text-muted: #8A94A6;
    --success: #10B981;
    --danger: #EF4444;

    /* typography */
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* layout */
    --container-max: 1200px;
    --gutter: 24px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --header-h: 98px;
}

/* ---------------------------------------------------------------------
   Base (document-level only — safe globally)
   --------------------------------------------------------------------- */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: clip;            /* clips the off-canvas menu; preserves position: sticky */
}

/* ---------------------------------------------------------------------
   Scoped reset & base
   --------------------------------------------------------------------- */
#view-landing,
#view-landing *,
#view-landing *::before,
#view-landing *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
}

#view-landing {
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

#view-landing img { max-width: 100%; display: block; }

#view-landing a { color: inherit; text-decoration: none; }

#view-landing button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

#view-landing ul { list-style: none; }

#view-landing h1, #view-landing h2, #view-landing h3, #view-landing h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.15;
}

/* ---------------------------------------------------------------------
   Layout helpers
   --------------------------------------------------------------------- */
#view-landing .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

#view-landing .section { padding-block: 40px; scroll-margin-top: calc(var(--header-h) + 8px); }

@media (min-width: 768px) {
    :root { --gutter: 32px; }
    #view-landing .section { padding-block: 56px; }
}

@media (min-width: 1024px) {
    :root { --gutter: 40px; }
    #view-landing .section { padding-block: 64px; }
}

/* ---------------------------------------------------------------------
   Shared: buttons
   --------------------------------------------------------------------- */
#view-landing .btn {
    --btn-h: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: var(--btn-h);
    padding-inline: 24px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
    -webkit-tap-highlight-color: transparent;
}
#view-landing .btn:active { transform: translateY(1px); }
#view-landing .btn i { width: 20px; height: 20px; stroke-width: 2; }
#view-landing .btn-block { display: flex; width: 100%; }

/* Gold filled — dark text on gold */
#view-landing .btn-primary {
    background: var(--gold-gradient);
    color: var(--bg-dark);
    box-shadow: 0 6px 22px rgba(229,184,105,0.22);
}
#view-landing .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 8px 28px rgba(229,184,105,0.32); }

/* Outlined — transparent + gold border */
#view-landing .btn-outline {
    background: rgba(8,11,17,0.45);
    color: var(--text-white);
    border: 1px solid rgba(229,184,105,0.65);
}
#view-landing .btn-outline:hover { background: rgba(229,184,105,0.12); border-color: var(--gold-primary); }

/* CTA banner: dark filled (black bg, gold text) */
#view-landing .btn-dark {
    background: var(--bg-dark);
    color: var(--gold-primary);
}
#view-landing .btn-dark:hover { background: #050709; filter: brightness(1.15); }

/* CTA banner: transparent w/ dark border (on gold bg) */
#view-landing .btn-ghost-dark {
    background: rgba(8,11,17,0.08);
    color: var(--bg-dark);
    border: 1px solid rgba(8,11,17,0.55);
}
#view-landing .btn-ghost-dark:hover { background: rgba(8,11,17,0.18); }

/* ---------------------------------------------------------------------
   Shared: card + eyebrow + section heading
   --------------------------------------------------------------------- */
#view-landing .card {
    background: rgba(17,22,34,0.75);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

#view-landing .eyebrow {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-primary);
    margin-bottom: 10px;
}

#view-landing .accent-gold { color: var(--gold-primary); }

#view-landing .section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 26px;
    text-align: center;
}
#view-landing .section-heading h2 {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    color: var(--text-white);
    white-space: nowrap;
}
#view-landing .deco-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    flex: 1 1 60px;
    max-width: 120px;
}
#view-landing .deco-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gold-primary);
    flex: 0 0 auto;
}

/* ---------------------------------------------------------------------
   1. Header / navigation
   --------------------------------------------------------------------- */
#view-landing .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(8,11,17,0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
}
#view-landing .header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#view-landing .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
#view-landing .logo-mark {
    height: 44px;
    width: auto;
    display: block;
}
#view-landing .logo-text {
    height: 30px;
    width: auto;
    max-width: 52vw;
    object-fit: contain;
    display: block;
}

/* CSS-only hamburger */
#view-landing .nav-toggle { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
#view-landing .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
}
#view-landing .nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--gold-primary);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}

#view-landing .nav-menu {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(80vw, 320px);
    height: calc(100vh - var(--header-h));
    background: var(--surface-dark);
    border-left: 1px solid var(--border-subtle);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    transform: translateX(100%);
    transition: transform .28s ease;
    box-shadow: -16px 0 40px rgba(0,0,0,0.5);
}
#view-landing .nav-menu a:not(.btn) {
    display: block;
    padding: 14px 12px;
    font-size: 1rem;
    color: var(--text-white);
    border-radius: var(--radius-sm);
    transition: background-color .2s ease, color .2s ease;
}
#view-landing .nav-menu a:not(.btn):hover { background: rgba(229,184,105,0.1); color: var(--gold-primary); }

#view-landing .nav-toggle:checked ~ .nav-menu { transform: translateX(0); }
#view-landing .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
#view-landing .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
#view-landing .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }
#view-landing .nav-toggle:checked ~ .nav-burger { position: fixed; right: var(--gutter); top: calc(var(--header-h) / 2 - 11px); z-index: 200; }

/* ---------------------------------------------------------------------
   2. Hero
   --------------------------------------------------------------------- */
#view-landing .hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(ellipse 70% 60% at 22% 18%, rgba(229,184,105,0.18), transparent 60%),
        radial-gradient(ellipse 80% 60% at 78% 85%, rgba(200,150,62,0.10), transparent 60%),
        repeating-linear-gradient(90deg, transparent 0 64px, rgba(255,255,255,0.014) 64px 65px),
        linear-gradient(180deg, #0B0E16 0%, var(--bg-dark) 55%, #050709 100%);
    background-size: cover, cover, auto, cover;
    background-position: center;
    overflow: hidden;
}
#view-landing .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,11,17,0.35) 0%, rgba(8,11,17,0.72) 55%, rgba(8,11,17,0.92) 100%);
    pointer-events: none;
}
#view-landing .hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding-top: 20px;
    padding-bottom: 44px;
}
#view-landing .hero .eyebrow { margin-bottom: 8px; }
#view-landing .hero-title {
    margin-bottom: 8px;
    line-height: 1.02;
    letter-spacing: -0.01em;
}
#view-landing .hero-brand {
    height: clamp(60px, 15vw, 120px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
#view-landing .hero-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 4.6vw, 1.75rem);
    color: var(--text-white);
    margin-bottom: 10px;
}
#view-landing .hero-desc {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 38ch;
    margin-bottom: 18px;
}
#view-landing .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
}

/* ---------------------------------------------------------------------
   3. Statistics card
   --------------------------------------------------------------------- */
#view-landing .stats-section { padding-top: 0; margin-top: -24px; position: relative; z-index: 2; }
#view-landing .stats-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 0;
    padding: 20px 14px;
}
#view-landing .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 12px 6px;
}
#view-landing .stat-icon {
    width: 34px; height: 34px;
    color: var(--gold-primary);
    stroke-width: 1.6;
}
#view-landing .stat-num {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(1.6rem, 5vw, 2.1rem);
    color: var(--text-white);
    line-height: 1;
}
#view-landing .stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.25;
}

/* ---------------------------------------------------------------------
   4 + 8. How It Works
   --------------------------------------------------------------------- */
#view-landing .steps { display: flex; flex-direction: column; gap: 0; }
#view-landing .step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 12px;
}
#view-landing .step::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 0;
    height: 18px;
    border-left: 1px dashed rgba(229,184,105,0.4);
    transform: translateX(-50%);
}
#view-landing .step:first-child::before { display: none; }
#view-landing .step-icon {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: rgba(229,184,105,0.05);
    display: grid;
    place-items: center;
    color: var(--gold-primary);
}
#view-landing .step-icon i { width: 36px; height: 36px; stroke-width: 1.6; }
#view-landing .step-num {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--bg-dark);
    display: grid;
    place-items: center;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid var(--bg-dark);
}
#view-landing .step-title { color: var(--gold-primary); font-size: 1.25rem; }
#view-landing .step-desc { color: var(--text-muted); font-size: 0.95rem; max-width: 32ch; }

/* ---------------------------------------------------------------------
   5 + 6 + 7 + 11. Membership
   --------------------------------------------------------------------- */
#view-landing .membership-card { padding: 26px 20px; }
#view-landing .membership-grid { display: flex; flex-direction: column; gap: 22px; }
#view-landing .membership-title {
    font-size: clamp(1.7rem, 6vw, 2.5rem);
    color: var(--text-white);
    margin-bottom: 16px;
}
#view-landing .features { display: flex; flex-direction: column; gap: 12px; }
#view-landing .features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-white);
    font-size: 0.98rem;
}
#view-landing .features i { color: var(--gold-primary); width: 22px; height: 22px; flex: 0 0 auto; stroke-width: 1.8; }

#view-landing .price-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(229,184,105,0.65);
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, rgba(17,22,34,0.95), rgba(8,11,17,0.95));
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
#view-landing .price-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-primary);
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
}
#view-landing .price-brand i { width: 22px; height: 22px; }
#view-landing .price-tier {
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    color: var(--text-muted);
    margin-top: 4px;
}
#view-landing .price-amount { margin: 14px 0 8px; line-height: 1; }
#view-landing .price-currency {
    font-family: var(--font-serif);
    font-weight: 800;
    font-size: clamp(2.8rem, 12vw, 3.6rem);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
#view-landing .price-unit { font-size: 1.1rem; color: var(--text-muted); font-weight: 500; }
#view-landing .price-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--gold-gradient);
    color: var(--bg-dark);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
#view-landing .price-subline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-primary);
    margin: 2px 0 6px;
}
#view-landing .price-tagline { color: var(--text-muted); font-style: italic; font-size: 0.95rem; }
#view-landing .price-book {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 120px;
    height: 120px;
    color: rgba(229,184,105,0.08);
    pointer-events: none;
}

#view-landing .membership-cta { margin-top: 20px; }

/* ---------------------------------------------------------------------
   6. Why Study Café
   --------------------------------------------------------------------- */
#view-landing .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
#view-landing .feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px 14px;
}
#view-landing .feature-icon {
    width: 40px; height: 40px;
    color: var(--gold-primary);
    stroke-width: 1.6;
    margin-bottom: 6px;
}
#view-landing .feature-title { color: var(--text-white); font-size: 1.2rem; }
#view-landing .feature-desc { color: var(--text-muted); font-size: 0.92rem; max-width: 30ch; }

/* ---------------------------------------------------------------------
   7. Final CTA banner
   --------------------------------------------------------------------- */
#view-landing .cta-banner {
    background: var(--gold-gradient);
    border-radius: var(--radius-lg);
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}
#view-landing .cta-copy { display: flex; align-items: flex-start; gap: 16px; }
#view-landing .cta-cup {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    color: var(--bg-dark);
    stroke-width: 1.8;
    margin-top: 4px;
}
#view-landing .cta-title { font-size: clamp(1.4rem, 5vw, 1.9rem); color: var(--bg-dark); line-height: 1.15; }
#view-landing .cta-sub { color: var(--text-white); font-weight: 500; margin-top: 4px; }
#view-landing .cta-actions { display: flex; flex-direction: column; gap: 12px; }

/* ---------------------------------------------------------------------
   8. Footer
   --------------------------------------------------------------------- */
#view-landing .site-footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-dark);
    padding-block: 22px;
}
#view-landing .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
#view-landing .footer-copy { color: var(--text-muted); font-size: 0.88rem; }
#view-landing .footer-social { display: flex; gap: 12px; }
#view-landing .footer-social a {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    display: grid; place-items: center;
    color: var(--gold-primary);
    transition: border-color .2s ease, background-color .2s ease;
}
#view-landing .footer-social a:hover { border-color: var(--gold-primary); background: rgba(229,184,105,0.1); }
#view-landing .footer-social i, #view-landing .footer-social svg { width: 18px; height: 18px; stroke-width: 1.6; }

/* =====================================================================
   Breakpoints — progressive enhancement
   ===================================================================== */

/* ---- Tablet ≥640px ---- */
@media (min-width: 640px) {
    #view-landing .stats-card { grid-template-columns: repeat(4, 1fr); gap: 0; }
    #view-landing .stat:not(:first-child) { border-left: 1px solid var(--border-subtle); }

    #view-landing .features-grid { grid-template-columns: 1fr 1fr; }
    #view-landing .feature:nth-child(odd) { border-right: 1px solid var(--border-subtle); }

    #view-landing .hero-actions { flex-direction: row; gap: 16px; }
    #view-landing .hero-actions .btn { width: auto; min-width: 200px; }
    #view-landing .btn-block { width: auto; }
    #view-landing .hero-actions .btn-block { width: auto; }

    #view-landing .cta-actions { flex-direction: row; }
    #view-landing .cta-actions .btn { width: auto; min-width: 160px; }

    #view-landing .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---- ≥768px : steps become horizontal ---- */
@media (min-width: 768px) {
    #view-landing .steps { flex-direction: row; justify-content: space-between; gap: 0; }
    #view-landing .step { flex: 1 1 0; padding: 20px 16px; }
    /* Horizontal dashed connector sitting strictly in the gap between icons */
    #view-landing .step::before {
        top: 62px;                 /* icon vertical center: padding(20) + half(42) */
        left: calc(-50% + 42px);   /* previous icon right edge */
        right: calc(50% + 42px);   /* this icon left edge */
        width: auto;
        height: 0;
        border-left: none;
        border-top: 1px dashed rgba(229,184,105,0.4);
        transform: none;
    }
    #view-landing .step:first-child::before { display: none; }

    #view-landing .cta-banner { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px 36px; }
}

/* ---- Desktop ≥1024px ---- */
@media (min-width: 1024px) {
    #view-landing .membership-grid { display: grid; grid-template-columns: 1fr 360px; align-items: start; gap: 48px; }
    #view-landing .price-card { align-self: stretch; }

    #view-landing .features-grid { grid-template-columns: repeat(4, 1fr); }
    #view-landing .feature { border-right: 1px solid var(--border-subtle); }
    #view-landing .feature:last-child { border-right: none; }

    #view-landing .hero-brand { height: 120px; }
    #view-landing .hero-content { padding-top: 24px; }

    /* Desktop: replace hamburger with inline nav */
    #view-landing .nav-burger, #view-landing .nav-toggle { display: none; }
    #view-landing .nav-menu {
        position: static;
        flex-direction: row;
        align-items: center;
        width: auto; height: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        transform: none;
        gap: 4px;
    }
    #view-landing .nav-menu a { padding: 10px 14px; }
    #view-landing .nav-menu .nav-cta, #view-landing .nav-menu .nav-login { margin-top: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #view-landing * { transition: none !important; }
    html { scroll-behavior: auto !important; }
}

/* =====================================================================
   SPA integration overrides
   ===================================================================== */
#view-landing.view {
    width: 100%;
    max-width: none;
    padding: 0;
}