/* Shared look for the three chapters that follow the film: Market, Economics & Go-to-Market, Engineering.
   Same ink, brass and type as the film. */
:root {
  --ink: #050605; --ink-2: #0B0F0D; --panel: #0F1412; --line: rgba(236, 230, 217, 0.10); --line-2: rgba(236, 230, 217, 0.18);
  --text: #ECE6D9; --muted: #A3ABA4; --dim: #6E7671; --brass: #C9A45C; --brass-hi: #E6CC92; --brass-lo: #8A6A2C; --mint: #9FE8C8;
  --red: #E58B6B; --blue: #72BCE0; --violet: #C99BDA; --green: #86C38A;
  --display: "Cormorant Garamond", "Iowan Old Style", "Times New Roman", serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gut: max(20px, env(safe-area-inset-left, 0px));
  --wrap: 1240px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(201, 164, 92, 0.35); }

/* ------------------------------------------------------------ chrome */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; gap: 18px; padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut) 14px;
  padding-bottom: 24px; background: linear-gradient(180deg, rgba(5, 6, 5, 0.95) 0%, rgba(5, 6, 5, 0.78) 62%, rgba(5, 6, 5, 0) 100%); pointer-events: none; }
.top a { pointer-events: auto; color: inherit; text-decoration: none; }
.top .mark { display: flex; align-items: center; gap: 10px; font: 500 20px var(--display); letter-spacing: 0.02em; white-space: nowrap; }
.top nav { margin-left: auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; pointer-events: auto; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { font: 600 13.5px var(--body); padding: 8px 13px; border-radius: 999px; color: var(--muted); white-space: nowrap; transition: color .2s, background .2s; }
.top nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.top nav a[aria-current="page"] { color: #16110A; background: var(--brass); }
.top nav .s { display: none; }
.star { width: 22px; height: 22px; fill: var(--brass); flex: none; }
#progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 60; background: linear-gradient(90deg, var(--brass), var(--brass-hi)); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 720px) {
  .top { gap: 10px; }
  .top .mark span { display: none; }
  .top nav a { padding: 7px 9px; font-size: 12.5px; }
  .top nav .l { display: none; }
  .top nav .s { display: inline; }
}

/* ------------------------------------------------------------ type and layout */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gut)); margin: 0 auto; }
.band { position: relative; padding: clamp(80px, 11vw, 160px) 0; }
.band.tight { padding: clamp(56px, 7vw, 96px) 0; }
.band.panel { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eb { font: 600 12px/1.2 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--brass); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(48px, 7vw, 112px); }
h2 { font-size: clamp(36px, 4.6vw, 72px); }
h3 { font-size: clamp(24px, 2.2vw, 34px); }
.lede { font-size: clamp(17px, 1.45vw, 21px); color: #CFC8BA; max-width: 62ch; margin: 22px 0 0; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.mono { font-family: var(--mono); }
.head { max-width: 900px; margin-bottom: clamp(36px, 5vw, 64px); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
@media (max-width: 980px) { .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid2, .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 2.2vw, 30px); min-width: 0; }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: #CFC8BA; }
.note { font-size: 13px; color: var(--dim); margin-top: 18px; max-width: 90ch; }
.note a { color: var(--muted); }
.src { font-size: 12.5px; color: var(--dim); margin-top: 14px; }
.src a { color: var(--muted); overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 8px; font: 600 11.5px var(--body); letter-spacing: 0.14em; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.pill.est { color: var(--brass-hi); border-color: rgba(201, 164, 92, 0.4); }

/* ------------------------------------------------------------ numbers */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.kpi { background: var(--ink-2); padding: clamp(18px, 2vw, 28px); display: grid; gap: 6px; align-content: start; min-width: 0; }
.kpi strong { font: 500 clamp(36px, 4vw, 60px)/1 var(--display); color: var(--brass-hi); white-space: nowrap; }
.kpi span { font-weight: 600; }
.kpi em { font-style: normal; font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ reveal on scroll */
.rv { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------ buttons and the chapter cards */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 13px 22px; border-radius: 999px; border: 1px solid rgba(236, 230, 217, 0.3); font: 600 15px var(--body); color: var(--text); background: rgba(255, 255, 255, 0.02); cursor: pointer; }
.btn.primary { background: var(--brass); border-color: var(--brass); color: #16110A; }
.btn:hover { border-color: var(--brass-hi); }
/* ------------------------------------------------------------ end of a chapter: what's next */
.next { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 120px var(--gut) 90px; background: radial-gradient(80% 80% at 50% 40%, #10251C, #050605 70%); overflow: hidden; }
.next-inner { display: grid; gap: 22px; justify-items: center; text-align: center; width: min(1100px, 100%); }
.next h2 { font-size: clamp(40px, 5.6vw, 88px); }
.next p { margin: 0; color: #CFC8BA; font-size: clamp(16px, 1.3vw, 20px); max-width: 52ch; }
.next .links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.next .done { font: 600 12px var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mint); }

/* House of Gambit: the wordmark, drawn from the logo through two masks so the letters can turn racing green on light screens; "of" stays gold */
.hog { position: relative; display: block; height: 50px; aspect-ratio: 600 / 377; flex: none; }
.hog i, .hog b { position: absolute; inset: 0; -webkit-mask: url(img/brand/hog_letters_mask.png) center / contain no-repeat; mask: url(img/brand/hog_letters_mask.png) center / contain no-repeat; background: var(--hog-ink, #E7E0D1); }
.hog b { -webkit-mask-image: url(img/brand/hog_of_mask.png); mask-image: url(img/brand/hog_of_mask.png); background: #A3844C; }
.hog-badge { display: block; width: 168px; height: auto; border-radius: 3px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.hog-badge.sm { width: 96px; margin: 0 auto 18px; }
@media (max-width: 760px) { .hog { height: 40px; } }
.top .mark .hog { display: block; }
