/* Product-page layouts for the case studies, after the Google Store Pixel 11 Pro page (2026-10-24).
   Each section of a case study uses a different delivery: a centered statement over a rounded media panel, a swipe
   rail with a progress bar, text beside a large card with an inset photo, a staggered photo pair, a card with large
   type, a quote card, icon cards, a collage, comparison columns and a pill link. The section tint changes per chapter. */

.px-band { --px-r: 24px; --px-r-sm: 16px; }

/* chapter tint: each of the four groups on a case page takes its own soft ground */
main.wrap > section.cgroup[data-tint] { background: var(--px-tint); }
[data-tint="warm"] { --px-tint: #f6ebe4; --px-card: #fbf4ef; --px-deep: #ecd9cd; }
[data-tint="sage"] { --px-tint: #e7ede6; --px-card: #f3f6f2; --px-deep: #d5e0d3; }
[data-tint="sky"]  { --px-tint: #e6edf6; --px-card: #f3f6fb; --px-deep: #d3e0ef; }
[data-tint="sand"] { --px-tint: #f1eee4; --px-card: #f8f6f0; --px-deep: #e3ddcb; }
.cgroup { --px-card: var(--bg-raised); --px-deep: var(--bg-sunken); }

.px { margin: clamp(3rem, 9vh, 6rem) 0; }
.px:first-of-type { margin-top: clamp(2rem, 6vh, 3.5rem); }
.px h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.025em; color: var(--ink); }
.px p { color: var(--ink-2); line-height: 1.6; }
.px b { color: var(--ink); font-weight: 600; }
.px-media { border-radius: var(--px-r); overflow: hidden; background: var(--px-deep); position: relative; }
.px-media > img, .px-media > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.px-media.contain > img, .px-media.contain > video { object-fit: contain; }
.px-chip { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: .35rem .8rem; border-radius: 999px;
  background: rgba(16,16,20,.62); color: #fff; font-size: .78rem; white-space: nowrap; backdrop-filter: blur(6px); }

/* 1 · statement: a centered headline and one short line, then (optionally) a rounded media panel */
.px-statement { text-align: center; }
.px-statement h3 { font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.08; max-width: 20ch; margin: 0 auto; }
.px-statement > p { max-width: 54ch; margin: 1rem auto 0; font-size: 1.02rem; }
.px-statement .px-media { margin-top: clamp(2rem, 5vh, 3rem); }

/* 2 · left statement: a left-aligned headline with a short body, for chapter openers inside a section */
.px-left h3 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; max-width: 18ch; }
.px-left > p { max-width: 52ch; margin-top: .9rem; }

/* 3 · rail: cards that scroll sideways, with a progress bar and arrows under them */
.px-rail-wrap { position: relative; }
.px-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 32%); gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.px-rail::-webkit-scrollbar { display: none; }
.px-rail.wide { grid-auto-columns: minmax(280px, 46%); }
.px-rail.tall .px-card .px-media { aspect-ratio: 9 / 14; }
.px-card { scroll-snap-align: start; min-width: 0; }
.px-card .px-media { aspect-ratio: 4 / 5; }
.px-card > p { margin-top: .9rem; font-size: .95rem; max-width: 38ch; }
.px-card.text { background: var(--px-card); border-radius: var(--px-r); padding: 1.6rem 1.5rem 1.8rem; display: flex; flex-direction: column; }
.px-card.text .px-n { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.03em; color: var(--ink); margin-bottom: auto; padding-bottom: 2.4rem; }
.px-card.text > p { margin-top: 0; }
.px-ctl { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.px-track { flex: 1; height: 2px; background: var(--line); border-radius: 2px; position: relative; overflow: hidden; }
.px-thumb { position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--ink); border-radius: 2px; transition: transform .2s linear, width .2s linear; }
.px-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-raised); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; }
.px-arrow:disabled { opacity: .35; cursor: default; }
.px-arrow:not(:disabled):hover { background: var(--ink); color: var(--bg); }

/* 4 · split with inset: a short text column, a large media card, and a small photo that overlaps its corner */
.px-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.px-split.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.px-split.flip .px-split-text { order: 2; }
.px-split-text { position: sticky; top: 90px; padding-top: .4rem; }
.px-split-text h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; }
.px-split-text p { margin-top: .8rem; font-size: .97rem; }
.px-split-text ul { margin: 1rem 0 0; padding-left: 1.1em; display: grid; gap: .5rem; color: var(--ink-2); line-height: 1.5; font-size: .95rem; }
.px-split-media { position: relative; }
.px-split-media > .px-media { aspect-ratio: 4 / 3; }
.px-inset { position: absolute; left: -14%; bottom: -8%; width: 36%; aspect-ratio: 3 / 4; border-radius: var(--px-r-sm);
  overflow: hidden; box-shadow: 0 18px 40px -14px rgba(16,16,20,.35); border: 4px solid var(--px-tint, var(--bg)); }
.px-inset img { width: 100%; height: 100%; object-fit: cover; display: block; }
.px-split.flip .px-inset { left: auto; right: -14%; }

/* 5 · staggered pair: two media cards, the second one lower, each with a bold first sentence */
.px-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.px-pair > :nth-child(2) { margin-top: clamp(3rem, 12vh, 8rem); }
.px-pair .px-media { aspect-ratio: 4 / 5; }
.px-pair figcaption { margin-top: .9rem; color: var(--ink-2); font-size: .95rem; line-height: 1.55; max-width: 40ch; }

/* 6 · big type: a card that carries one short phrase in very large type, beside a short text column */
.px-bigtype { background: var(--px-card); border-radius: var(--px-r); padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  display: grid; place-items: center; text-align: center; min-height: 320px; }
.px-bigtype span { font-family: var(--display); font-size: clamp(2.4rem, 6.4vw, 5.4rem); line-height: 1; letter-spacing: -.04em; color: var(--ink); max-width: 12ch; }
.px-bigtype small { display: block; margin-top: 1.2rem; font-family: var(--sans); font-size: .9rem; color: var(--ink-2); letter-spacing: 0; }

/* 7 · quote card: a large statement inside a card, the caption beside it */
.px-quote { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
.px-quote .px-bigtype span { font-size: clamp(1.9rem, 4.2vw, 3.4rem); max-width: 16ch; line-height: 1.12; letter-spacing: -.03em; }
.px-quote-cap h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; }
.px-quote-cap p { margin-top: .8rem; font-size: .97rem; }
.px-quote-cap .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .8rem; }

/* 8 · icon cards: short facts, each with a line icon, in one row (a rail on small screens) */
.px-icons { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; }
.px-icon { background: var(--px-card); border-radius: var(--px-r-sm); padding: 1.3rem 1.2rem 1.5rem; }
.px-icon svg { width: 26px; height: 26px; stroke: var(--ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; margin-bottom: 1.6rem; }
.px-icon p { font-size: .93rem; line-height: 1.5; }
.px-icon .px-n { font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1; letter-spacing: -.03em; color: var(--ink); margin-bottom: 1rem; }

/* 9 · collage: two small media stacked beside one large one, with the headline under the small pair */
.px-collage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; align-items: stretch; }
.px-collage-side { display: grid; grid-template-rows: auto auto 1fr; gap: 14px; }
.px-collage-side .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.px-collage-side .row .px-media { aspect-ratio: 3 / 4; }
.px-collage-side h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.12; margin-top: .6rem; }
.px-collage-side p { font-size: .95rem; }
.px-collage > .px-media { min-height: 420px; }

/* 10 · compare: columns of the same rows, side by side */
.px-compare { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 14px; }
.px-col { background: var(--px-card); border-radius: var(--px-r); padding: 1.6rem 1.5rem; }
.px-col .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.px-col h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: .5rem 0 .8rem; }
.px-col dl { margin: 1.2rem 0 0; border-top: 1px solid var(--line); }
.px-col dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding-top: .9rem; }
.px-col dd { margin: .3rem 0 0; padding-bottom: .9rem; border-bottom: 1px solid var(--line); color: var(--ink); font-size: .95rem; line-height: 1.5; }

/* 11 · pill link */
.px-pill-row { text-align: center; margin-top: 1.8rem; }
.px-pill { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem .9rem .55rem 1.1rem; border-radius: 999px;
  background: var(--bg-raised); border: 1px solid var(--line); color: var(--ink); font-size: .9rem; text-decoration: none; }
.px-pill:hover { background: var(--ink); color: var(--bg); }
.px-pill i { font-style: normal; }

/* wide media panel with a caption under it */
.px-panel .px-media { aspect-ratio: 16 / 9; }
.px-panel.auto .px-media { aspect-ratio: auto; }
.px-panel figcaption { margin-top: .9rem; color: var(--ink-2); font-size: .95rem; max-width: 60ch; }

/* the old parts kept inside a section (diagrams, the scroll story, the chart) sit on the chapter tint */
.cgroup .px-keep { margin: clamp(3rem, 9vh, 6rem) 0; }

@media (max-width: 860px) {
  .px-split, .px-split.flip, .px-quote, .px-collage { grid-template-columns: minmax(0, 1fr); }
  .px-split.flip .px-split-text { order: 0; }
  .px-split-text { position: static; }
  .px-inset { left: auto; right: 6%; bottom: -10%; width: 34%; }
  .px-split-media { margin-bottom: 3rem; }
  .px-icons { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(220px, 70%); overflow-x: auto; scroll-snap-type: x mandatory; }
  .px-icon { scroll-snap-align: start; }
  .px-compare { grid-template-columns: minmax(0, 1fr); }
  .px-rail, .px-rail.wide { grid-auto-columns: minmax(240px, 78%); }
}
@media (max-width: 560px) {
  .px-pair { grid-template-columns: minmax(0, 1fr); }
  .px-pair > :nth-child(2) { margin-top: 0; }
  .px-collage-side .row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { .px-thumb { transition: none; } }
.px-quote-cap ul { margin: 1rem 0 0; padding-left: 1.1em; display: grid; gap: .45rem; color: var(--ink-2); line-height: 1.5; font-size: .93rem; }
.px-keep > section.plate, .px-keep > section.blk { padding: 0 !important; }
/* keep the inset photo off the text column */
.px-inset { left: -9%; bottom: -10%; width: 32%; }
.px-split.flip .px-inset { left: auto; right: 5%; bottom: -12%; }
.px-split-text .tag-k { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: .6rem; }
.px-note { font-size: .82rem !important; color: var(--ink-2); opacity: .85; }
.px-rail.tall { grid-auto-columns: minmax(230px, 38%); }
.px-rail-wrap.fits .px-ctl { display: none; }

/* ---------- one type hierarchy for every case-study section (2026-10-24) ----------
   1 · section: "01 / Role" label, then one short headline (the largest text in the section)
   2 · block: every block headline the same size, left-aligned
   3 · body and captions; small labels in the eyebrow style */
.cgroup-head { align-items: start; }
.cgroup-t { margin-top: .7rem; max-width: 22ch; font-family: var(--display); font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.12; color: var(--ink); }
.px { margin: clamp(2.5rem, 7vh, 4.5rem) 0; }
.px-statement, .px-statement > p { text-align: left; margin-left: 0; margin-right: 0; }
.px h3, .px-statement h3, .px-left h3, .px-split-text h3, .px-collage-side h3, .px-quote-cap h3, .px-col h3, .cgroup .plate-title {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.22; max-width: 28ch; margin-left: 0; margin-right: 0; color: var(--ink); }
.cgroup .plate-title .sub { display: block; margin-top: .5rem; font-family: var(--sans); font-size: 1rem; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.px p, .px-statement > p, .px-left > p { font-size: 1rem; line-height: 1.6; max-width: 62ch; margin-top: .7rem; }
.px-card > p, .px-icon p, .px-pair figcaption, .px-panel figcaption { font-size: .9375rem; line-height: 1.55; }
.px-quote-cap .k, .px-col .tag, .px-split-text .tag-k { font-family: var(--display); font-size: .875rem; font-weight: 500; color: var(--muted); }
.px-bigtype span, .px-quote .px-bigtype span { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; max-width: 18ch; }
.px-n, .px-card.text .px-n, .px-icon .px-n { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.px-statement .px-media { margin-top: 1.6rem; }
.px-inset { left: auto; right: -3%; bottom: -10%; width: 30%; }
.px-split.flip .px-inset { right: auto; left: -3%; }
.px-split-media { margin-bottom: 2.5rem; }
