/* Jules Sampaio — editorial system.
   PP Pangaia Ultralight (and its italic) for display, Instrument Sans for reading, IBM Plex Mono for labels.
   Dark is the default theme; the header switch sets data-theme on <html>.
   Warm paper, near-black ink, one lime accent (#d1e030).
   --accent is a fill color; --accent-ink is the readable text version of it. */
:root {
  --paper: #f4f1ea;
  --ink: #161513;
  --muted: #6b665c;
  --line: #dbd5c8;
  --accent: #d1e030;
  --accent-ink: #5f6900;
  --hl-bg: #d1e030;
  --hl-ink: #161513;
  --wash: #eae5d9;
  --card: #ffffff;
  --todo: #fff3c4;
  --todo-line: #d9b528;
  --display: "PP Pangaia", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311; --ink: #efebe3; --muted: #a29c90; --line: #2f2c27;
    --accent: #d1e030; --accent-ink: #d1e030; --hl-bg: transparent; --hl-ink: #d1e030; --wash: #1f1d1a; --card: #1b1a17;
    --todo: #3a3214; --todo-line: #a88a1c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141311; --ink: #efebe3; --muted: #a29c90; --line: #2f2c27;
  --accent: #d1e030; --accent-ink: #d1e030; --hl-bg: transparent; --hl-ink: #d1e030; --wash: #1f1d1a; --card: #1b1a17;
  --todo: #3a3214; --todo-line: #a88a1c;
  color-scheme: dark;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2,.7,.1,1); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #161513; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.label, .mono { font: 500 11.5px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.ext { font-family: var(--body); font-size: .95em; margin-left: .15em; }

/* header */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); view-transition-name: site-head; }
.site-head .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; height: 72px; position: relative; }
.site-head .wrap::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; border-bottom: 1px solid var(--line); }
.mark { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); transition: color .2s; }
.mark:hover { color: var(--accent-ink); }
.logo { display: block; height: 40px; aspect-ratio: 743.5 / 788.69; background: currentColor;
  -webkit-mask: url(images/logo.svg) center / contain no-repeat; mask: url(images/logo.svg) center / contain no-repeat; }
.head-right { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 30px); }
.nav { display: flex; gap: clamp(14px, 2.4vw, 26px); }
.nav a { font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* light / dark switch */
.theme-toggle { position: relative; flex: none; width: 52px; height: 28px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; padding: 0; transition: background .3s, border-color .3s; }
.theme-toggle .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; transition: transform .45s cubic-bezier(.3,1.5,.5,1), background .3s; }
.theme-toggle svg { width: 12px; height: 12px; color: var(--paper); transition: transform .45s cubic-bezier(.3,1.5,.5,1); }
.theme-toggle .moon { display: none; }
.theme-toggle[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.theme-toggle[aria-checked="true"] .knob { transform: translateX(24px); background: #161513; }
.theme-toggle[aria-checked="true"] .sun { display: none; }
.theme-toggle[aria-checked="true"] .moon { display: block; color: var(--accent); transform: rotate(-20deg); }
.theme-toggle:hover .knob { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); }

/* home */
.intro { padding: 48px 0; min-height: calc(100svh - 72px); display: flex; align-items: center; justify-content: center; text-align: center; }
/* PP Pangaia, used at Ultralight and Ultralight Italic everywhere. */
@font-face { font-family: "PP Pangaia"; src: url(fonts/pp-pangaia-ultralight.woff2) format("woff2"); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: "PP Pangaia"; src: url(fonts/pp-pangaia-ultralightitalic.woff2) format("woff2"); font-weight: 200; font-style: italic; font-display: swap; }
.intro h1 { font: 200 clamp(30px, 4.3vw, 62px)/1.04 "PP Pangaia", Georgia, serif; letter-spacing: -.01em; margin: 0; display: flex; flex-direction: column; align-items: center; }
.morph { width: fit-content; margin: 0 auto !important; }
.morph .line { display: block; white-space: nowrap; }
.morph .line.italic { font-style: italic; }
.hl { color: var(--hl-ink); background: linear-gradient(transparent 16%, var(--hl-bg) 16% 94%, transparent 94%); padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

.work-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.work-head h2 { font: 500 11.5px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; margin: 0; color: var(--muted); }
.work-head h2 span { color: var(--ink); margin-left: 6px; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; transition: all .15s; }
.filters button:hover { color: var(--ink); border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--accent); color: #161513; border-color: var(--accent); }

/* project rows: each sticks below the ones before it, so they pile up as you scroll */
.index { list-style: none; margin: 0 0 clamp(72px, 10vw, 128px); padding: 0; counter-reset: work; }
.index li { counter-increment: work; position: sticky; top: 72px; background: var(--paper); border-top: 1px solid var(--line); }
.index li:first-child { border-top: 0; }
.index li[hidden] { display: none; }
.index li.no-stick { position: relative; top: auto !important; }
.card { display: grid; grid-template-columns: 72px minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(20px, 3vw, 48px); padding: 14px 0 clamp(28px, 4vw, 48px); text-decoration: none; }
.card .num { font: 500 11.5px/1 var(--mono); letter-spacing: .06em; padding-top: 12px; color: var(--muted); display: flex; align-items: center; align-self: start; gap: 8px; }
.card .num::before { content: counter(work, decimal-leading-zero); }
.card .num .new { order: 1; }
.card .text { display: flex; flex-direction: column; min-width: 0; }
.card .name { font: 200 clamp(24px, 2.2vw, 32px)/1.1 var(--display); letter-spacing: -.01em; margin: 0; padding-top: 4px; }
.card .name span { background-image: linear-gradient(var(--accent-ink), var(--accent-ink)); background-size: 0% 3px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 4px; transition: background-size .45s cubic-bezier(.2,.7,.1,1); }
.card:hover .name span, .card:focus-visible .name span { background-size: 100% 3px; }
.card .desc { margin: 18px 0 0; font-size: 16.5px; line-height: 1.5; max-width: 44ch; }
.card .who { margin: auto 0 0; padding-top: 24px; color: var(--muted); line-height: 1.7; }
.card .who b { display: block; font-weight: 500; color: var(--ink); }
.card .thumb { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; }
.card .thumb > .shot { height: 100%; border-radius: inherit; }
.card .thumb img { transition: transform .7s cubic-bezier(.2,.7,.1,1); }
.card:hover .thumb img { transform: scale(1.03); }
.card .new { font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #161513; background: var(--accent); border-radius: 999px; padding: 5px 8px; }

/* image frames with graceful placeholder */
.shot { position: relative; background: var(--wash); border-radius: 14px; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.shot .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-size: 12px; line-height: 1.4; color: var(--muted);
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, color-mix(in srgb, var(--accent) 8%, transparent) 11px 12px); }
.shot .ph b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }
.card .shot .ph span { display: none; }

/* case study */
.cs-top { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); }
.back { font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.back:hover { color: var(--ink); }
.back svg { transition: transform .2s; }
.back:hover svg { transform: translateX(-3px); }
.cs-top h1 { font: 200 clamp(40px, 6.4vw, 96px)/1 var(--display); letter-spacing: -.015em; margin: 28px 0 0; text-wrap: balance; width: fit-content; }
.cs-top .lede { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.45; max-width: 46ch; margin: 24px 0 0; text-wrap: pretty; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: clamp(32px, 5vw, 56px) 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.meta div { min-width: 0; }
.meta dt { font: 500 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.meta dd { margin: 0; font-size: 15px; font-weight: 500; }
.hero-shot { aspect-ratio: 16/9; border-radius: 8px; }

.cs-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: clamp(56px, 8vw, 104px) 0; }
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: s; }
.toc a { display: block; padding: 6px 0 6px 14px; text-decoration: none; color: var(--muted); border-left: 2px solid var(--line); transition: color .15s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--accent-ink); }
.prose { max-width: 720px; }
.prose section { scroll-margin-top: 96px; }
.prose section + section { margin-top: clamp(56px, 7vw, 88px); }
.prose h2 { font: 200 clamp(28px, 2.8vw, 38px)/1.1 var(--display); letter-spacing: -.01em; margin: 0 0 18px; text-wrap: balance; }
.prose h3 { font: 600 18px/1.3 var(--body); margin: 32px 0 6px; }
.prose p { margin: 0 0 16px; max-width: 65ch; }
.prose ul { margin: 0 0 16px; padding-left: 20px; max-width: 65ch; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--accent-ink); }
.prose figure { margin: 32px 0; }
.prose figure .shot { aspect-ratio: 16/10; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.prose a { text-decoration-color: var(--accent-ink); text-underline-offset: 3px; }
.wide { margin-left: calc(-200px - clamp(32px, 6vw, 96px)); }

.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 28px 0; }
.pairs figure { margin: 0; }
.clients { display: grid; gap: 40px; margin-top: 24px; }
.client { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: center; }
.client h3 { margin-top: 0; }
.client .shot { aspect-ratio: 4/3; }
.values { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.values li { margin: 0; }
.values .shot { aspect-ratio: 1; margin-bottom: 10px; }
.values strong { font: 200 22px/1.15 var(--display); letter-spacing: -.005em; }
.values span { display: block; color: var(--muted); font-size: 15px; }

.todo { background: var(--todo); border: 1px dashed var(--todo-line); border-radius: 8px; padding: 10px 14px; font-size: 15px; }
.todo::before { content: "To fill in: "; font-weight: 600; }
.inline-todo { background: var(--todo); border-bottom: 1px dashed var(--todo-line); padding: 0 4px; border-radius: 3px; }

.next { display: block; text-decoration: none; border-top: 1px solid var(--ink); padding: 28px 0 clamp(56px, 8vw, 96px); }
.next span { font: 500 11.5px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.next strong { display: flex; align-items: center; gap: 18px; font: 200 clamp(36px, 5.6vw, 76px)/1.02 var(--display); letter-spacing: -.015em; margin-top: 10px; transition: gap .3s cubic-bezier(.2,.7,.1,1), color .2s; }
.next:hover strong { gap: 30px; color: var(--accent-ink); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 10vw, 120px); align-items: start; }
.about h1 { font: 200 clamp(36px, 4.2vw, 56px)/1.05 var(--display); letter-spacing: -.01em; margin: 0 0 28px; text-wrap: balance; }
.about h1 em { color: var(--hl-ink); background: linear-gradient(transparent 16%, var(--hl-bg) 16% 94%, transparent 94%); padding: 0 .08em; }
.about p { max-width: 58ch; margin: 0 0 16px; font-size: 18px; }
.about .portrait { aspect-ratio: 4/5; border-radius: 8px; }
.facts { display: grid; gap: 0; margin: 36px 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts dt { font: 500 11px/1.9 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }

.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.about .btns { margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--ink); white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #161513; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: clamp(48px, 7vw, 88px) 0 40px; }
.site-foot .say { font: 200 clamp(38px, 5.4vw, 72px)/1.02 var(--display); letter-spacing: -.015em; margin: 0 0 clamp(36px, 5vw, 56px); }
.site-foot .say em { color: var(--hl-ink); background: linear-gradient(transparent 16%, var(--hl-bg) 16% 94%, transparent 94%); padding: 0 .08em; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 24px; padding-top: 20px; border-top: 1px solid var(--line); align-items: start; }
.foot-grid .label { color: var(--muted); display: block; margin-bottom: 6px; }
.foot-grid p { margin: 0; font-size: 15px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.foot-grid a { text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .15s; }
.foot-grid a:hover { border-color: var(--ink); }
.foot-grid .copy { color: var(--muted); align-self: end; }

/* responsive */
@media (max-width: 960px) {
  .card { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid .copy { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .cs-body { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .wide { margin-left: 0; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; }
  .about .portrait { max-width: 420px; }
}
@media (max-width: 700px) {
  .intro { min-height: 0; padding: 72px 0 64px; }
  .card { grid-template-columns: 46px minmax(0, 1fr); padding-top: 12px; }
  .card .num { padding-top: 12px; }
  .card .name { font-size: 22px; }
  .card .new { font-size: 9px; padding: 4px 6px; }
  .card .num { flex-direction: column; align-items: flex-start; }
  .card .thumb { grid-column: 1 / -1; margin-top: 18px; }
  .card .desc { margin-top: 10px; font-size: 15.5px; }
  .card .who { padding-top: 12px; }
  .card .shot .ph span { display: block; }
  .client { grid-template-columns: 1fr; }
  .pairs { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .logo { height: 36px; }
  .nav { gap: 14px; }
  .head-right { gap: 14px; }
  .nav .hide-sm { display: none; }
  .work-head { flex-direction: column-reverse; align-items: flex-start; gap: 12px; }
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; margin: 8px 0 0; border-top: 1px solid var(--ink); }
.stats div { padding: 20px 20px 4px 0; }
.stats dt { font: 200 clamp(40px, 5vw, 68px)/1 var(--display); letter-spacing: -.015em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.stats dd { margin: 10px 0 0; font-size: 15px; color: var(--muted); max-width: 26ch; }

.steps { list-style: none; padding: 0 !important; counter-reset: st; display: grid; gap: 0; border-top: 1px solid var(--line); }
.steps li { counter-increment: st; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--line); margin: 0 !important; }
.steps li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: 14px; font: 500 12px/1.6 var(--mono); padding-top: 3px; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.steps li strong { font-weight: 600; }
.tbl { overflow-x: auto; margin: 24px 0; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 520px; }
.tbl th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--ink); }
.tbl td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td:first-child { font-weight: 600; }
.yes, .no { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.yes { background: #d9f6d2; color: #135f2c; }
.no { background: var(--wash); color: var(--muted); }
.real .shot { aspect-ratio: auto; background: var(--wash); }
.real .shot img { height: auto; }
.pairs .real .shot { height: 100%; }
.pairs .real .shot img { height: 100%; object-fit: cover; }
.layers { display: grid; gap: 8px; margin: 24px 0; }
.layers div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.layers div:nth-child(2) { margin-left: 24px; border-color: var(--accent); }
.layers div:nth-child(3) { margin-left: 48px; }
.layers b { font: 200 20px/1.2 var(--display); letter-spacing: -.005em; }
.layers span { color: var(--muted); font-size: 15px; }
.swatches { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 24px 0; }
.swatches li { margin: 0; font-size: 13px; }
.swatches .sw { height: 84px; border-radius: 12px; border: 1px solid rgba(0,0,0,.08); display: flex; align-items: end; padding: 10px 12px; font: 600 22px/1 var(--display); margin-bottom: 8px; }
.swatches strong { display: block; font-size: 14px; }
.swatches span { color: var(--muted); font-variant-numeric: tabular-nums; }
.spacing { list-style: none; padding: 0 !important; display: grid; gap: 6px; margin: 24px 0; }
.spacing li { display: grid; grid-template-columns: 72px 90px 40px; align-items: center; gap: 12px; margin: 0; font-size: 14px; }
.spacing i { display: block; height: 16px; background: var(--accent); border-radius: 3px; }
.spacing span:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .layers div { grid-template-columns: 1fr; gap: 4px; } .layers div:nth-child(2) { margin-left: 12px; } .layers div:nth-child(3) { margin-left: 24px; } }
.prose .real .shot, .real .shot { aspect-ratio: auto; background: #fff; border: 1px solid var(--line); }
.prose .real .shot .ph { display: none; }
.client .shot { background: #fff; border: 1px solid var(--line); }
.client .shot img { object-fit: contain; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; }
.stats div { padding-bottom: 12px; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.real.narrow { max-width: 440px; }
.phone-hero { background: #E7E3DA; display: flex; align-items: center; justify-content: center; }
.phone-hero .phones { display: flex; align-items: center; justify-content: center; gap: 4%; height: 84%; width: 100%; }
.phone-hero .phones > img, .phone-hero .anim { height: 100%; width: auto; aspect-ratio: 600 / 1298; flex: none; filter: drop-shadow(0 12px 28px rgba(30, 25, 20, .18)); }
.phone-hero .phones img { position: static; object-fit: contain; }
.phone-hero .anim { position: relative; }
.phone-hero .anim img { width: 100%; height: 100%; }
.phone-hero video { position: absolute; left: 11.538%; top: 25.355%; width: 76.923%; height: auto; display: block; }
.phone-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 28px; background: #E7E3DA; border-radius: 14px; }
.ph-item { position: relative; }
.ph-item img { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 18px rgba(30, 25, 20, .16)); }
.ph-item video { position: absolute; height: auto; display: block; }
@media (max-width: 640px) { .phone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; gap: 12px; } }
.phone-hero video.splash-video, .ph-item video.splash-video { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 11% / 5.1%; transition: opacity .6s ease; }
video.splash-video.done { opacity: 0; }
.phone-grid.wrap { display: flex; flex-wrap: wrap; justify-content: center; }
.phone-grid.wrap .ph-item { flex: 0 0 calc((100% - 54px) / 4); align-self: flex-start; }
@media (max-width: 640px) { .phone-grid.wrap .ph-item { flex-basis: calc((100% - 12px) / 2); } }
.real.half { max-width: 520px; }
.video-hero { background: #19181c; }
.video-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (forced-colors: active) { .logo { background: CanvasText; } }

/* ✦ cursor: only for mouse users, switched on by script.js */
html.star-cursor, html.star-cursor * { cursor: none !important; }
.star { position: fixed; left: 0; top: 0; z-index: 1000; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }
.star.on { opacity: 1; }
.star svg { display: block; width: 100%; height: 100%; color: var(--ink); transition: transform .45s cubic-bezier(.3,1.4,.5,1), color .2s; }
.star svg path { fill: currentColor; stroke: var(--paper); stroke-width: 1.4; paint-order: stroke; }
.star.hot svg { color: var(--accent); transform: rotate(90deg) scale(1.4); }
.star.hot svg path { stroke: #161513; }
.star.down svg { transform: rotate(90deg) scale(1.15); }
@media (prefers-reduced-motion: reduce) { .star.hot svg { transform: scale(1.4); } .star.down svg { transform: scale(1.15); } }

/* Let a heading break an overlong word rather than push the page sideways */
.intro h1, .cs-top h1, .prose h2, .about h1, .site-foot .say, .next strong, .stats dt, .card .name { overflow-wrap: break-word; }

/* password wall on locked case studies */
.vault { margin-top: clamp(56px, 7vw, 88px); }
.vault-card { background: var(--wash); border: 1px solid var(--line); border-radius: 20px; padding: clamp(28px, 5vw, 56px); }
.vault-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #161513; display: grid; place-items: center; margin-bottom: 28px; }
.vault-icon svg { width: 26px; height: 26px; }
.vault-title { font: 200 clamp(28px, 2.8vw, 38px)/1.1 var(--display); letter-spacing: -.01em; margin: 0 0 12px; overflow-wrap: break-word; }
.vault-copy { color: var(--muted); max-width: 52ch; margin: 0 0 28px; }
.vault-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; }
.vault-form input { flex: 1 1 220px; min-width: 0; font: 400 16px/1 var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 14px 20px; }
.vault-form input:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.vault-form .btn { border: 0; cursor: pointer; }
.vault-form .btn:disabled { opacity: .6; }
.vault-msg { min-height: 1.6em; margin: 14px 0 0; font-size: 15px; color: var(--ink); }
.vault-alt { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.vault-alt a { color: var(--ink); text-decoration-color: var(--accent-ink); text-underline-offset: 3px; }
.vault.nope .vault-card { animation: vault-nope .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes vault-nope { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Easter egg: the head of security */
.vault-card { position: relative; }
.vault-copy .security { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit;
  text-decoration: underline dotted var(--accent-ink) 1.5px; text-underline-offset: 4px; transition: color .2s; }
.vault-copy .security:hover, .vault-copy .security:focus-visible, .vault.peek .security { color: var(--ink); text-decoration-style: solid; }
.guard { position: absolute; z-index: 2; top: -88px; right: clamp(12px, 5vw, 56px); width: clamp(120px, 16vw, 168px); height: auto; pointer-events: none;
  opacity: 0; transform: translateY(46px) rotate(-30deg) scale(.4); transform-origin: 50% 80%;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); transition: transform .65s cubic-bezier(.3,1.55,.5,1), opacity .2s; }
.vault.peek .guard { opacity: 1; transform: translateY(0) rotate(8deg) scale(1); }
@media (prefers-reduced-motion: reduce) { .guard { transform: none; transition: opacity .2s; } }

.vault-copy { max-width: 62ch; }
.vault-copy .security { display: inline; }
@media (max-width: 700px) { .vault-copy br { display: none; } }

/* Switch track shows both modes: the active one in the knob, the other faintly on the opposite side */
.theme-toggle .t-sun, .theme-toggle .t-moon { position: absolute; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; color: var(--ink); opacity: .4; transition: opacity .3s; pointer-events: none; }
.theme-toggle .t-sun { left: 8px; }
.theme-toggle .t-moon { right: 8px; }
.theme-toggle[aria-checked="false"] .t-sun, .theme-toggle[aria-checked="true"] .t-moon { opacity: 0; }
.theme-toggle[aria-checked="true"] .t-sun { color: #161513; opacity: .55; }
.theme-toggle:hover .t-sun, .theme-toggle:hover .t-moon { opacity: .7; }
.theme-toggle[aria-checked="false"]:hover .t-sun, .theme-toggle[aria-checked="true"]:hover .t-moon { opacity: 0; }
.theme-toggle .knob { z-index: 1; }

/* Animated previews on the home page */
.card .thumb video { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.card:hover .thumb video { transform: scale(1.03); }
.card .thumb video { transition: transform .7s cubic-bezier(.2,.7,.1,1); }

/* Full-width frame with the image centered inside */
.real.centered .shot { display: flex; justify-content: center; padding: clamp(16px, 4vw, 40px) 0; }
.real.centered .shot img { width: auto; max-width: 100%; max-height: 560px; }

/* Case-study rhythm: 16px between text, 18px under headings, 32px around every visual block */
.prose section > :is(figure, .tbl, .layers, .pairs, .swatches, .steps, .stats, .spacing) { margin-top: 32px; margin-bottom: 32px; }
.prose section > h2 + * { margin-top: 0 !important; }
.prose section > :last-child { margin-bottom: 0; }
.real.centered.tall .shot img { max-height: 960px; }
