:root {
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', monospace;

  --bg: #fbfcfe;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  --line: #e2e8f0;

  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;

  --accent: #1976d2;
  --accent-deep: #1565c0;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { min-height: 100dvh; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: .5px solid var(--line);
}
.brand {
  height: 36px; width: auto; display: block;
}
.from { font-size: 12px; color: var(--ink-3); }
.from b { color: var(--ink); font-weight: 500; }

.stage {
  position: relative; height: 60vh; min-height: 360px; max-height: 560px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%, #fff 0%, var(--bg-muted) 100%);
}
model-viewer {
  width: 100%; height: 100%; background: transparent;
  --poster-color: transparent;
}

.chip {
  position: absolute; top: 16px; z-index: 5;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-2); background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 6px 11px; border-radius: 999px; font-weight: 500;
  box-shadow: 0 0 0 .5px rgba(0,0,0,0.06);
}
.chip-left { left: 16px; }
.chip-right { right: 16px; font-family: var(--font-mono); letter-spacing: 0; }

.ar-fab {
  position: absolute; right: 16px; bottom: 16px; z-index: 10;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px 12px 14px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 500; border: 0; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  font-family: inherit;
}
.ar-fab:hover { background: #000; }

.loading {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3);
}
.loading.hidden { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.info {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 36px; padding: 26px 30px;
}
.eyebrow {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--ink-3); font-weight: 500;
}
.left h1 {
  font-family: var(--font-display); font-size: 46px; line-height: 1;
  letter-spacing: -0.02em; margin: 6px 0 16px; color: var(--ink);
  font-weight: 400;
}
.desc { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

.ar-tip {
  display: flex; gap: 10px; align-items: center;
  margin-top: 22px; padding: 14px 16px;
  background: var(--bg-muted); border-radius: 14px;
  font-size: 13px; color: var(--ink-2); line-height: 1.45;
}
.ar-tip svg { color: var(--accent); flex-shrink: 0; }
.ar-tip b { color: var(--ink); font-weight: 500; }

.specs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line);
  border-radius: 14px; overflow: hidden;
}
.specs > div {
  background: var(--bg-card); padding: 14px 16px;
}
.spec-full { grid-column: 1 / -1; }
.spec-k {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ink-3);
  font-weight: 500; margin-bottom: 4px;
}
.spec-v {
  font-size: 16px; color: var(--ink); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.spec-v.accent { color: var(--accent); font-size: 22px; }
.spec-v.mono { font-family: var(--font-mono); letter-spacing: -0.02em; }

.cta {
  display: flex; gap: 10px;
  padding: 0 30px 22px;
}
.btn {
  flex: 1; height: 56px; border-radius: 999px;
  font-family: inherit; font-size: 15px; font-weight: 500;
  border: 0; cursor: pointer; letter-spacing: -0.1px;
}
.btn.primary { background: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-deep); }
.btn.ghost {
  background: var(--bg-muted); color: var(--ink);
  box-shadow: inset 0 0 0 .5px var(--line);
}
.btn.ghost:hover { background: var(--line); }

.foot {
  padding: 16px 30px calc(24px + env(safe-area-inset-bottom, 0));
  border-top: .5px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em;
  font-family: var(--font-mono);
}
.foot a { color: var(--ink-2); text-decoration: none; font-weight: 500; }

@media (max-width: 720px) {
  .stage { height: 55vh; max-height: 500px; }
  .info { grid-template-columns: 1fr; gap: 22px; padding: 22px; }
  .left h1 { font-size: 36px; }
  .cta { padding: 0 22px 22px; flex-direction: column; }
  .foot { padding: 14px 22px calc(20px + env(safe-area-inset-bottom, 0)); }
}

.state-msg {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px; padding: 60px 24px;
  text-align: center;
}
.state-msg h2 {
  font-family: var(--font-display); font-size: 28px;
  font-style: italic; color: var(--ink); font-weight: 400;
}
.state-msg p { font-size: 14px; color: var(--ink-2); }

[hidden] { display: none !important; }
