:root {
  --paper: #f5f3ee;
  --paper-2: #ebe8e0;
  --ink: #15150f;
  --ink-2: #5d5c53;
  --line: #d9d5ca;
  --night: #0c0d10;
  --night-2: #16181d;
  --night-ink: #f2f0ea;
  --night-ink-2: #a3a39b;
  --accent: #2f45ff;
  --gut: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.leaving { opacity: 0; transition: opacity .18s ease; }

/* Background sits on #app so the blended header has something to blend against. */
#app { background: var(--paper); isolation: isolate; }

a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; line-height: 1.04; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-2);
}
.dark { background: var(--night); color: var(--night-ink); }
.dark .eyebrow { color: var(--night-ink-2); }

/* Header */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gut);
  color: #fff; mix-blend-mode: difference;
  font-size: 15px;
}
/* At the very top of the home page the header is plain white over the video. */
.site-head.over { mix-blend-mode: normal; text-shadow: 0 1px 18px rgba(0, 0, 0, .35); }
.site-head .name { font-family: var(--serif); font-size: 24px; letter-spacing: 0; }
.site-head nav { display: flex; gap: clamp(14px, 2.4vw, 34px); }
.site-head nav a { position: relative; padding: 4px 0; }
.site-head nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.site-head nav a:hover::after, .site-head nav a[aria-current]::after { transform: scaleX(1); }

/* Placeholder and real media */
.media { position: relative; overflow: hidden; background: var(--night-2); border-radius: 6px; aspect-ratio: 16 / 9; }
.media.tall { aspect-ratio: 4 / 5; }
.ph {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 20% 10%, hsl(var(--h) 46% 46% / .9), transparent 60%),
    radial-gradient(90% 80% at 90% 95%, hsl(calc(var(--h) + 50) 50% 30% / .9), transparent 62%),
    linear-gradient(135deg, hsl(var(--h) 30% 18%), hsl(calc(var(--h) + 30) 34% 9%));
  background-size: 140% 140%, 140% 140%, 100% 100%;
  background-position: 0% 0%, 100% 100%, 0 0;
  transition: background-position 2.4s var(--ease), transform 1.6s var(--ease);
}
a:hover .ph, .media:hover .ph { background-position: 40% 30%, 60% 70%, 0 0; transform: scale(1.03); }
.ph-label {
  position: absolute; left: 12px; bottom: 10px; right: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
.media .play {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: #fff; opacity: 0; transition: opacity .3s;
}
a:hover .media .play { opacity: .85; }

/* Device mockups */
.phone {
  position: relative; width: min(100%, 270px); aspect-ratio: 9 / 19; margin: 0 auto;
  border-radius: 34px; background: #050506; padding: 9px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45);
}
.phone .media { height: 100%; aspect-ratio: auto; border-radius: 26px; }
.phone::before {
  content: ''; position: absolute; top: 18px; left: 50%; width: 74px; height: 20px; margin-left: -37px;
  border-radius: 12px; background: #050506; z-index: 3;
}
.browser { border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .4); border: 1px solid var(--line); }
.browser-bar { display: flex; gap: 6px; align-items: center; padding: 10px 12px; background: #f0eee9; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #cfcabd; }
.browser-bar span { margin-left: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); }
.browser .media { border-radius: 0; }
.device-note { margin-top: 14px; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--ink-2); }

/* Draft chips */
.chip {
  display: inline-block; vertical-align: middle; margin-left: 2px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .04em; line-height: 1.5; font-style: normal;
  padding: 1px 6px; border-radius: 3px; background: #ffe45c; color: #2b2500; white-space: normal;
}
.draft-flag {
  position: fixed; right: 14px; bottom: 14px; z-index: 60; cursor: help;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em;
  padding: 5px 9px; border-radius: 4px; background: #ffe45c; color: #2b2500;
}

/* Reveal */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* Hero */
.hero-stage { height: 150svh; }
.hero-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.hero {
  position: relative; height: 100%; display: flex; align-items: flex-end; overflow: hidden;
  transform: scale(calc(1 - var(--p, 0) * .1)); border-radius: calc(var(--p, 0) * 26px); will-change: transform;
}
.hero-ctl { display: grid; gap: 12px; flex: 1; max-width: 420px; }
.segs { display: flex; gap: 6px; }
.segs button { flex: 1; height: 18px; padding: 8px 0; border: 0; background: none; cursor: pointer; }
.segs button::before, .segs button i { content: ''; display: block; height: 2px; border-radius: 2px; }
.segs button::before { background: rgba(255, 255, 255, .28); }
.segs button i { margin-top: -2px; background: #fff; transform: scaleX(0); transform-origin: left; }
.segs button.done i { transform: scaleX(1); }
.segs button.live i { transform: scaleX(1); transition: transform var(--hold, 4200ms) linear; }
.segs button:hover::before { background: rgba(255, 255, 255, .5); }

/* Rising headlines */
.rise .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.rise .w > span { display: inline-block; transform: translateY(110%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms); }
.rise.in .w > span { transform: none; }

/* Chapter index on case studies */
.chapters {
  position: fixed; left: 50%; bottom: 16px; z-index: 55; display: flex; gap: 2px; max-width: calc(100vw - 24px);
  padding: 5px; border-radius: 99px; background: rgba(14, 15, 19, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .6s var(--ease), opacity .4s;
}
.chapters::-webkit-scrollbar { display: none; }
.chapters.on { transform: translate(-50%, 0); opacity: 1; }
.chapters a { padding: 7px 13px; border-radius: 99px; font-size: 13px; color: rgba(255, 255, 255, .66); transition: background .3s, color .3s; }
.chapters a:hover { color: #fff; }
.chapters a.cur { background: #f2f0ea; color: #0c0d10; }
[id] { scroll-margin-top: 84px; }

/* Live phone feed */
.phone.live .ph { animation: feed 9s ease-in-out infinite alternate; }
@keyframes feed { from { background-position: 0% 0%, 100% 100%, 0 0; } to { background-position: 30% 70%, 60% 20%, 0 0; } }
.feed { position: absolute; left: 22px; right: 22px; bottom: 26px; z-index: 3; display: grid; gap: 7px; pointer-events: none; }
.feed .react { justify-self: end; display: grid; justify-items: center; gap: 4px; margin-bottom: 10px; color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.feed .react i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #fff; animation: pulse 2.6s ease-in-out infinite; }
.feed .react b { font-weight: 500; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.feed .cap { height: 7px; width: 78%; border-radius: 4px; background: rgba(255, 255, 255, .5); }
.feed .cap.short { width: 46%; background: rgba(255, 255, 255, .3); }
.feed .bar { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .25); overflow: hidden; margin-top: 4px; }
.feed .bar i { display: block; height: 100%; background: #fff; transform-origin: left; animation: playbar 12s linear infinite; }
@keyframes playbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero .frames, .hero .frame { position: absolute; inset: 0; }
.hero .frame { opacity: 0; transition: opacity 1.8s ease; }
.hero .frame.on { opacity: 1; }
.hero .frame .ph { animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 9, 12, .25), rgba(8, 9, 12, .12) 40%, rgba(8, 9, 12, .82)); }
.hero-in { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(36px, 7vh, 80px); }
.hero h1 { font-size: clamp(38px, 5.2vw, 84px); max-width: 17ch; }
.hero .sub { max-width: 46ch; margin-top: 22px; color: rgba(255, 255, 255, .82); font-size: clamp(16px, 1.35vw, 20px); }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 40px; }
.hero-foot .eyebrow { color: rgba(255, 255, 255, .62); }

/* Proof strip */
.proof { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.proof > div { padding: clamp(26px, 4vw, 54px) clamp(14px, 2vw, 30px) clamp(24px, 3.4vw, 46px) 0; }
.proof > div + div { padding-left: clamp(14px, 2vw, 30px); border-left: 1px solid var(--line); }
.proof b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.4vw, 84px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.proof span { display: block; margin-top: 12px; max-width: 24ch; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; }

/* Sections */
.sec { padding: clamp(64px, 10vw, 150px) 0; }
.sec-head { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; align-items: end; margin-bottom: clamp(36px, 5vw, 76px); }
.sec-head h2 { font-size: clamp(36px, 5vw, 76px); }
.sec-head p { max-width: 52ch; color: var(--ink-2); margin: 0; }
.dark .sec-head p { color: var(--night-ink-2); }

/* Flagship cards */
.flag { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(22px, 4vw, 64px); align-items: center; padding: clamp(26px, 4vw, 56px) 0; border-top: 1px solid var(--line); }
.flag:nth-of-type(even) .media { order: 2; }
.flag .num { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.flag h3 { font-size: clamp(34px, 4.2vw, 64px); margin: 10px 0 14px; }
.flag h3 em { font-style: italic; }
.flag .proves { font-size: 18px; margin-bottom: 10px; }
.flag .sum { color: var(--ink-2); max-width: 46ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border: 1px solid currentColor; border-radius: 99px; opacity: .7; }
.more { display: inline-flex; gap: 8px; align-items: center; margin-top: 22px; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.more i { font-style: normal; transition: transform .35s var(--ease); }
a:hover .more i, .more:hover i { transform: translateX(5px); }

/* Small card grid */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 36px); }
.card h3 { font-size: clamp(26px, 2.5vw, 36px); margin: 16px 0 6px; }
.card .sum { color: var(--ink-2); font-size: 15.5px; }
.card .meta { margin-top: 14px; }

/* Practice teaser and docs */
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); }
.doc {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 210px;
  padding: 20px; border: 1px solid var(--line); border-radius: 6px; background: #fbfaf7;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.doc:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -30px rgba(0, 0, 0, .35); }
.dark .doc { background: var(--night-2); border-color: #2a2d35; }
.doc h4 { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.1; margin: 0; }
.doc .lock { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.doc-group { padding: clamp(30px, 4vw, 56px) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 3fr; gap: 28px; }
.doc-group h3 { font-size: clamp(28px, 2.8vw, 40px); }
.doc-group .note { color: var(--ink-2); margin-top: 10px; max-width: 28ch; font-size: 15.5px; }

/* Gate */
.gate { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: clamp(24px, 3.4vw, 44px); border-radius: 8px; background: var(--night); color: var(--night-ink); }
.gate h3 { font-size: clamp(26px, 2.8vw, 40px); }
.gate p { margin: 10px 0 0; color: var(--night-ink-2); max-width: 52ch; font-size: 15.5px; }
.gate form { display: flex; gap: 8px; }
.gate input { width: 190px; padding: 12px 14px; border-radius: 4px; border: 1px solid #343842; background: #0f1014; color: #fff; font: inherit; font-size: 15px; }
.gate input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.gate button, .btn { padding: 12px 18px; border-radius: 4px; border: 0; background: var(--night-ink); color: var(--night); font: inherit; font-size: 15px; cursor: pointer; }
.btn.ink { background: var(--ink); color: var(--paper); display: inline-block; }
.btn.off { opacity: .45; pointer-events: none; }
.gate .err { grid-column: 1 / -1; color: #ff9a8a; font-size: 14px; min-height: 1em; margin: 0; }
.film-list { list-style: none; margin: 0; padding: 0; }
.film-list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 18px; }
.film-list li span:last-child { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); align-self: center; }

/* Case study */
.case-head { padding: clamp(120px, 17vh, 190px) 0 clamp(30px, 4vw, 56px); }
.case-head h1 { font-size: clamp(48px, 8.4vw, 132px); margin: 14px 0 26px; }
.case-meta { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; align-items: end; }
.case-meta .sum { font-size: clamp(19px, 1.8vw, 25px); line-height: 1.38; max-width: 40ch; }
.case-meta dl { margin: 0; font-size: 14.5px; }
.case-meta dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 12px; }
.case-meta dd { margin: 2px 0 0; }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: clamp(26px, 4vw, 56px); }
.results > div { padding: clamp(20px, 2.6vw, 36px) 20px clamp(20px, 2.6vw, 34px) 0; }
.results b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 60px); line-height: 1.02; letter-spacing: -.02em; }
.results span { display: block; margin-top: 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.4; max-width: 26ch; }
.beat { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(24px, 5vw, 84px); align-items: start; padding: clamp(40px, 6vw, 96px) 0; }
.beat:nth-of-type(even) .beat-text { order: 2; }
.beat:nth-of-type(even) { grid-template-columns: 7fr 4fr; }
.beat h2 { font-size: clamp(30px, 3.2vw, 46px); margin-bottom: 18px; }
.beat-text { position: sticky; top: 96px; }
.beat-text p { max-width: 44ch; }
.devices { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: clamp(24px, 5vw, 72px); }
.devices > div { flex: 0 1 270px; }
.devices > div.wide { flex: 1 1 520px; max-width: 760px; }
.next { display: block; padding: clamp(60px, 9vw, 130px) 0; }
.next h2 { font-size: clamp(44px, 7.4vw, 116px); margin-top: 12px; transition: transform .6s var(--ease); }
.next:hover h2 { transform: translateX(14px); }

/* About and IonQ */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(26px, 5vw, 84px); align-items: start; }
.lede { font-family: var(--serif); font-size: clamp(26px, 2.7vw, 40px); line-height: 1.2; }
.xp { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.xp h3 { font-size: 30px; }
.xp .when { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--ink-2); margin-top: 8px; }
.xp ul { margin: 8px 0 0; padding-left: 18px; }
.xp li { margin-bottom: 6px; }
.map { width: 100%; border-collapse: collapse; }
.map td { padding: 16px 0; border-top: 1px solid var(--line); vertical-align: top; }
.map td:first-child { width: 58%; padding-right: 24px; font-size: 18px; }
.map a { border-bottom: 1px solid currentColor; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* Footer */
.site-foot { padding: clamp(50px, 7vw, 100px) 0 34px; }
.site-foot .big { font-family: var(--serif); font-size: clamp(28px, 4.6vw, 72px); line-height: 1; display: inline-block; border-bottom: 1px solid currentColor; }
.site-foot .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: clamp(40px, 6vw, 90px); font-size: 13.5px; color: var(--night-ink-2); }
.site-foot .row a:hover { color: var(--night-ink); }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .proof { grid-template-columns: 1fr 1fr; }
  .proof > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .proof > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .sec-head, .flag, .case-meta, .beat, .beat:nth-of-type(even), .split, .xp, .doc-group, .gate { grid-template-columns: 1fr; }
  .flag:nth-of-type(even) .media, .beat:nth-of-type(even) .beat-text { order: 0; }
  .beat-text { position: static; }
  .grid3, .docs { grid-template-columns: 1fr; }
  .gate form { flex-wrap: wrap; }
  .gate input { flex: 1; width: auto; }
  .map td { display: block; width: auto !important; padding: 12px 0 0; }
  .map td + td { border-top: 0; padding: 4px 0 14px; }
  .site-head nav a.opt { display: none; }
  .hero-stage { height: 125svh; }
  .chapters { left: 12px; right: 76px; max-width: none; transform: translateY(140%); }
  .chapters.on { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .rise .w > span { transform: none; }
  .hero-stage { height: 100svh; }
  html { scroll-behavior: auto; }
}

/* In phones the draft label sits at the top so it clears the feed overlay. */
.phone .ph-label { bottom: auto; top: 46px; left: 22px; right: 22px; }

/* Stills gallery on case studies: first image wide, the rest side by side */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 24px); }
.gallery > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr; } }

/* Click-to-play public films */
.media.yt { cursor: pointer; }
.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-play {
  position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; border-radius: 99px;
  background: rgba(12, 13, 16, .72); color: #fff; font-size: 15px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .4s var(--ease), background .3s;
}
.yt-play i { width: 0; height: 0; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.media.yt:hover .yt-play, .media.yt:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.06); background: rgba(12, 13, 16, .9); }

/* Header hides on scroll down, returns on scroll up */
.site-head { transition: transform .45s var(--ease); }
.site-head.hide { transform: translateY(-110%); }

/* Public film players */
.reel-group + .reel-group { margin-top: clamp(40px, 6vw, 84px); }
.reel-group > .eyebrow { display: block; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.reel { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 40px) clamp(14px, 2vw, 28px); }
.reel figure { margin: 0; }
.reel figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; margin-top: 12px; font-size: 16px; }
.reel figcaption b { font-weight: 500; }
.reel figcaption span { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); align-self: center; white-space: nowrap; }
.media.embed { cursor: pointer; }
.media.embed img { transition: transform 1.2s var(--ease); }
.media.embed:hover img { transform: scale(1.03); }
.media.embed:hover .yt-play, .media.embed:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.06); background: rgba(12, 13, 16, .9); }

/* Full-page screenshot that scrolls slowly inside its frame */
.media.scrolling { container-type: size; }
.media .scrollshot { height: auto; object-fit: fill; animation: pagescroll 34s ease-in-out infinite alternate; }
@keyframes pagescroll { from { transform: translateY(0); } to { transform: translateY(calc(-100% + 100cqh)); } }

/* Lists inside case study sections */
.beat-list { margin: 0 0 1em; padding: 0; list-style: none; max-width: 44ch; }
.beat-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.beat-list li:last-child { border-bottom: 1px solid var(--line); }

@media (max-width: 860px) { .reel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .reel[style*='cols:3'], .reel[style*='cols:1'] { grid-template-columns: 1fr; } .reel figure { grid-column: auto !important; } }
@media (prefers-reduced-motion: reduce) { .media .scrollshot { animation: none; } }

/* Press coverage list under Where it ran */
.coverage { margin-top: clamp(36px, 5vw, 72px); }
.coverage .eyebrow { display: block; margin-bottom: 10px; }
.coverage a { border-bottom: 1px solid transparent; transition: border-color .3s; }
.coverage a:hover { border-bottom-color: currentColor; }
.coverage .film-list li:last-child { border-bottom: 1px solid var(--line); }

/* Framework diagram */
.framework { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 84px); }
.framework .eyebrow { display: block; margin-bottom: 16px; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pillars li { padding: 18px 18px 22px; border: 1px solid #2a2d35; border-radius: 6px; font-family: var(--serif); font-size: clamp(22px, 2vw, 30px); line-height: 1.1; }
.pillars li i { display: block; margin-bottom: 26px; font: normal 11px var(--mono); letter-spacing: .08em; color: var(--night-ink-2); }
.arc { list-style: none; margin: 0; padding: 0; counter-reset: arc; }
.arc li { position: relative; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 16px 0 22px; border-top: 1px solid #2a2d35; counter-increment: arc; }
.arc li::before { content: counter(arc); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--night-ink-2); display: grid; place-items: center; font: 12px var(--mono); }
.arc li:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 56px; bottom: -12px; width: 1px; background: #2a2d35; }
.arc b { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 30px); line-height: 1.1; }
.arc span { color: var(--night-ink-2); font-size: 15.5px; margin-top: 4px; }

/* Featured film */
.featured { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(22px, 4vw, 64px); align-items: end; margin-bottom: clamp(40px, 6vw, 84px); }
.featured-media { position: relative; }
.featured-play { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.featured .soon, .openers .soon, .tile-badge {
  position: absolute; left: 12px; top: 12px; z-index: 2; padding: 6px 10px; border-radius: 99px;
  background: rgba(12, 13, 16, .74); color: #fff; font: 10.5px var(--mono); letter-spacing: .07em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.featured h3 { font-size: clamp(40px, 5vw, 76px); margin: 10px 0 4px; }
.featured .place { font: 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }

/* Series index */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: clamp(24px, 3vw, 40px) 0 20px; }
.filters button { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.filters button:hover { border-color: var(--ink); }
.filters button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.series { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(18px, 2.4vw, 34px) clamp(10px, 1.4vw, 20px); }
.tile { display: block; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tile[hidden] { display: none; }
.tile:not([data-vimeo]) { cursor: default; }
.tile-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--night-2); }
.tile-media img { transition: transform 1.2s var(--ease); }
.tile[data-vimeo]:hover .tile-media img { transform: scale(1.05); }
.tile-badge { top: auto; bottom: 10px; left: 10px; opacity: .92; }
.tile-name { display: block; margin-top: 12px; font-family: var(--serif); font-size: clamp(22px, 1.9vw, 28px); line-height: 1.1; }
.tile-meta { display: block; margin-top: 5px; font: 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tile:focus-visible .tile-media { outline: 2px solid var(--accent); outline-offset: 3px; }
#films .gate { margin-bottom: clamp(20px, 3vw, 36px); }

/* Overlay player */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-rows: auto 1fr; padding: clamp(12px, 3vw, 40px); background: rgba(8, 9, 12, .94); animation: lb-in .3s ease; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; color: #f2f0ea; font-size: 15px; }
.lightbox-bar > span:last-child { display: flex; align-items: center; gap: 16px; }
.lightbox-bar a { color: #a3a39b; font-size: 13.5px; border-bottom: 1px solid currentColor; }
.lightbox-close { padding: 8px 14px; border-radius: 99px; border: 1px solid #3a3d46; background: none; color: #f2f0ea; font: inherit; font-size: 14px; cursor: pointer; }
.lightbox-close:hover { background: #f2f0ea; color: #0c0d10; }
.lightbox-frame { position: relative; align-self: center; justify-self: center; width: min(100%, calc((100vh - 140px) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 1100px) { .series { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .framework, .featured { grid-template-columns: 1fr; }
  .series { grid-template-columns: 1fr 1fr; }
}

/* Confidential cover film: locked poster, access code form beneath */
.media.cover-locked { cursor: pointer; }
.media.cover-locked:hover .yt-play, .media.cover-locked:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.06); background: rgba(12, 13, 16, .9); }
.cover-gate { margin-top: clamp(12px, 1.6vw, 24px); }

/* Opening films at the top of a case study, side by side */
.openers { margin-bottom: clamp(8px, 1vw, 16px); }
@media (max-width: 600px) { .reel.openers { grid-template-columns: 1fr; } }
.reel.openers.lead { grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 600px) { .reel.openers.lead { grid-template-columns: 1fr; } }
.openers .yt-play { white-space: nowrap; }

/* Screenshots behind the access code: blurred until unlocked */
.gated-shot { position: relative; overflow: hidden; cursor: pointer; }
.gated-shot img, .gated-shot video { filter: blur(22px) saturate(.85); transform: scale(1.08); }
.gated-shot .yt-play { z-index: 2; white-space: nowrap; }
.gated-shot:hover .yt-play, .gated-shot:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.06); background: rgba(12, 13, 16, .9); }
/* Play button lower in the frame, for posters with centered titles */
.yt-play.low { top: auto; bottom: 18px; transform: translateX(-50%); }
.media.embed:hover .yt-play.low, .media.embed:focus-visible .yt-play.low { transform: translateX(-50%) scale(1.06); }

/* Published posts in Where it ran: real screenshots in a grid, no device frame */
.devices.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); align-items: start; }
.devices.posts > div { flex: none; }
.post img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 32px -14px rgba(0,0,0,.22); }
@media (max-width: 860px) { .devices.posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .devices.posts { grid-template-columns: 1fr; } }

/* Three phones at the top of a case study */
.devices.hero-phones { margin: clamp(8px, 2vw, 24px) 0 clamp(24px, 4vw, 56px); }
.devices.hero-phones > div { flex: 0 1 300px; }
@media (max-width: 600px) { .devices.hero-phones > div { flex-basis: 70%; } }

/* Earlier roles sit on their own row inside the same entry */
.xp { row-gap: 18px; }
.xp > div:nth-child(n+3) .when { margin-top: 3px; }

.gallery-sec { padding-top: 0; }
.sec.dark + .gallery-sec { padding-top: clamp(48px, 7vw, 110px); }

.pov { list-style: none; margin: 0; padding: 0; counter-reset: pov; }
.pov li { display: grid; grid-template-columns: 64px minmax(0, 4fr) minmax(0, 7fr); gap: 0 24px; padding: 22px 0 26px; border-top: 1px solid var(--line); counter-increment: pov; }
.pov li::before { content: '0' counter(pov); font: 12px var(--mono); letter-spacing: .08em; color: var(--ink-2); padding-top: 8px; }
.pov h3 { font-size: clamp(24px, 2.4vw, 34px); }
.pov p { margin: 0; color: var(--ink-2); max-width: 60ch; }
@media (max-width: 760px) { .pov li { grid-template-columns: 40px 1fr; } .pov p { grid-column: 2; margin-top: 8px; } }
