/* Tri-Op Studios / Blackline Contract
   Palette: asphalt ground, gunmetal panels, bone text, field-sand data, signal red for record + primary actions. */
:root {
  --asphalt: #101315;
  --gunmetal: #191d20;
  --rule: #2b3135;
  --bone: #e7e2d7;
  --ash: #949a9d;
  --sand: #c6b68c;
  --signal: #d6262d;
  --signal-hot: #ee3b41;

  --font-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-pad: clamp(72px, 10vw, 140px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--asphalt);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--bone); color: var(--asphalt); padding: 8px 14px; }
.skip:focus { top: 8px; }
.muted { color: var(--ash); }

/* ---------- Type ---------- */
.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  max-width: 18ch;
  text-wrap: balance;
}
.h-section {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  text-wrap: balance;
}
.sub-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--sand);
  margin-bottom: 28px;
}
.lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: #cfcac0; max-width: 58ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-weight: 600; font-size: 1rem; font-variation-settings: "wdth" 88;
  text-decoration: none; border: 1px solid transparent; border-radius: 2px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-signal { background: var(--signal); color: #fff; }
.btn-signal:hover { background: var(--signal-hot); }
.btn-ghost { border-color: rgba(231, 226, 215, .45); color: var(--bone); background: rgba(16, 19, 21, .35); }
.btn-ghost:hover { border-color: var(--bone); background: rgba(231, 226, 215, .08); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .9375rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { background: rgba(16, 19, 21, .92); border-bottom-color: var(--rule); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.studio-mark img { width: 128px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  text-decoration: none; font-size: .9375rem; font-weight: 500; color: #d5d0c6;
  font-variation-settings: "wdth" 92;
}
.site-nav a:not(.btn):hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--signal); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate; background: #000;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3;
  filter: saturate(.9) contrast(1.05);
}
.hero-shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 35%, rgba(0,0,0,.55) 100%),
    linear-gradient(to top, rgba(16,19,21,1) 0%, rgba(16,19,21,.82) 22%, rgba(16,19,21,.15) 58%, rgba(16,19,21,.35) 100%),
    linear-gradient(to right, rgba(16,19,21,.7) 0%, rgba(16,19,21,0) 60%);
}
.grain {
  position: absolute; inset: -50%; z-index: -1; pointer-events: none; opacity: .14;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}

/* Viewfinder: the one bold device on the page */
.viewfinder { position: absolute; inset: clamp(80px, 11vh, 108px) clamp(14px, 3vw, 36px) clamp(14px, 3vw, 36px); pointer-events: none; }
.vf-corner { position: absolute; width: clamp(22px, 3vw, 40px); aspect-ratio: 1; border: 0 solid rgba(231,226,215,.75); }
.vf-tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.vf-tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.vf-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.vf-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.vf-top {
  position: absolute; top: 14px; left: 20px; right: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-variation-settings: "wdth" 80; font-weight: 600; font-size: .9375rem;
  font-variant-numeric: tabular-nums; color: rgba(231,226,215,.9); text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.rec { display: inline-flex; align-items: center; gap: 8px; letter-spacing: .08em; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px rgba(214,38,45,.8); display: inline-block; }
.rec .rec-dot { animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.hero-content { padding-bottom: clamp(56px, 9vh, 104px); padding-top: 140px; }
.hero-logo { width: min(560px, 82vw); margin-left: -6px; }
.hero-logo img { width: 100%; }
.hero-tagline {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.02; margin-top: 18px; max-width: 22ch;
}
.hero-lede { margin-top: 14px; max-width: 52ch; color: #d9d4ca; font-size: clamp(1rem, 1.4vw, 1.125rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 28px; }
.btn-play {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 6px;
  background: none; border: 0; cursor: pointer; font-weight: 600; font-variation-settings: "wdth" 88;
}
.btn-play:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.play-glyph {
  width: 36px; height: 36px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; flex: none;
}
.play-glyph::after {
  content: ""; position: absolute; left: 13px; top: 10px;
  border-left: 12px solid currentColor; border-top: 7.5px solid transparent; border-bottom: 7.5px solid transparent;
}
.hero-status {
  margin-top: 28px; font-size: .9375rem; color: var(--sand); font-variation-settings: "wdth" 88;
  padding-left: 14px; border-left: 2px solid var(--signal);
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }

/* The game */
.game { padding-top: clamp(56px, 8vw, 110px); }
.game-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(56px, 7vw, 96px); }
.run-loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.run-step { counter-increment: step; }
.run-step h4 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; line-height: 1; margin: 18px 0 8px;
  display: flex; align-items: baseline; gap: 10px;
}
.run-step h4::before {
  content: counter(step, decimal-leading-zero); font-family: var(--font-body); font-weight: 600;
  font-size: .875rem; color: var(--sand); font-variant-numeric: tabular-nums;
}
.run-step p { color: #c9c4ba; font-size: 1rem; }
.feed { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--gunmetal); }
.feed img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.feed::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(231,226,215,.22); pointer-events: none; }
.feed-tag {
  position: absolute; left: 16px; top: 14px; display: inline-flex; align-items: center; gap: 7px;
  font-size: .8125rem; font-weight: 600; font-variation-settings: "wdth" 80; text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.feed-tag .rec-dot { width: 7px; height: 7px; }

/* Quota illustration */
.quota {
  margin-top: clamp(72px, 9vw, 120px);
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px 64px; align-items: end;
  padding: clamp(28px, 4vw, 48px); background: var(--gunmetal); border-left: 3px solid var(--signal);
}
.quota-copy p { margin-top: 14px; color: #cfcac0; font-size: 1.125rem; }
.quota-chart { display: flex; align-items: flex-end; gap: clamp(6px, 1.2vw, 14px); height: 220px; }
.quota-chart span {
  flex: 1; height: var(--h); position: relative;
  background: linear-gradient(to top, rgba(198,182,140,.55), rgba(198,182,140,.2));
  border-top: 2px solid var(--sand);
}
.quota-chart span.is-today { background: linear-gradient(to top, rgba(214,38,45,.85), rgba(214,38,45,.35)); border-top-color: var(--signal-hot); }
.quota-chart i {
  position: absolute; bottom: -26px; left: 0; right: 0; text-align: center; font-style: normal;
  font-size: .75rem; color: var(--ash); font-variation-settings: "wdth" 80; white-space: nowrap;
}
.quota-chart { margin-bottom: 26px; }

/* Features */
.features { margin-top: clamp(72px, 9vw, 120px); display: grid; grid-template-columns: 1fr 2fr; gap: 24px 64px; }
.features .sub-head { position: sticky; top: 100px; align-self: start; font-size: clamp(1.75rem, 3vw, 2.5rem); color: var(--bone); font-weight: 800; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.feature { padding: 26px 0 30px; border-top: 1px solid var(--rule); }
.feature dt { font-weight: 700; font-size: 1.1875rem; font-variation-settings: "wdth" 95; margin-bottom: 8px; }
.feature dd { color: #c9c4ba; }

/* Screenshots */
.shots .section-head { grid-template-columns: auto 1fr; align-items: end; gap: 18px 40px; }
.shots .section-head p { justify-self: end; max-width: 40ch; text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; grid-auto-flow: dense; }
.gallery li { aspect-ratio: 16 / 9; }
.gallery li.g-wide { grid-column: span 2; grid-row: span 2; }
.gallery button {
  width: 100%; height: 100%; padding: 0; border: 0; background: var(--gunmetal); cursor: zoom-in; overflow: hidden; display: block;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; filter: saturate(.85); }
.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.03); filter: saturate(1); }

/* Team */
.founders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.person img, .advisor img {
  width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--gunmetal);
  filter: grayscale(1) contrast(1.08) brightness(.95);
}
.person img { margin-bottom: 20px; }
.person h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.875rem; line-height: 1; }
.role { color: var(--sand); font-weight: 600; font-variation-settings: "wdth" 88; margin: 6px 0 10px; font-size: .9875rem; }
.person p:not(.role), .advisor p:not(.role) { color: #c9c4ba; font-size: 1rem; }
.team .sub-head { margin-top: clamp(56px, 7vw, 88px); }
.advisors { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; }
.advisor { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: start; }
.advisor h4 { font-weight: 700; font-size: 1.1875rem; font-variation-settings: "wdth" 95; }
.advisor .role { margin: 2px 0 6px; }
.community {
  margin-top: clamp(56px, 7vw, 88px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  padding: 28px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.community p { font-size: 1.125rem; max-width: 60ch; }
.community strong { color: var(--bone); }

/* Roadmap */
.timeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; position: relative; }
.tl-item { position: relative; padding: 40px 22px 0 0; }
.tl-item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rule); }
.tl-item::after {
  content: ""; position: absolute; left: 0; top: -6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--asphalt); border: 2px solid var(--ash);
}
.tl-item.is-done::before { background: var(--sand); }
.tl-item.is-done::after { background: var(--sand); border-color: var(--sand); }
.tl-item.is-now::before { background: linear-gradient(to right, var(--sand), var(--rule)); }
.tl-item.is-now::after { background: var(--signal); border-color: var(--signal); box-shadow: 0 0 0 5px rgba(214,38,45,.25); }
.tl-item.is-launch::after { border-color: var(--signal); }
.tl-when { display: block; font-weight: 600; font-size: .9375rem; color: var(--sand); font-variation-settings: "wdth" 85; font-variant-numeric: tabular-nums; }
.tl-item h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.05; margin: 8px 0; }
.tl-item.is-launch h3 { color: #fff; }
.tl-item p { color: #c2bdb3; font-size: .9375rem; }
.tl-state {
  display: inline-block; margin-top: 14px; font-size: .8125rem; font-weight: 600; padding: 3px 10px;
  border: 1px solid currentColor; color: var(--sand);
}
.is-now .tl-state { color: var(--signal-hot); }

/* Press */
.press { background: var(--gunmetal); }
.section.press { border-top: 0; }
.press-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 72px; }
.press .lede { margin-top: 18px; }
.facts { margin-top: 36px; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--ash); }
.press-art { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.downloads { margin-top: 24px; }
.downloads li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.downloads a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 5px; }
.downloads a:hover { color: #fff; }
.downloads span { color: var(--ash); font-size: .9375rem; }
.contact { margin-top: 36px; }
.contact h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.875rem; line-height: 1; }
.contact p { color: #c9c4ba; margin: 8px 0 6px; }
.contact-mail { font-size: clamp(1.25rem, 2.4vw, 1.625rem); font-weight: 600; font-variation-settings: "wdth" 90; text-decoration: none; border-bottom: 2px solid var(--signal); word-break: break-all; }
.contact-mail:hover { color: #fff; }

/* Footer */
.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--rule); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px 40px; }
.footer-inner img { width: 120px; }
.footer-inner nav { display: flex; gap: 28px; justify-content: flex-end; }
.footer-inner nav a { text-decoration: none; font-weight: 500; }
.footer-inner nav a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 5px; }
.footer-inner p { grid-column: 1 / -1; font-size: .875rem; }

/* Modals */
.modal {
  border: 0; padding: 0; background: transparent; color: var(--bone);
  width: min(1280px, 94vw); max-width: none; max-height: 92vh; overflow: visible;
}
.modal::backdrop { background: rgba(5, 6, 7, .92); }
.modal video, .modal img { width: 100%; max-height: 86vh; object-fit: contain; background: #000; }
.modal-close {
  position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border: 0; background: none; cursor: pointer;
}
.modal-close::before, .modal-close::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: 19px; height: 2px; background: var(--bone);
}
.modal-close::before { transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }
.lb-nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 64px; border: 0; cursor: pointer;
  background: rgba(16,19,21,.6);
}
.lb-nav::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px;
  border-left: 2px solid var(--bone); border-bottom: 2px solid var(--bone);
}
.lb-prev { left: 0; }
.lb-prev::after { transform: translate(-30%, -50%) rotate(45deg); }
.lb-next { right: 0; }
.lb-next::after { transform: translate(-70%, -50%) rotate(-135deg); }
.lb-nav:hover { background: rgba(16,19,21,.85); }
.lb-caption { margin-top: 12px; color: var(--ash); font-size: .9375rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .run-loop { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 48px; }
  .features { grid-template-columns: 1fr; }
  .features .sub-head { position: static; }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    background: none; border: 1px solid rgba(231,226,215,.35); border-radius: 2px; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: var(--bone); position: relative; transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(16,19,21,.98); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 20px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-header:has(.site-nav.is-open) { background: rgba(16,19,21,.98); }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.0625rem; }
  .site-nav .btn { margin-top: 16px; min-height: 48px; }

  .game-intro { grid-template-columns: 1fr; }
  .quota { grid-template-columns: 1fr; }
  .quota-chart { height: 160px; }
  .feature-list { grid-template-columns: 1fr; }
  .shots .section-head { grid-template-columns: 1fr; }
  .shots .section-head p { justify-self: start; text-align: left; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .founders { grid-template-columns: 1fr 1fr; }
  .advisors { grid-template-columns: 1fr; }
  .press-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .studio-mark img { width: 104px; }
  .hero { align-items: flex-end; }
  .hero-content { padding-top: 120px; padding-bottom: 48px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .vf-top { font-size: .8125rem; top: 10px; left: 14px; right: 14px; }
  .run-loop { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 6px; }
  .gallery li.g-wide { grid-row: span 1; }
  .founders { grid-template-columns: 1fr; gap: 48px; }
  .person img { max-width: 320px; }
  .advisor { grid-template-columns: 84px 1fr; gap: 16px; }
  .timeline { grid-template-columns: 1fr; row-gap: 0; padding-left: 6px; }
  .tl-item { padding: 0 0 36px 32px; }
  .tl-item::before { left: 6px; right: auto; top: 6px; bottom: -6px; width: 2px; height: auto; }
  .tl-item:last-child::before { display: none; }
  .tl-item::after { top: 0; }
  .tl-item.is-now::before { background: linear-gradient(to bottom, var(--sand), var(--rule)); }
  .facts div { grid-template-columns: 7.5rem 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .rec .rec-dot { animation: none; }
  .gallery img { transition: none; }
}
