/* wireface.dev: OpenFace's site. Dark only: it is the face's own look (the "cyan" preset on night blue). */
:root {
  --night: #060b18;
  --night-2: #0a1226;
  --panel: #0d1630;
  --line: rgba(148, 163, 184, 0.14);
  --line-2: rgba(148, 163, 184, 0.24);
  --text: #e6ecf8;
  --muted: #9aa6c3;
  --dim: #6b7695;
  --cyan: #22d3ee;
  --indigo: #6366f1;
  --violet: #a78bfa;
  --grad: linear-gradient(110deg, var(--cyan) 10%, var(--indigo) 60%, var(--violet) 95%);
  --radius: 14px;
  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: inherit; }
code { font: 0.9em var(--mono); color: #c7d2fe; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; margin-bottom: 1.25rem; max-width: 22ch; }
h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: min(1140px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 16px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font: 500 0.78rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem; }
.lede { font-size: 1.16rem; color: var(--muted); max-width: 54ch; margin-top: 1.4rem; }
.lede.small { font-size: 1.05rem; margin-top: 0; }
.fine { color: var(--dim); font-size: 0.9rem; margin-top: 1.1rem; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font: 600 0.95rem/1 var(--body); text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn.primary { background: var(--grad); color: #050914; box-shadow: 0 8px 30px -10px rgba(99, 102, 241, .7); }
.btn.ghost { border-color: var(--line-2); color: var(--text); background: rgba(13, 22, 48, .5); }
.btn.ghost:hover { border-color: rgba(34, 211, 238, .5); }
.btn.small { padding: 8px 14px; font-size: 0.88rem; }

/* --- nav --- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(6, 11, 24, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem var(--display); letter-spacing: -0.02em; }
.brand img { border-radius: 9px; }
.links { display: flex; gap: 26px; margin-left: auto; }
.links a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.links a:hover { color: var(--text); }

/* --- hero --- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .35;
  mask-image: radial-gradient(ellipse 70% 60% at 65% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 65% 45%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: center; min-height: min(78vh, 700px); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

.stage { position: relative; margin: 0; aspect-ratio: 1 / 1.08; width: 100%; max-width: 560px; justify-self: center; }
.halo {
  position: absolute; inset: 8% 6% 14%; border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, rgba(34, 211, 238, .18), rgba(99, 102, 241, .12) 45%, transparent 70%);
  filter: blur(10px);
}
#head {
  position: absolute; inset: 0 0 12% 0; width: 100%; height: 88%;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, .45));
}
.caption {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 470px); min-height: 92px;
  padding: 14px 16px 14px; border-radius: var(--radius);
  background: rgba(10, 18, 38, .82); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
}
.caption .who { display: inline-block; font: 500 0.72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-right: 8px; padding: 4px 7px; border-radius: 6px; vertical-align: 2px; }
.caption .who.you { color: #fde68a; background: rgba(253, 230, 138, .1); }
.caption .who.face { color: var(--cyan); background: rgba(34, 211, 238, .1); }
.caption .line { font-size: 1rem; color: var(--text); }
.activity {
  position: absolute; right: 12px; top: -13px;
  font: 500 0.72rem/1 var(--mono); color: #c7d2fe;
  padding: 6px 9px; border-radius: 999px; background: #121c3d; border: 1px solid rgba(99, 102, 241, .45);
}
.activity::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 8px var(--cyan); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .activity::before { animation: none; } }

/* --- strip --- */
.strip { border-block: 1px solid var(--line); background: var(--night-2); }
.strip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px; padding: 18px 0; color: var(--dim); font: 500 0.92rem var(--display); letter-spacing: .01em; }

/* --- sections --- */
.section { padding: 96px 0; }
.section.alt { background: linear-gradient(180deg, var(--night-2), var(--night)); border-top: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 2.4rem; }
.card {
  padding: 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 22, 48, .9), rgba(10, 16, 36, .9));
  border: 1px solid var(--line);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(99, 102, 241, .45); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: 0.95rem; }
.ico { width: 26px; height: 26px; margin-bottom: 14px; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.flow { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.flow li { position: relative; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(13, 22, 48, .6); }
.flow li:not(:last-child)::after {
  content: ""; position: absolute; top: 34px; right: -13px; width: 10px; height: 10px; z-index: 1;
  border-top: 2px solid var(--indigo); border-right: 2px solid var(--indigo); transform: rotate(45deg);
}
.flow p { color: var(--muted); font-size: 0.93rem; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; margin-bottom: 12px; font: 600 0.85rem var(--mono); color: #050914; background: var(--grad); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.split > div { padding: 22px; border-radius: var(--radius); border: 1px dashed var(--line-2); }
.split p { color: var(--muted); font-size: 0.95rem; }

.faces { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.portraits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 420px; justify-self: center; }
.portraits li { aspect-ratio: 1; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); position: relative; }
.portraits img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portraits li:not(.holo)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(34, 211, 238, .08), rgba(99, 102, 241, .18));
  mix-blend-mode: screen;
}
.portraits .holo { border-color: rgba(34, 211, 238, .5); box-shadow: 0 0 30px -8px rgba(34, 211, 238, .5); }

.room { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 2.4rem 0 1.6rem; }
.seat { margin: 0; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(13, 22, 48, .6); }
.seat img { width: 72px; height: 78px; flex: none; object-fit: cover; border-radius: 14px; background: var(--night); }
.seat figcaption { display: grid; gap: 2px; }
.seat b { font: 600 1.05rem var(--display); }
.seat span { color: var(--muted); font-size: 0.9rem; }
.seat.lead { border-color: rgba(34, 211, 238, .55); box-shadow: 0 0 40px -18px rgba(34, 211, 238, .7); }
.rules { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rules li { color: var(--muted); font-size: 0.95rem; }
.rules b { color: var(--text); display: block; margin-bottom: 4px; font-weight: 600; }

.code { position: relative; border-radius: var(--radius); border: 1px solid var(--line-2); background: #050916; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 0.92rem/1.7 var(--mono); }
.code code { color: #d6e0ff; font-size: inherit; }
.copy {
  position: absolute; top: 10px; right: 10px; cursor: pointer;
  font: 500 0.75rem var(--mono); color: var(--muted); background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px;
}
.copy:hover { color: var(--text); border-color: rgba(34, 211, 238, .5); }

.table-wrap { overflow-x: auto; margin-top: 2rem; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.94rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { font: 600 0.98rem var(--display); background: var(--night-2); }
tbody th { color: var(--muted); font-weight: 500; width: 22%; }
td { color: var(--text); }

.start { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.reqs { margin: 1.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.reqs li { padding-left: 26px; position: relative; color: var(--muted); }
.reqs li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 7px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg); }
.steps { display: grid; gap: 18px; justify-items: start; }
.steps .code { width: 100%; }
.hint { color: var(--muted); font-size: 0.95rem; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--dim); font-size: 0.88rem; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-row p { flex: 1; min-width: 240px; }
.footer .brand { color: var(--text); font-size: 1rem; }
.footer a:not(.brand) { color: var(--muted); }

/* --- narrower screens --- */
@media (max-width: 980px) {
  .grid, .rules { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li::after { display: none; }
  .room { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .links { display: none; }
  .nav-row .btn { margin-left: auto; }
  .hero { padding-top: 32px; }
  .hero-grid, .faces, .start { grid-template-columns: 1fr; }
  .hero-grid { min-height: 0; }
  .stage { max-width: 440px; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .grid, .rules, .flow, .split { grid-template-columns: 1fr; }
  .lede { font-size: 1.06rem; }
  .caption { min-height: 104px; }
}

/* --- the hero's sound toggle --- */
.sound-row { position: absolute; top: 2%; right: 0; display: flex; align-items: center; gap: 10px; z-index: 2; }
.sound {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px 9px 11px; border-radius: 999px;
  font: 600 0.85rem var(--body); color: var(--text);
  background: rgba(10, 18, 38, .78); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .15s ease, background .15s ease;
}
.sound:hover { border-color: rgba(34, 211, 238, .55); }
.sound svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; stroke: none; }
.sound .on { display: none; }
.sound[aria-pressed="true"] { border-color: rgba(34, 211, 238, .6); background: rgba(34, 211, 238, .12); color: #cffafe; }
.sound[aria-pressed="true"] .on { display: inline; }
.sound[aria-pressed="true"] .off { display: none; }
.sound-hint { font: 500 0.78rem var(--mono); color: var(--cyan); white-space: nowrap; animation: nudge 2.4s ease-in-out infinite; }
.sound-hint::after { content: " \2192"; }
@keyframes nudge { 50% { transform: translateX(-4px); opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .sound-hint { animation: none; } }
.caption:has(.line:empty) { opacity: 0; }
.caption { transition: opacity .3s ease; }
.stage.talking .halo { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .65; transform: scale(1.03); } }
@media (max-width: 560px) { .sound-hint { display: none; } }

/* --- demo video, scenes --- */
.fine.engine { max-width: 52ch; margin-top: .5rem; }
.demo { padding-bottom: 56px; }
.video { margin: 2rem 0 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: #000;
  box-shadow: 0 40px 90px -40px rgba(34, 211, 238, .35); aspect-ratio: 16 / 9; }
.video video { display: block; width: 100%; height: 100%; }
.scene { margin: 2rem 0 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); aspect-ratio: 1600 / 893; }
.scene img { display: block; width: 100%; height: 100%; object-fit: cover; }
