@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 300 700; src: url("fonts/montserrat-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 300 700; src: url("fonts/montserrat-latin-wght-normal.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; }
@font-face { font-family: "Syncopate"; font-style: normal; font-display: swap; font-weight: 400; src: url("fonts/syncopate-latin-ext-400-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Syncopate"; font-style: normal; font-display: swap; font-weight: 400; src: url("fonts/syncopate-latin-400-normal.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; }
@font-face { font-family: "Syncopate"; font-style: normal; font-display: swap; font-weight: 700; src: url("fonts/syncopate-latin-ext-700-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Syncopate"; font-style: normal; font-display: swap; font-weight: 700; src: url("fonts/syncopate-latin-700-normal.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; }
/* Alejandro Lora · portfolio
   Layout: one-screen "business card" home with a horizontal project rail;
   case pages are long vertical reads with a sticky chapter column.
   Look: cream paper with a soft liquid background + clean Swiss grid. */
:root {
  /* dark is the brand default; light is opt-in via the Mode button */
  --ink: #151514;
  --ink-2: #1d1d1b;
  --ink-3: #262523;
  --line: #34322e;
  --paper: #f3eee2;
  --mute: #a19b8f;
  --accent: #36ba78;      /* same luminance and contrast as the old orange #F68912 */
  --accent-hot: #4fcb8c;
  --text: #d4cfc3;
  --display: "Syncopate", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(16px, 3.2vw, 56px);
  --r: 14px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --ink: #f3f1ec;
  --ink-2: #e8e5de;
  --ink-3: #dcd8cf;
  --line: #d3cfc5;
  --paper: #171716;
  --mute: #6c685f;
  --accent: #177648;      /* darker green so it keeps AA contrast on the light background */
  --accent-hot: #1d8a54;
  --text: #2f2e2a;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- language switching ---------- */
html[data-lang="es"] [lang="en"]:not(html),
html[data-lang="en"] [lang="es"]:not(html) { display: none !important; }

/* ---------- liquid background ----------
   One fixed WebGL canvas rendered at 1/6 resolution (the browser's upscaling softens it),
   cream with faint green currents and a fine static grain. Loops every 60 s, ~20 fps,
   paused when the tab is hidden. Falls back to the plain cream background. */
.liquid { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; opacity: 0; transition: opacity 1.2s; }
.liquid.on { opacity: 1; }
.fine-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .06 0 0 0 0 .23 0 0 0 0 .15 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.home-wrap, main, .case-foot, .next { position: relative; z-index: 1; }

/* ---------- shared UI ---------- */
.eyebrow {
  text-transform: uppercase; font-family: var(--display); font-weight: 700;
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--mute);
}
.lang {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
}
.lang button {
  border: 0; background: none; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: .18em;
  padding: 7px 11px 7px 12px; border-radius: 999px; color: var(--mute);
  transition: color .3s, background .3s;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--ink); }
.lang button:not([aria-pressed="true"]):hover { color: var(--paper); }

.logo-mark { display: block; height: auto; color: var(--accent); }
.logo-mark path { fill: currentColor; }

.copy {
  border: 0; background: none; padding: 0; cursor: pointer;
  text-decoration: none; position: relative;
}
.u-line { position: relative; text-decoration: none; }
.u-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(.0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.u-line:hover::after, .u-line:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .16em;
  padding: 12px 18px; border-radius: 999px;
  transition: transform .4s var(--ease-out), opacity .3s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }


/* =========================================================
   HOME
   ========================================================= */
html.home, html.home body { height: 100%; overflow: hidden; }
.home-wrap {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding-inline: var(--gut);
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: clamp(14px, 2.6vh, 28px) 0;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand .logo-mark { width: 54px; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .2em; line-height: 1.25;
}
.brand-name small { display: block; font-weight: 400; color: var(--mute); letter-spacing: .2em; font-size: 9.5px; }
.top-right { display: flex; align-items: center; gap: 18px; }
.status { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--mute); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.intro {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; gap: 24px 48px;
  padding-block: clamp(14px, 3.4vh, 40px) clamp(10px, 2.4vh, 26px);
}
.intro h1 {
  margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(26px, 4.1vw, 68px); line-height: .98; letter-spacing: -.01em;
  text-wrap: balance;
}
.intro h1 .o { color: var(--accent); }
.intro h1 .line { display: block; overflow: hidden; padding-bottom: .04em; }
.intro h1 .line > span { display: inline-block; }
.intro p { margin: 0; max-width: 46ch; font-size: clamp(13px, 1.05vw, 16px); color: var(--text); }

/* rail */
.rail-zone { position: relative; min-height: 0; display: flex; flex-direction: column; }
.rail-nav {
  display: flex; gap: 6px 22px; flex-wrap: wrap; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.rail-nav button {
  border: 0; background: none; cursor: pointer; padding: 4px 0; text-transform: uppercase;
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .2em; color: var(--mute);
  display: inline-flex; gap: 8px; align-items: baseline; transition: color .3s;
}
.rail-nav button sup { font-size: 8px; color: var(--accent); letter-spacing: .1em; }
.rail-nav button.on, .rail-nav button:hover { color: var(--paper); }

.rail {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  padding-top: clamp(12px, 2.2vh, 22px);
}
.rail.dragging { cursor: grabbing; }
.track {
  position: absolute; top: clamp(12px, 2.2vh, 22px); bottom: 0; left: 0;
  display: flex; gap: clamp(28px, 4vw, 72px);
  will-change: transform;
}
.group { display: flex; flex-direction: column; flex: none; }
.group-label {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; white-space: nowrap;
}
.group-label h2 {
  margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(18px, 2.4vw, 38px); letter-spacing: .02em; line-height: 1;
  -webkit-text-stroke: 1px var(--paper); color: transparent;
}
.group-label > span { text-transform: uppercase; font-size: 11px; color: var(--mute); font-family: var(--display); letter-spacing: .18em; }
.cards { display: flex; gap: clamp(12px, 1.4vw, 22px); }

.card {
  position: relative; width: calc(var(--fh, 300px) * .75); flex: none;
  display: flex; flex-direction: column; text-decoration: none; color: var(--paper);
  transform-origin: 50% 100%;
}
.card .frame {
  position: relative; height: var(--fh, 300px); flex: none; overflow: hidden; border-radius: var(--r);
  background: var(--ink-2);
  clip-path: inset(0 0 0 0 round var(--r));
  transition: clip-path .7s var(--ease-out);
}
.card .frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover;
  transform: scale(1.04);
  transition: filter .8s var(--ease-out), transform 1.2s var(--ease-out);
}
.card .over {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 18px; text-align: center;
  background: rgba(15,58,39,0); transition: background .7s var(--ease-out);
}
.card .over b {
  display: block; overflow: hidden;
  font-family: var(--display); font-weight: 700; text-transform: uppercase; color: #f6f0de;
  font-size: clamp(16px, calc(var(--fh, 300px) * .085), 34px); line-height: 1.05; letter-spacing: .02em; text-wrap: balance;
}
.card .over b > span { display: block; transform: translateY(110%); transition: transform .7s var(--ease-out); }
.card .over i { display: block; margin: 12px auto 0; width: 0; height: 2px; background: #f6f0de; transition: width .7s .1s var(--ease-out); }
.card .num {
  position: absolute; top: 12px; left: 14px; z-index: 2;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .1em; color: #f6f0de;
  mix-blend-mode: difference;
}
.card .go {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--ink);
  display: grid; place-items: center; transform: scale(0) rotate(-45deg);
  transition: transform .55s var(--ease-out);
}
.card .go svg { width: 18px; }
.card .meta { padding-top: 12px; display: block; min-width: 0; height: var(--mh, 100px); overflow: hidden; }
.card .meta h3 { margin-bottom: 5px; }
.card h3 {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(11px, .95vw, 15px);
  letter-spacing: .12em; text-transform: uppercase; line-height: 1.3; transition: color .4s;
}
.card p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--mute); max-width: 32ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) {
  .card:hover .frame img, .card:focus-visible .frame img { filter: blur(9px) saturate(1.1) brightness(.55); transform: scale(1.12); }
  .card:hover .over, .card:focus-visible .over { background: rgba(15,58,39,.35); }
  .card:hover .over b > span, .card:focus-visible .over b > span { transform: none; }
  .card:hover .over i, .card:focus-visible .over i { width: 48px; }
  .card:hover .go, .card:focus-visible .go { transform: scale(1) rotate(0); }
  .card:hover h3, .card:focus-visible h3 { color: var(--accent); }
}
.card:focus-visible { outline: none; }
.card:focus-visible .frame { outline: 2px solid var(--accent); }

/* "in progress" cards */
.card.soon { cursor: default; }
.card.soon .frame {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(15,58,39,.04) 14px 15px),
    var(--ink-2);
  border: 1px dashed var(--line);
  display: grid; place-items: center; text-align: center;
}
.card.soon .frame .stamp {
  font-family: var(--display); font-weight: 700; font-size: clamp(10px, .8vw, 12px); letter-spacing: .2em;
  color: var(--accent); border: 1.5px solid var(--accent); padding: 8px 12px; transform: rotate(-8deg);
  border-radius: 3px;
}
.card.soon:hover .frame { clip-path: inset(0 round var(--r)); }

/* progress */
.rail-progress { height: 2px; background: var(--line); margin-top: 14px; position: relative; overflow: hidden; flex: none; }
.rail-progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* footer card */
.foot {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 12px 32px;
  padding-block: clamp(12px, 2.4vh, 26px) calc(clamp(12px, 2.4vh, 24px) + env(safe-area-inset-bottom, 0px));
  font-size: 13px;
}
.foot .contact { display: flex; flex-wrap: wrap; gap: 6px 26px; justify-self: center; }
.foot .contact a, .foot .contact button { color: var(--paper); font-size: 13px; }
.foot .contact .k { color: var(--mute); margin-right: 6px; font-size: 11px; font-family: var(--display); letter-spacing: .14em; }
.foot .loc { color: var(--mute); font-size: 12px; }
.foot .pdf { display: flex; gap: 14px; font-size: 12px; }
.foot .pdf a { color: var(--mute); }
.foot .pdf a:hover { color: var(--paper); }

/* home load choreography (JS adds .ready) */
.js .intro h1 .line > span { transform: translateY(105%); }
.js .reveal-home { opacity: 0; transform: translateY(14px); }
.js .track .card { transform: translateX(60px) skewX(-6deg); opacity: 0; }
.ready .intro h1 .line > span { transform: none; transition: transform 1.1s var(--ease-out); }
.ready .intro h1 .line:nth-child(2) > span { transition-delay: .08s; }
.ready .intro h1 .line:nth-child(3) > span { transition-delay: .16s; }
.ready .reveal-home { opacity: 1; transform: none; transition: opacity .9s .3s, transform .9s .3s var(--ease-out); }
.ready .track .card { opacity: 1; transform: none; transition: opacity .8s, transform 1.2s var(--ease-out); }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 10px; }
  .intro p { font-size: 13px; }
  .status { display: none; }
  .foot { grid-template-columns: 1fr; gap: 8px; }
  .foot .contact { justify-self: start; gap: 4px 18px; }
  .foot .loc, .foot .pdf { display: none; }
}
@media (max-width: 560px) {
  .card .meta { --mh: 56px; }
  .brand-name small { display: none; }
  .brand .logo-mark { width: 42px; }
  .intro h1 { font-size: 24px; }
  .intro p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .card p { display: none; }
  .foot .contact .k { display: none; }
}
@media (max-height: 640px) and (min-width: 561px) {
  .intro p { display: none; }
  .card p { display: none; }
}

/* =========================================================
   CASE PAGES
   ========================================================= */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gut) 14px;
  transition: transform .5s var(--ease-out), background .4s;
}
.bar.solid { background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bar.hide { transform: translateY(-100%); }
.bar .brand .logo-mark { width: 48px; }
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.read-progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

.case-hero { padding: calc(110px + env(safe-area-inset-top, 0px)) var(--gut) 40px; }
.case-hero .kicker { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 26px; }
.case-hero .kicker span { font-size: 15px; color: var(--mute); letter-spacing: .01em; }
.case-hero h1 {
  margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(34px, 7.6vw, 150px); line-height: .92; letter-spacing: -.02em;
  text-wrap: balance;
}
.case-hero h1 .w { display: inline-block; white-space: nowrap; }
.case-hero h1 .ch { display: inline-block; }
.js .case-hero h1 .ch { transform: translateY(110%) rotate(6deg); opacity: 0; }
.ready .case-hero h1 .ch { transform: none; opacity: 1; transition: transform 1s var(--ease-out), opacity .6s; transition-delay: calc(var(--i) * 28ms + .1s); }
.case-hero .where { margin-top: 18px; color: var(--mute); font-size: 15px; }
.case-hero .lede-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; margin-top: 56px;
  border-top: 1px solid var(--line); padding-top: 32px;
}
.lede { margin: 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.5; font-weight: 400; text-wrap: pretty; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-content: start; }
.stat b {
  display: block; text-transform: uppercase; font-family: var(--display); font-weight: 700; color: var(--accent);
  font-size: clamp(24px, 2.6vw, 40px); line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.stat > span { display: block; margin-top: 8px; font-size: 13px; color: var(--mute); line-height: 1.45; }

.media { padding: 0 var(--gut); }
.figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--r); background: var(--ink-2); max-width: 100%; }
/* every image sits in a fixed-ratio slot and fills it: no stretching, no letterboxing */
.figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
/* graphics with their own shape/transparency (palettes, logo strips): never clipped */
.figure.free { border-radius: 0; background: none; overflow: visible; }
.grid { display: grid; gap: clamp(10px, 1.2vw, 18px); }
.grid > * { min-width: 0; }
.cap { margin: 14px 0 0; font-size: 12.5px; color: var(--mute); max-width: 80ch; }

/* reveal on scroll: wipe up */

.js .rt { opacity: 0; transform: translateY(24px); }
.rt.in { opacity: 1; transform: none; transition: opacity .9s, transform 1s var(--ease-out); }

.chapter {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 6vw, 120px);
  padding: clamp(80px, 12vw, 180px) var(--gut) clamp(40px, 5vw, 70px);
}
.chapter .side { position: relative; }
.chapter .side .sticky { position: sticky; top: 110px; }
.chapter .no {
  font-family: var(--display); font-weight: 700; color: var(--accent);
  font-size: clamp(56px, 8vw, 130px); line-height: .85; letter-spacing: -.03em;
}
.chapter .side h2 {
  margin: 14px 0 0; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(14px, 1.3vw, 20px); letter-spacing: .14em; line-height: 1.3; text-wrap: balance;
}
.chapter .side .rule { display: block; height: 2px; background: var(--accent); margin-top: 18px; width: 100%; transform-origin: left; }
.js .chapter .side .rule { transform: scaleX(0); }
.chapter.in .side .rule { transform: scaleX(1); transition: transform 1.2s var(--ease); }
.chapter .body { max-width: 66ch; }
.chapter h3 { margin: 0 0 22px; font-weight: 600; font-size: clamp(22px, 2.1vw, 32px); line-height: 1.25; text-wrap: balance; }
.chapter .body p { margin: 0 0 18px; font-size: clamp(15.5px, 1.1vw, 18px); color: var(--text); }

.pill-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Bondi timeline */
.timeline {
  margin: 0 var(--gut); border: 1px solid var(--line); border-radius: 10px;
  padding: clamp(24px, 3.4vw, 52px) clamp(16px, 3vw, 48px);
  background: var(--ink-2);
}
.tl {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px;
  list-style: none; margin: 0; padding: 0;
}
.tl::before, .tl::after {
  content: ""; position: absolute; left: 10%; right: 10%; top: 104px; height: 2px; background: var(--line);
}
.tl::after { background: linear-gradient(90deg, var(--line), var(--accent) 70%); transform-origin: left; transform: scaleX(var(--p, 1)); }
.js .tl::after { --p: 0; }
.timeline.in .tl::after { --p: 1; transition: transform 1.6s var(--ease); }
.tl li { display: grid; justify-items: center; text-align: center; gap: 10px; align-content: start; }
.tl .ic { height: 86px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 40px; color: #9fb3a2; }
.tl .ic img { height: 78px; width: 78px; object-fit: cover; border-radius: var(--r); }
.tl li.hot .ic { color: var(--accent); }
.tl .dot { width: 18px; height: 18px; border-radius: 50%; background: #9fb3a2; position: relative; z-index: 1; margin-top: 0; box-shadow: 0 0 0 6px var(--ink-2); }
.tl li.hot .dot { background: var(--accent); }
.tl h4 { margin: 8px 0 0; font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .14em; }
.tl li.hot h4 { color: var(--accent); }
.tl p { margin: 0; font-size: 12.5px; color: var(--mute); max-width: 24ch; line-height: 1.45; }
.js .tl li { opacity: 0; transform: translateY(16px); }
.timeline.in .tl li { opacity: 1; transform: none; transition: opacity .7s, transform .8s var(--ease-out); transition-delay: calc(var(--i) * 180ms + .2s); }

/* venues (CQ) */
.venues { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.venues h4 { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .14em; color: var(--accent); }
.venues p { margin: 0; font-size: 13px; color: var(--mute); line-height: 1.5; }

/* next project */
.next {
  display: block; text-decoration: none; margin-top: clamp(90px, 12vw, 180px);
  border-top: 1px solid var(--line); padding: clamp(40px, 6vw, 90px) var(--gut);
  position: relative; overflow: hidden;
}
.next .eyebrow { display: block; margin-bottom: 16px; }
.next strong {
  display: block; font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(34px, 8.5vw, 150px); line-height: .9; letter-spacing: -.02em;
  -webkit-text-stroke: 1.5px var(--paper); color: transparent;
  transition: color .6s var(--ease-out), -webkit-text-stroke-color .6s;
}
.next:hover strong { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.next .arrow { display: inline-block; transition: transform .6s var(--ease-out); }
.next:hover .arrow { transform: translateX(16px); }

.case-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; align-items: center;
  padding: 28px var(--gut) calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--mute);
}
.case-foot .contact { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.case-foot .contact a, .case-foot .contact button { color: var(--paper); font-size: 13px; }

/* logos page */
.logo-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.logo-grid .figure:nth-child(1) { grid-column: span 3; }
.logo-grid .figure:nth-child(2) { grid-column: span 3; }
.logo-grid .figure:nth-child(3), .logo-grid .figure:nth-child(4), .logo-grid .figure:nth-child(5) { grid-column: span 2; }
.logo-grid .figure:nth-child(6) { grid-column: span 6; }

@media (max-width: 860px) {
  .case-hero .lede-row { grid-template-columns: 1fr; }
  .chapter { grid-template-columns: 1fr; }
  .chapter .side .sticky { position: static; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .stat b { font-size: 18px; white-space: normal; }
  .stat > span { font-size: 12px; }
  .tl { grid-template-columns: 1fr; gap: 26px; }
  .tl::before, .tl::after { display: none; }
  .tl li { grid-template-columns: 70px minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 16px; }
  .tl .ic { grid-row: span 3; height: auto; font-size: 30px; }
  .tl .ic img { height: 60px; }
  .tl .dot { display: none; }
  .tl h4 { margin: 0; }
  .venues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-grid { grid-template-columns: 1fr; }
  .logo-grid .figure { grid-column: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .rv img, .js .rt, .js .pmenu li, .js .tl li, .js .track .card, .js .reveal-home, .js .intro h1 .line > span, .js .case-hero h1 .ch { clip-path: none; opacity: 1; transform: none; }
  .js .tl::after, .js .chapter .side .rule { transform: none; }
}

/* touch screens have no hover: show covers in colour */
@media (hover: none) {
  .card .frame img { transform: none; }
}

/* ---------- project switcher (case pages) ---------- */
.bar-right { display: flex; align-items: center; gap: 12px; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--ink) 70%, transparent);
  padding: 9px 14px 9px 16px; font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  transition: border-color .3s, background .3s;
}
.menu-btn:hover { border-color: var(--accent); }
.menu-btn .chev { width: 10px; height: 10px; transition: transform .5s var(--ease-out); }
.menu-open .menu-btn { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.menu-open .menu-btn .chev { transform: rotate(180deg); }
.menu-open .bar { transform: none !important; background: var(--ink); }

.pmenu {
  position: fixed; left: 0; right: 0; top: 0; z-index: 45;
  padding: calc(84px + env(safe-area-inset-top, 0px)) var(--gut) 28px;
  background: var(--ink); border-bottom: 1px solid var(--line);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .7s var(--ease), visibility 0s .7s;
}
.menu-open .pmenu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .7s var(--ease), visibility 0s; }
.pmenu-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(15,58,39,.35); opacity: 0; pointer-events: none; transition: opacity .5s; }
.menu-open .pmenu-scrim { opacity: 1; pointer-events: auto; }
.pmenu ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pmenu li { opacity: 0; transform: translateY(18px); transition: opacity .4s, transform .6s var(--ease-out); }
.menu-open .pmenu li { opacity: 1; transform: none; transition-delay: calc(var(--i) * 70ms + .25s); }
.pmenu a { display: grid; gap: 10px; text-decoration: none; color: var(--paper); }
.pmenu .thumb { aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--ink-2); position: relative; }
.pmenu .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out), filter .6s; }
.pmenu a:hover .thumb img { transform: scale(1.06); }
.pmenu .lbl { display: flex; align-items: baseline; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.pmenu .lbl em { font-style: normal; color: var(--accent); font-size: 10px; }
.pmenu a:hover .lbl { color: var(--accent); }
.pmenu .here .thumb::after {
  content: attr(data-here-es); position: absolute; left: 10px; top: 10px;
  font-family: var(--display); font-weight: 700; font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  background: var(--accent); color: var(--ink); padding: 5px 8px; border-radius: 999px;
}
.pmenu .here .thumb img { filter: brightness(.6); }
@media (max-width: 860px) {
  .pmenu { padding-top: calc(76px + env(safe-area-inset-top, 0px)); max-height: 100dvh; overflow-y: auto; }
  .pmenu ol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .menu-btn .txt { display: none; }
  .menu-btn { padding: 9px 12px; }
}
@media (max-width: 520px) { .bar .brand-name { display: none; } }
html[data-lang="en"] .pmenu .here .thumb::after { content: attr(data-here-en); }


/* ---------- light / dark toggle ---------- */
.theme {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--paper);
  padding: 8px 14px 8px 10px; font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  transition: border-color .3s;
}
.theme:hover { border-color: var(--paper); }
.theme:active { transform: scale(.97); }
.theme-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); transform: rotate(180deg); transition: transform .5s var(--ease-out); }
:root[data-theme="light"] .theme-dot { transform: none; }
@media (max-width: 860px) { .theme-txt { display: none; } .theme { padding: 8px; } }
.top-right, .bar-right { display: flex; align-items: center; gap: 10px; }

/* ---------- centred reading column on case pages ---------- */
:root { --wrap: 1240px; }
.case-hero, .media, .chapter, .next, .case-foot {
  max-width: calc(var(--wrap) + 2 * var(--gut)); margin-inline: auto;
}
.timeline { max-width: var(--wrap); margin-inline: max(var(--gut), calc((100% - var(--wrap)) / 2)); }
@media (min-width: 1500px) { .timeline { margin-inline: auto; } }
.bar { padding-inline: max(var(--gut), calc((100% - var(--wrap)) / 2)); }
.case-hero h1 { font-size: clamp(34px, 6.4vw, 112px); }
.chapter { padding-top: clamp(72px, 9vw, 140px); }
.media + .media { margin-top: clamp(14px, 1.4vw, 22px); }
.stats { gap: 28px; }
.stat b { font-size: clamp(20px, 2vw, 32px); white-space: normal; }

/* ---------- contact ---------- */
.contact-link { font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding: 8px 6px; }
.contact-page h1 { margin-bottom: clamp(32px, 4vw, 56px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px clamp(32px, 6vw, 96px); border-top: 1px solid var(--line); padding-top: 36px; }
.contact-intro .lede { margin-bottom: 28px; }
.contact-intro .direct { color: var(--mute); font-size: 15px; margin: 0 0 14px; }
.contact-intro .direct a { color: var(--paper); font-size: 17px; }
.cform { display: grid; gap: 22px; }
.cform .hp { position: absolute; left: -9999px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.field input, .field textarea {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--paper); background: var(--ink-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; width: 100%; resize: vertical;
  transition: border-color .25s, background .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--ink); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #c4473a; }
.form-error { margin: 0; color: #c4473a; font-size: 14px; }
.send {
  justify-self: start; cursor: pointer; border: 0; border-radius: 999px; background: var(--accent); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  padding: 16px 26px; transition: transform .2s, background .3s;
}
:root:not([data-theme="light"]) .send { color: #10130f; }
.send:hover { background: var(--accent-hot); }
.send:active { transform: translateY(1px) scale(.99); }
.send[disabled] { opacity: .6; cursor: progress; }
.form-ok { border: 1px solid var(--accent); border-radius: 12px; padding: 20px 22px; display: grid; gap: 6px; }
.form-ok b { font-family: var(--display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cform.sent .field, .cform.sent .send { display: none; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .top-right .contact-link { display: none; }
  .bar-right .contact-link { display: none; }
}

/* ---------- fixes oct-10 ---------- */
[hidden] { display: none !important; }
/* home rail runs to the very edge of the screen */
.rail { margin-inline: calc(-1 * var(--gut)); }
.track { padding-inline: var(--gut); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  /* home: full description, bigger title */
  .intro { padding-block: 18px 16px; gap: 12px; }
  .intro h1 { font-size: clamp(28px, 8.4vw, 40px); }
  .intro p { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 14px; line-height: 1.55; max-width: none; }
  .group-label h2 { font-size: 22px; }
  .card h3 { font-size: 12px; }

  /* case pages follow the PDF: same compositions side by side, side margins, rounded images */
  .case-hero { padding-top: calc(96px + env(safe-area-inset-top, 0px)); padding-bottom: 28px; }
  .case-hero h1 { font-size: clamp(38px, 11.5vw, 56px); line-height: .95; }
  .case-hero .lede { font-size: 17px; line-height: 1.5; }
  .grid { gap: 8px; }
  .media + .media { margin-top: 8px; }
  .stats { gap: 12px !important; margin-top: 6px; }
  .stat b { font-size: clamp(15px, 4.4vw, 19px) !important; white-space: normal; }
  .stat > span { font-size: 11.5px !important; line-height: 1.4; }
  .chapter { padding-top: 64px; }
}
/* mobile home: the page scrolls, the project rail gets big cards */
@media (max-width: 760px) {
  html.home, html.home body { height: auto; overflow-x: hidden; overflow-y: auto; }
  .home-wrap { height: auto; min-height: 100svh; grid-template-rows: auto auto auto auto; }
  .rail { flex: none; height: calc(min(60svh, 104vw) + 120px); }
  .card .meta { --mh: 56px; }
  .foot { padding-block: 22px 26px; }
}

/* ---------- mobile: images keep their weight ---------- */
@media (max-width: 760px) {
  .grid.grid--stack { grid-template-columns: 1fr !important; gap: 12px; }
  .grid.grid--swipe {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut);
    margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .grid.grid--swipe::-webkit-scrollbar { display: none; }
  .grid.grid--swipe > .figure { flex: none; width: min(74vw, 340px); scroll-snap-align: start; }
  .grid.grid--swipe::after { content: ""; flex: none; width: 1px; }
  .media + .media { margin-top: 12px; }
  .swipe-hint { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-family: var(--display); font-weight: 700; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
  .swipe-hint i { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
  .swipe-hint i b { position: absolute; inset: 0 auto 0 0; background: var(--accent); width: 30%; transition: transform .2s; }
}
@media (min-width: 761px) { .swipe-hint { display: none; } }

/* ---------- mobile edition (built by main.js) ---------- */
@media (max-width: 760px) {
  .cap { display: none; }
  .media + .media { margin-top: 14px; }
  .m-slider-wrap { padding-inline: 0; }
  .m-slider {
    --sh: min(58svh, 430px, calc(78vw / var(--rmax, 1)));
    display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); padding-inline: var(--gut);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .m-slider::-webkit-scrollbar { display: none; }
  .m-slider::after { content: ""; flex: 0 0 1px; }
  .m-slider > .figure { flex: none; height: var(--sh); scroll-snap-align: start; }
  .m-card { flex: none; scroll-snap-align: start; }
  .m-card .figure { width: 100%; }
  .m-card h4 { margin: 18px 0 6px; font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .14em; color: var(--accent); }
  .m-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--mute); }
  .m-bar { position: relative; height: 2px; margin: 16px var(--gut) 0; background: var(--line); border-radius: 2px; overflow: hidden; }
  .m-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 2px; }

  /* compact chapter header: number and title on one line */
  .chapter { padding-top: 60px; padding-bottom: 6px; }
  .chapter .side .sticky { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 14px; }
  .chapter .no { font-size: 34px !important; line-height: 1; }
  .chapter .side h2 { margin: 0; font-size: 11px; }
  .chapter .side .rule { flex-basis: 100%; margin-top: 14px; }
  .chapter h3 { font-size: 21px; margin: 18px 0 12px; }
  .chapter .body p { font-size: 15px; line-height: 1.6; margin-bottom: 12px; }
  .chapter .body p.m-fold { display: none !important; }
  .m-more {
    display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 10px 0; border: 0; background: none; cursor: pointer;
    font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  }
  .m-more svg { width: 10px; }

}
}
@media (max-width: 760px) {
  .m-slider.m-land { --sh: calc(84vw / var(--rmax, 1.5)); }
}

/* ---------- mobile v3: cover, facts, summaries, mosaics, editorial index ---------- */
.m-only { display: none; }
@media (max-width: 760px) {
  .m-only { display: block; }
  /* gaps inside a block of images: one mosaic wall */
  .media.m-single + .media, .media.m-pair + .media, .media.m-slider-wrap + .media.m-single, .media + .media.m-pair { margin-top: 8px; }
  .m-pair { display: flex; gap: 8px; align-items: flex-start; }
  .m-pair > .figure { flex: 1 1 0; width: 0; min-width: 0; }

  /* project cover + one-liner + facts sheet */
  .case-hero.has-cover { padding-top: calc(78px + env(safe-area-inset-top, 0px)); }
  .case-hero.has-cover + .media { display: none; }
  .case-hero.has-cover:has(.m-lede) .kicker, .case-hero.has-cover:has(.m-lede) .lede-row > .lede { display: none; }
  .m-cover { margin: 0 0 26px; aspect-ratio: 3 / 4; width: 100%; border-radius: var(--r); overflow: hidden; background: var(--ink-2); position: relative; }
  .m-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .case-hero.has-cover h1 { margin-bottom: 14px; }
  .m-lede { font-size: 18px; line-height: 1.45; margin: 0 0 22px; color: var(--paper); max-width: 30ch; }
  .m-facts { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 6px; border-top: 1px solid var(--line); }
  .m-facts > div { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
  .m-facts > div:nth-child(odd) { padding-right: 16px; }
  .m-facts dt { font-family: var(--display); font-weight: 700; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); margin-bottom: 5px; }
  .m-facts dd { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--paper); }
  .case-hero.has-cover .lede-row { margin-top: 18px; }
  .case-hero.has-cover .lede-row { border-top: 0 !important; padding-top: 0 !important; }

  /* chapter summary replaces the paragraphs */
  .chapter .body p.m-sum { font-size: 16px; line-height: 1.55; color: var(--text); }

  /* home: editorial index instead of the horizontal rail */
  .home .rail-zone { display: none; }
  .m-index { padding: 6px 0 10px; }
  .m-index h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
  .m-index ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .m-index li { border-bottom: 1px solid var(--line); }
  .m-index a { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 16px; align-items: center; padding: 16px 0; text-decoration: none; color: var(--paper); }
  .m-index .mi-meta { display: block; font-family: var(--display); font-weight: 700; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 7px; }
  .m-index strong { display: block; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.1; text-transform: uppercase; letter-spacing: .01em; }
  .m-index .mi-line { display: block; margin-top: 7px; font-size: 13px; line-height: 1.45; color: var(--mute); }
  .m-index .mi-img { display: block; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--ink-2); position: relative; }
  .m-index .mi-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .m-index a:active strong { color: var(--accent); }
}
/* home index v2: big covers, title only */
@media (max-width: 760px) {
  .m-index { padding: 8px 0 20px; }
  .m-index ol { border-top: 0; display: grid; gap: 34px; }
  .m-index li { border-bottom: 0; }
  .m-index a { display: block; padding: 0; }
  .m-index .mi-img { aspect-ratio: 3 / 4; border-radius: var(--r); }
  .m-index strong { margin-top: 14px; font-size: 13px; letter-spacing: .14em; }
}

/* stats: a short line instead of an arrow ("1 — 3") */
.stat .to { display: inline-block; width: .9em; height: 2px; background: currentColor; vertical-align: middle; margin: 0 .3em; position: relative; top: -.08em; border-radius: 2px; }
/* mobile-specific exports (img/<name>-m.webp) bring their own shape */
@media (max-width: 760px) { .figure[data-mr] { aspect-ratio: var(--mr) !important; } }
/* mobile sliders: driven by touch, one piece per swipe, centred */
@media (max-width: 760px) {
  .m-swipe { overflow-x: hidden !important; scroll-snap-type: none !important; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
  .m-swipe img { -webkit-user-drag: none; pointer-events: none; }
  .m-swipe::before { content: ""; flex: 0 0 1px; }
  .figure.m-small { width: 62% !important; }
  .media.m-single:has(.m-small) { display: flex; }
}

/* mobile timeline: vertical, the green line grows downwards like the desktop one grows sideways */
@media (max-width: 760px) {
  .timeline { margin: 0 var(--gut) !important; padding: 26px 20px 26px 18px !important; }
  .tl { display: grid !important; grid-template-columns: 1fr !important; gap: 26px !important; padding: 0 0 0 30px !important; }
  .tl::before, .tl::after { display: block !important; left: 8px !important; right: auto !important; top: 10px !important; bottom: 10px !important; width: 2px !important; height: auto !important; }
  .tl::after { background: linear-gradient(180deg, var(--line), var(--accent) 70%) !important; transform-origin: top !important; transform: scaleY(var(--p, 1)) !important; }
  .tl li { position: relative; display: grid !important; grid-template-columns: 54px minmax(0, 1fr) !important; column-gap: 14px; row-gap: 4px; justify-items: start !important; text-align: left !important; align-items: center; }
  .tl .ic { grid-row: span 2; height: 54px !important; font-size: 28px !important; }
  .tl .ic img { height: 54px !important; width: 54px !important; }
  .tl .dot { display: block !important; position: absolute !important; left: -29px; top: 50%; margin-top: -8px !important; width: 16px; height: 16px; }
  .tl h4 { margin: 0 !important; align-self: end; }
  .tl p { max-width: none !important; font-size: 13px; align-self: start; }
  .m-only-media { display: block; }
}
.m-only-media { display: none; }

/* labels on images (ANTES / DESPUÉS, BOCETO / FINAL...) drawn in code, always the same size */
.figure .tag {
  position: absolute; top: clamp(10px, 1.4vw, 18px); left: clamp(10px, 1.4vw, 18px); z-index: 2; pointer-events: none;
  display: inline-flex; align-items: center; height: 26px; padding: 0 13px; border-radius: 999px;
  background: #151515; border: 1px solid rgba(255,255,255,.18); color: #36ba78;
  font-family: var(--display); font-weight: 700; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; line-height: 1;
}
@media (max-width: 760px) { .figure .tag { height: 22px; padding: 0 10px; font-size: 8.5px; top: 10px; left: 10px; } }

/* =========================================================
   HOME v4 · "Mesa": project covers as loose cards on a table,
   switchable between Brands / UX/UI / Motion (tabs only appear
   when there is more than one category with work in it).
   Desktop: one screen, no scroll. Mobile: a vertical stack.
   ========================================================= */
html.home .home-wrap { grid-template-rows: auto minmax(0, 1fr) auto; }
.home-body {
  display: grid; grid-template-columns: minmax(250px, 24vw) minmax(0, 1fr); gap: clamp(20px, 3vw, 56px);
  min-height: 0; padding-block: clamp(14px, 3vh, 36px) clamp(6px, 1.4vh, 16px);
}
.home-left { display: flex; flex-direction: column; gap: clamp(18px, 3vh, 30px); min-height: 0; }
.home-left .intro { display: block; padding: 0; }
.home-left .intro h1 { font-size: clamp(24px, 2.5vw, 42px); line-height: 1.02; }
.home-left .intro p { margin-top: 18px; max-width: 34ch; }

.mesa-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.mesa-tabs button {
  cursor: pointer; background: transparent; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--paper) 38%, transparent); color: var(--paper);
  font-family: var(--display); font-weight: 700; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.mesa-tabs button:hover { border-color: var(--paper); }
.mesa-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }

.mesa { position: relative; min-height: 0; container-type: size; }
.mesa-word {
  position: absolute; left: 0; right: 0; top: 1cqh; text-align: center; white-space: nowrap; pointer-events: none; user-select: none;
  font-family: var(--display); font-weight: 700; font-size: 15cqw; line-height: 1; letter-spacing: -.01em;
  color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--paper) 17%, transparent);
}
.mesa-set {
  position: absolute; inset: 0;
  --h: min(76cqh, calc(97cqw / (var(--n) * .8 + var(--s) * .3)));
  --w: calc(var(--h) * .75);
  --gap: calc(var(--w) * .06);
  --x0: calc((100cqw - (var(--w) * var(--n) + var(--gap) * (var(--n) - 1))) / 2);
}
.carta {
  position: absolute; display: block; text-decoration: none; color: #f6f0de; overflow: hidden; z-index: 2;
  width: var(--w); aspect-ratio: 3 / 4; border-radius: var(--r); background: var(--ink-2);
  left: calc(var(--x0) + var(--i, 0) * (var(--w) + var(--gap)));
  top: calc((100cqh - var(--h)) / 2 + var(--dy, 0cqh));
  transform: rotate(var(--rot, 0deg));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
  transition: transform .5s var(--ease-out), box-shadow .5s;
}
.carta:nth-child(1) { --rot: -5deg; --dy: -3cqh; }
.carta:nth-child(2) { --rot: 3deg; --dy: 4cqh; z-index: 3; }
.carta:nth-child(3) { --rot: -2deg; --dy: -5cqh; }
.carta:nth-child(4) { --rot: 4deg; --dy: 2cqh; }
.carta.small {
  width: calc(var(--w) * .62); left: auto; top: auto; right: calc(var(--x0) * .3); bottom: 1cqh; --rot: 6deg; z-index: 4;
}
.mesa-set[data-n="1"] .carta { --rot: -3deg; --dy: 0cqh; }
.carta img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carta .pill {
  position: absolute; top: 12px; left: 12px; z-index: 2; max-width: calc(100% - 24px);
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 7px 12px;
  font-family: var(--display); font-weight: 700; font-size: clamp(7.5px, calc(var(--w) * .036), 9.5px); letter-spacing: .14em; line-height: 1.2; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.carta.small .pill { top: 8px; left: 8px; padding: 5px 9px; max-width: calc(100% - 16px); }
.carta .cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 72px 18px 18px;
  background: linear-gradient(to top, rgba(10, 12, 10, .92) 25%, rgba(10, 12, 10, 0));
  font-size: 12.5px; line-height: 1.5; font-weight: 400; color: #fff; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .5s var(--ease-out);
}
.carta .cap b { display: block; margin-bottom: 5px; font-family: var(--display); font-weight: 700; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: #6fe0a3; }
.carta.soon { background: var(--ink-3); color: var(--paper); cursor: default; }
.carta.soon .stamp { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 10px; letter-spacing: .2em; color: var(--mute); }
.carta.soon .cap { color: #f6f0de; }
@media (hover: hover) {
  html .carta:hover, html .carta:focus-visible { transform: rotate(0deg) translateY(-18px) scale(1.06); z-index: 6; box-shadow: 0 44px 80px rgba(0, 0, 0, .32); }
  html .carta:hover .cap, html .carta:focus-visible .cap { opacity: 1; transform: none; }
  html .carta:hover img { transform: scale(1.04); }
  .carta img { transition: transform .8s var(--ease-out); }
}
.carta:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.carta:active { transform: rotate(0deg) scale(.98); }

/* load choreography */
.js .carta { opacity: 0; transform: translateY(34px) rotate(var(--rot, 0deg)); }
.ready .carta { opacity: 1; transform: rotate(var(--rot, 0deg)); transition: opacity .8s, transform 1.2s var(--ease-out), box-shadow .5s; transition-delay: calc(.3s + var(--i, 0) * .09s); }
.ready.settled .carta { transition-delay: 0s; transition-duration: .8s, .5s, .5s; }
@keyframes mesa-in { from { opacity: 0; } }
.settled .mesa-set .carta { animation: mesa-in .45s ease both; }
.settled .mesa-word { animation: mesa-in .45s ease both; }
@media (prefers-reduced-motion: reduce) {
  .js .carta { opacity: 1; transform: rotate(var(--rot, 0deg)); }
  .settled .mesa-set .carta, .settled .mesa-word { animation: none; }
}

/* tablets and any tall (portrait) screen wider than a phone: the page scrolls,
   intro on top in two columns, covers in a staggered 2-column table below */
@media (min-width: 761px) and (max-width: 1000px), (min-width: 761px) and (orientation: portrait) {
  html.home, html.home body { height: auto; overflow-x: hidden; overflow-y: auto; }
  html.home .home-wrap { height: auto; min-height: 100svh; grid-template-rows: auto auto auto; }
  .home-body { grid-template-columns: 1fr; gap: 8px; padding-block: clamp(18px, 3vw, 40px) 8px; }
  .home-left { gap: 28px; }
  .home-left .intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 5vw; align-items: end; }
  .home-left .intro h1 { font-size: clamp(30px, 5.2vw, 52px); }
  .home-left .intro p { margin: 0; max-width: 46ch; font-size: clamp(14px, 1.9vw, 17px); }
  .mesa { container-type: normal; height: auto; padding: calc(17vw * .8) 0 24px; }
  .mesa-word { display: block; top: 0; font-size: 17vw; }
  .mesa-set { position: relative; inset: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 52px) 4vw; justify-items: center; align-items: start; }
  .mesa-set[hidden] { display: none; }
  .carta, .carta.small { position: relative; left: auto; top: auto; right: auto; bottom: auto; width: min(88%, 460px); margin: 0; --dy: 0px; }
  .carta:nth-child(even) { margin-top: clamp(30px, 6vw, 72px); }
  .carta:only-child { grid-column: 1 / -1; }
  .carta.small { width: min(62%, 300px); align-self: start; }
  .carta:nth-child(1) { --rot: -3deg; }
  .carta:nth-child(2) { --rot: 3deg; }
  .carta:nth-child(3) { --rot: -2deg; }
  .carta:nth-child(4) { --rot: 4deg; }
  .carta.small { --rot: 5deg; }
  .foot { padding-block: 22px 26px; }
}

/* mobile: a vertical pile, big covers, name tag on top of each */
@media (max-width: 760px) {
  html.home .home-wrap { grid-template-rows: auto auto auto; }
  .home-body { grid-template-columns: 1fr; gap: 6px; padding-block: 14px 4px; }
  .home-left { gap: 22px; }
  .home-left .intro h1 { font-size: clamp(28px, 8.4vw, 40px); }
  .home-left .intro p { max-width: none; }
  .mesa-tabs { gap: 8px; }
  .mesa-tabs button { flex: 1; padding: 0 8px; }
  .mesa { container-type: normal; padding: 36px 0 20px; }
  .mesa-word { display: none; }
  .mesa-set { position: static; display: flex; flex-direction: column; align-items: center; --w: min(78vw, 320px); }
  .mesa-set[hidden] { display: none; }
  .carta { position: relative; left: auto; top: auto; right: auto; bottom: auto; width: var(--w); margin-top: -44px; --dy: 0px; }
  .carta:first-child { margin-top: 0; }
  .carta, .carta:nth-child(2) { z-index: auto; }
  .carta:nth-child(1) { --rot: -3deg; }
  .carta:nth-child(2) { --rot: 3deg; }
  .carta:nth-child(3) { --rot: -2deg; }
  .carta:nth-child(4) { --rot: 4deg; }
  .carta.small { width: calc(var(--w) * .66); align-self: flex-end; margin-right: 6px; margin-top: -18px; right: auto; bottom: auto; --rot: 5deg; z-index: 4; }
  .carta .cap { display: none; }
  .foot { padding-block: 22px 26px; }
}
