/* Shared styles for /work pages. Tokens, fonts and components mirror index.html. */
:root {
  --bg: #120F0F;
  --bg-raised: #1C1717;
  --bg-raised-2: #262020;
  --glow: #6B1A1A;
  --accent: #E0A94A;
  --ink: #F5F1EE;
  --ink-2: #B8AFAC;
  --line: rgba(245,241,238,0.14);
  --sans: "Onest", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --gutter: 32px;
  --radius-card: 20px;
  color-scheme: dark;
}
@media (max-width: 720px) { :root { --gutter: 20px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p a, li a, td a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
p a:hover, li a:hover, td a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, video { display: block; max-width: 100%; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.measure { max-width: 860px; }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; gap: 12px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 500 15px/1 var(--sans); white-space: nowrap; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.pill:hover { border-color: rgba(245,241,238,0.4); background: rgba(245,241,238,0.04); }
.pill.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill.primary:hover { background: #fff; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding-top: 20px; padding-bottom: 20px;
}
.nav::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: rgba(18,15,15,0.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.wordmark { font-family: var(--serif); font-size: 1.4rem; letter-spacing: 0.02em; line-height: 1; }
.nav-pill {
  display: flex; gap: 4px; height: 48px; padding: 0 8px; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.nav-pill::-webkit-scrollbar { display: none; }
.nav-pill a {
  position: relative; padding: 0 14px; height: 100%; display: inline-flex; align-items: center;
  font-size: 15px; color: var(--ink-2); white-space: nowrap; transition: color .2s;
}
.nav-pill a:hover, .nav-pill a[aria-current="page"] { color: var(--ink); }
.nav-pill a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 9px; height: 2px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0); transform-origin: left;
}
.nav-pill a[aria-current="page"]::after { transform: scaleX(1); }
.nav-right { justify-self: end; }
@media (max-width: 840px) {
  .nav { grid-template-columns: 1fr auto; row-gap: 12px; padding-top: 16px; padding-bottom: 12px; }
  .wordmark { grid-row: 1; grid-column: 1; }
  .nav-right { grid-row: 1; grid-column: 2; }
  .nav-pill { grid-row: 2; grid-column: 1 / -1; justify-self: start; height: 44px; }
  .nav-pill a { padding: 0 12px; font-size: 14px; }
  .nav-right .pill { height: 40px; padding: 0 16px; font-size: 14px; }
}
@media (max-width: 480px) {
  .nav-pill { padding: 0 4px; }
  .nav-pill a { padding: 0 9px; font-size: 13px; }
  .xs-hide { display: none; }
}

/* Page header */
.page-head { position: relative; isolation: isolate; padding-top: 56px; padding-bottom: 24px; }
.page-head::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 1100px; height: 1100px; right: -380px; top: -640px; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(107,26,26,0.7) 0%, rgba(107,26,26,0.3) 30%, rgba(107,26,26,0.08) 52%, transparent 68%);
}
.crumb { font-size: 15px; color: var(--ink-2); margin: 0 0 20px; }
.crumb a:hover { color: var(--ink); }
h1 {
  font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 500; line-height: 1; letter-spacing: -0.03em;
  margin: 0 0 22px;
}
h1::after { content: "."; color: var(--accent); }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-2); max-width: 60ch; margin: 0; }
.lede b { color: var(--ink); font-weight: 500; }
@media (max-width: 720px) { .page-head { padding-top: 32px; } }

/* Sections */
.section { padding-top: 72px; scroll-margin-top: 60px; }
.section:last-of-type { padding-bottom: 8px; }
.eyebrow {
  display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 22px; font-weight: 500;
}
.eyebrow::before { content: ""; display: inline-block; width: 18px; height: 1px; background: var(--accent); vertical-align: middle; margin-right: 12px; }
@media (max-width: 720px) { .section { padding-top: 56px; } }

/* Media frame */
.frame { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; background: var(--bg-raised); }
.frame video { width: 100%; aspect-ratio: 16 / 9; height: auto; background: #000; }
.caption { margin: 14px 0 0; color: var(--ink-2); font-size: 0.95rem; max-width: 70ch; }

/* Two portrait videos side by side */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 760px; }
.pair figure { margin: 0; }
.pair .frame video { aspect-ratio: 4 / 5; }
.pair figcaption { margin-top: 10px; color: var(--ink-2); font-size: 0.95rem; }
.pair figcaption b { color: var(--ink); font-weight: 500; margin-right: 6px; }
@media (max-width: 560px) { .pair { grid-template-columns: 1fr; max-width: 360px; } }

/* Status line under a lede */
.status-line { margin: 18px 0 0; display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--ink-2); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* Screenshot strip */
.shots {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-left: 0; padding-bottom: 14px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  -webkit-overflow-scrolling: touch;
}
.shots img {
  flex: 0 0 220px; width: 220px; height: auto; scroll-snap-align: start;
  border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--bg-raised);
}
@media (max-width: 720px) { .shots img { flex-basis: 70vw; width: 70vw; } }
.caption .pill { text-decoration: none; margin-top: 8px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0 0 28px; }
.stat b { display: block; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--ink-2); font-size: 0.95rem; margin-top: 6px; max-width: 24ch; }
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .stats .stat.wide { grid-column: 1 / -1; }
}

/* Table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-raised); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 480px; }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
tr:last-child td { border-bottom: none; }
td { color: var(--ink-2); font-variant-numeric: tabular-nums; }
td:first-child { color: var(--ink); }
.tablenote { margin: 12px 0 0; color: var(--ink-2); font-size: 0.9rem; max-width: 70ch; }

/* Stories */
.stories { display: grid; gap: 22px; max-width: 72ch; }
.stories p { margin: 0; color: var(--ink-2); }
.stories p b { color: var(--ink); font-weight: 500; }
.stories code { font-family: var(--mono); font-size: 0.85em; background: var(--bg-raised-2); padding: 2px 6px; border-radius: 6px; color: var(--ink); }

/* Link cards (UGC outputs) */
.outs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.out {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--bg-raised); border-radius: var(--radius-card); overflow: hidden; padding: 0 0 22px;
  transition: background-color .2s;
}
.out:hover { background: #211b1b; }
.out .thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-raised-2); overflow: hidden; }
.out .thumb img { width: 100%; height: 100%; object-fit: cover; }
.out .thumb .play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(18,15,15,0.72); border: 1px solid rgba(245,241,238,0.3);
  display: grid; place-items: center; color: var(--ink);
}
.out .thumb .play svg { width: 20px; height: 20px; margin-left: 3px; }
.out .thumb.plain { aspect-ratio: auto; height: 0; }
.out .meta { padding: 0 22px; display: grid; gap: 6px; }
.out .platform { display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.out .platform svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.out .meta p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.out.noimg { padding-top: 22px; }
@media (max-width: 900px) { .outs { grid-template-columns: 1fr; } }

/* Links row */
.linkrow { display: flex; flex-wrap: wrap; gap: 12px; }

/* Back + footer */
.back { padding-top: 72px; }
.back a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 15px; }
.back a:hover { color: var(--ink); }
footer { margin-top: 48px; padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer .built { margin-left: auto; }
footer .built b { color: var(--ink); font-weight: 500; }
@media (max-width: 720px) { footer .built { margin-left: 0; width: 100%; } }
