/* Runway system (open-design): black ground, one typeface, zero shadows, the scene is the UI. */
@font-face { font-family: "Inter"; src: url("vendor/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ground: #000;
  --text: #fff;
  --text-2: #a7a7a7;
  --slate: #767d88;
  --surface: rgba(26, 26, 26, .72);
  --border: #27272a;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--ground);
  color: var(--text);
  font: 400 16px/1.4 "Inter", system-ui, sans-serif;
  letter-spacing: -0.16px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; opacity: 0; transition: opacity .6s var(--ease); }
.ready #scene { opacity: 1; }

/* Dark overlay for text readability over the image, per the system's hero treatment. */
.shade { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0) 55vh), linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0) 140px); }

.top { position: fixed; top: max(var(--gutter), env(safe-area-inset-top)); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: baseline; }
.home { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: 0.35px; text-transform: uppercase; }
.home:hover { color: var(--text-2); }
.tag { color: var(--slate); font-size: 11px; font-weight: 450; letter-spacing: 0.35px; text-transform: uppercase; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; color: var(--slate); font-size: 14px; font-weight: 500; letter-spacing: 0.35px; text-transform: uppercase; pointer-events: none; transition: opacity .3s var(--ease); }
.ready .loading { opacity: 0; }

.copy { position: fixed; left: var(--gutter); bottom: max(var(--gutter), env(safe-area-inset-bottom)); max-width: 30rem; pointer-events: none; }
.copy h1 { font-size: 48px; font-weight: 400; line-height: 1; letter-spacing: -1.2px; }
.copy p { margin-top: 16px; color: var(--text-2); max-width: 26rem; }

.controls { position: fixed; right: var(--gutter); bottom: max(var(--gutter), env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; max-width: min(360px, calc(100vw - 2 * var(--gutter))); }

.modes { display: flex; align-items: center; gap: 4px; }
.label { color: var(--slate); font-size: 11px; font-weight: 450; letter-spacing: 0.35px; text-transform: uppercase; margin-right: 8px; }
.modes button {
  font: 600 14px/1 "Inter", system-ui, sans-serif; letter-spacing: 0.35px; text-transform: uppercase;
  color: var(--slate); background: transparent; border: 1px solid transparent; border-radius: 4px;
  padding: 10px 12px; cursor: pointer; transition: color .1s var(--ease), border-color .15s var(--ease);
}
.modes button:hover { color: var(--text); }
.modes button[aria-pressed="true"] { color: var(--text); border-color: var(--border); }
.modes button:focus-visible, .home:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }

.status { color: var(--text-2); font-size: 13px; text-align: right; min-height: 1em; }
.status:empty { display: none; }

.privacy { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; animation: enter .25s var(--ease); }
.privacy h2 { font-size: 14px; font-weight: 600; letter-spacing: 0.35px; text-transform: uppercase; line-height: 1.25; }
.privacy p { margin-top: 6px; font-size: 13px; line-height: 1.3; color: var(--text-2); }
.cam { position: relative; flex: none; width: 96px; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: #111; }
.cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.face { position: absolute; border: 1px solid var(--text); border-radius: 2px; }

.failed .loading { opacity: 0; }

@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (pointer: coarse) { .modes button { min-height: 44px; padding: 12px 14px; } }

@media (max-width: 760px) {
  .copy { right: var(--gutter); bottom: calc(max(var(--gutter), env(safe-area-inset-bottom)) + 64px); }
  .copy h1 { font-size: 36px; letter-spacing: -0.9px; }
  .copy p { font-size: 15px; }
  .controls { left: var(--gutter); align-items: stretch; max-width: none; }
  .modes { justify-content: flex-end; }
  .status { text-align: left; }
  body[data-mode="head"] .copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .privacy { animation: none; }
  #scene, .loading { transition-duration: .15s; }
}
