/* Studio layer (Dec 2026): stage panels, device frames, project rows,
   editorial case-study header, and the screen walkthrough player.
   Loaded after site.css (and case.css on project pages). */

:root {
  --ease-out: cubic-bezier(.2, .7, .1, 1);
  --stage-r: clamp(16px, 2vw, 26px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body:not(.draft) .verify, body:not(.draft) .todo { padding: 0; }
.ico { width: 16px; height: 16px; flex: none; transition: transform .25s var(--ease-out); }

/* ── Shared serif display (Fraunces, softened: friendly, not bookish) ── */
h1, h2, h3, .nav-home, .proj-title, .next-case .t { font-variation-settings: 'SOFT' 60, 'WONK' 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.split-title h2, .footer h2 { font-family: var(--display) !important; font-weight: 400 !important; letter-spacing: -.02em; }
.nav-home { font-size: 21px; letter-spacing: -.01em; }

/* ── Home hero: a short personal intro with her photo set into the line ── */
.hero { align-content: start; min-height: 0; padding-top: calc(var(--nav-h) + clamp(64px, 14vh, 150px)); padding-bottom: clamp(110px, 18vh, 200px); }
.hero-inner { display: block; max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 4.4vw, 64px); line-height: 1.1; letter-spacing: -.025em; }
.hero h1 .line { padding-bottom: .04em; }
.hero-face { display: inline-block; width: .9em; height: .9em; border-radius: 50%; object-fit: cover; object-position: 50% 30%; vertical-align: -.1em; margin: 0 .02em 0 .06em; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--rule); }
.hero-sub { margin-top: clamp(28px, 4vh, 40px); max-width: 52ch; }
.hero-sub p { max-width: none; font-size: 18.5px; line-height: 1.65; color: #2B2B2B; margin: 0; }


/* ── Stage: a soft, grainy colour field that screens sit on ── */
.stage {
  --base: #DDE8E4; --a: #FFFFFF; --b: #BFE3DA; --c: #F1D2BF;
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--stage-r);
  background:
    radial-gradient(70% 90% at 8% 0%, var(--a) 0%, transparent 60%),
    radial-gradient(60% 80% at 100% 30%, var(--b) 0%, transparent 65%),
    radial-gradient(80% 70% at 30% 110%, var(--c) 0%, transparent 62%),
    var(--base);
}
.stage::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: var(--grain); opacity: .32; mix-blend-mode: soft-light; }
.stage > * { position: relative; z-index: 1; }

.stage--live     { --base: #A9DAD2; --a: #F2FBF8; --b: #4FB7AA; --c: #17474E; }
.stage--redesign { --base: #E2EFEA; --a: #FFFFFF; --b: #BDE5DA; --c: #F2D4C2; }
.stage--launches { --base: #EEE5D8; --a: #FFF9F0; --b: #E7C3A2; --c: #B7D8D1; }
.stage--website  { --base: #14343A; --a: #2B5E63; --b: #0B2228; --c: #3E2F2A; }
.stage--local    { --base: #F5EAC6; --a: #FFFCEE; --b: #F1CF77; --c: #BDDCF1; }
.stage--dark     { --base: #1E2126; --a: #2D3440; --b: #1A1C20; --c: #3C2B24; }

/* ── Device: a dark bezel around a 16:10 screen ── */
.device {
  width: 100%; margin: 0 auto;
  background: #101315; padding: clamp(5px, .7vw, 11px);
  border-radius: clamp(12px, 1.6vw, 22px);
  box-shadow: 0 60px 90px -50px rgba(6, 28, 32, .65), 0 20px 40px -30px rgba(6, 28, 32, .5), inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: clamp(7px, .9vw, 13px); background: #0a1a24; }
.screen.light { background: #F7F8F7; }
.screen > img { position: absolute; left: 0; top: 0; width: 100%; height: auto; }

/* Slides inside a screen: cross-fade with a small sideways slide */
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transform: translateX(3.5%) scale(.985); transition: opacity .55s ease, transform .9s var(--ease-out); }
.slide.on { opacity: 1; transform: none; }
.slide.was { transform: translateX(-3.5%) scale(.985); }
.slide img { display: block; width: 100%; height: auto; }
/* Tall screens scroll slowly while they are on, so the whole screen gets seen */
.slide.on img.pans { animation: pan var(--dur, 6s) cubic-bezier(.45, 0, .3, 1) both; }
[data-player].paused .slide.on img.pans { animation-play-state: paused; }
@keyframes pan { 0%, 14% { transform: translateY(0); } 86%, 100% { transform: translateY(var(--pan, 0px)); } }


/* ── Meta groups beside a title: plain text, no rules, no labels ── */
.proj-col, .cs-col { padding-top: .35em; font-size: 16.5px; line-height: 1.65; color: var(--ink); }
.proj-col ul, .cs-col ul { list-style: none; margin: 0; padding: 0; }

/* ── Home: work list ─────────────────────────────────────── */
.work { max-width: var(--max); margin: 0 auto; padding: clamp(16px, 2vw, 28px) var(--gutter) 24px; }
.work-title { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2.2vw, 30px); color: var(--soft); letter-spacing: -.02em; line-height: 1.1; padding-bottom: clamp(8px, 1.5vw, 16px); }

.projs { list-style: none; margin: 0; padding: 0; }
.proj { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--rule); }
.proj:last-child { border-bottom: 0; }
.proj-link { display: block; text-decoration: none; color: inherit; border-radius: var(--stage-r); }

.proj-head { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 176px); column-gap: clamp(20px, 2.6vw, 40px); align-items: start; margin-bottom: clamp(24px, 3.4vw, 44px); }
.proj-title { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.1vw, 46px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; max-width: 20ch; transition: color .25s; }
.proj-link:hover .proj-title { color: var(--accent); }

.proj .stage { padding: clamp(28px, 6.5vw, 96px) clamp(18px, 11vw, 168px) 0; }
.proj .stage .device { border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 0; transform: translateY(12px); transition: transform .8s var(--ease-out); }
.proj .stage .screen { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.proj-link:hover .stage .device { transform: translateY(0); }

/* The always-visible pill, bottom right, like a caption you can press */
.proj-pill { position: absolute; right: clamp(14px, 2.4vw, 32px); bottom: clamp(14px, 2.4vw, 32px); z-index: 3; display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; padding: 12px 20px; border-radius: 999px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); transition: background .25s; }
.proj-pill svg { width: 16px; height: 16px; transition: transform .25s var(--ease-out); }
.proj-link:hover .proj-pill { background: var(--accent); }
.proj-link:hover .proj-pill svg { transform: translateX(3px); }

.proj-foot { display: flex; gap: 20px; align-items: baseline; margin-top: 16px; }
.proj-foot .pcard-ext { margin: 0; }

/* Phones and diagrams on a stage */
.stage-phones { display: flex; justify-content: center; align-items: flex-start; gap: clamp(10px, 3vw, 40px); padding-bottom: clamp(28px, 5vw, 64px); }
.stage-phones img { width: clamp(84px, 19%, 220px); height: auto; border-radius: clamp(16px, 2.4vw, 32px); border: clamp(3px, .5vw, 6px) solid #121212; box-shadow: 0 40px 60px -36px rgba(0, 0, 0, .55); transition: transform .8s var(--ease-out); }
.stage-phones img:nth-child(2) { margin-top: 7%; }
.proj-link:hover .stage-phones img { transform: translateY(-8px); }
.proj-link:hover .stage-phones img:nth-child(2) { transform: translateY(-14px); }
.proj .stage .pcard-diagram { position: relative; inset: auto; padding: 0 0 clamp(48px, 7vw, 96px); max-width: 760px; margin: 0 auto; }

/* ── Case study: editorial header ─────────────────────────── */
.cs-head { display: block; border-bottom: 0; max-width: var(--max); margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(32px, 4vw, 52px); }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 176px); column-gap: clamp(20px, 2.6vw, 40px); align-items: start; }
.cs-grid h1 { max-width: 17ch; font-family: var(--display); font-weight: 400; font-size: clamp(36px, 4vw, 58px); line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
.cs-col p { margin: 0; }
.cs-name { font-weight: 600; }
.cs-sub { color: var(--soft); }
.cs-col a { color: inherit; text-decoration-color: var(--accent-line); text-underline-offset: 4px; }
.cs-col a:hover { color: var(--accent); }

.cs-hero { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.cs-hero .stage { padding: clamp(48px, 6vw, 96px) clamp(16px, 9vw, 150px); }

/* ── Walkthrough player ──────────────────────────────────── */
.walk { margin: 32px 0 12px; }
.walk-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.walk-steps button { width: 100%; min-height: 44px; display: flex; flex-direction: column; gap: 9px; align-items: stretch; text-align: left; background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--soft); font-size: 13.5px; line-height: 1.25; transition: color .2s; }
.walk-steps .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.walk-steps button:hover, .walk-steps button[aria-current="step"] { color: var(--ink); }
.walk-steps button[aria-current="step"] { font-weight: 600; }
.walk-steps .bar { position: relative; height: 3px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.walk-steps .bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--ink); border-radius: inherit; }
.walk-steps button.done .bar i { transform: scaleX(1); background: #9A9A98; }
.walk-steps button[aria-current="step"] .bar i { animation: fill var(--dur, 6s) linear both; background: var(--accent); }
.walk.stopped .walk-steps button[aria-current="step"] .bar i { animation: none; transform: scaleX(1); }
.walk.paused .walk-steps button[aria-current="step"] .bar i { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }

.walk .stage { padding: clamp(18px, 4.5vw, 56px); }
.walk-cap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; margin-top: 18px; min-height: 92px; }
.walk-cap .t { display: block; font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin-bottom: 4px; }
.walk-cap .d { display: block; font-size: 16.5px; line-height: 1.6; color: #3A3A3A; max-width: 62ch; }
.walk-cap .txt { animation: cap-in .5s var(--ease-out); }
@keyframes cap-in { from { opacity: 0; transform: translateY(6px); } }
.walk-ctrl { display: flex; gap: 6px; }
.walk-ctrl button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: var(--card); cursor: pointer; display: grid; place-items: center; transition: border-color .2s, background .2s; }
.walk-ctrl button:hover { border-color: var(--ink); }
.walk-ctrl button:active { background: var(--panel); }
.walk-ctrl svg { width: 16px; height: 16px; }
.walk-ctrl [data-toggle] .play { display: none; }
.walk.stopped .walk-ctrl [data-toggle] .play, .walk.reduce .walk-ctrl [data-toggle] .play { display: block; }
.walk.stopped .walk-ctrl [data-toggle] .pause, .walk.reduce .walk-ctrl [data-toggle] .pause { display: none; }

/* Tabs variant: segmented pills instead of progress bars */
.walk--tabs .walk-steps { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.walk--tabs .walk-steps::-webkit-scrollbar { display: none; }
.walk--tabs .walk-steps button { flex-direction: row; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; white-space: nowrap; font-size: 14.5px; }
.walk--tabs .walk-steps button[aria-current="step"] { background: var(--ink); color: var(--paper); font-weight: 500; }
.walk--tabs .walk-steps button:not([aria-current="step"]):hover { background: var(--panel); }
.walk--tabs .bar { display: none; }
.walk--tabs .walk-cap { min-height: 0; }

/* The loop diagram */
.loopd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 32px 0 6px; padding: 0; }
.loopd li { list-style: none; padding: 16px 18px 16px 0; }
.loopd li + li { padding-left: 18px; border-left: 1px solid var(--rule); }
.loopd .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.loopd b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.loopd span { display: block; font-size: 15px; line-height: 1.5; color: var(--soft); }
.loop-return-wrap .line { height: 18px; margin: 0 12% 0 14px; border: 1.5px solid #C9C9C7; border-top: 0; border-radius: 0 0 16px 16px; position: relative; }
.loop-return-wrap .line::before { content: ''; position: absolute; left: -6px; top: -7px; border: 5px solid transparent; border-bottom: 7px solid #C9C9C7; border-top: 0; }
.loop-return-wrap p { text-align: center; font-size: 14.5px; color: var(--soft); margin: 8px 0 0; }

/* Rules list (two columns of short commitments) */
.rules { list-style: none; margin: 24px 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.rules li { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--rule); font-size: 16.5px; line-height: 1.55; }
.rules li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--rule); }
.rules b { display: block; margin-bottom: 2px; }

/* Stage figure (a static screen on a stage) */
.sfig { margin: 28px 0 8px; }
.sfig .stage { padding: clamp(18px, 4.5vw, 56px); }
.sfig .screen.tall { aspect-ratio: auto; }
.sfig .screen.tall > img { position: static; }
.sfig figcaption { font-size: 15px; color: var(--soft); margin-top: 14px; line-height: 1.55; max-width: 70ch; }
.sfig figcaption b { color: var(--ink); font-weight: 600; }
.sfig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sfig-pair .stage { padding: clamp(14px, 2.6vw, 32px); }

/* Open questions */
.qs { list-style: none; margin: 20px 0 0; padding: 0; }
.qs li { text-wrap: pretty; padding: 16px 0; border-top: 1px solid var(--rule); font-size: 17px; line-height: 1.6; }
.qs b { font-weight: 600; }

/* Feature teaser (used on the launches page) */
.teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border-radius: var(--stage-r); overflow: hidden; border: 1px solid var(--rule); background: var(--card); margin: 24px 0 8px; }
.case-body a.teaser { color: var(--ink); text-decoration: none; }
.teaser-text { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.teaser-text b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 8px; color: var(--ink); }
.teaser-text span { font-size: 16px; color: var(--soft); line-height: 1.55; }
.teaser-text .teaser-go { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.case-body a.teaser:hover b, .case-body a.teaser:hover .teaser-go { color: var(--accent); }
.teaser:hover .ico { transform: translateX(3px); }
.teaser .stage { border-radius: 0; display: flex; align-items: flex-start; min-height: 260px; max-height: 340px; padding: 28px 0 0 28px; }
.teaser .stage img { width: 100%; height: auto; border-radius: 10px 0 0 0; box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .55); }

/* ── Responsive ─────────────────────────────────────────── */
/* Below 1180px the title takes the full row and the three meta columns sit beneath it */
@media (max-width: 1180px) {
  .proj-head, .cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .proj-title-wrap, .cs-grid h1 { grid-column: 1 / -1; padding-right: 0; }
  .cs-grid h1 { max-width: 22ch; }
  .proj-title { max-width: 22ch; }
  .walk-steps button { font-size: 12.5px; }
}
@media (max-width: 960px) {
  .loopd { grid-template-columns: 1fr 1fr; }
  .loopd li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 720px) {
  .proj .stage { padding: 22px 16px 0; }
  .proj-pill { font-size: 13.5px; padding: 9px 14px; }
  /* Phones: thin progress bars only; the caption below names the step */
  .walk:not(.walk--tabs) .walk-steps { gap: 4px; margin-bottom: 10px; }
  .walk:not(.walk--tabs) .walk-steps button { padding: 18px 0 20px; gap: 0; }
  .walk:not(.walk--tabs) .walk-steps .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .walk-cap { grid-template-columns: 1fr; }
  .walk-ctrl { order: -1; }
  .walk--tabs .walk-steps { display: flex; }
  .rules { grid-template-columns: 1fr; }
  .rules li:nth-child(even) { padding-left: 0; border-left: 0; }
  .sfig-pair { grid-template-columns: 1fr; }
  .teaser { grid-template-columns: 1fr; }
  .cs-hero .stage { padding: 20px 12px; }
}
@media (max-width: 560px) {
  .proj-head, .cs-grid { grid-template-columns: 1fr 1fr; }
  .proj-col:last-child, .cs-col:last-child { grid-column: 1 / -1; }
  .loopd { grid-template-columns: 1fr; }
  .loopd li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
}

@media (prefers-reduced-motion: reduce) {
  .slide, .slide.was { transform: none; transition: opacity .2s; }
  .slide.on img.pans { animation: none; }
  .walk-steps button[aria-current="step"] .bar i { animation: none; transform: scaleX(1); }
  .proj .stage .device, .stage-phones img { transition: none; }
}
.hero h1 { max-width: 20ch; text-wrap: balance; }
.hero-sub { max-width: 58ch; }
/* Dot field: dissolves on every edge (horizontal fade x vertical fade) so it never reads as a box */
.hero-grid {
  --fx: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.2) 20%, #000 55%, #000 80%, transparent 100%);
  --fy: linear-gradient(180deg, transparent 0%, #000 12%, #000 58%, rgba(0,0,0,.55) 72%, rgba(0,0,0,.2) 86%, transparent 100%);
  -webkit-mask-image: var(--fx), var(--fy); -webkit-mask-composite: source-in;
  mask-image: var(--fx), var(--fy); mask-composite: intersect;
}

/* ── Older case studies, distilled: no chips, cards, pills or gradient text ── */
.intro2 { display: block; }
.intro2-text { max-width: 64ch; }
.psr { display: block; border-top: 0; padding-top: 0; margin: 28px 0 8px; }
.psr-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 0 24px; padding: 10px 0 !important; }
.psr-card .psr-k { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.6; }
.psr-card p { font-size: 17px; }
.hmw p.big { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink); font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
.fig .tag, .fig .tag.live, .fig .tag.shipped { display: inline; background: none !important; color: var(--ink) !important; padding: 0 !important; border-radius: 0; font-size: inherit !important; letter-spacing: 0 !important; text-transform: none; font-weight: 600; margin-right: 0 !important; }
.fig .tag::after { content: ': '; }
.before-badge { background: none; padding: 0; border-radius: 0; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.issue-h em { color: inherit; }
@media (max-width: 560px) { .psr-card { grid-template-columns: 1fr; } }
.cards .card { background: none; border: 0; border-radius: 0; padding: 0; }
.card h3 { font-family: var(--sans); font-size: 19px; font-weight: 600; margin: 0 0 6px; line-height: 1.35; letter-spacing: -.005em; }
.cards { gap: 28px; }
/* Let the dot field spill past the hero and dissolve behind the start of the work list */
.hero { overflow: visible; }
.hero-grid { bottom: auto; }
.work { position: relative; z-index: 1; }
html, body { overflow-x: clip; }
@media (max-width: 720px) { .hero-grid { opacity: .6; } }
.timeline li > span:last-child { text-wrap: pretty; }
