/* Work section: project cards, device mockups, and the project modal.
   The mock screens themselves are styled by work/<project>.css. */

/* ───────── Section ───────── */

.work {
  position: relative;
  z-index: 2;
  padding: clamp(88px, 14vh, 150px) var(--gutter) clamp(96px, 15vh, 170px);
  background: var(--bg);
}

.work-head { max-width: 760px; margin: 0 auto clamp(40px, 7vh, 80px); text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 14px 6px 11px;
  border-radius: 980px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.04);
  font-size: 0.9375rem;
  font-weight: 500;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.work h2 {
  margin: 0.4em 0 0.3em;
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.work-sub { max-width: 34em; margin: 0 auto; font-size: 1.0625rem; line-height: 1.55; letter-spacing: -0.01em; color: var(--ink-2); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* two large cards a row */
  gap: clamp(28px, 3.4vw, 48px) clamp(20px, 2.4vw, 32px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.project {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.project:focus-visible { outline-offset: 6px; border-radius: 22px; }
.project-meta { display: flex; flex-direction: column; gap: 2px; padding: 14px 4px 0; }
.project-meta strong { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
.project-meta span { font-size: 0.9375rem; color: var(--ink-2); }

/* ───────── Thumbnail: a browser window and a phone on a tinted tile ───────── */

/* --tint: the tile behind the devices. --b1..3: block colours for pages that have no screenshot yet. */
.thumb--deebo { --tint: linear-gradient(150deg, #efeafd, #d9cffb); --b1: #8d5ce0; --b2: #1c1630; --b3: #c9b8f5; }
.thumb--beaches { --tint: linear-gradient(150deg, #eaf1fc, #b9d0f1); --b1: #0c4db7; --b2: #ff9b00; --b3: #a8c4ee; }
.thumb--rethink { --tint: url("assets/work/rethink-tile.jpg") center / cover; --b1: #f47b20; --b2: #1d1d1f; --b3: #fde3cf; }
.thumb--rethink .case-hint { color: rgba(255, 255, 255, 0.9); }
.thumb--nexus { --tint: url("assets/work/nexus-tile.jpg") center / cover; --b1: #3a3a3c; --b2: #ebeae6; --b3: #c9c4ba; }
.thumb--hybrid { --tint: linear-gradient(150deg, #e0f7f6, #a9dedc); --b1: #009f9e; --b2: #072625; --b3: #fef0cd; }

/* a screen that is a plain screenshot (added by tools/inline-work.mjs) */
.site--image { width: 100%; }
.site--image img { display: block; width: 100%; height: auto; }

/* a page with no screenshot yet: a flat block of the project's colour */
.blank { aspect-ratio: 16 / 10; background: var(--b1); }
.phone .blank { aspect-ratio: 390 / 844; }
.blank--2 { background: var(--b2); }
.blank--3 { background: var(--b3); }

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3.1;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size; /* device chrome below is sized in cqw of the tile */
  border-radius: 20px;
  background: var(--tint);
  transition: transform 160ms var(--ease-out);
}
.project:active .thumb { transform: scale(0.985); }

.browser {
  position: absolute;
  left: 7cqw;
  top: 9cqw;
  width: 122cqw; /* bleeds off the right and bottom of the tile, so the page reads larger */
  overflow: hidden;
  border-radius: 1.8cqw;
  background: #fff;
  box-shadow: 0 0 0 max(1px, 0.1cqw) rgba(0, 0, 0, 0.08), 0 3cqw 8cqw -2cqw rgba(0, 0, 0, 0.28);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 1cqw;
  height: 4.2cqw;
  padding: 0 1.7cqw;
  background: #f1f1f2;
  border-bottom: max(1px, 0.08cqw) solid rgba(0, 0, 0, 0.07);
}
.browser-bar i { width: 1.3cqw; height: 1.3cqw; border-radius: 50%; background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar b {
  width: 42%;
  margin: 0 auto;
  padding: 0.45cqw 0;
  border-radius: 1.2cqw;
  background: #fff;
  font-size: 1.3cqw;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  color: #6e6e73;
  transform: translateX(-3cqw); /* optically centred against the three dots */
}

/* the screen: a size container, so the mock page inside scales with it */
.shot {
  display: block;
  overflow: hidden;
  container-type: inline-size;
  aspect-ratio: 16 / 10;
  background: #fff;
}

.phone {
  --pw: 21cqw;
  position: absolute;
  right: 6cqw;
  bottom: -7cqw;
  width: var(--pw);
  padding: calc(var(--pw) * 0.043);
  border-radius: calc(var(--pw) * 0.17);
  background: #0c0c0d;
  box-shadow: inset 0 0 0 calc(var(--pw) * 0.008) #3a3a3d, 0 3cqw 8cqw -2cqw rgba(0, 0, 0, 0.4);
}
.phone .shot { aspect-ratio: 390 / 844; border-radius: calc(var(--pw) * 0.13); }

/* iPhone status bar: stays at the top while the page scrolls underneath. Sized in
   cqw of the screen (.shot is the container), to an iPhone's 390pt-wide proportions. */
.sbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 13.8cqw;
  padding: 1.4cqw 6.6cqw 0 10.5cqw;
  background: #fff;
  color: #000;
  font: 600 4.3cqw / 1 -apple-system, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -0.01em;
}
.sb-island {
  position: absolute;
  left: 50%;
  top: 2.8cqw;
  width: 31cqw;
  height: 9.2cqw;
  margin-left: -15.5cqw;
  border-radius: 5cqw;
  background: #000;
}
.sb-icons { display: flex; align-items: center; gap: 1.5cqw; }
.sb-icons svg { display: block; height: 3.1cqw; width: auto; fill: currentColor; }
.sb-icons svg:last-child { height: 3.3cqw; }

/* hover: the devices drift slowly closer, and settle back just as slowly when the
   pointer leaves. A transition, so leaving mid-zoom reverses from where it is. */
.thumb-in {
  position: absolute;
  inset: 0;
  transform-origin: 45% 45%;
  transition: transform 1600ms cubic-bezier(0.33, 0, 0.2, 1);
}
.peek {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 13cqw;
  height: 13cqw;
  margin: -6.5cqw 0 0 -6.5cqw;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.86);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
}
.peek svg { width: 46%; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .project:hover .thumb-in { transform: scale(1.08); }
  .project:hover .peek { opacity: 1; transform: none; }
}
.project:focus-visible .peek { opacity: 1; transform: none; }

/* ───────── Project modal ───────── */

html.case-open { overflow: hidden; }

dialog.case {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
  color: var(--ink);
}
dialog.case[open] { display: grid; place-items: center; }
/* literal curves here: ::backdrop does not inherit custom properties in every browser */
dialog.case::backdrop {
  background: rgba(18, 18, 20, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  transition: background-color 400ms cubic-bezier(0.23, 1, 0.32, 1), backdrop-filter 400ms cubic-bezier(0.23, 1, 0.32, 1), -webkit-backdrop-filter 400ms cubic-bezier(0.23, 1, 0.32, 1);
}
dialog.case.open::backdrop {
  background: rgba(18, 18, 20, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* the sheet grows out of the clicked card (work.js sets transform-origin) and leaves the same way */
.case-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 48px));
  height: min(920px, calc(100dvh - 48px));
  overflow: hidden;
  border-radius: 28px;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) inset, 0 40px 120px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: scale(0.92);
  transition: transform 420ms var(--ease-drawer), opacity 240ms var(--ease-out);
}
dialog.case.open .case-sheet { opacity: 1; transform: none; }
.case-sheet:focus { outline: none; }

.case-top { /* translucent bar; the project scrolls beneath it */
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 26px;
  background: rgba(245, 244, 240, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.case-grab { display: none; }
.case-title { flex: 1; min-width: 0; }
.case-title h2 { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; }
.case-title p { margin: 1px 0 0; font-size: 0.875rem; line-height: 1.3; color: var(--ink-2); }
.case-visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 980px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.case-visit svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.case-visit:active { transform: scale(0.97); }
.case-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.07);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.case-close svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.case-close:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .case-visit:hover { background: #3a3a3c; }
  .case-close:hover { background: rgba(29, 29, 31, 0.12); }
}

.case-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-top: 70px; }

/* device showcase */
.case-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px clamp(16px, 3vw, 40px) 22px;
  background: var(--tint);
}
.seg { /* Web / Mobile switch: a pill that slides under the labels */
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.seg::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 980px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 320ms var(--ease-out);
}
.seg[data-view="mobile"]::before { transform: translateX(100%); }
.seg button {
  position: relative;
  padding: 7px 22px;
  border: 0;
  border-radius: 980px;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 200ms ease;
}
.seg button[aria-pressed="true"] { color: var(--ink); }

.case-stage {
  position: relative;
  width: min(100%, calc(56vh * 16 / 9));
  aspect-ratio: 16 / 9;
  container-type: inline-size;
}
/* perspective for the side pages' turn; the row may spill past the stage, the hero clips it */
.devices { position: absolute; inset: 0; perspective: 140cqw; touch-action: pan-y; }
.case-hero { overflow: hidden; }
.case-stage .browser,
.case-stage .phone {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  /* Pages sit in a row. work.js sets each page's offset from the centre:
     --tx (cqw), --ry (turn, deg), --sc (scale) and --op (opacity). --dx and --s
     are the Web/Mobile switch moving the whole row aside. */
  transform:
    translate(-50%, -50%)
    translateX(calc(var(--dx, 0cqw) + var(--tx, 0) * 1cqw))
    rotateY(calc(var(--ry, 0) * 1deg))
    scale(calc(var(--s, 1) * var(--sc, 1)));
  opacity: var(--op, 1);
  cursor: pointer;
  /* a long, soft settle: quick to leave, gentle to land */
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1), opacity 500ms var(--ease-out);
  will-change: transform;
}
.devices.dragging .browser,
.devices.dragging .phone { transition: none; } /* follow the finger exactly */
.case-stage .browser { width: 64cqw; --step: 55; --step2: 24; --rot: 34; --side: 0.74; }
.case-stage .phone { --pw: 21cqw; --step: 25; --step2: 15; --rot: 30; --side: 0.8; }
.case-stage .front { cursor: auto; }
.case-stage [data-page]::after { /* a pale veil sends the side pages into the distance */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.4);
  opacity: 1;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
}
.case-stage .front::after { opacity: 0; }
.case-stage [data-page]:not(.front) .shot { overflow: hidden; pointer-events: none; }
.case-stage .far { pointer-events: none; }
.case-stage .missing { display: none; } /* a page this screen size has no screenshot for */

/* previous / next */
.flip {
  position: absolute;
  top: 50%;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(0, 0, 0, 0.14);
  color: var(--ink);
  cursor: pointer;
  transition: opacity 240ms ease, transform 200ms var(--ease-out);
}
.flip--prev { left: 0; }
.flip--next { right: 0; }
.flip svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flip:active { transform: scale(0.92); }
.flip:disabled { opacity: 0; pointer-events: none; }
.flip[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .flip:hover { background: #fff; }
}

.seg[hidden], .pager[hidden] { display: none; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.pager button {
  padding: 6px 14px;
  border: 0;
  border-radius: 980px;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(29, 29, 31, 0.6);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.pager button:active { transform: scale(0.96); }
.pager button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.devices[data-view="web"] .phone { --dx: 30cqw; --s: 0.88; opacity: 0; pointer-events: none; }
.devices[data-view="mobile"] .browser { --dx: -30cqw; --s: 0.88; opacity: 0; pointer-events: none; }
.devices[data-view="web"] .phone::after, .devices[data-view="mobile"] .browser::after { opacity: 0; }
/* in the modal the screens really scroll */
.case-stage .shot { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; overflow-anchor: none; }
.case-stage .shot::-webkit-scrollbar { display: none; }
.case-hint { margin: 0; font-size: 0.8125rem; color: rgba(29, 29, 31, 0.55); }

/* the write-up */
.case-body { max-width: 900px; margin: 0 auto; padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 48px) clamp(48px, 7vw, 88px); }
.case-body .case-lead { margin: 0 0 1.3em; color: var(--ink); font-size: clamp(1.25rem, 2.2vw, 1.625rem); font-weight: 500; line-height: 1.34; letter-spacing: -0.022em; }
.case-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 28px;
  margin: 0 0 clamp(28px, 4vw, 48px);
  padding: 20px 0;
  border-block: 1px solid rgba(29, 29, 31, 0.1);
}
.case-facts dt { font-size: 0.8125rem; color: var(--ink-2); }
.case-facts dd { margin: 3px 0 0; font-size: 1rem; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.case-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; margin-bottom: clamp(32px, 5vw, 56px); }
.case-body h3 { margin: 0 0 0.5em; font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.02em; }
.case-body p { margin: 0; font-size: 1rem; line-height: 1.6; letter-spacing: -0.008em; color: #48484d; }
.case-deep ul { margin: 0.6em 0 0; padding: 0; list-style: none; }
.case-deep li {
  display: grid;
  grid-template-columns: minmax(0, 11em) minmax(0, 1fr);
  gap: 6px 28px;
  padding: 16px 0;
  border-top: 1px solid rgba(29, 29, 31, 0.1);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.008em;
  color: #48484d;
}
.case-deep strong { font-weight: 600; color: var(--ink); }
.case-note { margin-top: 1.6em !important; font-size: 0.875rem !important; color: var(--ink-2) !important; }

/* ───────── Narrow screens ───────── */

@media (max-width: 900px) {
  .work-grid { grid-template-columns: 1fr; max-width: 560px; gap: 32px; }
  .case-cols, .case-facts { grid-template-columns: 1fr; }
  .case-deep li { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* the modal becomes a bottom sheet you can drag down */
  dialog.case[open] { place-items: end stretch; }
  .case-sheet {
    width: 100%;
    height: calc(100dvh - 28px);
    border-radius: 24px 24px 0 0;
    opacity: 1;
    transform: translate3d(0, 100%, 0);
    transition: transform 480ms var(--ease-drawer);
  }
  .case-top { padding: 22px 12px 12px 20px; touch-action: none; cursor: grab; }
  .case-grab {
    display: block;
    position: absolute;
    left: 50%;
    top: 8px;
    width: 38px;
    height: 5px;
    margin-left: -19px;
    border-radius: 3px;
    background: rgba(29, 29, 31, 0.2);
  }
  .case-visit { padding: 8px 14px; font-size: 0.875rem; }
  .case-scroll { padding-top: 76px; }
  .case-stage { width: 100%; aspect-ratio: 4 / 4.6; }
  .case-stage .browser { width: 86cqw; --step: 78; --step2: 20; --rot: 30; --side: 0.72; }
  .case-stage .phone { --pw: 44cqw; --step: 50; --step2: 18; --rot: 28; --side: 0.76; }
  .flip { width: 38px; height: 38px; margin-top: -19px; }
  .devices[data-view="web"] .phone { --dx: 60cqw; }
  .devices[data-view="mobile"] .browser { --dx: -60cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .case-sheet { transform: none !important; transition: opacity 200ms ease; opacity: 0; }
  dialog.case.open .case-sheet { opacity: 1; }
  .case-stage .browser, .case-stage .phone { transition: opacity 200ms ease; --dx: 0cqw !important; --s: 1 !important; --ry: 0 !important; }
  .thumb-in, .seg::before { transition: none; }
  .project:hover .thumb-in { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .case-top { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ───────── Concepts (Rethink, Nexus): one cover image, then a bento of details ───────── */
.thumb-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-hero--cover { position: relative; display: block; padding: 0; background: #e9e7e2; }
.case-cover { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: cover; }
.case-hero--cover .case-hint {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 12px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  font-weight: 500;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(110px, 13vw, 170px);
  gap: 12px;
  margin: 0 0 clamp(32px, 5vw, 56px);
}
.bento figure {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--tile, #f4f4f2);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.bento img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.bento .b-fit { padding: clamp(14px, 2.4vw, 28px); grid-template: minmax(0, 1fr) / minmax(0, 1fr); } /* the cell has a fixed size, so the picture fits inside it */
.bento .b-fit img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.bento--rethink { --tile: #f6f6f7; grid-template-areas: "page page page portrait" "page page page portrait" "type type swatch specimen" "logos logos logos logos"; }
.bento--rethink { grid-template-rows: repeat(3, clamp(120px, 14vw, 180px)) 84px; }
.bento--rethink .b-portrait img { object-position: 72% 35%; }
.b-swatch {
  align-content: end;
  justify-items: start;
  gap: 2px;
  padding: 14px 16px;
  background: #f47b20 !important;
  color: #fff;
  font-size: 0.8125rem;
}
.b-swatch span { font-weight: 600; }
.b-swatch b { font-weight: 500; opacity: 0.85; font-variant-numeric: tabular-nums; }
.b-specimen { grid-auto-flow: column; gap: 6px; }
.sp-sans { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.2rem, 4.6vw, 3.6rem); letter-spacing: 0.02em; color: #4a4a4c; }
.sp-serif { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: clamp(2.4rem, 5vw, 3.9rem); color: #f47b20; }

.bento--nexus { --tile: #ece9e4; grid-template-areas: "page page page apps" "page page page history" "thread thread images mascot" "prompt prompt prompt prompt"; grid-template-rows: repeat(3, clamp(120px, 14vw, 180px)) 92px; }

.b-page { grid-area: page; }
.b-portrait { grid-area: portrait; }
.b-type { grid-area: type; }
.b-swatch { grid-area: swatch; }
.b-specimen { grid-area: specimen; }
.b-logos { grid-area: logos; }
.b-apps { grid-area: apps; }
.b-history { grid-area: history; }
.b-thread { grid-area: thread; }
.b-images { grid-area: images; }
.b-mascot { grid-area: mascot; }
.b-prompt { grid-area: prompt; }

@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 10px; }
  .bento--rethink { grid-template-areas: "page page" "portrait type" "swatch specimen" "logos logos"; grid-template-rows: 210px 170px 120px 64px; }
  .bento--nexus { grid-template-areas: "page page" "thread thread" "apps history" "images mascot" "prompt prompt"; grid-template-rows: 210px 180px 170px 150px 64px; }
  .case-hero--cover .case-hint { left: 12px; bottom: 12px; font-size: 0.75rem; }
}

/* ───────── Beaches & Boats app: phones fanned out, then a bento of the app ───────── */
.thumb--bnbapp {
  --tint:
    radial-gradient(60% 55% at 88% 6%, rgba(255, 176, 64, 0.55), transparent 70%),
    linear-gradient(160deg, #eaf2ff 0%, #b8d1f6 55%, #8fb3ec 100%);
}
/* phones placed by hand (not the modal carousel) */
.app-phone { position: absolute; right: auto; bottom: auto; }
.app-phone .shot img { display: block; width: 100%; height: auto; }

.app-fan .af-l, .app-fan .af-c, .app-fan .af-r { --pw: 27cqw; top: 13cqw; }
.app-fan .af-c { left: 36.5cqw; top: 8cqw; z-index: 2; box-shadow: inset 0 0 0 calc(var(--pw) * 0.008) #3a3a3d, 0 4cqw 9cqw -2cqw rgba(12, 40, 90, 0.5); }
.app-fan .af-l { left: 11cqw; transform: rotate(-9deg); }
.app-fan .af-r { left: 62cqw; transform: rotate(9deg); }

.app-hero { position: relative; display: block; padding: 0; overflow: hidden; }
.app-stage {
  position: relative;
  width: min(100%, 1100px);
  margin: 0 auto;
  aspect-ratio: 16 / 8.4;
  container-type: inline-size;
}
.app-stage .app-phone { --pw: 19cqw; top: 9cqw; }
.app-stage .ah-1 { left: 8cqw; top: 15cqw; transform: rotate(-6deg); }
.app-stage .ah-2 { left: 29cqw; top: 6cqw; z-index: 2; }
.app-stage .ah-3 { left: 52cqw; top: 6cqw; z-index: 2; }
.app-stage .ah-4 { left: 73cqw; top: 15cqw; transform: rotate(6deg); }
.app-hero .case-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 12px; border-radius: 980px; background: rgba(255, 255, 255, 0.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink); font-weight: 500; white-space: nowrap; z-index: 3; }

.case-status {
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 980px;
  background: rgba(12, 77, 183, 0.1);
  color: #0c4db7;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.case-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #ff9b00; vertical-align: 1px; }

.bento--app {
  --tile: #f2f5fb;
  grid-template-areas:
    "s1 s2 s3 s4"
    "stack stack stack stack";
  grid-template-rows: clamp(330px, 40vw, 470px) auto;
}
.b-s1 { grid-area: s1; } .b-s2 { grid-area: s2; } .b-s3 { grid-area: s3; } .b-s4 { grid-area: s4; }
.b-stack { grid-area: stack; }

/* each screen on its own tint, from sunrise to sea */
.bento .b-phone { container-type: size; }
.b-s1 { background: radial-gradient(70% 50% at 50% 0%, #ffd9a0, #fff4e4 70%) !important; }
.b-s2 { background: linear-gradient(170deg, #dfeaff, #b4cdf4) !important; }
.b-s3 { background: linear-gradient(170deg, #f6efe3, #e9dcc4) !important; }
.b-s4 { background: linear-gradient(170deg, #ddf3f1, #a9dcd6) !important; }
.bento .b-phone .app-phone {
  --pw: min(70cqw, 44cqh);
  position: relative;
  box-shadow: inset 0 0 0 calc(var(--pw) * 0.008) #3a3a3d, 0 18px 40px -16px rgba(10, 30, 70, 0.45);
  transition: transform 700ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .bento .b-phone:hover .app-phone { transform: translateY(-6px); }
}

.bento--app .b-fit img { border-radius: 12px; box-shadow: 0 6px 20px -10px rgba(10, 30, 70, 0.3); }
.b-stack {
  align-content: start;
  justify-items: start;
  gap: 10px;
  padding: 16px;
  background: #11161f !important;
  color: #fff;
}
.b-stack > span { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.6); }
.b-stack ul { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.b-stack li { padding: 4px 9px; border-radius: 980px; background: rgba(255, 255, 255, 0.1); font-size: 0.75rem; font-weight: 500; }

.case-cols--four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }

@media (max-width: 640px) {
  .app-stage { aspect-ratio: 4 / 3.3; }
  .app-stage .app-phone { --pw: 30cqw; }
  .app-stage .ah-1 { left: 2cqw; top: 16cqw; }
  .app-stage .ah-2 { left: 22cqw; top: 7cqw; }
  .app-stage .ah-3 { left: 48cqw; top: 7cqw; }
  .app-stage .ah-4 { left: 68cqw; top: 16cqw; }
  .app-hero .case-hint { font-size: 0.75rem; }
  .bento--app {
    grid-template-areas: "s1 s2" "s3 s4" "stack stack";
    grid-template-rows: 330px 330px auto;
  }
  .case-cols--four { grid-template-columns: 1fr; }
}
