/* ============================================================
   MIRR — live try-on
   Palette: ink #0E0E0E / bone #F2EFE9 / ash #8A8A86 + accent
   Type: heavy grotesque display + mono specs
   ============================================================ */

:root {
  --ink:    #0E0E0E;
  --bone:   #F2EFE9;
  --ash:    #8A8A86;
  --accent: #FF5A1F;          /* rotating accent, set by app.js */
  --bg:     var(--ink);
  --fg:     var(--bone);
  --line:   rgba(242, 239, 233, 0.14);
  --grotesk: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hidden { display: none !important; }

a { color: inherit; text-decoration: none; }

/* ---------------- header ---------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(14, 14, 14, 0.82);
  backdrop-filter: blur(8px);
  z-index: 20;
}
.wordmark, .hero-wordmark {
  font-family: var(--grotesk);
  font-weight: 900;
  letter-spacing: -0.04em;
}
.wordmark { font-size: 22px; }
.site-nav { display: flex; gap: 22px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }
.site-nav a:hover { color: var(--fg); }

/* ---------------- hero ---------------- */
.hero {
  min-height: 78vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px 60px;
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero-wordmark {
  font-size: clamp(72px, 18vw, 220px);
  line-height: 0.86;
  margin: 0;
  color: var(--fg);
  text-transform: uppercase;
}
.hero-wordmark[data-accent] { color: var(--accent); }
.hero-tag {
  font-family: var(--mono);
  font-size: clamp(14px, 2.4vw, 22px);
  letter-spacing: 0.12em;
  color: var(--ash);
  margin: 0;
}
.hero-fine { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ash); text-transform: uppercase; margin: 6px 0 0; }

/* CTA */
.cta {
  margin-top: 10px;
  font-family: var(--grotesk);
  font-weight: 900;
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 16px 42px;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cta:hover { transform: translateY(-2px); filter: brightness(1.08); }
.cta:active { transform: translateY(0); }

/* ---------------- try-on ---------------- */
.tryon { padding: 48px 28px; border-bottom: 1px solid var(--line); }
.tryon[aria-hidden="true"] { display: none; }
.tryon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.mirror {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, #141414 0 12px, #101010 12px 24px);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.stage { width: 100%; height: 100%; display: block; object-fit: cover; }
.stage3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* match #stage so the WebGL bitmap isn't CSS-stretched */
  pointer-events: none; /* clicks pass through to webcam/canvas below */
}
.stage3d.hidden { display: none; }

.depth-range { width: 100%; accent-color: var(--accent); }
.control-block.is-disabled { opacity: 0.35; pointer-events: none; }
#mode-picker .seg-btn[data-mode="3d"] { color: var(--accent); }

.status-pill {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14,14,14,0.7);
  border: 1px solid var(--line);
  color: var(--ash);
}
.dbg {
  position: absolute;
  bottom: 12px; left: 12px;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(14,14,14,0.72);
  border: 1px solid var(--line);
  color: var(--signal);
  letter-spacing: 0.04em;
}

/* fallback */
.fallback { position: absolute; inset: 0; display: grid; place-items: center; gap: 14px; padding: 24px; text-align: center; background: var(--ink); }
.fallback img { width: 52%; max-width: 280px; height: auto; border-radius: 10px; }
.fallback-msg h3 { font-family: var(--grotesk); font-size: 20px; margin: 8px 0; }
.fallback-msg p { font-family: var(--mono); font-size: 12px; color: var(--ash); max-width: 460px; margin: 6px auto; line-height: 1.5; }

/* controls */
.controls { display: flex; flex-direction: column; gap: 22px; }
.control-block { display: flex; flex-direction: column; gap: 10px; }
.control-label { font-size: 11px; letter-spacing: 0.2em; color: var(--ash); }

.seg { display: flex; gap: 8px; }
.seg-btn {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 6px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.seg-btn:hover { border-color: var(--ash); }
.seg-btn.is-active { background: var(--fg); color: var(--ink); border-color: var(--fg); }

.swatches { display: flex; gap: 10px; }
.swatch {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid transparent;
  cursor: pointer;
  outline: 1px solid var(--line);
  outline-offset: 2px;
  transition: transform 0.1s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { border-color: var(--accent); outline-color: var(--accent); }

.size-hint {
  font-family: var(--grotesk);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.size-hint .sz { color: var(--accent); }

.capture-row { flex-direction: row; gap: 10px; }
.btn {
  font-family: var(--grotesk);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: rgba(242,239,233,0.08); }
.capture-note { font-size: 11px; color: var(--ash); letter-spacing: 0.06em; margin: 0; }

/* ---------------- drop ---------------- */
.drop { padding: 64px 28px; border-bottom: 1px solid var(--line); }
.drop-inner { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 28px; }
.drop-title { font-family: var(--grotesk); font-weight: 900; font-size: clamp(24px, 5vw, 44px); letter-spacing: -0.02em; margin: 0; }
.drop-stats { display: flex; justify-content: center; gap: 56px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-size: clamp(28px, 6vw, 52px); color: var(--accent); letter-spacing: 0.02em; }
.stat-label { font-size: 11px; letter-spacing: 0.2em; color: var(--ash); }

.waitlist { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.waitlist label { font-size: 11px; letter-spacing: 0.2em; color: var(--ash); }
.waitlist-row { display: flex; gap: 8px; width: 100%; max-width: 460px; }
.waitlist input {
  flex: 1;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg);
  background: rgba(242,239,233,0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
}
.waitlist input::placeholder { color: var(--ash); }
.waitlist input:focus { outline: none; border-color: var(--accent); }
.waitlist-msg { font-size: 13px; letter-spacing: 0.08em; color: var(--accent); margin: 4px 0 0; }
.waitlist-fine { font-size: 10px; letter-spacing: 0.1em; color: var(--ash); margin: 0; text-transform: uppercase; }

/* ---------------- footer ---------------- */
.site-footer {
  display: flex; justify-content: space-between;
  padding: 22px 28px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash);
}

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .tryon-grid { grid-template-columns: 1fr; }
  .drop-stats { gap: 32px; }
}
