/* ==========================================================================
   Wanderlore Marketing Site — Premium LCARS-Inspired Dark Theme
   ========================================================================== */

:root {
    --bg-deep:    #060710;
    --bg-surface: #0b0c10;
    --bg-card:    #111320;
    --bg-card-hover: #181b2a;
    --amber:      #F0B75A;
    --amber-glow: rgba(240, 183, 90, 0.25);
    --amber-dim:  rgba(240, 183, 90, 0.08);
    --blue:       #4a90e2;
    --blue-glow:  rgba(74, 144, 226, 0.15);
    --sage:       #87a589;
    --text:       #c5c6c7;
    /* Every piece of secondary copy on this page runs through --text-muted —
       nav links, feature descriptions, the step captions, portal-card blurbs,
       the footer. At #6b6e76 that was 3.6:1 on --bg-card and 3.9:1 on
       --bg-deep, and all of it is small text, which needs 4.5:1. Lifted within
       the same cool-grey family so the hierarchy against --text is untouched
       (still 2.3:1 apart); now 4.75:1 on cards and 5.17:1 on the page. */
    --text-muted: #7f8189;
    --border:     rgba(255,255,255,0.06);
    --radius:     12px;
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Grid Canvas Background */
#grid-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s var(--ease);
}

.navbar--scrolled {
    background: rgba(6, 7, 16, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 12px 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: var(--amber);
    color: #000;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 6px;
    border-top-right-radius: 14px;
    border-bottom-left-radius: 14px;
    box-shadow: 0 0 18px var(--amber-glow);
}

.brand__name {
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}

.nav-links a:hover { color: #fff; }

.nav-cta {
    color: var(--amber) !important;
    font-weight: 600 !important;
    border: 1px solid rgba(240, 183, 90, 0.3);
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.2s var(--ease) !important;
}

.nav-cta:hover {
    background: rgba(240, 183, 90, 0.1);
    border-color: var(--amber);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 40px 80px;
    text-align: center;
    z-index: 1;
}

.hero__glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(240, 183, 90, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero__eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--blue);
    margin-bottom: 24px;
    padding: 6px 16px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 100px;
}

.hero__title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero__gradient {
    background: linear-gradient(135deg, var(--amber) 0%, #f7c97f 40%, var(--sage) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 1.2rem;
    color: var(--text);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.25s var(--ease);
    cursor: pointer;
    border: none;
}

.btn__icon {
    font-size: 1.2rem;
}

.btn-primary {
    background: var(--amber);
    color: #000;
    box-shadow: 0 4px 24px var(--amber-glow), 0 0 0 0 var(--amber-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px var(--amber-glow), 0 0 60px rgba(240, 183, 90, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--amber);
    border: 1px solid rgba(240, 183, 90, 0.35);
}

.btn-secondary:hover {
    background: rgba(240, 183, 90, 0.08);
    border-color: var(--amber);
    transform: translateY(-3px);
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.hero__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.hero__stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* ---------- SECTIONS ---------- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--amber);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* ---------- FEATURES ---------- */
.features {
    position: relative;
    z-index: 1;
    padding: 120px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--amber);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.feature-card:hover::before { opacity: 1; }

.feature-card--visor::before { background: var(--amber); }
.feature-card--deep::before { background: var(--sage); }
.feature-card--lcars::before { background: var(--blue); }
.feature-card--ledger::before { background: #e8665a; }
.feature-card--qr::before { background: #c792ea; }
.feature-card--identity::before { background: #ffcb6b; }

.feature-card__icon {
    font-size: 2rem;
    color: var(--amber);
    margin-bottom: 16px;
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--amber-dim);
    border-radius: 12px;
}

.feature-card--deep .feature-card__icon { color: var(--sage); background: rgba(135, 165, 137, 0.1); }
.feature-card--lcars .feature-card__icon { color: var(--blue); background: var(--blue-glow); }
.feature-card--ledger .feature-card__icon { color: #e8665a; background: rgba(232, 102, 90, 0.1); }
.feature-card--qr .feature-card__icon { color: #c792ea; background: rgba(199, 146, 234, 0.1); }
.feature-card--identity .feature-card__icon { color: #ffcb6b; background: rgba(255, 203, 107, 0.1); }

.feature-card__badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Honest status on a capability that is specified but not yet live.
   Wanderlore is a PocketCloud reference client, and a reference client does not
   advertise what it cannot do — see the deploy repo's ADR-0003 D5. Sits beside
   the protocol badge so the card still reads as one line of metadata. */
.feature-card__soon {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--bg, #0b0e13);
    background: var(--accent, #f0b75a);
    border-radius: 3px;
    padding: 2px 6px;
    margin-left: 8px;
    vertical-align: 2px;
}

.feature-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

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

/* ---------- HOW IT WORKS ---------- */
.how-it-works {
    position: relative;
    z-index: 1;
    padding: 120px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, var(--amber), var(--blue), var(--sage));
    opacity: 0.3;
}

.step {
    text-align: center;
    position: relative;
}

.step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--amber);
    color: var(--amber);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 24px var(--amber-glow);
}

.step__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

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

/* ---------- PORTALS ---------- */
.portals {
    position: relative;
    z-index: 1;
    padding: 120px 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.portals__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portals__aside {
    margin-top: 32px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.portals__aside a {
    color: var(--amber);
    text-decoration: none;
    border-bottom: 1px solid var(--amber-glow);
}

.portals__aside a:hover { border-bottom-color: var(--amber); }

.portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 24px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s var(--ease);
}

.portal-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--amber);
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 24px var(--amber-glow);
}

.portal-card__icon {
    font-size: 2.5rem;
    color: var(--amber);
    margin-bottom: 16px;
    width: 72px; height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--amber-dim);
    border-radius: 50%;
}

.portal-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.portal-card__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.portal-card__cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s;
}

.portal-card:hover .portal-card__cta {
    transform: translateX(4px);
}

/* ---------- FOR VENUES (T48) ---------- */
.venue {
    position: relative;
    z-index: 1;
    padding: 40px 40px 120px;
    max-width: 1000px;
    margin: 0 auto;
}

.venue .section-header { margin-bottom: 40px; }

.section-blurb {
    max-width: 640px;
    margin: 16px auto 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* web-lib's contact form reads these tokens; here they are the page's own
   palette, so the form is amber on the card colour rather than the
   library's blue-violet default. */
.venue__form {
    display: flex;
    justify-content: center;
    --panel: var(--bg-card);
    --bg-soft: var(--bg-surface);
    --line: rgba(240, 183, 90, 0.2);
    --text: #fff;
    --muted: var(--text-muted);
    --accent: var(--amber);
    --accent-2: #d99a3a;
    --radius: 20px;
}

.venue__form .pc-contact-form,
.venue__form .pc-form-success { width: 100%; max-width: 560px; }
.venue__form .pc-form-submit { color: #000; }
.venue__form .pc-form-note { color: var(--amber); }

/* ---------- FOOTER ---------- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 48px 40px;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fff;
}

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

.footer__tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ---------- SCROLL ANIMATIONS ---------- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger feature cards */
.feature-card.animate-in:nth-child(2) { transition-delay: 0.1s; }
.feature-card.animate-in:nth-child(3) { transition-delay: 0.2s; }
.feature-card.animate-in:nth-child(4) { transition-delay: 0.3s; }
.feature-card.animate-in:nth-child(5) { transition-delay: 0.4s; }
.feature-card.animate-in:nth-child(6) { transition-delay: 0.5s; }

.step.animate-in:nth-child(2) { transition-delay: 0.15s; }
.step.animate-in:nth-child(3) { transition-delay: 0.3s; }

.portal-card.animate-in:nth-child(2) { transition-delay: 0.1s; }
.portal-card.animate-in:nth-child(3) { transition-delay: 0.2s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .features__grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; gap: 32px; }
    .steps::before { display: none; }
    .portals__grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

@media (max-width: 640px) {
    .navbar { padding: 14px 20px; }
    .nav-links {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(6, 7, 16, 0.96);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        z-index: 999;
    }
    .nav-links--open { display: flex; }
    .nav-links a { font-size: 1.2rem; }
    .nav-toggle { display: block; z-index: 1001; }

    .hero { padding: 100px 20px 60px; }
    .hero__title { letter-spacing: -1px; }
    .hero__stats { gap: 24px; }
    .hero__stat-value { font-size: 1.5rem; }

    .features { padding: 60px 20px; }
    .features__grid { grid-template-columns: 1fr; }

    .how-it-works { padding: 60px 20px; }
    .portals { padding: 60px 20px; }
    .venue { padding: 20px 20px 80px; }

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