/* ============================================================================
   Used Car Metrics — the hub.
   Steel + amber, deliberately neutral: it's the PARENT of teal SiennaWatch and
   Green Hell GTWatch, so it must not compete with either. The two doors carry
   their car's real material — piano-black lacquer and carbon-fibre twill.
   ========================================================================== */
:root {
  --bg: #0B0E13;
  --surface: #141a22;
  --surface-2: #1a212b;
  --line: #242c38;
  --line-bright: #33404f;
  --text: #e6edf3;
  --muted: #8b949e;
  --faint: #5d6875;
  --steel: #7EA6C4;
  --amber: #F2B33D;
  --ok: #46e08a;
  --shadow: 0 14px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 480px at 78% -14%, #16202c 0%, rgba(11,14,19,0) 62%);
  background-attachment: fixed;
  min-height: 100vh;
}
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--steel); }

/* ── brand lockup ─────────────────────────────────────────────────────────── */
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-lockup .mark { width: 52px; height: 52px; flex: 0 0 auto; }
.brand-lockup.small .mark { width: 38px; height: 38px; }
.wordmark { font-size: 21px; font-weight: 700; line-height: 1; letter-spacing: .005em; }
.brand-lockup.small .wordmark { font-size: 16px; }
.wordmark span { color: var(--steel); }
.tagline { font-size: 9px; letter-spacing: .22em; color: var(--faint);
           text-transform: uppercase; margin-top: 5px; }
.brand-lockup.small .tagline { font-size: 8px; margin-top: 4px; }

/* ── login ────────────────────────────────────────────────────────────────── */
.login-body { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-wrap { width: 100%; max-width: 380px; display: flex; flex-direction: column;
              align-items: center; gap: 26px; }
.login-card {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.login-card h1 { font-size: 19px; }
.login-card .hint { margin: -8px 0 4px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; }
.login-card label span { font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--faint); font-weight: 600; }
input {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 11px; padding: 12px 13px; font-size: 16px; font-family: inherit; width: 100%;
}
input:focus { outline: none; border-color: var(--steel);
              box-shadow: 0 0 0 3px rgba(126,166,196,.15); }
.err { color: #fb6b6b; font-size: 13px; margin: 0; }
.foot { color: var(--faint); font-size: 13px; text-align: center; margin: 0; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 16px; border-radius: 11px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; min-height: 44px; transition: .15s;
}
.btn:hover { border-color: var(--line-bright); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; }
.btn.primary { background: var(--steel); border-color: transparent; color: #0b0e13; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.amber { background: var(--amber); border-color: transparent; color: #1a1206; }

/* ── topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(14px);
  position: sticky; top: 0; z-index: 20;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.who { color: var(--muted); font-size: 13px; }
.god-pill {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--amber); background: rgba(242,179,61,.12);
  border: 1px solid rgba(242,179,61,.35); padding: 5px 9px; border-radius: 20px;
}
main { max-width: 1000px; margin: 0 auto; padding: 30px max(18px, env(safe-area-inset-left)) 60px; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.lead b { color: var(--text); }

/* ── the two doors ────────────────────────────────────────────────────────── */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
@media (max-width: 760px) { .doors { grid-template-columns: 1fr; } }
.skeleton { height: 240px; border-radius: 18px; background: var(--surface);
            border: 1px solid var(--line); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.door {
  position: relative; overflow: hidden; border-radius: 18px; padding: 24px;
  display: flex; flex-direction: column; gap: 16px; min-height: 250px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--text);
  transition: transform .18s ease, box-shadow .18s ease;
}
.door:hover { transform: translateY(-3px); }

/* SIENNA — piano black lacquer: specular top edge, gloss sweep, deep black */
.door.piano {
  background:
    linear-gradient(180deg, rgba(255,255,255,.10) 0, rgba(255,255,255,.02) 12%, transparent 30%),
    linear-gradient(165deg, #1a2028 0%, #0c1016 52%, #05070a 100%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.12);
}
.door.piano::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 22% -20%, rgba(255,255,255,.09), transparent 58%);
}
.door.piano:hover { box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.16),
                                0 0 0 1px rgba(34,224,196,.35); }
.door.piano .door-accent { color: #22E0C4; }         /* SiennaWatch teal */

/* AMG GT — carbon fibre twill under clear-coat, Green Hell rake light */
.door.carbon {
  background-color: #0d0f0a;
  background-image:
    radial-gradient(110% 80% at 20% -20%, rgba(180,212,53,.14), transparent 58%),
    linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.05) 75%),
    linear-gradient(45deg, rgba(0,0,0,.55) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.55) 75%);
  background-size: 100% 100%, 10px 10px, 10px 10px;
  background-position: 0 0, 0 0, 5px 5px;
  border: 1px solid rgba(180,212,53,.24);
}
.door.carbon::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.07), transparent 38%);
}
.door.carbon:hover { box-shadow: var(--shadow), 0 0 0 1px rgba(180,212,53,.5); }
.door.carbon .door-accent { color: #C9EC4B; }        /* Green Hell */

.door-head { position: relative; z-index: 1; }
.door-name { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.door-sub { font-size: 12px; color: var(--muted); margin-top: 4px;
            letter-spacing: .04em; text-transform: uppercase; }
.door-stats { position: relative; z-index: 1; display: flex; gap: 20px; flex-wrap: wrap;
              margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.10); }
.door-stat .n { font-family: "JetBrains Mono", ui-monospace, monospace;
                font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.door-stat .l { font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
                color: var(--faint); margin-top: 2px; }
.door-cta { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px;
            font-weight: 700; font-size: 14px; }
.door-cta .arrow { transition: transform .18s ease; }
.door:hover .door-cta .arrow { transform: translateX(4px); }
.door-off { color: #fb6b6b; font-size: 12px; }

/* ── share section ────────────────────────────────────────────────────────── */
.share { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.share h2 { font-size: 16px; margin-bottom: 6px; }
.share-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.share-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.share-row .nm { font-weight: 600; font-size: 14px; min-width: 96px; }
.share-row code {
  flex: 1; min-width: 200px; font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.share-row .btn { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.copied { color: var(--ok); font-size: 12px; font-weight: 600; }


/* ScionWatch door — TRON grid: cyan edge-glow on a dark perspective grid */
.door.grid {
  background-color: #05080d;
  background-image:
    radial-gradient(120% 80% at 20% -20%, rgba(34,224,255,.12), transparent 58%),
    linear-gradient(rgba(34,224,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,224,255,.06) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px, 26px 26px;
  border: 1px solid rgba(34,224,255,.28);
  box-shadow: var(--shadow), inset 0 0 30px rgba(34,224,255,.06);
}
.door.grid:hover { box-shadow: var(--shadow), 0 0 0 1px #22E0FF, 0 0 26px rgba(34,224,255,.4); }
.door.grid .door-accent { color: #22E0FF; }

.god-pill.view-pill { color: var(--steel); background: rgba(126,166,196,.12); border-color: rgba(126,166,196,.35); }

/* per-door instrument mark */
.door-head { display: flex; align-items: center; gap: 13px; }
.door-mark { width: 40px; height: 40px; flex: 0 0 auto; }
/* ScionWatch: full Tron neon — the radar glows */
.door-mark.neon { filter: drop-shadow(0 0 4px #22E0FF) drop-shadow(0 0 10px rgba(34,224,255,.6)); animation: neonPulse 2.6s ease-in-out infinite; }
@keyframes neonPulse { 50% { filter: drop-shadow(0 0 7px #22E0FF) drop-shadow(0 0 18px rgba(34,224,255,.85)); } }
