/* Geist, self-hosted (variable 400-700): latin + latin-ext cover English and Portuguese */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Home — wireframe pass. Designed at 1920px. Gray blocks stand in for images. */

:root {
  --ink: #1a1a1a;
  --muted: #8a8a8a;
  --line: #dcdcdc;
  --block: #dedede;
  --pill: #f2f2f2;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }
html, body { overflow-x: clip; } /* never a sideways scrollbar (clip, unlike hidden, adds no scroll container) */

/* Custom cursors (20px; hotspots at the arrow tip, fingertip and I-beam centre). Default arrow first, then
   pointer for interactive elements and text for text fields. All are plain CSS cursor images (no script, no blending),
   drawn by the browser itself, so they never lag. */
html { cursor: url("assets/cursor.svg") 1 1, auto; --text-cursor: url("assets/cursor-text.svg") 4 10, text; }
a, button, summary, label, select, [role="button"], [onclick] { cursor: url("assets/cursor-pointer.svg") 12 2, pointer; }
input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
textarea, [contenteditable="true"],
:is(p, h1, h2, h3, h4, h5, h6, li, blockquote, figcaption, small, dt, dd):not(:is(a, button, label) *) { cursor: var(--text-cursor); }

body {
  background: #fff;
  color: var(--ink);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

/* Placeholder block */
.ph { display: block; background: var(--block); border-radius: 26px; }
i.ph { display: inline-block; border-radius: 8px; }
/* Placeholder filled with a real image */
.ph--img { position: relative; overflow: hidden; }

/* Header */
.header {
  height: 116px;
  width: min(1550px, calc(100% - 48px));
  margin: 0 auto; /* same gutters as .about */
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav { display: flex; gap: 32px; font-size: 16px; }
.nav a { position: relative; }
/* Hover: a 2px line, 4px below the link, that fills in left to right */
.nav a::after { content: ""; position: absolute; left: 0; top: calc(100% + 4px); width: 100%; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform .45s cubic-bezier(.16, 1, .3, 1); pointer-events: none; }
@media (hover: hover) { .nav a:hover::after { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .nav a::after { transition: none; } }

.lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1.5px solid #F4EBE6;
  border-radius: 999px;
  font: 500 12px/95% "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: 0.05em;
}
.lang__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px; /* +1px top: optically centres the caps with the flag */
  border-radius: 999px;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: url("assets/cursor-pointer.svg") 12 2, pointer;
}
/* Liquid highlight: one pill that slides (and stretches) between the two items; positioned by i18n.js */
.lang__pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: #F9F4F1; pointer-events: none; }
.lang__item { position: relative; z-index: 1; opacity: .6; transition: opacity .2s ease; }
.lang__item[aria-pressed="true"], .lang__item--active { opacity: 1; } /* selected language stays at full strength */
@media (hover: hover) { .lang__item:hover { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lang__item { transition: none; } }
.lang .ph--flag { margin-top: -2px; width: 20px; height: 20px; border-radius: 50%; background: center / cover no-repeat; }
.lang [data-lang="en"] .ph--flag { background-image: url("assets/flag-us.png"); }
.lang [data-lang="pt"] .ph--flag { background-image: url("assets/flag-br.png"); }

/* Hero */
.hero { padding: 80px 24px 88px; container-type: inline-size; }
.hero__text { width: fit-content; margin-inline: auto; } /* shrink-wrapped block, centred on every viewport */
/* Curtain: nav + hero are pinned and fade out (script); the stack scrolls normally over them.
   The stack has no background — the pinned block is hidden once fully faded. */
.pinned { position: sticky; top: 0; }
.stack { position: relative; z-index: 1; display: flow-root; }
.hero__hi { font-size: 30px; line-height: 95%; font-weight: 500; letter-spacing: 0; }
.hero__title br.m { display: none; } /* phone-only line breaks */
.hero__title {
  margin-top: 8px;
  /* Always 3 lines: nowrap + font-size fitted to the hero content width (widest line ≈ 9.52em) */
  font-size: min(84px, calc(100cqw / 9.7));
  white-space: nowrap;
  line-height: 95%;
  font-weight: 500;
  letter-spacing: -0.03em;
}
/* Portuguese: widest line is ≈10.41em (vs 9.52em in English), so fit the font to that */
:lang(pt-BR) .hero__title { font-size: min(84px, calc(100cqw / 10.6)); }
/* Large screens: bring the full 100px cap back */
@media (min-width: 1600px) {
  .hero__title { font-size: min(100px, calc(100cqw / 9.7)); }
  :lang(pt-BR) .hero__title { font-size: min(100px, calc(100cqw / 10.6)); }
}
/* 1599px and below: tighter vertical gaps so the gallery peeks above the fold */
@media (max-width: 1599px) {
  .header { height: 96px; }
  .hero { padding-top: 40px; padding-bottom: 40px; }
  .gallery { margin-top: 24px; }
}
.ph--icon { width: .8em; height: .8em; border-radius: .22em; vertical-align: -0.02em; margin: 0 .06em; }
/* Shared inline-icon sizing for the hero title */
.hero__icon { display: inline-block; width: .8em; height: .8em; vertical-align: -0.02em; margin: 0 .06em; overflow: visible; }

/* "Craft" icon: morphing shape (Lottie, assets/craft-morph.json, played by seal-lottie.js).
   The 1em box keeps .8em of visual size; the 110-unit canvas overflows it to leave room for the bounce. */
.hero__icon--craft { position: relative; width: 1em; height: 1em; margin: 0 -.04em; vertical-align: -0.12em; }
.hero__craft-anim { position: absolute; inset: -.1111em; }
.hero__title span.hero__icon { top: 2px; } /* optical alignment with the text */
@media (max-width: 640px) { .hero__title span.hero__icon { top: 1px; } }
/* Lottie canvases are inline by default, which pushes a small one below its box */
.hero__craft-anim canvas, .hero__star-anim canvas { display: block; }

/* "AI" icon: spinning star. In the hero it's a Lottie (assets/ai-star.json); the footer's small one is SVG + CSS. */
span.hero__icon--ai { position: relative; }
.hero__star-anim { position: absolute; inset: -.02105em; }
.hero__icon--ai .star { transform-origin: 38px 38px; animation: star-spin 2.4s linear infinite; }
@keyframes star-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero__icon--ai .star { animation: none; } }

/* Gallery */
.gallery {
  position: relative;
  z-index: 1;
  margin: 32px 16px 0;
  aspect-ratio: 1122 / 551;
  display: grid;
  gap: 12px;
  grid-template-columns: 260fr 282fr 272fr 272fr;
  grid-template-rows: 203fr 85fr 239fr;
}
/* Parallax: the image drifts inside its tile (tiles and 12px gaps never move).
   --p (-1…1) is set by script; --s is the drift speed (% of the image's height per unit of --p).
   The image layer is 12% taller than the tile (6% spare each side = 5.36% of the layer), so the
   shift is clamped to ±5.3%. A high --s uses the whole spare range over a shorter scroll
   (more visible); the clamp stops the image running out and showing the grey behind it. */
/* Fallback: the tile itself shows the image, so if a phone browser drops the parallax layer for a
   frame while scrolling, the picture stays instead of the grey placeholder. */
.gallery .ph--img {
  --img-r: var(--img); /* phones swap in the ~1100px copy (--img-sm, set per tile) so they do not download the 2000px original */
  background: var(--block) var(--img-r) center / cover no-repeat;
  isolation: isolate;
}
.gallery .ph--img::before {
  content: "";
  position: absolute;
  inset: -6% 0;
  background: var(--img-r) center / cover no-repeat;
  transform: translate3d(0, clamp(-5.3%, calc(var(--p, 0) * var(--s, 10) * var(--d, 1) * 1%), 5.3%), 0);
  will-change: transform;
}
@media (max-width: 900px) { .gallery .ph--img { --img-r: var(--img-sm, var(--img)); } }
/* Daily log tile: the full 2000x1500 photo, cropped to the phone's lower-left corner (about x 530-1170, y 745-1290 of the
   source). Width-fit zoom of 2000/637, with the position worked out so that region fills the tile. */
/* Laptop tile: the photo (transparent cut-out; the tile colour #FF977B shows behind it) is set at 97.5% of the tile width, right-aligned so the sleeve bleeds off the edge, as in the positioning reference; the tile fills the rest with that same colour */
.gallery .g-forms { background-color: #ff977b; background-image: none; } /* the tile's own copy of the photo (iOS fallback) would show through the cut-out as a second laptop, so only the ::before layer carries the image */
/* "Fresh & Natural" seal: the orange scalloped blob spins, the white lettering stays still. Placed from the positioning reference (centre 20.05% across, 60.9% down; 9.25% of the tile width). */
/* The seal rides in a layer with the same box and drift as the photo layer, so it stays glued to the picture while scrolling. Its top is 59.7% of that taller layer = 60.9% of the tile. */
.gallery .g-forms .seal-layer { display: block; position: absolute; inset: -6% 0; pointer-events: none; transform: translate3d(0, clamp(-5.3%, calc(var(--p, 0) * var(--s, 10) * var(--d, 1) * 1%), 5.3%), 0); will-change: transform; }
@media (max-width: 900px) { .gallery .g-forms .seal-layer { inset: 0; transform: none; will-change: auto; } }
.gallery .g-forms .seal { position: absolute; left: 20.05%; top: 59.7%; width: 9.25%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; overflow: visible; }
@media (max-width: 900px) { .gallery .g-forms .seal { top: 60.9%; } }
.gallery .g-forms .seal__blob { transform-origin: 50.5px 50.5px; animation: seal-spin 15s linear infinite; }
@keyframes seal-spin { from { transform: rotate(0deg) scale(1.1); } to { transform: rotate(360deg) scale(1.1); } }
/* Phone-in-hand tile: photo zoomed to 153.9% of the tile width and shifted from the positioning reference. Its flat grey studio
   backdrop (#EFEFEF) fills the tile so no gap shows when the drift moves the photo. The tile's own copy of the photo is switched off. */
.gallery .g-photo { background-color: #efefef; background-image: none; }
.gallery .g-photo::before { background-size: 153.9% auto; background-position: 8.7% -23.2%; background-repeat: no-repeat; }
/* Hand-drawn mountain and asterisk on top of the photo. They sit in a layer with the photo layer's box and drift, so they stay glued
   to the picture while scrolling; tops are % of that taller layer (reference y of the tile, (6% + y) / 112%). */
.gallery .g-photo .art-layer { container-type: inline-size; display: block; position: absolute; inset: -6% 0; pointer-events: none; transform: translate3d(0, clamp(-5.3%, calc(var(--p, 0) * var(--s, 10) * var(--d, 1) * 1%), 5.3%), 0); will-change: transform; }
.gallery .g-photo .art { position: absolute; display: block; height: auto; max-width: none; }
.gallery .g-photo .art--mountain { left: calc(-7.7% - 5px); top: calc(58.2% + 20px); width: 57%; scale: 1.05; transform: rotate(-3deg); }
.gallery .g-photo .art--star { left: calc(80.6% - 8px); top: 31.8%; width: 16%; transform: translate(-50%, -50%); }
/* Gentle sideways float with little bumps: a slow sweep of 2.36% of the tile width (about 6px on a large desktop tile, 2.5px on a phone; sine, so it eases in and out at each end) plus a 0.45% up-and-down ripple, three bumps per trip. Sampled as keyframes, so the timing is linear. The mountain drifts right first, the asterisk left first, so they always move against each other.
   Uses the separate "translate" property so it stacks on top of each element's own transform. */
.gallery .g-photo .art--mountain { animation: float-mountain 9s linear infinite; }
.gallery .g-photo .art--star { animation: float-star 8s linear infinite; }
@keyframes float-mountain { 0% { translate: 0.000cqw 0.000cqw; } 2.5% { translate: 0.369cqw 0.204cqw; } 5% { translate: 0.729cqw 0.364cqw; } 7.5% { translate: 1.071cqw 0.444cqw; } 10% { translate: 1.387cqw 0.428cqw; } 12.5% { translate: 1.669cqw 0.318cqw; } 15% { translate: 1.909cqw 0.139cqw; } 17.5% { translate: 2.103cqw -0.070cqw; } 20% { translate: 2.244cqw -0.265cqw; } 22.5% { translate: 2.331cqw -0.401cqw; } 25% { translate: 2.360cqw -0.450cqw; } 27.5% { translate: 2.331cqw -0.401cqw; } 30% { translate: 2.244cqw -0.265cqw; } 32.5% { translate: 2.103cqw -0.070cqw; } 35% { translate: 1.909cqw 0.139cqw; } 37.5% { translate: 1.669cqw 0.318cqw; } 40% { translate: 1.387cqw 0.428cqw; } 42.5% { translate: 1.071cqw 0.444cqw; } 45% { translate: 0.729cqw 0.364cqw; } 47.5% { translate: 0.369cqw 0.204cqw; } 50% { translate: 0.000cqw 0.000cqw; } 52.5% { translate: -0.369cqw -0.204cqw; } 55% { translate: -0.729cqw -0.364cqw; } 57.5% { translate: -1.071cqw -0.444cqw; } 60% { translate: -1.387cqw -0.428cqw; } 62.5% { translate: -1.669cqw -0.318cqw; } 65% { translate: -1.909cqw -0.139cqw; } 67.5% { translate: -2.103cqw 0.070cqw; } 70% { translate: -2.244cqw 0.265cqw; } 72.5% { translate: -2.331cqw 0.401cqw; } 75% { translate: -2.360cqw 0.450cqw; } 77.5% { translate: -2.331cqw 0.401cqw; } 80% { translate: -2.244cqw 0.265cqw; } 82.5% { translate: -2.103cqw 0.070cqw; } 85% { translate: -1.909cqw -0.139cqw; } 87.5% { translate: -1.669cqw -0.318cqw; } 90% { translate: -1.387cqw -0.428cqw; } 92.5% { translate: -1.071cqw -0.444cqw; } 95% { translate: -0.729cqw -0.364cqw; } 97.5% { translate: -0.369cqw -0.204cqw; } 100% { translate: -0.000cqw -0.000cqw; } }
@keyframes float-star { 0% { translate: 0.000cqw 0.450cqw; } 2.5% { translate: -0.369cqw 0.401cqw; } 5% { translate: -0.729cqw 0.265cqw; } 7.5% { translate: -1.071cqw 0.070cqw; } 10% { translate: -1.387cqw -0.139cqw; } 12.5% { translate: -1.669cqw -0.318cqw; } 15% { translate: -1.909cqw -0.428cqw; } 17.5% { translate: -2.103cqw -0.444cqw; } 20% { translate: -2.244cqw -0.364cqw; } 22.5% { translate: -2.331cqw -0.204cqw; } 25% { translate: -2.360cqw -0.000cqw; } 27.5% { translate: -2.331cqw 0.204cqw; } 30% { translate: -2.244cqw 0.364cqw; } 32.5% { translate: -2.103cqw 0.444cqw; } 35% { translate: -1.909cqw 0.428cqw; } 37.5% { translate: -1.669cqw 0.318cqw; } 40% { translate: -1.387cqw 0.139cqw; } 42.5% { translate: -1.071cqw -0.070cqw; } 45% { translate: -0.729cqw -0.265cqw; } 47.5% { translate: -0.369cqw -0.401cqw; } 50% { translate: -0.000cqw -0.450cqw; } 52.5% { translate: 0.369cqw -0.401cqw; } 55% { translate: 0.729cqw -0.265cqw; } 57.5% { translate: 1.071cqw -0.070cqw; } 60% { translate: 1.387cqw 0.139cqw; } 62.5% { translate: 1.669cqw 0.318cqw; } 65% { translate: 1.909cqw 0.428cqw; } 67.5% { translate: 2.103cqw 0.444cqw; } 70% { translate: 2.244cqw 0.364cqw; } 72.5% { translate: 2.331cqw 0.204cqw; } 75% { translate: 2.360cqw 0.000cqw; } 77.5% { translate: 2.331cqw -0.204cqw; } 80% { translate: 2.244cqw -0.364cqw; } 82.5% { translate: 2.103cqw -0.444cqw; } 85% { translate: 1.909cqw -0.428cqw; } 87.5% { translate: 1.669cqw -0.318cqw; } 90% { translate: 1.387cqw -0.139cqw; } 92.5% { translate: 1.071cqw 0.070cqw; } 95% { translate: 0.729cqw 0.265cqw; } 97.5% { translate: 0.369cqw 0.401cqw; } 100% { translate: 0.000cqw 0.450cqw; } }
/* Phones: the sweep is only about 2.5px there, so a shorter loop keeps the movement from feeling sluggish */
@media (max-width: 900px) { .gallery .g-photo .art--mountain { animation-duration: 5s; } .gallery .g-photo .art--star { animation-duration: 4.5s; } }
@media (prefers-reduced-motion: reduce) { .gallery .g-photo .art { animation: none; } }
/* Phones: the tile is much taller than wide and the photo does not drift, so the photo is top-aligned (still sized by width) and the art tops are % of the tile height, worked out from the same reference */
@media (max-width: 900px) {
  .gallery .g-photo::before { background-position: 8.7% -14%; }
  .gallery .g-photo .art-layer { inset: 0; transform: none; will-change: auto; }
  .gallery .g-photo .art--mountain { top: calc(42.7% + 8px); }
  .gallery .g-photo .art--star { left: calc(80.6% - 3px); top: 21.4%; }
}
@media (prefers-reduced-motion: reduce) { .gallery .g-forms .seal__blob { animation: none; transform: scale(1.1); } }
.gallery .g-forms, .gallery .g-forms::before { background-size: 97.5% auto; background-position: 100% 31.2%; background-repeat: no-repeat; }
.gallery .g-log, .gallery .g-log::before { background-size: 161.9% auto; background-position: 15.77% 84.8%; }
/* Daily log tile: a soft halo pulsing around the "+" button in the photo. The pulse layer is the same box as the photo layer
   (same inset and parallax drift) and is a size container, so the halo is placed with the same maths as the crop above:
   the button is an oval of about 87 x 81 source px centred at (782, 1057) of the 2000 x 1500 photo, and one source px is
   0.157cqw at this zoom. It keeps the button's own colour and is rotated 2 degrees like the button. */
.gallery .g-log .pulse-layer {
  display: block; position: absolute; inset: -6% 0; pointer-events: none; container-type: size;
  transform: translate3d(0, clamp(-5.3%, calc(var(--p, 0) * var(--s, 10) * var(--d, 1) * 1%), 5.3%), 0);
  will-change: transform;
}
.gallery .g-log .pulse {
  display: block; position: absolute; border-radius: 50%; transform: rotate(-10deg); --c: 70, 73, 83;
  left: calc(43.85cqw - 7.35cqw); top: calc(84.8cqh - 28.86cqw - 6.87cqw); width: 14.69cqw; height: 13.74cqw;
  animation: pulse-halo 1.76s cubic-bezier(.2, .6, .4, 1) infinite;
}
@keyframes pulse-halo { 0% { box-shadow: 0 0 0 0 rgba(var(--c), .8); } 88.6%, 100% { box-shadow: 0 0 0 3cqw rgba(var(--c), 0); } }
@media (max-width: 900px) { .gallery .g-log .pulse-layer { inset: 0; transform: none; will-change: auto; } }
@media (prefers-reduced-motion: reduce) { .gallery .g-log .pulse { animation: none; } }
/* --d: direction (1 = all tiles drift the same way; -1 would reverse a tile). */
.gallery .g-icons  { --s: 10; --d: 1; }
.gallery .g-phone  { --s: 12; --d: 1; }
.gallery .g-social { --s: 10; --d: 1; }
.gallery .g-forms  { --s: 12; --d: 1; }
.gallery .g-log    { --s: 10; --d: 1; }
.gallery .g-photo  { --s: 12; --d: 1; }

/* Tile parallax: each TILE also moves at its own speed (--v, px per unit of --p), so the vertical
   gaps between neighbours change while scrolling. --p is clamped to ±0.75 so tiles never collide
   when the gallery is mostly off-screen. --k scales everything down on small screens. */
/* Film grain over every gallery tile: a tiny tiled fractal-noise SVG (rendered once, static) blended softly on top */
.about__photo { position: relative; overflow: hidden; }
.gallery .ph::after, .about__photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; /* iOS Safari does not clip blended layers to the parent's rounded corners, so round the grain itself */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 220px 220px;
  mix-blend-mode: soft-light; opacity: .6;
}
.gallery .ph { border-radius: 24px; clip-path: inset(0 round 24px); } /* clip-path as well as border-radius: iOS Safari stops clipping blended / fading children to border-radius mid-transition */
.gallery .ph { transform: translate3d(0, calc(clamp(-0.75, var(--p, 0), 0.75) * var(--v, 0) * var(--k, 1) * 1px), 0); will-change: transform; }
.gallery .g-icons  { --v: 14; }
/* Illustrations tile: transparent artwork on a peach background, contained at about 59% of the tile width */
.gallery .g-icons, .gallery .g-icons::before { background-color: #f8f3f1; background-size: 39.2% auto; background-position: center; }
/* Top-left tile: the illustration is inline SVG (the animated piggy is saved in animations/piggy.html; its CSS below is kept) so its parts can move. It sits in a layer with the photo layer's box and drift (the tile has no
   photo any more), centred, at 39.2% of the tile width. */
.gallery .g-icons .icons-layer { display: block; position: absolute; inset: -6% 0; pointer-events: none; transform: translate3d(0, clamp(-5.3%, calc(var(--p, 0) * var(--s, 10) * var(--d, 1) * 1%), 5.3%), 0); will-change: transform; }
@media (max-width: 900px) { .gallery .g-icons .icons-layer { inset: 0; transform: none; will-change: auto; } }
.gallery .g-icons .icon-art { position: absolute; left: 50%; top: 50%; width: 39.2%; height: auto; transform: translate(-50%, -50%); overflow: visible; }
/* Two slots, one above the other, each a clipping window (like the project pages' figure rise-in). Both are centred on the tile, and the
   drawings sit against the facing edges (top slot bottom-aligned, bottom slot top-aligned), so the gap between the two drawings is always exactly
   32px at the desktop tile size whatever their heights (12.2% of the tile width, so it scales). Each window reaches 3% past its drawing toward
   the middle so bursts and bounces are not clipped. The layer is a size container so the gap can use cqw. */
.gallery .g-icons .icons-layer { container-type: inline-size; }
.gallery .g-icons .ic-slot { position: absolute; left: 0; right: 0; height: 25%; overflow: hidden; }
.gallery .g-icons .ic-slot--a { bottom: calc(50% + var(--ic-half, 6.1cqw) - 3cqw); }
.gallery .g-icons .ic-slot--b { top: calc(50% + var(--ic-half, 6.1cqw) - 7cqw); height: 30%; }
@media (max-width: 900px) { .gallery .g-icons .icons-layer { --ic-half: 10px; } } /* phones: the tile is narrow and tall, so the two drawings sit further apart */
.gallery .g-icons .ic-item { position: absolute; inset: 0; display: flex; justify-content: center; }
.gallery .g-icons .ic-item[hidden] { display: none; }
.gallery .g-icons .ic-slot--a .ic-item { align-items: flex-end; padding-bottom: 3cqw; }
.gallery .g-icons .ic-slot--b .ic-item { align-items: flex-start; padding-top: 7cqw; }
.gallery .g-icons .ic-item .icon-art { position: static; transform: none; flex: none; height: auto; width: 33%; }
.gallery .g-icons .ic-item .handphone { width: 29%; }
.gallery .g-icons .ic-item .piggy { width: 27.5%; }
.piggy * { transform-box: fill-box; }
/* Trotters swing a few degrees about their tops, one after the other */
.piggy__paw { transform-origin: 50% 0; animation: piggy-paw 2.8s ease-in-out infinite; }
.piggy__paw--r { animation-delay: -1.4s; }
@keyframes piggy-paw { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
/* Eyes glance left, hold, glance right, hold */
.piggy__eyes { animation: piggy-eyes 4.4s ease-in-out infinite; }
@keyframes piggy-eyes { 0%, 100% { transform: translate(0, 0); } 15%, 38% { transform: translate(-7px, 2px); } 55%, 80% { transform: translate(7px, -2px); } }
/* Coin bobs up and down */
.piggy__coin { animation: piggy-coin 2.2s ease-in-out infinite; }
@keyframes piggy-coin { 0%, 100% { transform: translateY(8px); } 50% { transform: translateY(-24px); } }
/* Sparkles spin a full turn, swell to 1.5x and come back to their own size, offset from each other */
.piggy__spark { transform-origin: 50% 50%; animation: piggy-spark 3.2s ease-in-out infinite; }
.piggy__spark--b { animation-delay: -1.6s; }
@keyframes piggy-spark { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.5); } 100% { transform: rotate(360deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .piggy * { animation: none !important; } }
/* High five (top-left tile): the hands pull apart, swing back together and slap; on the slap the two orange bursts pop out and fade.
   Pivots are the wrists (bottom corners of the artwork, in viewBox units); the bursts scale from the point their rays fan out of.
   Everything is at rest (hands together, bursts showing) when animation is off. One 2s loop: about 1.7s of action, then a 0.3s hold on the finished frame (hands together, bursts still showing). */
.highfive { --cubic-out: cubic-bezier(.33, 1, .68, 1); --cubic-in: cubic-bezier(.32, 0, .67, 0); }
.highfive .hf__hand--l { transform-origin: 20px 400px; animation: hf-left 2s linear infinite; }
.highfive .hf__hand--r { transform-origin: 560px 400px; animation: hf-right 2s linear infinite; }
/* Cubic easing per leg: ease-out to pull apart, ease-in to slap, ease-out to settle */
@keyframes hf-left { 0%, 3.86% { transform: none; animation-timing-function: var(--cubic-out); } 17.39% { transform: translate(-24px, 6px) rotate(-5deg); animation-timing-function: linear; } 28.98% { transform: translate(-24px, 6px) rotate(-5deg); animation-timing-function: var(--cubic-in); } 33.81% { transform: translate(8px, 0) rotate(2deg); animation-timing-function: var(--cubic-out); } 40.56%, 100% { transform: none; } }
@keyframes hf-right { 0%, 3.86% { transform: none; animation-timing-function: var(--cubic-out); } 17.39% { transform: translate(24px, 6px) rotate(5deg); animation-timing-function: linear; } 28.98% { transform: translate(24px, 6px) rotate(5deg); animation-timing-function: var(--cubic-in); } 33.81% { transform: translate(-8px, 0) rotate(-2deg); animation-timing-function: var(--cubic-out); } 40.56%, 100% { transform: none; } }
.highfive .hf__burst { animation: hf-burst 2s var(--cubic-out) infinite; }
.highfive .hf__burst--l { transform-origin: 119.3px 53.7px; }
.highfive .hf__burst--r { transform-origin: 482.2px 55.6px; }
@keyframes hf-burst { 0%, 3.86% { transform: scale(1.04); opacity: 1; } 17.39% { transform: scale(1.12); opacity: 0; } 31.87% { transform: scale(.15); opacity: 0; } 37.67% { transform: scale(1.25); opacity: 1; } 44.43% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.04); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .highfive * { animation: none !important; } }
/* Delivery truck (top-left tile). Body and far wheels ride on the suspension and bump along; the near wheels bump less; each fruit sways on
   its own about its base, out of step with the others; the dark burst at the cab corner pops out and fades, like the high five's. */
.truck .tr__body { transform-origin: 300px 410px; animation: tr-bump 1.3s linear infinite; }
.truck .tr__wheels { animation: tr-bump-wheels 1.3s linear infinite; }
@keyframes tr-bump { 0%, 100% { transform: translateY(0) rotate(0); } 10% { transform: translateY(-9px) rotate(-.5deg); } 22% { transform: translateY(0) rotate(0); } 38% { transform: translateY(-5px) rotate(.4deg); } 50% { transform: translateY(0) rotate(0); } 68% { transform: translateY(-8px) rotate(-.4deg); } 80% { transform: translateY(0) rotate(0); } 90% { transform: translateY(-3px) rotate(.2deg); } }
@keyframes tr-bump-wheels { 0%, 100% { transform: translateY(0); } 10% { transform: translateY(-3px); } 22% { transform: translateY(0); } 38% { transform: translateY(-2px); } 50% { transform: translateY(0); } 68% { transform: translateY(-3px); } 80% { transform: translateY(0); } 90% { transform: translateY(-1px); } }
.truck .tr__fruit { transform-box: fill-box; transform-origin: 50% 100%; animation: tr-sway 3s ease-in-out infinite; }
.truck .tr__fruit--1 { animation-duration: 3.4s; animation-delay: -0.6s; }
.truck .tr__fruit--2 { animation-duration: 2.7s; animation-delay: -1.9s; }
.truck .tr__fruit--3 { animation-duration: 3.1s; animation-delay: -1.1s; }
.truck .tr__fruit--4 { animation-duration: 2.4s; animation-delay: -0.3s; }
.truck .tr__fruit--5 { animation-duration: 3.7s; animation-delay: -2.4s; }
@keyframes tr-sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
/* Sparkles over the fruit, like the piggy: the star spins a full turn while it swells to 1.5x and settles back; the dots swell and settle out of step */
.truck .tr__spark, .truck .tr__dot { transform-box: fill-box; transform-origin: 50% 50%; }
.truck .tr__spark { animation: tr-spark 3.2s ease-in-out infinite; }
@keyframes tr-spark { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.5); } 100% { transform: rotate(360deg) scale(1); } }
.truck .tr__dot { animation: tr-dot 2.4s ease-in-out infinite; }
.truck .tr__dot--1 { animation-delay: -0.4s; }
.truck .tr__dot--2 { animation-delay: -1.2s; }
.truck .tr__dot--3 { animation-delay: -2s; }
@keyframes tr-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.6); } }
.truck .tr__burst { transform-origin: 88px 212px; animation: tr-burst 2.6s var(--cubic-out, cubic-bezier(.33, 1, .68, 1)) infinite; }
@keyframes tr-burst { 0%, 14% { transform: scale(.15); opacity: 0; } 22% { transform: scale(1.25); opacity: 1; } 30% { transform: scale(1); opacity: 1; } 62% { transform: scale(1.06); opacity: 1; } 78%, 100% { transform: scale(1.12); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .truck * { animation: none !important; } }
/* Hand and phone (top-left tile), one 3s loop: the hand swings from up to down and back about the wrist, which stays put (a small skew warps it as it goes), ending in the drawn pose at the bottom (the pose the sparkle and dot are placed against), the orange sparkle spins in and
   out at the top of the lift, and the small dot swells then settles. Everything shows (at rest) when animation is off. */
.handphone .hp__hand { transform-origin: 400px 360px; animation: hp-offer 3s var(--cubic-io, cubic-bezier(.65, 0, .35, 1)) infinite; }
@keyframes hp-offer { 0%, 100% { transform: rotate(14deg) skewY(4deg); } 38%, 56% { transform: none; } }
.handphone .hp__spark, .handphone .hp__dot { transform-box: fill-box; transform-origin: 50% 50%; translate: -25px -4.5px; } /* placed from the reference: both shift 25 units left and 4.5 up from where they are drawn, which keeps them clear of the card and keeps their spacing */
.handphone .hp__spark { animation: hp-spark 3s ease-out infinite; }
@keyframes hp-spark { 0%, 14% { transform: rotate(0) scale(0); } 38% { transform: rotate(360deg) scale(1.2); } 48%, 74% { transform: rotate(360deg) scale(1); } 90%, 100% { transform: rotate(360deg) scale(0); } }
.handphone .hp__dot { animation: hp-dot 3s ease-in-out infinite; }
@keyframes hp-dot { 0%, 28%, 100% { transform: scale(1); } 46% { transform: scale(1.6); } 66% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .handphone * { animation: none !important; } }
.gallery .g-phone  { --v: 6; }
.gallery .g-social { --v: 22; }
.gallery .g-forms  { --v: 2; }
.gallery .g-log    { --v: 18; }
.gallery .g-photo  { --v: 9; }

/* Icons tile: nine inline line icons laid out like the original artwork (884x660, scaled to cover the tile).
   Three of them animate: phone waves, hourglass flip, message typing dots. */
.gallery .g-icongrid { position: relative; overflow: hidden; container-type: size; background: #f8f3f1; }
.gi-stage {
  position: absolute; left: 50%; top: 50%;
  width: max(100cqw, calc(100cqh * 884 / 660)); aspect-ratio: 884 / 660;
  transform: translate(-50%, calc(-50% + clamp(-5.3%, calc(var(--p, 0) * var(--s, 10) * var(--d, 1) * 1%), 5.3%)));
  will-change: transform;
}
.gi { position: absolute; left: var(--x); top: var(--y); width: 8.14%; height: auto; transform: translate(-50%, -50%); color: #454240; overflow: visible; }
/* Icon motion: no fades and no warping. Phone and chart use line tracing (stroke-dash on pathLength=100 strokes);
   the chat dots swell in place. Without animation (reduced motion) everything shows fully drawn. */
/* Phone: each wave traces out from the middle of its arc towards both ends. The inner wave goes first, then the
   outer one, they hold, then collapse back to the middle in the same order and the loop restarts. */
@keyframes gi-wave-1 {
  0%, 100% { stroke-dasharray: 0 200; stroke-dashoffset: -50; }
  18%, 62% { stroke-dasharray: 100 200; stroke-dashoffset: 0; }
  78%      { stroke-dasharray: 0 200; stroke-dashoffset: -50; }
}
@keyframes gi-wave-2 {
  0%, 16%, 100% { stroke-dasharray: 0 200; stroke-dashoffset: -50; }
  36%, 68% { stroke-dasharray: 100 200; stroke-dashoffset: 0; }
  86%      { stroke-dasharray: 0 200; stroke-dashoffset: -50; }
}
.gi--phone .wave { stroke-dasharray: 100 200; stroke-dashoffset: 0; animation-duration: 2.6s; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.gi--phone .wave-1 { animation-name: gi-wave-1; }
.gi--phone .wave-2 { animation-name: gi-wave-2; }
/* Chart: the trend line is traced from bottom-left to the arrow; the arrowhead starts drawing out of its corner just
   as the line gets there, so the end always reads as an arrow. The line then retracts and the arrowhead goes last.
   The bars stay put. */
@keyframes gi-trace { 0% { stroke-dashoffset: 100; } 50%, 78% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@keyframes gi-trace-arrow { 0%, 40% { stroke-dashoffset: 100; } 52%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
.gi--chart .trend, .gi--chart .arrow { stroke-dasharray: 100 100; stroke-dashoffset: 0; }
.gi--chart .trend { animation: gi-trace 2.8s ease-in-out infinite; }
.gi--chart .arrow { animation: gi-trace-arrow 2.8s ease-in-out infinite; }
/* Truck: the line through the middle of the cargo box is traced from the back to the front, held, then retracted the same
   way, while the body bumps over the wheels (the wheels stay planted). */
@keyframes gi-mid { 0% { stroke-dashoffset: 100; } 42%, 68% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@keyframes gi-bump { 0%, 100% { transform: translateY(0); } 20% { transform: translateY(-3px); } 40% { transform: translateY(0); } 60% { transform: translateY(-1.8px); } 80% { transform: translateY(0); } }
.gi--truck .mid { stroke-dasharray: 100 100; stroke-dashoffset: 0; animation: gi-mid 1.8s ease-in-out infinite; }
.gi--truck .chassis { animation: gi-bump 1.2s ease-in-out infinite; }
/* Hourglass: the glass simply turns over (a full 360 degrees, in two half-turns with a pause after each). */
@keyframes gi-flip { 0%, 30% { transform: rotate(0); animation-timing-function: ease-in-out; } 44%, 78% { transform: rotate(180deg); animation-timing-function: ease-in-out; } 92%, 100% { transform: rotate(360deg); } }
.gi--hourglass .glass { transform-origin: 36px 37.5px; animation: gi-flip 8s infinite; }
/* Chat: dots hop up one after another and swell a little, then settle back to size */
@keyframes gi-type { 0%, 55%, 100% { transform: translateY(0) scale(1); } 25% { transform: translateY(-4px) scale(1.35); } }
.gi--message .dot { transform-box: fill-box; transform-origin: center; animation: gi-type 1.2s ease-in-out infinite; }
.gi--message .dot-2 { animation-delay: .15s; }
.gi--message .dot-3 { animation-delay: .3s; }
@media (max-width: 900px) { .gi-stage { transform: translate(-50%, -50%); will-change: auto; } }
@media (prefers-reduced-motion: reduce) { .gi * { animation: none !important; } }

/* Phone tile: looping mockup. Three screens cross-fade while the tile background fades to match.
   The layer drifts with the parallax exactly like the other tiles' images; edges are hard-cropped by the tile. */
.gallery .g-phone.mock { background: #e3d4fd; }
.gallery .g-phone.mock::before { display: none; }
.mock__bg { position: absolute; inset: 0; opacity: 0; transition: opacity 700ms ease-in-out; }
.mock__bg.on { opacity: 1; }
.mock__bg[data-c="1"] { background: #e3d4fd; }
.mock__bg[data-c="2"] { background: #e6f3dd; }
.mock__bg[data-c="3"] { background: #d6ecfd; }
.mock__layer {
  position: absolute; inset: -6% 0;
  transform: translate3d(0, clamp(-5.3%, calc(var(--p, 0) * var(--s, 10) * var(--d, 1) * 1%), 5.3%), 0);
  will-change: transform;
}
.mock__stage { position: absolute; left: 0; top: 0; width: 2000px; height: 1499px; transform-origin: 0 0; will-change: transform; }
.mock__shapes { position: absolute; inset: 0; }
.mock__shape { position: absolute; height: auto; opacity: 0; transition: opacity 700ms ease-in-out; }
.mock__shape.on { opacity: 1; }
.mock__shape { transform-origin: 50% 50%; animation: mock-spin 120s linear infinite; will-change: transform, opacity; }
@keyframes mock-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mock__shape { animation: none; } }
/* Placement in the 2000x1499 stage, matched to the Figma preview. */
.mock__shape[data-c="1"] { left: 270px; top: -13px; width: 1500px; }
.mock__shape[data-c="2"] { left: 270px; top: 49px; width: 1500px; }
.mock__shape[data-c="3"] { left: 245px; top: -35px; width: 1550px; }
.mock__shots { position: absolute; inset: 0; }
.mock__shot { position: absolute; left: 0; top: 0; width: 2000px; height: 1499px; opacity: 0; transition: opacity 700ms ease-in-out; will-change: opacity; backface-visibility: hidden; }
.mock__shot.on { opacity: 1; }
/* First image is the permanent base layer (hand never fades); the others fade in/out on top of it. */
.mock__shot:first-child { opacity: 1; transition: none; }
.mock__shot.cut { transition: none; }
@media (max-width: 900px) { .mock__layer { inset: 0; transform: none; will-change: auto; } .mock__stage, .mock__shot, .mock__shape { will-change: auto; } }
@media (prefers-reduced-motion: reduce) { .mock__bg, .mock__shot, .mock__shape { transition-duration: 1ms; } }

.g-icons  { grid-column: 1;     grid-row: 1 / 3; }
.g-phone  { grid-column: 2 / 4; grid-row: 1 / 3; }
.g-social { grid-column: 4;     grid-row: 1; }
.g-forms  { grid-column: 1 / 3; grid-row: 3; }
.g-log    { grid-column: 3;     grid-row: 3; }
.g-photo  { grid-column: 4;     grid-row: 2 / 4; }

/* Logos: single-line marquee, drifts left to right */
.logos {
  width: min(1448px, calc(100% - 48px));
  margin: 130px auto 0;
  overflow: hidden;
  position: relative;
}
/* Edge fade: white gradient overlays instead of a mask-image on the moving strip
   (masking an animated element makes iOS Safari drop images). */
.logos::before, .logos::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 12%;
  z-index: 1;
  pointer-events: none;
}
.logos::before { left: 0;  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.logos::after  { right: 0; background: linear-gradient(to left,  #fff, rgba(255, 255, 255, 0)); }
.logos__track {
  display: flex;
  width: max-content;
  animation: logos-drift 15s linear infinite;
}
.logos__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 64px;
  padding-right: 64px;
}
.logos__group img { flex-shrink: 0; width: auto; height: var(--h); display: block; }
@keyframes logos-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logos__track { animation: none; }
}

/* About */
.about {
  width: min(1311px, calc(100% - 48px));
  margin: 100px auto 0;
  display: grid;
  grid-template-columns: 1fr 374px;
  column-gap: 32px; /* keeps the copy off the photo when the window gets narrow */
  align-items: start;
}
/* About title: wide window: "…Visual and Motion / Design, powered by AI"; narrower: 4 lines (break after "Visual and") */
.section-title br.w3 { display: none; }
@media (min-width: 1320px) { .section-title br.n3 { display: none; } .section-title br.w3 { display: inline; } }
.section-title {
  font-size: clamp(38px, 6.5vw, 70px);
  line-height: 110%;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.about__text p {
  max-width: 760px;
  margin-top: 30px;
  font-size: 21px;
  line-height: 30px;
}
.section-title + p { margin-top: 36px; }
/* Marker highlight on the key phrase: soft purple (the hero icon colour) behind dark text, clone keeps it tidy across line breaks. */
.about__text strong {
  font-weight: 550;
  background: linear-gradient(rgba(106, 101, 244, 0.18), rgba(106, 101, 244, 0.18)) no-repeat left center / 100% 100%;
  transition: background-size 0.9s cubic-bezier(.16, 1, .3, 1);
  border-radius: 4px;
  padding: 0 0.15em;
  margin: 0 -0.15em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* The script adds .hl-pending on load and removes it when the paragraph scrolls into view, so the marker sweeps across. */
.about__text strong.hl-pending { background-size: 0% 100%; transition: none; }
.about__photo { height: 486px; background: var(--block) url("assets/about.webp") center / cover no-repeat; }

/* The dividers are drawn by the row's ::before/::after (see "About links hover" at the end of this file),
   not by borders, so the hover can recolor the very same line. The 1px paddings keep the old row heights. */
.about__links { width: 100%; max-width: 743px; margin-top: 62px; }
.about__links li { padding-top: 1px; }
.about__links li:last-child { padding-bottom: 1px; }
.about__links a {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 99px;
  font-size: 32px;
  font-weight: 500;
  line-height: 110%;
  letter-spacing: -0.03em;
}
.about__links .arrow {
  flex: none;
  width: 32px;
  height: 32px;
  background: currentColor;
  -webkit-mask: url("assets/arrow-up-right.svg") center / contain no-repeat;
  mask: url("assets/arrow-up-right.svg") center / contain no-repeat;
}

/* Selected work */
.work { width: min(1550px, calc(100% - 48px)); margin: 0 auto; padding: 156px 0 140px; } /* same gutters as header/.about */

/* Footer: a hairline the width of the content (not full-bleed), in the page gutters. Top: role + big name, then Explore and Socials
   link columns (small gray headings). Bottom: copyright and back to top. */
.sf { width: min(1550px, calc(100% - 48px)); margin: 0 auto; display: flex; flex-direction: column; gap: 72px; padding: 88px 0 48px; border-top: 1px solid #dadada; color: var(--ink); }
.sf__top { display: grid; grid-template-columns: 1.7fr 1fr 1fr auto; gap: 48px 32px; align-items: start; } /* name, Explore, Socials, Language */
@media (max-width: 1024px) { .sf__top { grid-template-columns: 1fr 1fr auto; gap: 40px 32px; } .sf__intro { grid-column: 1 / -1; } } /* tablets: name on top, three columns below */
.sf__label { margin: 0 0 24px; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--muted); }
.sf__intro .sf__label { margin-bottom: 12px; font-size: 18px; line-height: 24px; font-weight: 500; color: var(--ink); }
.sf__label .hero__icon { width: 14px; height: 14px; margin: 0 6px 0 0; vertical-align: -1px; } /* the hero's spinning AI star, small, before the text */ /* the role line is a bit larger */
.sf__label .hero__icon path { fill: var(--ink); } /* black star instead of the hero purple */
.sf__name { margin: 0; width: min-content; font-size: clamp(40px, 5.2vw, 72px); line-height: 1.05; font-weight: 500; letter-spacing: -0.03em; }
.sf__col .lang { width: fit-content; }
.sf__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sf__list a { font-size: 32px; line-height: 38px; font-weight: 500; letter-spacing: -0.03em; }
.sf__bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 14px; line-height: 20px; }
.sf__copy { font-size: 14px; color: var(--muted); }
.sf .sf__top-link { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; background: #F9F4F1; color: var(--ink); font-weight: 500; transition: background-color .3s ease-out, color .3s ease-out; } /* rounded box in the language selector gray; turns black on hover */
@media (hover: hover) { .sf .sf__top-link:hover { opacity: 1; background: #000; color: #fff; } }
.sf a { color: var(--ink); transition: opacity .2s ease-out; }
@media (hover: hover) { .sf a:hover { opacity: .6; } }
@media (max-width: 800px) {
  .sf { gap: 40px; padding: 80px 0 32px; }
  .sf__top { grid-template-columns: 1fr; gap: 40px; } /* phones: name, then Explore, Socials and Language, one per row */
  .sf__label { margin-bottom: 12px; } /* tighter label-to-links gap */
  .sf__name { font-size: clamp(36px, 11vw, 56px); }
  .sf__bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
}
.work__grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  row-gap: 64px;
}
.card__img { aspect-ratio: 823 / 500; }
/* Home work cards: the image comes from --bg; phones use the ~900px copy (--bg-sm) */
.work .card__img[style*="--bg"] { --bg-r: var(--bg); background-image: var(--bg-r); }
@media (max-width: 900px) { .work .card__img[style*="--bg"] { --bg-r: var(--bg-sm, var(--bg)); } }
/* Selected work (home): while the card is hovered the project image dims to 70% and zooms to 103% inside its box.
   The zoom runs on a ::before that copies the box's own (inline) background, so the box itself stays put and clips it. */
.work .card__img, .case__more .card__img { position: relative; overflow: hidden; isolation: isolate; transition: opacity .25s ease-out; }
.work .card__img::before, .case__more .card__img::before { content: ""; position: absolute; inset: 0; background: inherit; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
/* Same film grain as the gallery tiles, over the home page thumbnails (case pages have none) */
.work .card__img::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 220px 220px;
  mix-blend-mode: soft-light; opacity: .6;
}
@media (hover: hover) {
  .work .card:hover .card__img, .case__more .card:hover .card__img { opacity: .7; }
  .work .card:hover .card__img::before, .case__more .card:hover .card__img::before { transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) { .work .card__img, .case__more .card__img, .work .card__img::before, .case__more .card__img::before { transition: none; } }
.card h3 {
  margin-top: 24px;
  font-size: 36px;
  line-height: 110%;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.card p { margin-top: 4px; font-size: 20px; line-height: 28px; color: var(--muted); }

/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
  .header { height: 88px; }
  .hero { padding: 40px 48px 40px; }
  .section-title br { display: none; }
  .gallery { margin: 32px 16px 0; }
  .logos { margin-top: 80px; }

  .about { grid-template-columns: minmax(0, 1fr); margin-top: 80px; } /* minmax(0,…): a long word can't stretch the column past the gutters */
  .about__text h2 { overflow-wrap: break-word; }
  .about__photo { order: -1; width: 100%; max-width: 530px; height: auto; aspect-ratio: 1062 / 764; margin: 0 0 40px; background-image: url("assets/about-wide.webp"); }
  .about__text p { font-size: 19px; line-height: 28px; }
  .about__links { margin-top: 48px; }
  .about__links a { height: 80px; }

  .work { padding: 96px 0; }
  .card h3 { font-size: 30px; }
  .card p { font-size: 18px; }
}

/* ---------- Compact gallery (≤900px) ---------- */
@media (max-width: 900px) {
  /* Gallery: same bento grid as desktop, scaled down and wider than the screen so the
     outer tiles are cropped at the sides (fixed, phone tile centred) */
  .gallery {
    --u: clamp(0.33px, calc((100vw - 172px) / 554), 1px); /* 0.33px floor: below ~355px wide the grid stays wider than the screen, so the sides still crop */ /* phone tile = screen width minus 80px each side, so neighbours peek in at any width */
    margin: 32px 0 0;
    aspect-ratio: auto;
    gap: 12px;
    grid-template-columns: calc(260 * var(--u)) calc(282 * var(--u)) calc(272 * var(--u)) calc(272 * var(--u));
    grid-template-rows: calc(203 * var(--u) * 1.35) calc(85 * var(--u) * 1.35) calc(239 * var(--u) * 1.35); /* rows taller than the width scale: 1.35x */
    justify-content: center; /* centres the phone tile; the wider grid overflows equally both sides */
    overflow-x: clip; overflow-y: visible; /* crop the sides, but let tiles drift vertically */
    --k: 1;
  }
  .gallery .ph { border-radius: 16px; clip-path: inset(0 round 16px); transform: none; will-change: auto; }
  /* Static images on phones (parallax is off, see the gallery script): no drifting layer */
  .gallery .ph--img::before { inset: 0; transform: none; will-change: auto; }
}

/* Very narrow phones: shrink the header so nav + language switch fit between the gutters */
@media (max-width: 360px) {
  .header .nav { gap: 14px; font-size: 14px; }
  .header .lang { gap: 2px; padding: 3px; }
  .header .lang__item { padding: 8px 8px 6px; gap: 4px; }
}

/* ---------- Phone (≤640px) ---------- */
@media (max-width: 640px) {
  .header { height: 72px; }
  .nav { gap: 20px; font-size: 15px; }
  .lang__item { padding: 8px 12px 6px; gap: 6px; }
  .nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .nav a::after { top: calc(50% + 14px); } /* the tap target is 44px tall; keep the line 4px under the text */
  .nav a.nav__linkedin { display: none; } /* phones: only Work + About */

  .hero { padding: 40px 24px 32px; }
  .hero__hi { font-size: 22px; }
  .hero__text { margin-inline: 0; width: auto; } /* left-aligned with the 24px gutter */
  .hero__title br.d { display: none; }
  .hero__title br.m { display: inline; }
  .hero__title { font-size: calc(100cqw / 7.9); }
  :lang(pt-BR) .hero__title { font-size: calc(100cqw / 7.9); } /* widest PT phone line ≈ 7.78em */


  .logos { width: calc(100% - 48px); margin-top: 56px; }
  .logos__group { gap: 32px; padding-right: 32px; }
  .logos__group img { height: calc(var(--h) * .8); }

  .about { margin-top: 64px; }
  .about__photo { margin-bottom: 32px; aspect-ratio: 1062 / 658; background-image: url("assets/about-mobile.webp"); }
  .section-title + p { margin-top: 24px; }
  .about__text p { margin-top: 20px; font-size: 17px; line-height: 26px; }
  .about__links { margin-top: 36px; }
  .about__links a { height: 64px; gap: 16px; font-size: 24px; }
  .about__links .arrow { width: 24px; height: 24px; }

  .work { padding: 72px 0; } /* phones: 72px above the footer divider ... */
  .sf { padding-top: 72px; } /* ... and 72px below it */
  .work__grid { grid-template-columns: 1fr; row-gap: 40px; margin-top: 32px; }
  .card h3 { margin-top: 16px; font-size: 26px; line-height: 110%; }
  .card p { font-size: 16px; line-height: 24px; }
  .ph { border-radius: 18px; }
  i.ph { border-radius: 8px; }
  .ph--flag { border-radius: 3px; }
  .ph--icon { border-radius: .22em; }
}

/* Touch: replace hover with press feedback */
@media (hover: none) {
  .about__links a:active, .nav a:active { opacity: .6; }
}

/* Hero intro: words rise + fade in one at a time. Delay comes from --d (set by script). */
.wt-word { animation: wt-rise 1s cubic-bezier(.16, 1, .3, 1) var(--d, 0s) both; }
.wt-word { display: inline-block; }
@keyframes wt-rise { 0% { opacity: 0; translate: 0 .35em; } }
.wt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .wt-word { animation: none; } }

/* Header + gallery entrance: a very subtle fade-in on load */
.nav, .gallery { animation: header-fade 1.05s ease-out both; }
@keyframes header-fade { from { opacity: 0; } }
.lang-switch .nav { animation: none; } /* set by the head script after a language switch */
@media (prefers-reduced-motion: reduce) { .nav, .gallery { animation: none; } }


/* Scroll-triggered word rise (about title): words stay hidden/paused until .wt-in is added */
.wt-scroll .wt-word { animation-duration: 1s; animation-play-state: paused; } /* 9 gaps × 55ms + 1s ≈ 1.5s */
.wt-scroll.wt-in .wt-word { animation-play-state: running; }

/* Scroll-in entrance fade (class toggled by script): logos, about copy/links/photo, work title and cards */
.logos, .about__text p, .about__links, .about__photo, .card, .case__fade { transition: opacity 1.05s ease-out; }
.fade-pending { opacity: 0; }


/* ---------- Project page (recipes.html) ---------- */
.card { position: relative; }
.card__link { position: absolute; inset: 0; z-index: 1; border-radius: 26px; }

.case { width: min(1311px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 140px; }
.case__intro { padding-top: 80px; }
@media (min-width: 641px) { .case__intro:has(.case__back) { padding-top: 64px; } } /* pages with the back arrow: 64px from the header to the arrow (phones keep 24px) */
.case__back { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0 0 16px; padding: 0; border-radius: 50%; background: #F9F4F1; color: var(--ink); line-height: 0; transition: background-color .3s ease-out, color .3s ease-out; } /* 14px back arrow (flipped), centred in a 40px round light box in the language switch pill fill */
@media (hover: hover) { .case__back:hover { opacity: 1; background: #000; color: #fff; } } /* same hover as the footer's Back to top button: turns black, arrow white */
.case__back svg { display: block; width: 14px; height: 14px; transform: scaleX(-1); }
.case__intro .section-title { max-width: 1000px; }
.case__intro .case__lead { margin: 12px 0 0; max-width: 1000px; font-size: 21px; line-height: 30px; }
.case__hero { margin-top: 56px; aspect-ratio: 1311 / 600; background: var(--block) var(--img, none) center / cover no-repeat; }
/* Logo laid over a hero, centered in the free right side: 85% of its 243x61 size in the 1311x600 design */
.case__hero--logo { position: relative; }
.case__logo { position: absolute; left: 74.09%; top: 45.68%; width: 15.755%; height: auto; overflow: visible; }
.case__logo .wt-word { font-size: 80px; animation-duration: 1.3s; } /* 80px sets the heading rise (.35em) in the logo's own units; slower than the 1s headings */
.case__logo.wt-reset .wt-word { animation: none; } /* toggled by project.js to replay the loop */

.case__meta { border-bottom: 1px solid #F4EBE6; }
.case__meta dl { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 32px; margin: 0; padding: 64px 0 48px; }
.case__meta dt { font-size: 14px; color: var(--muted); }
.case__meta dd { margin: 8px 0 0; font-size: 18px; line-height: 26px; font-weight: 500; }

.case__row { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 800px; margin: 80px auto 0; } /* title and text share one 800px column */
.case__h { font-size: 44px; line-height: 52px; font-weight: 500; letter-spacing: -0.03em; }
.case__row:has(.case__sub) { gap: 12px; } /* label (h3) to statement (h2) */
.case__h3 { font-size: 18px; line-height: 26px; font-weight: 400; letter-spacing: normal; color: var(--muted); } /* same type as the problem-box titles, kept gray */
.case__body { max-width: 800px; }
.case__body p { font-size: 21px; line-height: 30px; }
.case__body p + p, .case__sub + p { margin-top: 24px; }
.case__body .case__sub { font-size: 44px; line-height: 52px; font-weight: 500; letter-spacing: -0.03em; }

/* Main problems: outlined cards, title on top, number pinned to the bottom (same look as the results cards) */
.case__problems { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.case__problems li { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 200px; padding: 32px; background: #F9F4F1; border-radius: 24px; } /* = the language selector's active-pill tint */
.case__problems h3 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 500; letter-spacing: -0.03em; }
.case__problems span { font-size: 56px; line-height: 64px; font-weight: 500; letter-spacing: -0.03em; }
@media (max-width: 640px) {
  .case__problems { grid-template-columns: 1fr; margin-top: 40px; }
  .case__problems li { min-height: 0; padding: 24px; border-radius: 16px; }
  .case__problems span { font-size: 52px; line-height: 58px; } /* same step-down as the results figures on phones */
}

.case__fig { margin-top: 64px; aspect-ratio: 1311 / 600; background: var(--block) var(--img, none) center / cover no-repeat; }
.case__figs { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 64px; container-type: inline-size; }
.case__figs .case__fig { margin-top: 0; aspect-ratio: auto; height: calc(100cqw * 600 / 1311); } /* same height as the full-width figures */

/* "See it live" store buttons: outlined pill (16px top and bottom, 32px sides), icon + two lines; hover turns it black (the Play icon keeps its colors) */
.case__stores { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.case__store { display: inline-flex; align-items: center; gap: 12px; padding: 16px 32px; border: 1px solid rgba(1, 2, 2, .25); border-radius: 999px; background: #fff; color: #010202; cursor: pointer; transition: background-color .3s ease-out, border-color .3s ease-out, color .3s ease-out; }
.case__store-icon { flex: none; width: 28px; height: 32px; }
.case__store--play .case__store-icon { width: 29px; }
.case__store-text { display: flex; flex-direction: column; text-align: left; white-space: nowrap; }
.case__store-text small { font-size: 12px; line-height: 14px; font-weight: 500; }
.case__store-text strong { font-size: 21px; line-height: 24px; font-weight: 500; letter-spacing: -0.01em; }
@media (hover: hover) { .case__store:hover { opacity: 1; background: #000; border-color: #000; color: #fff; } }
@media (max-width: 640px) { .case__stores { gap: 8px; margin-top: 24px; } }

.case__more { margin-top: 140px; }
.case__results { margin-top: 114px; }
.case__results .section-title { font-size: 44px; line-height: 52px; } /* same size as the other case-study section titles (.case__h) */
.case__results ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 64px; }
/* White cards: title + text on top, the big figure pinned to the bottom */
.case__results li { display: flex; flex-direction: column; padding: 40px; background: #F9F4F1; border-radius: 24px; } /* same fill as the 01/02/03 problem boxes */
.case__results strong { order: 3; margin-top: auto; padding-top: 32px; display: flow-root; font-size: 68px; line-height: 77px; font-weight: 500; letter-spacing: -0.03em; }
.case__results .case__icon { display: block; width: auto; height: 52px; margin: 12px 0 13px; } /* sits in the 77px numeral line */
.case__results h3 { order: 1; font-size: 28px; line-height: 32px; font-weight: 500; letter-spacing: -0.03em; }
.case__results li p { order: 2; margin-top: 16px; font-size: 18px; line-height: 26px; color: var(--muted); }
.case__more .work__grid { margin-top: 48px; grid-template-columns: repeat(3, 1fr); } /* the other 3 projects */
.case__more .card h3 { font-size: 28px; }
.case__more .card p { font-size: 18px; }

@media (max-width: 1024px) {
  .case__row { gap: 20px; margin-top: 56px; }
  .case__meta dl { grid-template-columns: repeat(2, 1fr); }
  .case__results ul { grid-template-columns: 1fr; margin-top: 48px; }
  .case__results li { min-height: 0; }
  .case__more { margin-top: 96px; }
  .case__more .work__grid { column-gap: 20px; }
  .case__more .card h3 { font-size: 24px; }
  .case__results { margin-top: 80px; }
}
@media (max-width: 800px) {
  .case__more .work__grid { grid-template-columns: 1fr; row-gap: 40px; } /* 3 across gets too tight: stack */
  .case__more .card h3 { font-size: 28px; }
}
@media (max-width: 640px) {
  .case { padding-bottom: 72px; }
  .case__intro { padding-top: 24px; }
  .case__lead, .case__body p { font-size: 17px; line-height: 26px; }
  .case__body .case__sub { font-size: 32px; line-height: 38px; }
  .case__hero { margin-top: 36px; height: auto; aspect-ratio: 4 / 3; }
  .case__hero[style*="--img-sm"] { background-image: var(--img-sm); } /* a header with its own phone image (Organic keeps the taller photo) */
  /* Logo hero on phones: same 4:3 as the other heroes. The crop shows 22.5% to 83.6% of the photo, keeping the face and
     leaving a plain strip on the right, where the logo moves to. */
  .case__hero--logo { background-position: 57.8% center; }
  .case__logo { left: 74.5%; top: 46.85%; width: 18.8%; } /* top: half the height minus half the logo (6.3% of it at 4:3) */

  .case__meta dl { grid-template-columns: 1fr; gap: 20px; }
  .case__h { font-size: 32px; line-height: 38px; }
  .case__row { margin-top: 44px; }
  .case__fig { margin-top: 40px; aspect-ratio: 4 / 3; }
  .case__figs { grid-template-columns: 1fr; gap: 16px; margin-top: 40px; }
  .case__figs .case__fig { height: auto; aspect-ratio: 4 / 3; }
  .case__results ul { margin-top: 36px; }
  .case__results li { padding: 24px; border-radius: 16px; }
  .case__results .section-title { font-size: 32px; line-height: 38px; }
  .case__results h3 { font-size: 26px; line-height: 30px; }
  .case__results strong { font-size: 52px; line-height: 58px; }
  .case__results .case__icon { width: auto; height: 40px; margin: 9px 0; }
  .case__more .work__grid { grid-template-columns: 1fr; }
}

/* Desktop (1025px and up): 32px page side margin. Gallery keeps its own 16px margin.
   Kept at the end of the file so it wins over the base width rules above. */
@media (min-width: 1025px) {
  .about, .case { width: min(1311px, calc(100% - 64px)); }
  .header, .work, .sf { width: min(1550px, calc(100% - 64px)); }
  .logos { width: min(1448px, calc(100% - 64px)); }
  .hero { padding-left: 32px; padding-right: 32px; }
}

/* Below 1600px: smaller section titles (70px -> 62px cap) and About text.
   Phones/tablets already scale down via vw/clamp and their own breakpoints. */
@media (max-width: 1599px) {
  .section-title { font-size: clamp(38px, 6.5vw, 62px); }
}

/* Very narrow screens: the 38px floor is too big ("potencializada" alone is ~6.6em wide), so section
   titles use the hero title's phone formula: the width between the 24px gutters / 7.9.
   body is the size container so cqw is the page width without the scrollbar (the hero measures its own box). */
@media (max-width: 360px) {
  body { container-type: inline-size; }
  .section-title { font-size: min(38px, calc((100cqw - 48px) / 7.9)); }
  .card h3 { font-size: min(26px, calc((100cqw - 48px) / 11.6)); } /* project titles stay smaller than the section title, as on desktop: 26/38 = 0.68 of (width / 7.9) */
}
@media (min-width: 1025px) and (max-width: 1599px) {
  .about__text p { font-size: 20px; line-height: 28px; }
}

/* Project pages, 1025-1599px: tighter gap between the nav and the first heading */
@media (min-width: 1025px) and (max-width: 1599px) {
  .case__intro { padding-top: 32px; }
}

/* Project facts with 5 items (e.g. a Year column): 5 columns on desktop instead of wrapping a 5th onto a new row */
@media (min-width: 1025px) {
  .case__meta dl:has(> div:nth-child(5)) { grid-template-columns: repeat(5, auto); }
}

/* Nav anchors (Work / About): land with 48px of breathing room above the section title.
   The eased scrolling itself is the small script at the end of index.html. */
#work, #about, #about-photo { scroll-margin-top: 48px; } /* #about-photo: the About link's target when the photo is stacked above the text */

/* Logo strip tooltip: black pill with a rounded caret, white text.
   Positioned and shown by the small script at the end of index.html. */
.logos-tip {
  position: fixed;
  z-index: 100;
  left: 0; top: 0;
  --caret: 0px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% + 6px)) scale(.96);
  transform-origin: calc(50% + var(--caret)) 100%;
  transition: opacity .18s ease-out, transform .18s ease-out;
}
.logos-tip.on { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.logos-tip::after { /* caret: rotated square with a soft corner, pointing down at the pointer */
  content: "";
  position: absolute;
  left: calc(50% + var(--caret));
  bottom: -5px;
  width: 14px; height: 14px;
  background: #000;
  border-radius: 0 0 4px 0;
  transform: translateX(-50%) rotate(45deg);
}
@media (prefers-reduced-motion: reduce) { .logos-tip { transition: none; } }

/* "View project" tooltip on the Selected work cards: same purple pill as the logo tooltip, sitting just below-right of the
   pointer with a small square top-left corner (the pointer side). The label is typed by the script at the end of index.html. */
.work-tip {
  position: fixed;
  z-index: 100;
  left: 0; top: 0;
  padding: 10px 18px;
  border-radius: 4px 999px 999px 999px;
  background: #000;
  color: #fff;
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: scale(.96);
  transform-origin: 0 0;
  transition: opacity .18s ease-out, transform .18s ease-out;
}
.work-tip.on { opacity: 1; transform: scale(1); }
.tip__rest { visibility: hidden; }
.tip__caret { display: inline-block; width: 1.5px; height: 15px; margin: 0 1px -2px 1px; background: #fff; animation: tip-blink .9s steps(1) infinite; }
.tip__txt.done .tip__caret { display: none; }
@keyframes tip-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .work-tip, .logos-tip { transition: none; } .tip__caret { animation: none; } }

/* About links hover (Get in touch / LinkedIn): the row's top and bottom dividers fade from a 1px gray line to a
   2px dark one. ONE line per divider (the row's ::before / last row's ::after). Each is a fixed 2px box: its
   outer pixel is a gray border (the resting line) and the inner pixel is transparent. On hover both fade to
   dark together, so only color animates: no height change, no half-pixel flicker. */
.about__links li { position: relative; }
.about__links li::before, .about__links li:last-child::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  box-sizing: border-box;
  pointer-events: none;
  background-color: transparent;
  transition: background-color .5s ease, border-color .5s ease;
}
.about__links li::before { top: 0; border-top: 1px solid var(--line); }            /* this row's top divider (the middle one is the 2nd row's top) */
.about__links li:last-child::after { bottom: 0; border-bottom: 1px solid var(--line); } /* the list's bottom divider */
/* Hovering row N darkens its top divider, and the one below it (= row N+1's top divider, or the list's bottom one). */
.about__links li:hover::before,
.about__links li:hover + li::before,
.about__links li:last-child:hover::after,
.about__links li:focus-within::before,
.about__links li:focus-within + li::before,
.about__links li:last-child:focus-within::after { background-color: var(--ink); border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .about__links li::before, .about__links li:last-child::after { transition: none; }
}

/* Project cards: keyboard focus ring, kept but restyled. 2px dark outline sitting 16px away from the card
   (the outline follows the link's 26px corner radius, so it stays rounded). Stays inside the 32px column gap. */
.card__link:focus { outline: none; }
.card__link:focus-visible { outline: 2px solid var(--ink); outline-offset: 16px; }

/* Keyboard focus ring (same look as the project cards): 2px dark outline, rounded.
   About links (the whole row): 16px away. Nav links (Work / About / LinkedIn): 4px away. */
.about__links a:focus, .nav a:focus, .sf a:focus { outline: none; }
.about__links a:focus-visible { outline: 2px solid var(--ink); outline-offset: 16px; border-radius: 26px; }
.nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 26px; }
.sf a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 26px; }

/* Organic card: the animated seal sits on top of the one baked into the photo.
   The photo has no seal of its own now; the SVG is placed in % of the image box so it tracks it at any size. */
.card__img:has(> .card__seal), .case__more .card__img { position: relative; overflow: hidden; } /* overlays (seal, chat, stats, tags) are positioned in % of this box, also on the project pages' "more projects" row */
.card__seal { position: absolute; inset: 0; pointer-events: none; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.card__seal-anim { position: absolute; left: 28%; top: 13.55%; width: 17.6%; aspect-ratio: 1; } /* ≈70px on the desktop card; the ring centre sits where the old seal was */
.card__seal-anim canvas { display: block; width: 100% !important; height: 100% !important; }
@media (hover: hover) { .card:hover .card__seal { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .card__seal { transition: none; } }

/* Roleplay card: the chat bubbles (Lottie) play over the photo: typing dots, then each message, one after another; holds 2s, then restarts.
   Positioned in % of the image box; the artwork sits at 4.56% / 53.5% of the Figma frame, inside a 14-unit empty margin. */
.card__chat-anim { position: absolute; left: 5.4%; top: 50.2%; width: 44.5%; aspect-ratio: 283 / 125; }
.card__chat-anim canvas { display: block; width: 100% !important; height: 100% !important; }

/* Health card: animated Steps / Activity cards laid over the ones baked into the thumbnail (see health-stats.js).
   The mask is the thumbnail's own background colour, so the baked-in cards never peek out. Positions are % of the image. */
.card__stats { position: absolute; inset: 0; pointer-events: none; }
.card__stats .stat { position: absolute; left: 75.12%; width: 20%; height: auto; overflow: visible; transform-origin: 50% 50%; }
.card__stats .stat--steps { top: 21.8%; }
.card__stats .stat--activity { top: 50.9%; }
.card__stats .stat__num { font-family: "Geist", sans-serif; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; fill: #464854; font-variant-numeric: tabular-nums; }
.card__stats .stat__unit { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.card__stats .stat__lbl { font-family: "Geist", sans-serif; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; fill: #464854; }
/* Follows the thumbnail's hover zoom (same 1.03 scale and easing as .card__img::before) */
.card__stats { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) { .work .card:hover .card__stats, .card:hover .card__stats { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .card__stats { transition: none; } }

/* Recipes card: Vegetarian / Gluten-free / 15 min tags over the photo (see recipes-tags.js). Positions are % of the image. */
.card__tags { position: absolute; left: 9.04%; top: 32.5%; width: 22.8%; aspect-ratio: 105 / 98; pointer-events: none; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.card__tags .tag { position: absolute; left: 0; height: auto; overflow: visible; transform-origin: 50% 50%; will-change: transform, opacity; backface-visibility: hidden; } /* own compositing layer per tag: stops hairline seams while they scale / fade on phones */
.card__tags .tag--veg { top: 0; width: 94.29%; }
.card__tags .tag--gf { top: 34.69%; width: 99.33%; }
.card__tags .tag--min { top: 69.39%; width: 72.38%; }
.card__tags .tag__txt { font-family: "Geist", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: -0.01em; fill: #000; }
@media (hover: hover) { .card:hover .card__tags { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .card__tags { transition: none; } }

/* Pull quote inside a case body: black four-point sparkle on the left, bold statement beside it */
.case__body .case__quote { display: flex; align-items: center; gap: 24px; margin: 48px 0; }
.case__body .case__quote:last-child { margin-bottom: 0; } /* nothing after it: no extra gap before the next block */
.case__body .case__quote svg { flex: none; width: 24px; height: 24px; margin: 0; vertical-align: baseline; }
.case__body .case__quote svg path { fill: var(--ink); } /* same spinning star as the footer, in black */
.case__body .case__quote p { margin: 0; font-size: 30px; line-height: 36px; font-weight: 500; letter-spacing: -0.02em; }
@media (max-width: 640px) { .case__body .case__quote { gap: 16px; margin: 32px 0; } .case__body .case__quote svg { width: 24px; height: 24px; } .case__body .case__quote p { font-size: 24px; line-height: 30px; } }

/* WeightBuddy hero: calories card overlaid on the cream phone. Stage matches the 2000x916 hero image so % offsets track it at any crop. */
.case__hero-stage { position: absolute; top: 50%; left: 50%; height: 100%; aspect-ratio: 2000 / 916; transform: translate(-50%, -50%); pointer-events: none; }
.case__hero-card { position: absolute; left: 32.75%; top: 53.06%; width: 34.35%; height: auto; display: block; }

.case__hero.wb-hold { opacity: 0; } /* released by health-card.js once the image and card are ready */
/* Recipes hero: two separate layers on a cream block, the phone (transparent image) and the recipe card (SVG).
   .rec-hero is a 2000x916 stage centred on the block and covering it, so their % positions hold at any size */
.case__hero--recipes { position: relative; overflow: hidden; container-type: size; background-color: #F7F1EC; }
.rec-hero { position: absolute; left: 50%; top: 50%; width: max(100cqw, 100cqh * 2000 / 916); aspect-ratio: 2000 / 916; translate: -50% -50%; pointer-events: none; }
.rec-hero__phone { position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block; } /* 2000x916 like every case header, the phone already placed in it */
.rec-hero__card { position: absolute; left: 53.3%; top: 33.19%; width: 28.2%; height: auto; display: block; }
.rec-hero__tag { transform-box: fill-box; transform-origin: 50% 50%; } /* entrance and typing: recipes-card.js */
/* Phones: the stage is the block itself, and both layers grow, the card overlapping the phone (with a soft shadow to
   lift it off the white screen) */
@media (max-width: 640px) {
  .rec-hero { left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; translate: none; }
  .rec-hero__phone { left: -31.79%; top: -2.16%; width: 188.01%; max-width: none; } /* puts the phone itself at 6% / 8%, 58% wide */
  .rec-hero__card { left: auto; right: 4%; top: 46%; width: 60%; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .14)); }
}
/* Case subtitle: fades in on load with a CSS animation (no script, so it also plays when the element is visible from the first paint). */
@keyframes lead-in { from { opacity: 0; } to { opacity: 1; } }
.case__intro .case__lead { animation: lead-in 1.1s ease-out .2s both; }
@media (prefers-reduced-motion: reduce) { .case__intro .case__lead { animation: none; } }

.case__fig { position: relative; overflow: hidden; }



/* Nutrition goals block: a standard image block (same size and radius as the others) with the animated SVG UI in a white card (40px padding, 32px radius) on the cream background. The card is sized from the block's own height so it always fits. */
.case__fig--goals { background-color: #DCF9EC; display: flex; align-items: center; justify-content: center; container-type: size; }
.goals__card { padding: 40px; border-radius: 32px; background: #fff; box-sizing: border-box; }
.goals__card img, .goals__card svg { display: block; width: min(300px, calc((100cqh - 104px) * 327 / 210), calc(100cqw - 112px)); height: auto; }
.case__fig--goals, .case__fig--goals * { overflow-anchor: none; } /* the card resizes during the animation: stop the browser scrolling the page to compensate */
@media (min-width: 1301px) { .goals__card img, .goals__card svg { width: min(380px, calc((100cqh - 104px) * 327 / 210), calc(100cqw - 112px)); } } /* bigger on wide screens (the block is taller there) */


/* Home cover reused as a case block: the animated Steps/Activity cards are positioned in % of the source image (2000x1144), so the stage reproduces background-size: cover to keep them on the phone at any block size. */
.case__fig--cover { container-type: size; aspect-ratio: 1311 / 760; }
@media (max-width: 900px) { .case__fig--cover { aspect-ratio: 2000 / 1144; } } /* tablets: show the whole image (no side crop), so the cards on the right edge stay visible */
.cover__stage { position: absolute; top: 50%; left: 50%; width: max(100cqw, calc(100cqh * 2000 / 1144)); aspect-ratio: 2000 / 1144; transform: translate(-50%, -50%); pointer-events: none; }
.case__fig--cover .card__stats .stat { width: 16%; left: 74.8%; } /* sized/placed from the reference mock of work-health-cover.webp (795x455) */
.case__fig--cover .card__stats .stat--steps { top: 26.8%; }
.case__fig--cover .card__stats .stat--activity { top: 51.2%; }
@media (max-width: 640px) { .case__fig--cover { aspect-ratio: 4 / 3; } .case__fig--cover .card__stats .stat { left: 69%; } } /* phones: same height as the other blocks; the sides crop 11.9% each, so the cards move in to stay visible */

/* WeightBuddy page: image blocks that stack directly (no text between) use the same gap vertically as the 32px between side-by-side blocks (16px on phones, like the two-up grid). */
.case--health > .case__fig + .case__fig, .case--health > .case__fig + .case__figs, .case--health > .case__figs + .case__fig, .case--health > .case__figs + .case__figs { margin-top: 32px; }
@media (max-width: 900px) { .case--health > .case__fig + .case__fig, .case--health > .case__fig + .case__figs, .case--health > .case__figs + .case__fig, .case--health > .case__figs + .case__figs { margin-top: 16px; } .case--health .case__figs { gap: 16px; } }
/* Steps/activity goal screens on phones: cover would crop the cards against the sides, so size the image from the cards instead (they span 60.25% of its width) to keep 32px on each side. The background color matches the image edges. */
@media (max-width: 900px) { .case__fig--screens { background-color: #F7F1EC; background-size: calc((100% - 64px) * 1.66) auto; } }
@media (max-width: 360px) { .case__fig--screens { background-size: calc((100% - 40px) * 1.66) auto; } } /* very small phones: 20px on each side */
/* Hand with meal screen: whole image shown, resting on the bottom edge, the fill matching its background */
.case__fig.case__fig--hand-meal { background-color: #F8F2EF; background-size: contain; background-position: 50% 100%; }
@media (max-width: 640px) { .case__fig.case__fig--hand-meal { background-size: cover; } } /* phones: fill the 4:3 block (trims 10% of empty side on each edge), so the phone isn't tiny. Wider blocks keep "contain", or the top of the phone is cut */
/* WeightBuddy meal-logging images (side by side). The fill matches their background */
.case__fig.case__fig--calories, .case__fig.case__fig--tip { background-color: #F7F1EC; }
/* Blinking text cursor before "Rice" in the meal description. .cal covers the block exactly like the "cover" background
   (square image), so the cursor stays on the text whatever the block's shape; its position is in % of the image */
.case__fig--calories { container-type: size; }
.cal { position: absolute; left: 50%; top: 50%; width: max(100cqw, 100cqh); aspect-ratio: 1; translate: -50% -50%; pointer-events: none; }
.cal__caret { position: absolute; left: 26.2%; top: 58.7%; width: max(1.5px, .3%); height: 3.7%; border-radius: 99px; background: #474855; animation: tip-blink 1.06s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .cal__caret { animation: none; } }
/* Roleplay overview: takes the image's own shape (2000x1165); phones keep the usual 4:3, which only trims empty sides.
   The fill matches its background */
.case__fig.case__fig--overview { background-color: #F7F1EC; }
@media (min-width: 641px) { .case__fig.case__fig--overview { aspect-ratio: 2000 / 1165; } }
/* Recipes overview photo (hand and phone): same idea, the image's own shape (2000x1006). Phones crop it to 4:3,
   shifted right so the phone stays near the middle */
@media (min-width: 641px) { .case__fig.case__fig--rec-overview { aspect-ratio: 2000 / 1006; } }
@media (max-width: 640px) { .case__fig.case__fig--rec-overview { background-position: 60% 50%; } }
/* Mushroom recipes photo (phone over mushrooms, 2000x1114): the image's own shape, resting on the bottom edge where the
   phone is cut. Phones crop it to 4:3 with the phone in the middle, without the bubbles */
.case__fig.case__fig--mushrooms { background-color: #F7F1EC; background-position: 50% 100%; }
@media (min-width: 641px) { .case__fig.case__fig--mushrooms { aspect-ratio: 2000 / 1114; } }
@media (max-width: 640px) { .case__fig.case__fig--mushrooms { background-position: 104.5% 100%; } } /* centres the phone at any width; past 100% the sliver uncovered on the right is the same cream as the photo */
/* Prompt bubbles left of that phone (motion: recipes-chat.js). The Vilo thumbnail's bubble, measured in its own units:
   --u is one unit, 16 units are the text size, which follows the block (1.45% of its width, never under 10.5px) */
.chat { position: absolute; inset: 0; container-type: inline-size; pointer-events: none; }
.chat__stack { --f: max(10.5px, 1.45cqw); --u: calc(var(--f) / 16); position: absolute; right: 55.5%; top: 42.7%; display: flex; flex-direction: column; align-items: flex-end; gap: calc(9 * var(--u)); }
.chat__item { position: relative; }
.chat__msg { display: block; padding: calc(11 * var(--u)) calc(15.5 * var(--u)); border-radius: calc(22 * var(--u)) calc(4 * var(--u)) calc(22 * var(--u)) calc(22 * var(--u)); background: #fff; color: #0A0A0A; font-size: var(--f); line-height: calc(20 * var(--u)); white-space: pre; transform-origin: 100% 50%; }
.chat__typing { position: absolute; right: 0; top: calc(50% - 17 * var(--u)); width: calc(54 * var(--u)); height: calc(34 * var(--u)); border-radius: calc(17 * var(--u)) calc(4 * var(--u)) calc(17 * var(--u)) calc(17 * var(--u)); background: #fff; opacity: 0; transform-origin: 100% 50%; }
.chat__typing i { position: absolute; top: calc(14 * var(--u)); left: calc(15 * var(--u)); width: calc(6 * var(--u)); height: calc(6 * var(--u)); border-radius: 50%; background: #0A0A0A; }
.chat__typing i:nth-child(2) { left: calc(24 * var(--u)); }
.chat__typing i:nth-child(3) { left: calc(33 * var(--u)); }
@media (max-width: 640px) { .chat { display: none; } } /* phones: no bubbles, there is no room beside the centred phone */
.case__fig.case__fig--cream { background-color: #F7F1EC; }
/* High-five loop from the home gallery (its .highfive keyframes), centred in the block */
.case__fig--hf { display: flex; align-items: center; justify-content: center; }
.case__fig--hf .highfive { flex: none; width: 32.1%; height: auto; overflow: visible; } /* the hands swing past the artwork box */
/* Recipes copy of the high five with a snappier slap (hands joining ends at 32.2% instead of 33.81%); the pull-apart is unchanged */
@keyframes hf-left-rec { 0%, 3.86% { transform: none; animation-timing-function: var(--cubic-out); } 17.39% { transform: translate(-24px, 6px) rotate(-5deg); animation-timing-function: linear; } 28.98% { transform: translate(-24px, 6px) rotate(-5deg); animation-timing-function: var(--cubic-in); } 32.2% { transform: translate(8px, 0) rotate(2deg); animation-timing-function: var(--cubic-out); } 40.56%, 100% { transform: none; } }
@keyframes hf-right-rec { 0%, 3.86% { transform: none; animation-timing-function: var(--cubic-out); } 17.39% { transform: translate(24px, 6px) rotate(5deg); animation-timing-function: linear; } 28.98% { transform: translate(24px, 6px) rotate(5deg); animation-timing-function: var(--cubic-in); } 32.2% { transform: translate(-8px, 0) rotate(-2deg); animation-timing-function: var(--cubic-out); } 40.56%, 100% { transform: none; } }
.case__fig--hf .highfive .hf__hand--l { animation-name: hf-left-rec; }
.case__fig--hf .highfive .hf__hand--r { animation-name: hf-right-rec; }
/* Bookmark box (right block), one 3.6s loop: the grey shapes stay still, the bookmark
   rises in from below while fading in, then the three black lines next to it follow; at the end the bookmark and lines fade out and it restarts.
   At rest (animation off) it is all showing */
.case__fig--bm { display: flex; align-items: center; justify-content: center; }
.case__fig--bm .bookmark { flex: none; width: 39.8%; height: auto; overflow: visible; }
.bookmark .bm__flag { animation: bm-flag 3.6s cubic-bezier(.65, 0, .35, 1) infinite; } /* ease-in-out cubic */
.bookmark .bm__line { transform-box: fill-box; transform-origin: 0% 100%; animation: bm-line 3.6s cubic-bezier(.33, 1, .68, 1) infinite; }
.bookmark .bm__line--2 { animation-delay: .1s; }
.bookmark .bm__line--3 { animation-delay: .2s; }
/* the flag morphs from a small circle (same 10 cubic segments as the outline) into the bookmark; CSS d: is not supported in Safari, where it just fades and rises */
@keyframes bm-flag { 0%, 4% { d: path("M167.05 87.05C166 88.1 165.32 89.44 165.09 90.9C164.85 92.37 165.09 93.86 165.76 95.18C166.43 96.5 167.5 97.57 168.82 98.24C170.14 98.91 171.63 99.15 173.1 98.91C174.56 98.68 175.9 98 176.95 96.95C178 95.9 178.68 94.56 178.91 93.1C179.15 91.63 178.91 90.14 178.24 88.82C177.57 87.5 176.5 86.43 175.18 85.76C173.86 85.09 172.37 84.85 170.9 85.09C169.44 85.32 168.1 86 167.05 87.05Z"); opacity: 0; transform: translateY(24px); } 12% { opacity: 1; } 22% { d: path("M141.55 43.25C139.14 43.25 137.19 45.24 137.19 47.69C137.19 73.98 137.19 100.27 137.19 126.56C137.19 129.96 140.8 132.09 143.71 130.41C152.45 125.36 161.19 120.31 169.94 115.27C171.27 114.49 172.91 114.49 174.25 115.27C182.99 120.31 191.73 125.36 200.47 130.41C203.38 132.09 206.99 129.96 206.99 126.56C206.99 100.27 206.99 73.98 206.99 47.69C206.99 45.24 205.04 43.25 202.63 43.25C182.27 43.25 161.91 43.25 141.55 43.25Z"); opacity: 1; transform: none; } 88% { d: path("M141.55 43.25C139.14 43.25 137.19 45.24 137.19 47.69C137.19 73.98 137.19 100.27 137.19 126.56C137.19 129.96 140.8 132.09 143.71 130.41C152.45 125.36 161.19 120.31 169.94 115.27C171.27 114.49 172.91 114.49 174.25 115.27C182.99 120.31 191.73 125.36 200.47 130.41C203.38 132.09 206.99 129.96 206.99 126.56C206.99 100.27 206.99 73.98 206.99 47.69C206.99 45.24 205.04 43.25 202.63 43.25C182.27 43.25 161.91 43.25 141.55 43.25Z"); opacity: 1; transform: none; } 96%, 100% { d: path("M141.55 43.25C139.14 43.25 137.19 45.24 137.19 47.69C137.19 73.98 137.19 100.27 137.19 126.56C137.19 129.96 140.8 132.09 143.71 130.41C152.45 125.36 161.19 120.31 169.94 115.27C171.27 114.49 172.91 114.49 174.25 115.27C182.99 120.31 191.73 125.36 200.47 130.41C203.38 132.09 206.99 129.96 206.99 126.56C206.99 100.27 206.99 73.98 206.99 47.69C206.99 45.24 205.04 43.25 202.63 43.25C182.27 43.25 161.91 43.25 141.55 43.25Z"); opacity: 0; transform: none; } }
@keyframes bm-line { 0%, 22% { opacity: 0; transform: scale(.4); } 34% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bookmark * { animation: none !important; } }
/* Organic header: the laptop-in-hands photo (2000x916, its own orange backdrop, same shape as the header) with the "Fresh & Natural" seal on the
   laptop's left side; the orange blob spins, the white lettering stays still (same drawing and spin as the gallery tile). Phones: the 4:3 header
   crops the photo around the laptop's left side, so the seal is placed and sized for that crop */
.case__hero--laptop { position: relative; overflow: hidden; background-color: #ff977b; background-size: cover; background-position: 50% 50%; }
.case__hero--laptop .seal { position: absolute; left: 17.5%; top: 57.3%; width: 9.2%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; overflow: visible; }
.case__hero--laptop .seal__blob { transform-origin: 50.5px 50.5px; animation: seal-spin 15s linear infinite; }
@media (max-width: 640px) { .case__hero--laptop { background-image: url("assets/laptop-transparent-sm.webp"); background-size: 122% auto; background-position: 36% 48%; } .case__hero--laptop .seal { left: 14%; top: 50%; width: 12.8%; } } /* phones: same 4:3 height as the other headers; the uncropped cut-out (as on the home tile) keeps the whole laptop on the pink, sleeves bleeding off the edges */
@media (prefers-reduced-motion: reduce) { .case__hero--laptop .seal__blob { animation: none; transform: scale(1.1); } }
/* Recipe card -> product card (left block of the pair). One white box that resizes from the recipe card to the product card on click, while the
   recipe screen swipes out to the left and the product screen swipes in from the right, like moving to another screen. Everything is drawn in
   design px (the Figma frames) times --u, so it scales with the block. --u fits the larger frame (488 x 372 design px incl. margin) into the block */
.case__fig.case__fig--swap { background-color: #F7F1EC; container-type: size; display: block; }
.swap { --u: calc(0.765 * min(calc(100cqw / 488), calc(100cqh / 372))); position: absolute; inset: 0; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: #1A1A1A; text-align: left; pointer-events: none; }
.swap__box { --e: cubic-bezier(.65, 0, .35, 1); position: absolute; left: 50%; top: 50%; width: calc(398 * var(--u)); height: calc(332 * var(--u)); transform: translate(-50%, -50%); background: #fff; border-radius: calc(32 * var(--u)); box-shadow: 0 calc(2 * var(--u)) calc(14 * var(--u)) rgba(60, 40, 20, .05); overflow: hidden; transition: width .7s var(--e), height .7s var(--e), border-radius .7s var(--e); }
.swap.is-b .swap__box { width: calc(292 * var(--u)); height: calc(350 * var(--u)); border-radius: calc(36 * var(--u)); }
/* the two screens: each is as big as its own card and slides sideways inside the box */
.swap__s { position: absolute; top: 0; height: 100%; transition: transform .7s var(--e); }
.swap__s--a { left: 0; width: calc(398 * var(--u)); }
.swap__s--b { left: 0; width: calc(292 * var(--u)); transform: translateX(calc(398 * var(--u))); }
.swap.is-b .swap__s--a { transform: translateX(calc(-398 * var(--u))); }
.swap.is-b .swap__s--b { transform: none; }
.swap__s > * { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); white-space: nowrap; margin: 0; }
.swap__tags { --x: 28; --y: 28; width: calc(243 * var(--u)); height: calc(42 * var(--u)); }
.swap__mark { --x: 353; --y: 35; width: calc(19 * var(--u)); height: calc(23 * var(--u)); }
.swap__title { --x: 28; --y: 82; font-size: calc(26 * var(--u)); line-height: 1.12; font-weight: 700; letter-spacing: -.01em; }
.swap__desc { --x: 28; --y: 150; font-size: calc(15.5 * var(--u)); line-height: 1.45; }
.swap__panel { --x: 28; --y: 216; width: calc(342 * var(--u)); height: calc(86 * var(--u)); border-radius: calc(18 * var(--u)); background: #FAFAFA; transition: transform .18s ease-out, background-color .18s ease-out; }
.swap.is-press .swap__panel { transform: scale(.975); background: #F1F1F1; } /* the row dips while the tap lands */
.swap__tap { position: absolute; z-index: 2; left: 0; top: 0; width: calc(150 * var(--u)); aspect-ratio: 1; margin: calc(-75 * var(--u)) 0 0 calc(-75 * var(--u)); opacity: 0; pointer-events: none; }
.swap__chev { --x: 340; --y: 252; width: calc(8 * var(--u)); height: calc(13 * var(--u)); }
/* carton, name and price appear in both screens, at their own spots */
.swap__carton { background: url("assets/work-recipes-price.webp") 31.32% 65.75% / 2415% auto no-repeat; mix-blend-mode: multiply; }
.swap__name { line-height: 1.33; color: #6B6B6B; }
.swap__price { line-height: 1.2; font-weight: 700; color: #FE4F20; }
.swap__s--a .swap__carton { --x: 66; --y: 227; width: calc(26 * var(--u)); height: calc(63.4 * var(--u)); }
.swap__s--a .swap__name { --x: 129; --y: 229; font-size: calc(15 * var(--u)); }
.swap__s--a .swap__price { --x: 129; --y: 272; font-size: calc(15 * var(--u)); }
.swap__s--b .swap__carton { --x: 120.5; --y: 32; width: calc(51 * var(--u)); height: calc(124.4 * var(--u)); }
.swap__s--b .swap__name { --x: 28; --y: 182; font-size: calc(19 * var(--u)); }
.swap__s--b .swap__price { --x: 28; --y: 241; font-size: calc(21 * var(--u)); }
.swap__step { --x: 28; --y: 284; display: flex; align-items: center; justify-content: space-between; width: calc(236 * var(--u)); height: calc(38 * var(--u)); padding: 0 calc(16 * var(--u)); border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px #E6E6E6, 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, .08); font-size: calc(15 * var(--u)); font-weight: 600; }
.swap__step span { font-size: calc(20 * var(--u)); line-height: 1; }
@media (prefers-reduced-motion: reduce) { .swap__box, .swap__s { transition: none !important; } }
/* Products to add to the box (right of the pair). Phones: the 4:3 crop starts at "Herbs & seasonings" and keeps the
   button and the first two product cards whole */
.case__fig.case__fig--rec-add { background-color: #F7F1EC; }
@media (max-width: 640px) { .case__fig.case__fig--rec-add { background-position: 50% 44%; } }
.case__fig.case__fig--connections { background-color: #FFE5CC; } /* same idea, for the connections screens */
@media (min-width: 641px) { .case__fig.case__fig--connections { aspect-ratio: 2000 / 1404; } }
/* The two SVG cards sit over the image: .conn covers the block exactly like the "cover" background (2000x1404),
   so the cards stay in place beside the phone whatever the block's shape */
.case__fig--connections { container-type: size; }
.conn { position: absolute; left: 50%; top: 50%; width: max(100cqw, calc(100cqh * 2000 / 1404)); aspect-ratio: 2000 / 1404; translate: -50% -50%; }
.conn__cards { position: absolute; left: 57.25%; top: 50%; width: 26.95%; translate: 0 -50%; }
/* Roleplay square images (side by side). The fill matches their lilac background. The portrait fills the block, keeping
   the top of the hair when phones crop it to 4:3; the call screen is always shown whole, so the phone is never cut */
.case__fig.case__fig--portrait, .case__fig.case__fig--call { background-color: #E6D6FF; }
.case__fig.case__fig--portrait { background-position: 50% 30%; }
.case__fig.case__fig--call { background-size: contain; }
/* Roleplay unlock screen: same shape as the other blocks (600px tall at full width). The whole image is shown, resting on
   the bottom edge where the hand and phone are cut; the pink fill matches its background around it */
.case__fig.case__fig--unlock { background-color: #FFF0EC; background-size: contain; background-position: 50% 100%; }
@media (max-width: 640px) { .case__fig.case__fig--unlock { background-size: cover; } } /* phones: fill the 4:3 block, as on WeightBuddy's hand image */
/* Roleplay gem images (side by side, above the unlock screen). The fill matches their background; same spacing between
   the two image rows as on WeightBuddy */
.case__fig.case__fig--rewards, .case__fig.case__fig--gems { background-color: #FFF0EC; }
.case__figs + .case__fig--unlock { margin-top: 32px; }
@media (max-width: 900px) { .case--roleplay .case__figs { gap: 16px; } .case__figs + .case__fig--unlock { margin-top: 16px; } } /* smaller screens: 16px both between and under the side-by-side images */
.conn__card { display: block; position: relative; transform-origin: 50% 50%; } /* entrance and heart fill: roleplay-cards.js */
.conn__card + .conn__card { margin-top: 6.9%; }
.conn__card img { display: block; width: 100%; height: auto; }
.conn__hearts { position: absolute; inset: 0; width: 100%; height: 100%; }
.case__fig--phone { background: #F6F1ED; }
/* Phone mock centered, 75% of the block height. The UI screen sits under the frame, clipped to the frame's opening (894x1938 at 36,31 of the 966x2000 frame, 138 radius; 2px under the bezel so no seam shows).
   The screen image keeps its full height at the opening's width: to scroll it later, animate translateY on .phone__scroll. */
.phone__device { position: absolute; inset: 0; margin: auto; height: 75%; aspect-ratio: 966 / 2000; } /* centered without a transform: a half-pixel translate softens the images */
.phone__screen { position: absolute; left: 3.727%; top: 1.55%; width: 92.547%; height: 96.9%; overflow: hidden; isolation: isolate; border-radius: 15.44% / 7.12%; background: #fff; }
.phone__scroll { display: block; width: 100%; height: auto; }
.phone__tabbar { position: absolute; left: 0; bottom: 0; z-index: 1; display: block; width: 100%; height: auto; background: #fff; } /* fixed tab menu: stays put while .phone__scroll moves behind it */
.phone__frame { position: absolute; inset: 0; width: 100%; height: 100%; }
/* swipe gesture (moved and stretched by health-scroll.js): an outlined circle that becomes a pill as it travels */
.phone__touch { position: absolute; z-index: 2; left: 66%; top: 70%; width: 11.2%; margin-left: -5.6%; box-sizing: border-box; border: 2px solid #000; border-radius: 999px; background: rgba(255, 255, 255, .45); opacity: 0; pointer-events: none; }
.case__fig--phone { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; } /* full-bleed: spans the whole viewport */
/* Half the width, never under 500px (mock 375px tall), so it doesn't turn into a thin strip on tablets and phones.
   Taller between ~900px and 1360px wide: up to 56% of the width, capped at 680px, until half the width passes it.
   The screen images' `sizes` in health.html and roleplay.html follow this height. */
.case__fig.case__fig--phone { aspect-ratio: auto; height: max(500px, 50vw, min(56vw, 680px)); }
/* Roleplay (Vilo) variant of the phone block: scope its changes to .case__fig--vilo so WeightBuddy stays as is. */
.case__fig--phone.case__fig--vilo { background: #ECE1FF; }
/* Recipes "with my box" phone: one image with the frame already on it, in the same block. The recipe cards lie over it,
   clipped to the screen opening, and swipe sideways (recipes-swipe.js). Positions measured on the 967x2000 image */
.case__fig--phone.case__fig--box { background: #EBF2D5; }
.case__fig--box .phone__device { aspect-ratio: 967 / 2000; }
.case__fig--box .phone__screen { left: 3.826%; width: 92.244%; background: none; }
.phone__cards { position: absolute; left: 3.18%; top: 13.89%; display: block; width: 284.6%; max-width: none; height: auto; }
/* the same swipe gesture, travelling sideways: on the bottom edge of the cards (white into green), clear of their text */
.case__fig--box .phone__touch { top: 36.6%; margin: -5.6% 0 0; aspect-ratio: 1; }
.phone__shot { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; } /* stacked screens, moved and faded by roleplay-screens.js */
.phone__shot:nth-child(2) { transform: translate3d(100%, 0, 0); } /* waits off to the right, then slides in */
.phone__shot:nth-child(3) { opacity: 0; } /* fades in over the second */
/* tap animation: a square 72% of the screen width (the ripple fills about 30% of it), centred on the left/top point set by the script */
.phone__tap { position: absolute; z-index: 2; left: 0; top: 0; width: 72%; aspect-ratio: 1; margin: -36% 0 0 -36%; opacity: 0; pointer-events: none; }
/* Organic overview: the box photo (2000x949) */
.case__fig.case__fig--org-overview { background-color: #FEE5CE; aspect-ratio: 2000 / 949; }
@media (max-width: 640px) { .case__fig.case__fig--org-overview { aspect-ratio: 8 / 5; background-position: 29% 50%; } } /* phones: taller, trimming only empty side background; the box and produce stay whole */
/* Organic sign-up screen and banana poster (square 2000x2000); phones show them square so nothing is cut */
.case__fig.case__fig--org-signup { background-color: #FFDBD0; }
.case__fig.case__fig--org-banana { background-color: #FD5321; }
@media (max-width: 640px) { .case__figs .case__fig.case__fig--org-signup, .case__figs .case__fig.case__fig--org-banana { aspect-ratio: 1; } }
/* Organic checkout: the standard phone swipe scroll (health-scroll.js) on a pink block */
.case__fig--phone.case__fig--org-phone { background: #FFEAEA; }
/* Desktop UI in a browser window (Organic landing page): the bar stays put and the page scrolls under it,
   with the phone swipe scroll (health-scroll.js). The window bleeds off the bottom of the block. */
.case__fig.case__fig--browser { background-color: #F1F0EC; aspect-ratio: 2000 / 1087; container-type: inline-size; }
.case__fig.case__fig--browser.case__fig--shop { background-color: #FFDBD0; } /* the second browser window, on a pink block */
.browser { position: absolute; left: 11.15%; right: 11.15%; top: 10.7%; bottom: 0; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; border-radius: 1.75cqw 1.75cqw 0 0; background: #fff; box-shadow: 0 0 5cqw rgba(0, 0, 0, .05); }
.browser__bar { position: relative; z-index: 1; display: block; width: 100%; height: auto; flex: none; background: #fff; box-shadow: 0 2px 16px rgba(0, 0, 0, .025); } /* soft shadow over the page scrolling beneath */
.browser__screen { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.browser__screen .phone__touch { --dot: max(14px, 2.7%); left: calc(97% - 20px); width: var(--dot); margin-left: calc(var(--dot) / -2); } /* same on-screen size as on the phone, in the page's right margin */
@media (max-width: 640px) { .case__fig.case__fig--browser { aspect-ratio: 8 / 5; } .browser { left: 9%; right: 9%; } } /* phones: same height as the overview photo, slightly narrower side margins than desktop */
/* Organic: oddly shaped eggplant (square photo); the lilac matches its backdrop while it loads */
.case__fig.case__fig--org-eggplant { background-color: #DBC4FF; }
/* Organic: box in the field (square photo); dark green while it loads */
.case__fig.case__fig--org-farm { background-color: #3E5A24; }
