/* =====================================================================
   King's Quest · Landing page
   Brand: Black + Metallic Gold (official tokens in /assets/css/tokens.css)
   Local aliases below map the landing's variable names onto those tokens.
   ===================================================================== */
@import url("../css/tokens.css");

:root {
    --pc-midnight-950: var(--pc-bg);       /* #080808 */
    --pc-midnight-900: var(--pc-bg-2);     /* #111111 */
    --pc-navy-800: var(--pc-card);         /* #1A1A1A */
    --pc-navy-600: #2A2A2A;
    --pc-ruby-500: var(--pc-gold);         /* primary accent */
    --pc-ruby-600: var(--pc-bronze);
    --pc-gold-300: var(--pc-champagne);    /* #F0CE83 */
    --pc-gold-400: var(--pc-gold);         /* #D6B15E */
    --pc-gold-500: var(--pc-bronze);       /* #B58A42 */
    --pc-violet-500: var(--pc-bronze);
    --pc-success: var(--pc-gold);
    --pc-info: var(--pc-champagne);

    --text: var(--pc-text);                /* #FFFFFF */
    --text-muted: var(--pc-text-2);        /* #B8B0A0 */
    --text-dim: var(--pc-muted);           /* #777777 */
    --line: var(--pc-border-soft);
    --glass: rgba(26, 26, 26, .55);
    --glass-strong: rgba(17, 17, 17, .78);

    /* Gold used sparingly: buttons, key words, numbers */
    --grad-brand: linear-gradient(135deg, #F0CE83 0%, #D6B15E 50%, #B58A42 100%);
    --grad-gold: linear-gradient(180deg, #F6DFA4 0%, #D6B15E 55%, #A97D38 100%);

    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 30px 80px -24px rgba(0, 0, 0, .85);
    --font: var(--pc-font);
    --font-display: var(--pc-font-display);
    --ease: cubic-bezier(.2, .7, .1, 1);
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1100px 650px at 80% -10%, rgba(214, 177, 94, .10), transparent 60%),
        radial-gradient(900px 600px at 0% 30%, rgba(181, 138, 66, .06), transparent 60%),
        var(--pc-midnight-950);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; }
p { margin: 0; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; position: relative; }

/* ---------- 3D stage ---------- */
#stage {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s var(--ease);
}
body.stage-ready #stage { opacity: 1; }
.stage-vignette {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(8, 8, 8, .65) 100%);
}
main, .footer, .nav { position: relative; z-index: 2; }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.scroll-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad-brand); }

/* ---------- Typography helpers ---------- */
.grad, .grad-gold {
    font-style: normal;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.grad { background-image: var(--grad-brand); }
.grad-gold { background-image: var(--grad-gold); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pc-gold-400);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc-success); box-shadow: 0 0 0 4px rgba(214, 177, 94, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(214, 177, 94, 0); } }

/* ---------- Buttons ---------- */
.btn {
    --pad: .95rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: var(--pad);
    border-radius: 999px;
    font-weight: 600;
    font-size: .98rem;
    border: 1px solid transparent;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
    cursor: pointer;
    white-space: nowrap;
}
.btn--sm { --pad: .6rem 1.1rem; font-size: .9rem; }
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: 0 12px 30px -10px rgba(214, 177, 94, .7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(214, 177, 94, .85); }
.btn--ghost { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .04); backdrop-filter: blur(10px); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, .35); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--pc-midnight-900); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(255, 255, 255, .5); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--pc-gold-400); outline-offset: 3px; }
.link-muted { color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.link-muted:hover { color: #fff; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .4s, border-color .4s, backdrop-filter .4s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(8, 8, 8, .72); backdrop-filter: blur(16px) saturate(140%); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 1rem; }
.nav__brand img { height: 42px; width: auto; }
.nav__links { display: flex; gap: 2rem; font-size: .95rem; color: var(--text-muted); font-weight: 500; }
.nav__links a { position: relative; transition: color .25s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--grad-brand); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav__links a:hover { color: #fff; }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta { display: flex; align-items: center; gap: 1.2rem; }
.nav__toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 8px; cursor: pointer; }
.nav__toggle span { display: block; height: 2px; background: #fff; margin: 6px 0; transition: transform .3s; }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2rem; align-items: center; }
.hero__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 6vw, 5rem); margin: 1.2rem 0 1.4rem; }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-muted); max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero__actions--center { justify-content: center; }
.chips { list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li { font-size: .85rem; color: var(--text-muted); padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }

.hero__float { position: relative; height: 520px; }
.glass-card {
    position: absolute;
    display: flex;
    gap: .8rem;
    align-items: center;
    padding: .85rem 1.1rem;
    border-radius: 16px;
    background: var(--glass);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(14px) saturate(150%);
    box-shadow: var(--shadow);
    font-size: .88rem;
    min-width: 230px;
}
.glass-card strong { display: block; font-size: .92rem; }
.glass-card span { color: var(--text-muted); font-size: .8rem; }
.gc-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; }
.gc-icon--gold { background: var(--grad-gold); }
.gc-icon--ruby { background: var(--grad-brand); color: #fff; }
.gc-rank { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(226, 182, 90, .15); color: var(--pc-gold-400); border: 1px solid rgba(226, 182, 90, .4); }
.float-a { top: 6%; right: 4%; animation: floaty 7s ease-in-out infinite; }
.float-b { top: 46%; left: -4%; animation: floaty 8s ease-in-out -2s infinite; }
.float-c { bottom: 4%; right: 12%; animation: floaty 9s ease-in-out -4s infinite; }
@keyframes floaty { 50% { transform: translateY(-14px); } }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .3); transform: translateX(-50%); }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Metrics ---------- */
.metrics { padding: 30px 0 90px; }
.metrics__label { text-align: center; color: var(--text-dim); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.8rem; }
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17, 17, 17, .55); backdrop-filter: blur(12px); overflow: hidden; }
.metric { padding: 2rem 1.5rem; text-align: center; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric__num { display: block; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 600; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.metric__lbl { color: var(--text-muted); font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.section__head { text-align: center; max-width: 760px; margin: 0 auto 4rem; }
.section__head--left { text-align: left; margin: 0; }
.section__head h2, .how h2, .cta h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.3rem); margin: 1rem 0; }
.section__head p { color: var(--text-muted); font-size: 1.08rem; }
/* Keep headings legible when 3D objects drift behind them. */
.section__head, .how__sticky, .hero__copy { text-shadow: 0 2px 24px rgba(8, 8, 8, .85); }
.section__head .grad, .section__head .grad-gold, .how__sticky .grad-gold, .hero__copy .grad, .hero__copy .grad-gold { text-shadow: none; filter: drop-shadow(0 2px 18px rgba(8, 8, 8, .8)); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.tile {
    position: relative;
    padding: 1.8rem;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(26, 26, 26, .6), rgba(17, 17, 17, .7));
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color .4s, box-shadow .4s;
    --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
}
.tile::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px circle at var(--mx) var(--my), rgba(214, 177, 94, .14), transparent 45%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.tile:hover { border-color: rgba(226, 182, 90, .35); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.tile:hover::before { opacity: 1; }
.tile--wide { grid-column: span 2; }
.tile h3 { font-size: 1.25rem; margin: 1.1rem 0 .6rem; }
.tile p { color: var(--text-muted); font-size: .96rem; }
.tile__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(214, 177, 94, .14); color: #F0CE83; border: 1px solid rgba(214, 177, 94, .3); }
.tile__icon svg { width: 24px; height: 24px; }
.tile__icon--gold { background: rgba(226, 182, 90, .12); color: var(--pc-gold-400); border-color: rgba(226, 182, 90, .3); }
.tile__icon--violet { background: rgba(181, 138, 66, .14); color: #D6B15E; border-color: rgba(181, 138, 66, .3); }

.mini-quests { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.pill { font-size: .8rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text-muted); }
.pill--ruby { color: #F0CE83; border-color: rgba(214, 177, 94, .45); }
.pill--violet { color: #D6B15E; border-color: rgba(181, 138, 66, .45); }
.pill--gold { color: var(--pc-gold-400); border-color: rgba(226, 182, 90, .45); }

.mini-board { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: .5rem; }
.mini-board li { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border-radius: 10px; background: rgba(255, 255, 255, .04); font-size: .9rem; }
.mini-board li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: rgba(226, 182, 90, .18); color: var(--pc-gold-400); }
.mini-board li b { margin-left: auto; color: var(--pc-gold-300); font-variant-numeric: tabular-nums; }

.mini-ledger { margin-top: 1.3rem; display: grid; gap: .45rem; font-size: .84rem; }
.mini-ledger div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--text-muted); }
.mini-ledger .up { color: var(--pc-success); }
.mini-ledger .down { color: #F0CE83; }

.mini-badges { display: flex; gap: .55rem; margin-top: 1.3rem; }
.mini-badges span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; background: var(--grad-brand); box-shadow: 0 0 0 3px rgba(226, 182, 90, .55); }
.mini-badges span:nth-child(2n) { background: linear-gradient(135deg, #2A2A2A, #3A3124); }
.mini-badges span:nth-child(3n) { background: var(--grad-gold); color: var(--pc-midnight-900); }

.mini-chat { margin-top: 1.3rem; display: grid; gap: .5rem; max-width: 420px; }
.bubble { padding: .6rem .9rem; border-radius: 14px 14px 14px 4px; background: rgba(255, 255, 255, .06); font-size: .88rem; justify-self: start; }
.bubble--me { border-radius: 14px 14px 4px 14px; background: rgba(181, 138, 66, .25); justify-self: end; }

/* ---------- How it works ---------- */
.how__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: start; }
.how__sticky { position: sticky; top: 130px; }
.how__sticky p { color: var(--text-muted); font-size: 1.08rem; max-width: 460px; }
.how__progress { margin-top: 2.2rem; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); max-width: 360px; overflow: hidden; }
.how__progress span { display: block; height: 100%; width: 100%; background: var(--grad-gold); transform-origin: 0 50%; transform: scaleX(0); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.step {
    display: flex;
    gap: 1.4rem;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(17, 17, 17, .55);
    backdrop-filter: blur(12px);
    opacity: .45;
    transform: scale(.97);
    transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .5s, background .5s;
}
.step.is-active { opacity: 1; transform: scale(1); border-color: rgba(226, 182, 90, .45); background: rgba(26, 26, 26, .7); }
.step__num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.step h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.step p { color: var(--text-muted); }

/* ---------- Quest showcase ---------- */
.showcase { border-radius: 28px; border: 1px solid var(--line); background: rgba(17, 17, 17, .65); backdrop-filter: blur(16px); padding: 1.6rem; box-shadow: var(--shadow); }
.tabs { display: inline-flex; gap: .4rem; padding: .35rem; border-radius: 999px; background: rgba(255, 255, 255, .05); margin-bottom: 1.6rem; }
.tab { border: 0; background: none; color: var(--text-muted); padding: .65rem 1.3rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; transition: background .3s, color .3s; }
.tab.is-active { background: var(--grad-brand); color: #fff; }
.panel { display: none; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; padding: 1rem; }
.panel.is-active { display: grid; animation: panelIn .6s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } }
.panel h3 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; margin-bottom: .8rem; }
.panel p { color: var(--text-muted); }
.panel b { color: #fff; }
.ticks { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: .55rem; color: var(--text-muted); font-size: .95rem; }
.ticks li::before { content: "✓"; color: var(--pc-success); font-weight: 700; margin-right: .6rem; }

.race { display: grid; gap: .9rem; padding: 1.6rem; border-radius: var(--radius); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); position: relative; }
.race__row { display: grid; grid-template-columns: 90px 1fr 54px; gap: .9rem; align-items: center; font-size: .9rem; }
.race__row b { text-align: right; font-variant-numeric: tabular-nums; color: var(--pc-gold-300); }
.bar { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--grad-brand); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.4s var(--ease); }
.is-racing .bar i, .phone .bar i, .app .bar i { transform: scaleX(1); }
.race__row:first-child .bar i { background: var(--grad-gold); }
.race__goal { position: absolute; top: 1rem; bottom: 1rem; right: calc(54px + 1.6rem + .9rem); border-left: 2px dashed rgba(226, 182, 90, .55); }
.race__goal span { position: absolute; top: -.6rem; left: -1.1rem; font-size: .7rem; color: var(--pc-gold-400); text-transform: uppercase; letter-spacing: .1em; }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: 1.6rem; border-radius: var(--radius); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); text-align: center; }
.versus__side img { width: 84px; height: 84px; margin: 0 auto .6rem; border-radius: 22px; }
.versus__side strong { display: block; font-size: 1.1rem; }
.versus__score { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; color: var(--pc-gold-300); font-variant-numeric: tabular-nums; }
.versus__vs { font-weight: 800; font-size: 1.2rem; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-brand); }
.versus__bar { grid-column: 1 / -1; height: 10px; border-radius: 99px; background: rgba(181, 138, 66, .4); overflow: hidden; }
.versus__bar i { display: block; height: 100%; width: var(--v); background: var(--grad-brand); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.4s var(--ease); }
.is-racing .versus__bar i { transform: scaleX(1); }

.podium-card { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: .8rem; padding: 1.6rem 1.6rem 0; border-radius: var(--radius); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); height: 300px; }
.pc { text-align: center; }
.pc span { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }
.pc div { border-radius: 14px 14px 0 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.pc--1 div { height: 180px; background: var(--grad-gold); color: var(--pc-midnight-900); }
.pc--2 div { height: 130px; background: linear-gradient(180deg, #CBD3E6, #8A93AE); color: var(--pc-midnight-900); }
.pc--3 div { height: 95px; background: linear-gradient(180deg, #E09A6A, #A35D33); }

/* ---------- Overview devices ---------- */
.devices { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2rem; perspective: 1600px; }
.laptop, .phone { transform-style: preserve-3d; will-change: transform; }
.laptop__screen { border-radius: 18px 18px 0 0; padding: 14px; background: #0E0E0E; border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow), 0 0 80px -20px rgba(181, 138, 66, .45); }
.laptop__base { height: 18px; margin: 0 -4%; border-radius: 0 0 22px 22px; background: linear-gradient(180deg, #2A2A2A, #151515); }
.dash { display: grid; grid-template-columns: 52px 1fr; min-height: 340px; border-radius: 10px; overflow: hidden; background: #F5F6FA; color: #0F172A; }
.dash__side { background: var(--pc-midnight-900); display: grid; align-content: start; gap: 10px; padding: 14px 12px; }
.dash__side i { height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.dash__side i.on { background: var(--pc-ruby-500); }
.dash__main { padding: 16px; display: grid; gap: 14px; }
.dash__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dash__kpis div { background: #fff; border-radius: 10px; padding: 10px 12px; box-shadow: 0 4px 14px -8px rgba(15, 23, 42, .25); }
.dash__kpis small, .dash__chart small, .dash__list small { display: block; color: #64748B; font-size: .7rem; }
.dash__kpis b { font-size: 1.15rem; }
.dash__row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.dash__chart, .dash__list { background: #fff; border-radius: 10px; padding: 12px; box-shadow: 0 4px 14px -8px rgba(15, 23, 42, .25); }
.bars { display: flex; align-items: end; gap: 8px; height: 150px; margin-top: 10px; }
.bars i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #F0CE83, #B58A42); }
.bars i:nth-child(2n) { background: linear-gradient(180deg, #4A3B22, #2A2A2A); }
.dash__list p { display: flex; justify-content: space-between; font-size: .78rem; padding: 7px 0; border-bottom: 1px solid #EEF0F5; }
.dash__list b { color: var(--pc-gold-500); }

.phone { width: 230px; margin-bottom: -30px; }
.phone__screen { border-radius: 36px; padding: 10px; background: #050505; border: 1px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow), 0 0 60px -10px rgba(214, 177, 94, .45); }
.app { border-radius: 28px; padding: 22px 16px; min-height: 440px; background: radial-gradient(400px 300px at 0% 0%, rgba(214, 177, 94, .3), transparent 60%), #0E0E0E; }
.app__hello { font-weight: 700; font-size: 1.05rem; }
.app__wallet { margin: 14px 0; padding: 14px; border-radius: 16px; background: var(--grad-brand); }
.app__wallet small { display: block; opacity: .8; font-size: .72rem; }
.app__wallet b { font-size: 1.6rem; font-family: var(--font-display); }
.app__wallet span { font-size: .75rem; opacity: .85; margin-left: 4px; }
.app__label { font-size: .72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; margin: 14px 0 8px; }
.app__quest { font-size: .78rem; margin-bottom: 10px; }
.app__quest .bar { height: 7px; margin-top: 5px; }
.app__badges { display: flex; gap: 8px; }
.app__badges span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-gold); color: var(--pc-midnight-900); font-weight: 700; }

/* ---------- Impact ---------- */
.impact__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat { padding: 2rem 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(17, 17, 17, .6); backdrop-filter: blur(12px); }
.stat__num { font-family: var(--font-display); font-size: 3.4rem; font-weight: 600; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat__unit { font-size: 1.1rem; color: var(--pc-gold-400); margin-left: .35rem; font-weight: 600; }
.stat p { color: var(--text-muted); font-size: .95rem; margin-top: .5rem; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 3rem; }
.quote { margin: 0; padding: 2rem; border-radius: var(--radius); background: linear-gradient(180deg, rgba(26, 26, 26, .7), rgba(17, 17, 17, .7)); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; gap: 1.6rem; }
.quote blockquote { margin: 0; font-size: 1.04rem; line-height: 1.65; }
.quote figcaption { display: flex; align-items: center; gap: .8rem; }
.quote figcaption b { display: block; font-size: .92rem; }
.quote figcaption small { color: var(--text-dim); font-size: .8rem; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--grad-brand); flex-shrink: 0; }

/* ---------- Rewards marquee ---------- */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 1.2rem; width: max-content; animation: marquee 45s linear infinite; padding: 1rem 0; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - .6rem)); } }
.reward { display: grid; gap: .5rem; width: 230px; padding: 1.4rem; border-radius: var(--radius); background: rgba(26, 26, 26, .6); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: transform .4s var(--ease), border-color .4s; }
.reward:hover { transform: translateY(-6px) rotate(-1deg); border-color: rgba(226, 182, 90, .45); }
.reward__glyph { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; font-family: var(--font-display); background: var(--grad-brand); }
.reward:nth-child(3n) .reward__glyph { background: var(--grad-gold); color: var(--pc-midnight-900); }
.reward:nth-child(3n+1) .reward__glyph { background: linear-gradient(135deg, #1F1F1F, #4A3B22); }
.reward__name { font-weight: 600; }
.reward__coins { color: var(--pc-gold-300); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
.accordion { display: grid; gap: .9rem; }
.accordion details { border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(17, 17, 17, .6); backdrop-filter: blur(10px); padding: 0 1.4rem; transition: border-color .3s; }
.accordion details[open] { border-color: rgba(226, 182, 90, .35); }
.accordion summary { list-style: none; cursor: pointer; padding: 1.2rem 0; font-weight: 600; display: flex; justify-content: space-between; gap: 1rem; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--pc-gold-400); transition: transform .3s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion p { color: var(--text-muted); padding-bottom: 1.3rem; }

/* ---------- CTA ---------- */
.cta { padding: 60px 0 140px; }
.cta__panel {
    text-align: center;
    padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4rem);
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(600px 300px at 20% 0%, rgba(255, 255, 255, .14), transparent 60%),
        linear-gradient(135deg, rgba(214, 177, 94, .92), rgba(181, 138, 66, .9));
    box-shadow: 0 40px 100px -30px rgba(214, 177, 94, .6);
}
.cta__panel::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(ellipse at center, #000, transparent 70%); pointer-events: none; }
.cta__panel > * { position: relative; z-index: 1; }
.cta__panel h2 { max-width: 760px; margin-inline: auto; }
.cta__panel .grad-gold { background-image: linear-gradient(120deg, #FFF3CF, #F5D58A); }
.cta__panel p { color: rgba(255, 255, 255, .85); max-width: 560px; margin: 0 auto; font-size: 1.08rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(8, 8, 8, .85); backdrop-filter: blur(12px); padding: 70px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.footer__brand img { height: 42px; width: auto; }
.footer__brand p { color: var(--text-muted); margin-top: 1rem; max-width: 280px; }
.footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-dim); margin-bottom: 1rem; }
.footer__grid a { display: block; color: var(--text-muted); padding: .3rem 0; font-size: .95rem; }
.footer__grid a:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-dim); font-size: .85rem; }
.footer__demo { color: var(--pc-gold-400); }

/* ---------- Reveal (JS adds .is-in; without JS everything is visible) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero__grid, .how__grid, .faq__grid, .panel { grid-template-columns: 1fr; }
    .hero__float { height: 360px; }
    .bento { grid-template-columns: 1fr 1fr; }
    .tile--wide { grid-column: span 2; }
    .impact__grid { grid-template-columns: 1fr 1fr; }
    .quotes { grid-template-columns: 1fr; }
    .how__sticky { position: static; }
    .devices { grid-template-columns: 1fr; justify-items: center; }
    .phone { margin: -120px 0 0 auto; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .nav__links, .nav__cta .link-muted { display: none; }
    .nav__toggle { display: block; }
    .nav.is-open .nav__links { display: flex; flex-direction: column; position: absolute; top: 76px; left: 0; right: 0; padding: 1.4rem 20px 2rem; gap: 1.2rem; background: rgba(8, 8, 8, .96); border-bottom: 1px solid var(--line); }
    .nav__cta .btn { display: none; }
    .hero { padding-top: 110px; }
    body.stage-ready #stage { opacity: .55; } /* 3D stays ambient behind full-width text on phones */
    .hero__float { display: none; }
    .metrics__grid { grid-template-columns: 1fr 1fr; }
    .metric:nth-child(2) { border-right: 0; }
    .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .bento, .impact__grid { grid-template-columns: 1fr; }
    .tile--wide { grid-column: auto; }
    .section { padding: 80px 0; }
    .step { padding: 1.4rem; }
    .race__row { grid-template-columns: 72px 1fr 44px; }
    .dash__kpis { grid-template-columns: 1fr 1fr; }
    .dash__row { grid-template-columns: 1fr; }
    .phone { margin: -60px auto 0; }
    .footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Black + Metallic Gold refinements
   - dark text on gold surfaces
   - gold kept to accents (~5%): dark panels with thin metallic borders
   ===================================================================== */
.btn--primary, .btn--primary:hover { color: #0B0B0B; font-weight: 700; letter-spacing: .06em; }
.btn--ghost { border-color: var(--pc-border); }
.btn--ghost:hover { border-color: var(--pc-gold); color: var(--pc-champagne); }
.btn--light { background: var(--grad-brand); color: #0B0B0B; font-weight: 700; letter-spacing: .06em; }
.gc-icon--ruby, .tab.is-active, .versus__vs, .app__wallet, .avatar, .reward__glyph { color: #0B0B0B; }
.mini-badges span { color: #0B0B0B; box-shadow: 0 0 0 2px rgba(214, 177, 94, .4); }
.mini-badges span:nth-child(2n) { background: #1F1F1F; color: var(--pc-gold); }
.reward:nth-child(3n+1) .reward__glyph, .reward:nth-child(3n) .reward__glyph { color: var(--pc-gold); }
.reward:nth-child(3n) .reward__glyph { background: #1F1F1F; border: 1px solid var(--pc-border); }

/* Section headings: oversized, elegant, white with a single gold accent word */
.hero__title, .section__head h2, .how h2, .cta h2 { font-weight: 600; letter-spacing: -.01em; }
.hero__title { text-transform: uppercase; font-size: clamp(2.8rem, 6.4vw, 5.6rem); line-height: .98; letter-spacing: .005em; }
.hero__title .line { display: block; }
.eyebrow { color: var(--pc-gold); }
.eyebrow .dot { background: var(--pc-gold); }

/* Cards: dark surfaces with a thin metallic top edge */
.tile, .step, .stat, .quote, .reward, .showcase, .metrics__grid, .accordion details, .race, .versus, .podium-card {
    background: linear-gradient(180deg, rgba(26, 26, 26, .82), rgba(17, 17, 17, .86));
    border-color: var(--pc-border-soft);
}
.tile::after, .stat::after, .quote::after {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(214, 177, 94, .55), transparent);
}
.stat, .quote { position: relative; overflow: hidden; }
.tile:hover, .stat:hover, .quote:hover { border-color: var(--pc-border); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 40px -18px rgba(214, 177, 94, .35); }
.tile::before { background: radial-gradient(500px circle at var(--mx) var(--my), rgba(214, 177, 94, .10), transparent 45%); }
.tile__icon, .tile__icon--gold, .tile__icon--violet { background: rgba(214, 177, 94, .08); color: var(--pc-gold); border-color: var(--pc-border); }
.pill--ruby, .pill--violet, .pill--gold { color: var(--pc-champagne); border-color: var(--pc-border); }
.mini-ledger .up { color: var(--pc-champagne); }
.mini-ledger .down { color: var(--pc-text-2); }
.bubble--me { background: rgba(214, 177, 94, .14); }
.ticks li::before { color: var(--pc-gold); }
.race__row:first-child .bar i { background: var(--grad-gold); }
.bar i, .versus__bar i { background: linear-gradient(90deg, #B58A42, #D6B15E); }
.versus__bar { background: rgba(255, 255, 255, .08); }
.pc--2 div { background: linear-gradient(180deg, #E8E2D4, #A49D8F); }
.pc--3 div { background: linear-gradient(180deg, #C9925A, #7E5228); color: #0B0B0B; }

/* Product preview: dark admin dashboard */
.dash { background: #111111; color: var(--pc-text); }
.dash__side { background: #0A0A0A; border-right: 1px solid var(--pc-border-soft); }
.dash__side i.on { background: var(--pc-gold); }
.dash__kpis div, .dash__chart, .dash__list { background: #1A1A1A; border: 1px solid var(--pc-border-soft); box-shadow: none; }
.dash__kpis small, .dash__chart small, .dash__list small { color: var(--pc-text-2); }
.dash__kpis b { color: var(--pc-champagne); }
.dash__list p { border-bottom-color: rgba(255, 255, 255, .06); }
.dash__list b { color: var(--pc-gold); }
.bars i { background: linear-gradient(180deg, #F0CE83, #8A6A30); }
.bars i:nth-child(2n) { background: linear-gradient(180deg, #4A4A4A, #262626); }
.laptop__screen { box-shadow: var(--shadow), 0 0 80px -24px rgba(214, 177, 94, .4); border-color: var(--pc-border); }
.phone__screen { box-shadow: var(--shadow), 0 0 60px -16px rgba(214, 177, 94, .35); border-color: var(--pc-border); }
.app { background: radial-gradient(400px 300px at 0% 0%, rgba(214, 177, 94, .16), transparent 60%), #0C0C0C; }
.app__badges span:nth-child(2n) { background: #1F1F1F; color: var(--pc-gold); border: 1px solid var(--pc-border); }

/* CTA: dark luxury panel with ambient gold light instead of a solid gold slab */
.cta__panel {
    background:
        radial-gradient(700px 320px at 50% -20%, rgba(214, 177, 94, .22), transparent 65%),
        linear-gradient(180deg, #161616, #0E0E0E);
    border: 1px solid var(--pc-border);
    box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(214, 177, 94, .35);
}
.cta__panel::after { background-image: radial-gradient(rgba(214, 177, 94, .18) 1px, transparent 1px); }
.cta__panel .grad-gold { background-image: var(--grad-gold); }
.cta__panel p { color: var(--pc-text-2); }

/* About section */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about__copy p { color: var(--text-muted); font-size: 1.06rem; margin-top: 1rem; }
.about__pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pillar { position: relative; padding: 1.5rem; border-radius: var(--radius-sm); border: 1px solid var(--pc-border-soft); background: linear-gradient(180deg, rgba(26, 26, 26, .82), rgba(17, 17, 17, .86)); transition: border-color .3s, transform .3s; }
.pillar:hover { border-color: var(--pc-border); transform: translateY(-3px); }
.pillar__num { font-family: var(--font-display); font-size: 1.6rem; color: var(--pc-gold); line-height: 1; }
.pillar h3 { font-size: 1.05rem; margin: .7rem 0 .4rem; }
.pillar p { color: var(--text-muted); font-size: .92rem; }
.capabilities { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.5rem; }
.capabilities li { color: var(--text-muted); font-size: .95rem; padding-left: 1.5rem; position: relative; }
.capabilities li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid var(--pc-gold); }

/* How-it-works: connecting line with animated indicator */
.steps { position: relative; }
.steps::before { content: ""; position: absolute; left: 49px; top: 36px; bottom: 36px; width: 1px; background: linear-gradient(180deg, transparent, var(--pc-border), transparent); }
.step.is-active .step__num { filter: drop-shadow(0 0 14px rgba(214, 177, 94, .5)); }

.footer__demo { color: var(--pc-gold); }
.nav__brand img, .footer__brand img { filter: var(--pc-logo-filter); }

@media (max-width: 1024px) {
    .about__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 760px) {
    .about__pillars, .capabilities { grid-template-columns: 1fr; }
    .steps::before { display: none; }
}

/* Cormorant defaults to old-style numerals; use lining figures for numbers */
.hero__title, h1, h2, h3, .metric__num, .stat__num, .step__num, .pillar__num, .app__wallet b, .versus__score, .pc div, .dash__kpis b { font-variant-numeric: lining-nums tabular-nums; }

/* =====================================================================
   King's Quest brand + company credit
   ===================================================================== */
.nav__brand img { height: 52px; width: auto; filter: none; }
.footer__brand img.kq-logo { height: 76px; width: auto; filter: none; }
.nav.is-scrolled .nav__brand img { height: 46px; transition: height .3s; }

.company { margin-top: 1.6rem; display: grid; gap: 1rem; }
.company__brand { display: inline-flex; align-items: center; gap: .8rem; color: var(--text-dim); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; width: fit-content; }
.company__logo { height: 30px; width: auto; opacity: .9; transition: opacity .25s, transform .25s; }
.company__logo--vasudev { height: 26px; }
.company__brand:hover .company__logo { opacity: 1; transform: translateY(-1px); }
.company__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.company__links a {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 50%; border: 1px solid var(--pc-border-soft);
    color: var(--text-muted); background: rgba(255, 255, 255, .02);
    transition: color .25s, border-color .25s, background .25s, transform .25s;
}
.company__links a:hover { color: var(--pc-gold); border-color: var(--pc-border); background: rgba(214, 177, 94, .08); transform: translateY(-2px); }

@media (max-width: 760px) {
    .nav__brand img { height: 42px; }
}

/* =====================================================================
   Footer (solid background; brand | Links | Support | Contact Us + bottom bar)
   ===================================================================== */
.footer.kq-footer {
    position: relative;
    z-index: 3;                         /* sits above the fixed 3D canvas */
    background: #111111;                /* solid: 3D objects no longer show through */
    backdrop-filter: none;
    border-top: 1px solid var(--pc-border);
    padding: 64px 0 0;
}
.kq-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) repeat(2, minmax(0, .8fr)) minmax(0, 1.1fr);
    gap: 2.5rem 3rem;
    padding-bottom: 56px;
}
.kq-footer__brand img.kq-logo { height: 64px; width: auto; filter: none; }
.kq-footer__brand p { color: var(--pc-text-2); margin-top: 1.1rem; max-width: 560px; line-height: 1.75; font-size: .97rem; text-align: justify; }
.kq-footer__col h4 { font-family: var(--font); font-size: 1rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--pc-text); margin: 0 0 1.4rem; }
.kq-footer__col a { display: block; color: var(--pc-text-2); padding: .32rem 0; font-size: .97rem; width: fit-content; transition: color .2s, transform .2s; }
.kq-footer__col a:hover { color: var(--pc-gold); transform: translateX(3px); }

.kq-contacts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; max-width: 260px; }
.kq-contacts a {
    width: 42px; height: 42px; display: grid !important; place-items: center; padding: 0 !important;
    border-radius: 12px; border: 1px solid var(--pc-border-soft); background: #161616;
    color: var(--pc-text) !important; transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.kq-contacts a:hover { color: #0B0B0B !important; background: var(--grad-brand); border-color: transparent; transform: translateY(-2px) !important; }

.kq-footer__bar { border-top: 1px solid rgba(255, 255, 255, .06); background: #0C0C0C; }
.kq-footer__bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 22px 0; }
.kq-copyright { color: var(--pc-text-2); font-size: .92rem; }
.kq-credit { display: inline-flex; align-items: center; gap: .9rem; color: var(--pc-text-2); font-size: .92rem; }
.kq-credit a { display: inline-flex; }
.kq-credit__logo { height: 30px; width: auto; transition: opacity .2s, transform .2s; }
.kq-credit__logo--vasudev { height: 28px; }
.kq-credit a:hover .kq-credit__logo { transform: translateY(-1px); }

@media (max-width: 1024px) {
    .kq-footer__top { grid-template-columns: 1fr 1fr; }
    .kq-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .kq-footer__top { grid-template-columns: 1fr; }
    .kq-footer__bar-inner { flex-direction: column; align-items: flex-start; }
    .kq-footer__brand p { text-align: left; }
}
