/* ==========================================================================
   RedSign Studio · styles.css
   1. Tokens   2. Base   3. Components   4. Sections   5. Motion   6. Responsive   7. Decorative system   8. Case studies (/work)
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */
:root {
  /* Color */
  --black: #0B0B0B;
  --white: #FFFFFF;
  --gray: #555555;
  --line: #D9D9D9;
  --red: #FB1515;            /* Brand red, matches the logo. Large type and accents. */
  --red-ink: #DB1212;        /* Same red, slightly darker: small text and small fills on white (5.1:1). */
  --white-muted: rgba(255, 255, 255, 0.72);
  --white-line: rgba(255, 255, 255, 0.18);

  /* Type */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --fs-display: clamp(40px, 7.8vw, 150px);   /* Hero + "Inconsistent" headline */
  --fs-ticker: clamp(56px, 7.8vw, 150px);
  --fs-title: clamp(34px, 3.2vw, 60px);      /* Pricing / Extras titles */
  --fs-row: clamp(26px, 2.95vw, 57px);       /* Problem row titles */
  --fs-note: clamp(16px, 1.15vw, 22px);      /* Side notes */
  --fs-lead: clamp(18px, 0.6vw + 12px, 22px);
  --fs-body: clamp(16px, 0.5vw + 11px, 19px);
  --fs-small: 15px;
  --fs-micro: 13px;
  --tracking-display: -0.03em;

  /* Layout */
  --container: 1520px;
  --gutter: clamp(20px, 5vw, 64px);
  /* Extra side margin: 100px at 1920, scaling linearly to 0 at 390 so phones keep their space. */
  --gutter-extra: clamp(0px, (100vw - 390px) * 0.0654, 100px);
  --pad-x: calc(var(--gutter) + var(--gutter-extra));

  /* Vertical rhythm: one scale used everywhere */
  --section: clamp(120px, 11.5vw, 220px);    /* between sections */
  --section-xl: calc(var(--section) * 1.5);  /* a major break (before About) */
  --space-xl: clamp(64px, 6.2vw, 120px);     /* section title → content */
  --space-lg: clamp(44px, 4.2vw, 80px);      /* content → closing line / buttons */
  --space-md: clamp(28px, 2.6vw, 48px);      /* between related blocks */
  --space-sm: clamp(16px, 1.5vw, 28px);
  --radius-lg: clamp(18px, 1.9vw, 36px);
  --radius-md: clamp(14px, 1.25vw, 24px);
  --radius-sm: clamp(10px, 0.85vw, 16px);
  --nav-offset: 110px;
  --nav-h: clamp(60px, 4.5vw, 86px);   /* nav pill height (also positions the case study tab pill) */

  /* Motion (mirrors EASE / DUR in main.js: power3.out) */
  --ease-out: cubic-bezier(0.165, 0.84, 0.44, 1);
  --dur-fast: 0.22s;        /* hover feedback */
  --dur: 0.3s;              /* hover / state changes */
  --dur-accordion: 0.4s;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);  /* soft, modern ease-out for the button fill */
  --dur-fill-in: 0.85s;     /* button fill grows to cover the button */
  --dur-fill-out: 0.6s;     /* button fill shrinks back */

  /* Shadows */
  --shadow-soft: 3px 3px 20px rgba(0, 0, 0, 0.16);
  --shadow-lift: 0 24px 48px -24px rgba(0, 0, 0, 0.28);
}

/* 2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Anchor targets (#contact, #pricing…) land below the sticky nav
   (16px from the top + the nav height) with some breathing room. */
:root { --anchor-offset: calc(16px + var(--nav-h) + clamp(24px, 2.5vw, 48px)); }
[id] { scroll-margin-top: var(--anchor-offset); }
/* Case study deliverables also clear the floating tab pill (measured by main.js: --tabs-clearance). */
.deliverables [data-tab][id] { scroll-margin-top: var(--tabs-clearance, calc(16px + var(--nav-h) * 0.94 + 12px + 46px + 48px)); }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* Empty placeholder images stay invisible until a src is added. */
img:not([src]), img[src=""] { visibility: hidden; }

:focus-visible {
  outline: 2px solid var(--red-ink);
  outline-offset: 4px;
  border-radius: 4px;
}

.container {
  width: min(var(--container) - 2 * var(--gutter-extra), 100% - 2 * var(--pad-x));
  margin-inline: auto;
}

.section {
  --gap-above: var(--section);
  padding-top: var(--gap-above);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

/* 3. Components
   ========================================================================== */

/* Display type */
.display {
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 1.09;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
}

/* Line masks for reveal animations */
.line-mask {
  display: block;
  overflow: hidden;
  /* A little room so glyph edges never get clipped by the mask. */
  padding-bottom: 0.04em;
  margin-bottom: -0.04em;
}
.line-inner { display: block; }

/* Image placeholders: black, rounded, fixed ratio. Swap the <img> src later. */
.ph {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #F2F2F0;
  border-radius: var(--radius-md);
}
.ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Arrows nudge right on hover of their link */
.arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease-out);
}

/* Buttons: real links. On hover a feathered red circle grows from the cursor.
   main.js adds <span class="btn__fill"><span class="btn__glow"></span></span>:
   - .btn__fill follows the cursor (translate, set every frame by JS, no CSS transition)
   - .btn__glow only scales (CSS transition), so moving never restarts the growth
     and a quick enter/leave simply reverses from wherever it is. */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: clamp(52px, 3.6vw, 68px);
  min-width: clamp(220px, 19vw, 364px);
  padding: 0 2em;
  border-radius: 999px;
  font-size: clamp(14px, 0.85vw, 17px);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.btn__fill {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  width: 0;
  height: 0;
  pointer-events: none;
  will-change: transform;
}
.btn__glow {
  position: absolute;
  left: calc(var(--bd, 600px) * -0.5);
  top: calc(var(--bd, 600px) * -0.5);
  width: var(--bd, 600px);
  height: var(--bd, 600px);
  border-radius: 50%;
  /* Solid core, then a long, eased falloff: a soft even edge with no visible ring */
  background: radial-gradient(circle closest-side,
    rgb(219, 18, 18) 0%,
    rgb(219, 18, 18) 52%,
    rgba(219, 18, 18, 0.93) 59%,
    rgba(219, 18, 18, 0.8) 66%,
    rgba(219, 18, 18, 0.62) 73%,
    rgba(219, 18, 18, 0.42) 80%,
    rgba(219, 18, 18, 0.23) 87%,
    rgba(219, 18, 18, 0.08) 94%,
    rgba(219, 18, 18, 0) 100%);
  transform: scale(0);
  transition: transform var(--dur-fill-out) var(--ease-soft);
  will-change: transform;
  backface-visibility: hidden;
}
.btn.is-lit .btn__glow {
  transform: scale(1);
  transition-duration: var(--dur-fill-in);
}
/* Text turns white in step with the fill (once the red covers most of the button) */
.btn.is-lit {
  color: var(--white);
  transition: color 0.35s var(--ease-soft) 0.16s, background-color var(--dur) var(--ease-out);
}
.btn--light { background: var(--white); color: var(--black); }
.btn--dark  { background: var(--black); color: var(--white); }
.btn--block { width: 100%; min-width: 0; }

/* Keyboard focus and touch: full red fill, no cursor effect */
.btn:focus-visible { background-color: var(--red-ink); color: var(--white); }
@media (hover: none) {
  .btn:active { background-color: var(--red-ink); color: var(--white); }
}

/* Text links */
.text-link {
  font-weight: 500;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
}
.text-link--lg { font-size: clamp(20px, 1.56vw, 30px); }

@media (hover: hover) {
  a:hover .arrow { transform: translateX(5px); }
  a:hover .arrow--up { transform: translateY(-4px); }
  .text-link:hover { text-decoration-line: underline; }
}

/* Side notes */
.side-note {
  font-size: var(--fs-note);
  font-weight: 500;
  line-height: 1.2;
  text-align: right;
}

/* Section heads: title on the left, side note on the right */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.title {
  font-size: var(--fs-title);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Logo (inline SVG sprite) */
/* Logo: assets/redsign-logo.svg (vector, sharp at any size) */
.logo {
  display: block;
  height: clamp(22px, 1.6vw, 30px);
  width: auto;
}

/* 4. Sections
   ========================================================================== */

/* Banner */
.banner {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 14px var(--pad-x);
  font-size: clamp(13px, 0.65vw + 6px, 19px);
  line-height: 1.4;
}
.banner__link {
  margin-left: 0.6em;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  text-underline-offset: 0.28em;
}
@media (hover: hover) { .banner__link:hover { text-decoration: underline; } }
.banner :focus-visible { outline-color: var(--white); }

/* Navigation */
.nav {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: flex;
  justify-content: center;
  margin-top: clamp(16px, 3vw, 59px);
  padding-inline: var(--pad-x);
  pointer-events: none;
}
.nav__pill {
  position: relative;
  pointer-events: auto;
  width: min(1067px, 100%);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: clamp(24px, 5.8vw, 112px);
  background: var(--white);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transform-origin: 50% 0;
  transition: transform 0.4s var(--ease-out);
}
.nav.is-compact .nav__pill { transform: scale(0.94); }
.nav__logo { display: block; padding: 6px 0; }
.nav__links {
  list-style: none;
  display: flex;
  gap: clamp(20px, 2.4vw, 46px);
  font-size: clamp(13px, 0.8vw, 15.5px);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.nav__links a {
  position: relative;
  display: block;
  padding: 6px 0;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform var(--dur) var(--ease-out);
}
@media (hover: hover) {
  .nav__links a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
}
.nav__toggle { display: none; }

/* Hero */
.hero { padding-top: clamp(56px, 6.2vw, 120px); }
.hero__headline { position: relative; }
.hero__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero__line--2 { align-self: flex-end; }

/* Red cursor spotlight on headlines (hero, problem, footer wordmark).
   One text layer only: each .spot-line paints its glyphs with a radial gradient
   clipped to the text. main.js sets --x / --y per line (cursor position relative
   to that line) and the .is-lit class grows --r from 0, so the light fades in/out.
   With --r at 0 the gradient is just the black text color. */
@property --r {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}
:root { --spot-r: 180px; }
.has-spotlight .spot-line {
  --r: 0px;
  background-image: radial-gradient(circle var(--r) at var(--x, -999px) var(--y, -999px),
    var(--red) 0%, var(--red) 38%, var(--black) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: --r var(--dur) var(--ease-out);
}
.has-spotlight.is-lit .spot-line { --r: var(--spot-r); }
/* Keep selected text visible: the letters are painted underneath the highlight,
   so the highlight must be translucent. */
.has-spotlight .spot-line::selection {
  background: rgba(251, 21, 21, 0.18);
}

.hero__media {
  position: absolute;
  top: calc(var(--fs-display) * 0.53);
  right: 0;
  width: 18%;
  aspect-ratio: 273 / 129;
  translate: 0 -50%;
  border-radius: var(--radius-md);
}
.hero__note {
  position: absolute;
  right: 0;
  top: calc(var(--fs-display) * 2.48);
}
.hero__lead {
  max-width: 34em;
  margin: var(--space-lg) auto 0;
  color: var(--gray);
  font-size: var(--fs-lead);
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 2.6vw, 50px);
  margin-top: var(--space-md);
}

/* Work */
.work > .container { container-type: inline-size; }
.eyebrow-title {
  margin-bottom: var(--space-xl);
  color: var(--gray);
  font-size: clamp(15px, 1.3vw, 25px);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: uppercase;
}
/* Staggered zig-zag: odd rows are the vertical offset, even rows size to the cards. */
.work__grid {
  --offset: 15cqi;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: var(--offset) auto var(--offset) auto var(--offset);
  column-gap: 6.37cqi;
  row-gap: 10.5cqi;
}
.work__grid > .card:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
.work__grid > .card:nth-child(2) { grid-column: 2; grid-row: 2 / 4; }
.work__grid > .card:nth-child(3) { grid-column: 1; grid-row: 3 / 5; }
.work__grid > .card:nth-child(4) { grid-column: 2; grid-row: 4 / 6; }

.card__link { display: block; border-radius: var(--radius-lg); }
.card__media {
  aspect-ratio: 712 / 339;
  border-radius: var(--radius-lg);
}
.ph__parallax {
  position: absolute;
  inset: -8% 0;
}
.card__media img {
  transition: transform 0.35s var(--ease-out);
}
.card__body {
  max-width: 31em;
  margin-top: var(--space-md);
}
.card__label {
  color: var(--gray);
  font-size: var(--fs-small);
  font-weight: 500;
}
.card__label .sep { margin-inline: 0.35em; color: var(--line); }
.card__title {
  margin-top: 0.45em;
  font-size: clamp(19px, 1.25vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.card__text {
  margin-top: 0.5em;
  color: var(--gray);
  line-height: 1.5;
}
.card__cta { display: inline-block; margin-top: 1em; }
@media (hover: hover) {
  .card:hover .card__media img,
  .card:focus-within .card__media img { transform: scale(1.04); }
  .card:hover .card__cta .arrow { transform: translateX(5px); }
}

/* Problem */
.problem__head { margin-bottom: var(--space-xl); }
.problem__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.problem__line--2 { align-self: flex-end; }

.rows {
  --row-pad: clamp(0px, 1.9vw, 36px);
  --row-num: clamp(44px, 5.5vw, 105px);
  --row-gap: clamp(12px, 1.6vw, 32px);
  list-style: none;
  border-bottom: 1px solid var(--black);
  overflow-anchor: none; /* main.js keeps the active row in place instead */
}
.row { border-top: 1px solid var(--black); }
.row__heading { font: inherit; }
.row__btn {
  display: grid;
  grid-template-columns: var(--row-num) minmax(0, 1fr) minmax(0, 470px) 28px;
  align-items: center;
  column-gap: var(--row-gap);
  width: 100%;
  padding: clamp(32px, 3.8vw, 72px) 0 clamp(32px, 3.8vw, 72px) var(--row-pad);
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.row__btn:focus-visible { outline-offset: -2px; }
.row__num {
  font-size: clamp(15px, 1.16vw, 22px);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast) var(--ease-out);
}
.row__title {
  transition: transform var(--dur) var(--ease-out);
  font-size: var(--fs-row);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.row__desc {
  color: var(--gray);
  font-size: clamp(15px, 0.95vw, 18px);
  line-height: 1.45;
}
.row__icon {
  position: relative;
  justify-self: end;
  width: 20px;
  height: 20px;
  transition: transform var(--dur) var(--ease-out);
}
/* Subtle hover: the title nudges right and the icon grows slightly */
@media (hover: hover) {
  .row__btn:hover .row__title { transform: translateX(8px); }
  .row__btn:hover .row__icon { transform: scale(1.2); }
}
.row__icon::before,
.row__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  transition: transform var(--dur-accordion) var(--ease-out);
}
.row__icon::after { transform: rotate(90deg); }
.row.is-open .row__num { color: var(--red-ink); }
.row.is-open .row__icon::after { transform: rotate(180deg); }

/* Accordion panel: grid rows animate 0fr → 1fr, so no height is ever measured */
.js .row__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-accordion) var(--ease-out);
}
.js .row.is-open .row__panel { grid-template-rows: 1fr; }
.row__clip { min-height: 0; overflow: hidden; }
.row__content {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(16px, 2.2vw, 40px) clamp(20px, 2.6vw, 48px);
  padding: 0 0 var(--space-lg) calc(var(--row-pad) + var(--row-num) + var(--row-gap));
}
.js .row__content {
  opacity: 0;
  transition: opacity var(--dur-accordion) var(--ease-out);
}
.js .row.is-open .row__content { opacity: 1; transition-delay: 0.08s; }
.row__main { aspect-ratio: 16 / 9; }
.row__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.row__kicker {
  color: var(--gray);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.row__subtitle {
  margin-top: 0.5em;
  font-size: clamp(24px, 2vw, 38px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.row__line {
  max-width: 26em;
  margin-top: 0.8em;
  color: var(--gray);
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.4em;
}
.tags li {
  padding: 0.4em 0.95em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-micro);
  font-weight: 500;
  line-height: 1.4;
}
.row__strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 20px);
}
.row__strip .ph { aspect-ratio: 3 / 2; border-radius: var(--radius-sm); }

.problem__outro {
  margin-top: var(--space-lg);
  text-align: right;
}

/* Packages ticker */
.ticker {
  margin-top: var(--section);
  padding-block: clamp(18px, 2vw, 40px);
  border-block: 1px solid var(--black);
  overflow: hidden;
}
.ticker__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.ticker__group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  font-size: var(--fs-ticker);
}
.ticker__word {
  padding-inline: 0.42em;
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker__mark {
  flex-shrink: 0;
  height: 0.34em; /* assets/redsign-symbol.svg, ~2:1 */
  width: auto;
}

/* Pricing */
.pricing__intro {
  max-width: 44em;
  margin: var(--space-md) 0 var(--space-xl);
  color: var(--gray);
  font-size: var(--fs-lead);
  line-height: 1.5;
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(16px, 1.6vw, 28px);
}
.plan {
  position: relative;
  grid-row: span 7;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: clamp(32px, 2.8vw, 52px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  /* Hover lift uses the separate 'translate' property; GSAP owns 'transform' for the reveal. */
  transition: translate var(--dur) var(--ease-out);
}
.plan::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
@media (hover: hover) {
  .plan:hover { translate: 0 -6px; }
  .plan:hover::after { opacity: 1; }
}
.plan__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em 0.6em;
  font-size: clamp(28px, 2.3vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.plan__tag {
  padding: 0.5em 0.85em;
  border-radius: 999px;
  background: var(--red-ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
}
.plan__tagline {
  margin-top: 0.7em;
  color: var(--gray);
  font-size: clamp(17px, 1.05vw, 20px);
}
.plan__price { padding-top: var(--space-md); }
.plan__amount {
  font-size: clamp(36px, 3vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.plan__unit { color: var(--gray); font-size: 16px; }
.plan__retainer { margin-top: 0.6em; font-size: 17px; font-weight: 500; }
.plan__meta {
  margin-top: var(--space-md);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.plan__meta div { display: flex; gap: 12px; }
.plan__meta div + div { margin-top: 8px; }
.plan__meta dt {
  flex: 0 0 6.6em;
  padding-top: 0.2em;
  color: var(--gray);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plan__value {
  margin-top: 24px;
  color: var(--red-ink);
  font-size: 17px;
  font-weight: 500;
}
.plan__cta { margin-top: var(--space-md); }
.plan__list {
  margin-top: var(--space-md);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.plan__list-title {
  color: var(--gray);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plan__list ul { list-style: none; margin-top: 10px; }
.plan__list li {
  position: relative;
  margin-top: 0.55em;
  padding-left: 1.6em;
  font-size: 16px;
  line-height: 1.45;
}
.plan__list li::before {
  content: "";
  position: absolute;
  left: 0.1em;
  top: 0.38em;
  width: 0.8em;
  height: 0.42em;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.5;
  transform: rotate(-45deg);
}

.plan--featured {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}
.plan--featured .plan__tagline,
.plan--featured .plan__unit,
.plan--featured .plan__meta dt,
.plan--featured .plan__list-title { color: var(--white-muted); }
.plan--featured .plan__meta,
.plan--featured .plan__list { border-color: var(--white-line); }
.plan--featured .plan__value { color: var(--red); }
.plan--featured .btn--light { box-shadow: none; }
.plan--featured :focus-visible { outline-color: var(--white); }

.pricing__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-top: var(--space-lg);
}
.pricing__terms { color: var(--gray); font-size: var(--fs-small); }
.pricing__terms span { display: block; }
.pricing__foot .text-link { flex-shrink: 0; }

/* Extras */
.extras__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: var(--space-xl);
  border-block: 1px solid var(--line);
}
.extra {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  padding: clamp(24px, 2.2vw, 40px) clamp(16px, 1.6vw, 28px);
  border-left: 1px solid var(--line);
}
.extra:first-child { padding-left: 0; border-left: 0; }
.extra__name {
  font-size: clamp(18px, 1.25vw, 24px);
  font-weight: 500;
  line-height: 1.2;
}
.extra__price { color: var(--gray); font-size: 16px; }

.video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--black);
  cursor: pointer;
}
.video__thumb,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
/* Hairline frame so light thumbnails don't dissolve into the page */
.video::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}
.video__thumb { transition: transform var(--dur) var(--ease-out); }
.video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(56px, 4.6vw, 80px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red-ink);
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease-out);
}
.video__play::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  border-style: solid;
  border-width: 0.5em 0 0.5em 0.85em;
  border-color: transparent transparent transparent var(--white);
  font-size: clamp(14px, 1.1vw, 20px);
  transform: translate(-50%, -50%);
}
@media (hover: hover) {
  .video:hover .video__thumb { transform: scale(1.04); }
  .video:hover .video__play { transform: translate(-50%, -50%) scale(1.08); }
}
.video.is-playing { cursor: auto; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  margin-top: auto; /* pushed down to the portrait's bottom edge when there's room */
  border-top: 1px solid var(--line);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding: var(--space-md) 16px 0 0;
}
.stat__num {
  font-size: clamp(44px, 4vw, 76px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  color: var(--gray);
  font-size: var(--fs-small);
  line-height: 1.35;
}
.anchor-placeholder { height: 0; }

/* Final call to action */
/* A quieter, more personal headline: sentence case, ~56% of the section titles */
.cta__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(32px, 4.4vw, 84px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
/* Actions on the left, booking note on the right */
.cta__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md) 48px;
}
.cta__note { text-align: right; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px clamp(24px, 3vw, 56px);
}
.cta__email { font-size: clamp(18px, 1.3vw, 24px); }

/* Footer */
.footer {
  margin-top: var(--section);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--line);
}
.footer .container { container-type: inline-size; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 0.8fr)) minmax(0, 1.15fr);
  gap: var(--space-lg) clamp(24px, 3vw, 56px);
}
.footer .logo { height: clamp(24px, 1.8vw, 34px); }
.footer__tagline {
  max-width: 18em;
  margin-top: 20px;
  color: var(--gray);
  font-size: var(--fs-small);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-md);
  font-size: var(--fs-small);
  font-weight: 500;
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  /* Static soft halo (no looping animation) */
  box-shadow: 0 0 0 4px rgba(251, 21, 21, 0.14);
}
.footer__title {
  color: var(--gray);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer__list {
  list-style: none;
  margin-top: 18px;
  font-size: 16px;
}
.footer__list li + li { margin-top: 10px; }
.footer__small {
  max-width: 18em;
  margin-top: 18px;
  color: var(--gray);
  font-size: var(--fs-small);
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: var(--space-xl);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--gray);
  font-size: var(--fs-small);
}
.footer__top { color: var(--black); }
/* Giant wordmark: sized to the container width (cqi), cropped slightly at the bottom */
.wordmark {
  margin-top: var(--space-md);
  font-size: 23.2cqi; /* "REDSIGN" is ~4.29em wide, so it spans the container; re-measure if the word changes */
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
}
.wordmark .spot-line {
  display: block;
  margin-left: -0.04em;
  padding-bottom: 0.04em;
}

/* 5. Motion: initial states for the load animation (only when JS + motion are on)
   ========================================================================== */
.intro [data-intro-scope] .line-inner { transform: translateY(110%); }
.intro [data-intro="fade"] { opacity: 0; transform: translateY(16px); }
.intro [data-intro="media"] { opacity: 0; transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  /* Buttons: a simple, quick colour fade instead of the growing circle */
  .btn { transition: background-color 0.25s ease, color 0.25s ease !important; }
  .btn:hover { background-color: var(--red-ink); color: var(--white); }
  .btn__fill { display: none; }
}

/* 6. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .plans { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .plan {
    grid-row: auto;
    grid-template-rows: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
  }
  /* Name + price on the left, details + button on the right, lists below. */
  .plan__head  { grid-column: 1; grid-row: 1; }
  .plan__price { grid-column: 1; grid-row: 2 / 4; }
  .plan__meta  { grid-column: 2; grid-row: 1; align-self: start; margin-top: 0; padding-top: 0.4em; border-top: 0; }
  .plan__value { grid-column: 2; grid-row: 2; }
  .plan__cta   { grid-column: 2; grid-row: 3; }
  .plan__list  { grid-row: 4; }

  .extras__list { grid-template-columns: minmax(0, 1fr); border-bottom: 0; }
  .extra,
  .extra:first-child {
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 1024px) {
  .rows { --row-num: 48px; }
  .row__btn { grid-template-columns: var(--row-num) minmax(0, 1fr) minmax(0, 340px) 24px; }
}

@media (max-width: 820px) {
  :root { --nav-offset: 96px; }
  .nav__pill { padding-inline: 24px 12px; }
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .nav__toggle-icon,
  .nav__toggle-icon::before {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    transition: transform var(--dur) var(--ease-out);
  }
  .nav__toggle-icon { position: relative; transform: translateY(-3px); }
  .nav__toggle-icon::before { content: ""; position: absolute; top: 6px; }
  .nav.is-open .nav__toggle-icon { transform: translateY(0) rotate(45deg); }
  .nav.is-open .nav__toggle-icon::before { transform: translateY(-6px) rotate(-90deg); }

  .nav__links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 12px 24px;
    background: var(--white);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
  }
  .nav__links li + li { border-top: 1px solid var(--line); }
  .nav__links a { padding: 14px 0; }
  .nav__links a::after { display: none; }
  .nav.is-open .nav__links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .pricing__foot { flex-direction: column; align-items: flex-start; }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  /* Work: single column */
  .work__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: 72px;
  }
  .work__grid > .card:nth-child(n) { grid-column: 1; grid-row: auto; }

  /* Problem rows: number + title + icon, description underneath */
  .row__btn {
    grid-template-columns: var(--row-num) minmax(0, 1fr) 20px;
    row-gap: 8px;
    padding-left: 0;
  }
  .rows { --row-num: 40px; --row-pad: 0px; }
  .row__desc { grid-column: 2 / 3; grid-row: 2; }
  .row__icon { grid-column: 3; grid-row: 1; }
  .row__content {
    grid-template-columns: minmax(0, 1fr);
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  :root { --fs-display: 11vw; }

  /* Hero: lines stack left, note and image move below the headline */
  .hero__headline { display: flex; flex-direction: column; }
  .hero__line--2 { align-self: flex-start; }
  .hero__note {
    position: static;
    order: 1;
    margin-top: 20px;
    text-align: left;
  }
  .hero__media {
    position: static;
    order: 2;
    width: 100%;
    margin-top: 28px;
    translate: none;
  }
  .hero__lead { margin-inline: 0; text-align: left; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { min-width: 0; }

  .problem__line--2 { align-self: flex-start; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .section-head .side-note { text-align: left; }

  .plan { grid-template-columns: minmax(0, 1fr); }
  .plan > * { grid-column: 1; grid-row: auto; }
  .plan__meta { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
  .plan--featured .plan__meta { border-color: var(--white-line); }
  .plan__meta div { flex-direction: column; gap: 2px; }
  .plan__meta dt { flex-basis: auto; }

  .row__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .problem__outro { text-align: left; }


  .cta__row { flex-direction: column; align-items: stretch; }
  .cta__note { text-align: left; }
  .cta__actions { flex-direction: column; align-items: stretch; }
  .cta__actions .btn { min-width: 0; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { flex-direction: column; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(n + 3) { margin-top: var(--space-sm); }
}

/* 7. Decorative system
   Calm, low-contrast details that support the content. Everything here is optional:
   delete this section and the matching deco-* markup in index.html to remove it.

   .deco-grid   faint technical grid behind a section (hero, problem, pricing)
   .deco-frame  "+" registration marks at the four corners of a block
                (work images, About portrait, pricing cards)
   .deco-label  section label, e.g. "01 / Work"
   .deco-sign   signature line: × + thin line (+ "Sign here" in the final CTA).
                Draws in from left to right once (main.js); static with reduced motion.
   ========================================================================== */
:root {
  --deco-ink: rgba(11, 11, 11, 0.045);   /* grid lines */
  --deco-mark: rgba(11, 11, 11, 0.3);   /* registration marks */
  --deco-line: rgba(11, 11, 11, 0.2);   /* signature line */
}

/* Technical grid: full-bleed, faded out at the top and bottom of the section */
.deco-grid { position: relative; isolation: isolate; }
.deco-grid::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--deco-ink) 1px, transparent 1px),
    linear-gradient(to bottom, var(--deco-ink) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

/* Registration marks: one pseudo-element, four crosshairs placed just outside the corners */
.deco-frame { position: relative; }
.deco-frame::after {
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11'%3E%3Cpath d='M5.5 0v11M0 5.5h11' stroke='%230B0B0B' stroke-width='1'/%3E%3C/svg%3E");
  content: "";
  position: absolute;
  inset: -16px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
  background:
    var(--cross) left top / 11px 11px no-repeat,
    var(--cross) right top / 11px 11px no-repeat,
    var(--cross) left bottom / 11px 11px no-repeat,
    var(--cross) right bottom / 11px 11px no-repeat;
}

/* Section labels sit in the section's top padding, so they don't change the vertical rhythm */
.section > .container { position: relative; }
.deco-label {
  position: absolute;
  left: 0;
  top: calc(-1 * (var(--space-md) + 1.4em));
  display: flex;
  gap: 0.35em;
  color: var(--gray);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.deco-label__num { color: var(--black); font-variant-numeric: tabular-nums; }

/* Signature line */
.deco-sign {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.deco-sign__x {
  color: var(--red);
  font-size: 18px;
  line-height: 1;
}
.deco-sign__line {
  flex: 1;
  height: 1px;
  background: var(--deco-line);
  transform-origin: 0 50%;
}
/* As a divider: placed in the gap between two sections (no effect on layout) */
.deco-sign--divider {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--gap-above, var(--section)) * -0.78);
}
/* Under the final CTA headline: the main visual element of that block */
.deco-sign--cta {
  position: relative;
  max-width: 720px;
  margin: var(--space-lg) 0 calc(var(--space-lg) + 1.6em);
}
.deco-sign--cta .deco-sign__x { font-size: 24px; }
.deco-sign--cta .deco-sign__line { background: rgba(11, 11, 11, 0.32); }
.deco-sign--cta .deco-sign__label { left: 36px; }
.deco-sign__label {
  position: absolute;
  left: 30px;
  top: calc(100% + 10px);
  color: var(--gray);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Mobile: keep it subtle */
@media (max-width: 640px) {
  .deco-grid::before { background-size: 48px 48px; opacity: 0.7; }
  .deco-frame::after,
  .deco-sign--divider { display: none; }
}

/* 8. Case studies (/work)
   Shared by work/index.html and every case page. Placeholders use the same
   .ph component as the homepage; the ratio classes below set their shape.
   ========================================================================== */
[hidden] { display: none !important; }

/* Homepage: link under the gallery */
.work__all { margin-top: var(--space-xl); text-align: right; }

/* Placeholder ratios */
.ph--16x9  { aspect-ratio: 16 / 9; }
.ph--16x10 { aspect-ratio: 16 / 10; }
.ph--4x3   { aspect-ratio: 4 / 3; }
.ph--1x1   { aspect-ratio: 1 / 1; }
.ph--4x1   { aspect-ratio: 4 / 1; }
.ph--linkedin-banner { aspect-ratio: 1128 / 191; }
.ph--2x3   { aspect-ratio: 2 / 3; }
.ph--phone { aspect-ratio: 9 / 19.5; }

/* data-concept="true": small "Concept application" label in the corner */
.ph[data-concept="true"]::after {
  content: "Concept application";
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  max-width: calc(100% - 28px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0.5em 0.9em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--black);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Play icon for motion placeholders */
.ph__play {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: clamp(56px, 5vw, 88px);
  height: clamp(56px, 5vw, 88px);
  margin: auto;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  pointer-events: none;
}
.ph__play::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  border-style: solid;
  border-width: 0.5em 0 0.5em 0.85em;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
  font-size: clamp(14px, 1.1vw, 20px);
  transform: translate(-50%, -50%);
}

/* Header */
.case-hero,
.work-all-hero {
  padding-top: clamp(48px, 5vw, 96px);
  container-type: inline-size;
}
.case-hero__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: var(--space-lg);
}
.case-back { font-size: var(--fs-small); }
.arrow--back { margin-right: 0.3em; }
@media (hover: hover) { a:hover .arrow--back { transform: translateX(-5px); } }
.case-kicker {
  color: var(--gray);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.02em;
}
/* Giant title: sized so the longest line never exceeds the container */
.case-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: min(var(--fs-display), 8.8cqi);
}
.case-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 16px var(--space-lg);
  margin-top: var(--space-lg);
}
.case-intro__client { font-size: var(--fs-note); font-weight: 500; }
.case-intro__line {
  max-width: 34em;
  color: var(--gray);
  font-size: var(--fs-lead);
  line-height: 1.5;
}
.case-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 32px;
  margin-top: var(--space-lg);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.case-meta dt {
  color: var(--gray);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.case-meta dd { margin-top: 8px; font-size: 16px; line-height: 1.45; }
.case-hero__media { margin-top: var(--space-xl); }
.case-hero__media .ph { border-radius: var(--radius-lg); }

/* Challenge / approach */
.case-overview__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg) clamp(40px, 6vw, 120px);
}
.case-subtitle,
.deliv__title {
  font-size: clamp(22px, 1.8vw, 32px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.case-overview__col p {
  max-width: 34em;
  margin-top: var(--space-sm);
  color: var(--gray);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

/* Deliverables tabs: a floating pill centered under the nav pill (same radius,
   white glass and soft shadow). main.js builds the tabs from the [data-tab] blocks,
   moves the pill to <body>, shows it only while "What they got" is on screen,
   and slides the black indicator to the active tab. */
.tabs {
  position: fixed;
  /* Nav: 16px from the top, compact (scale .94) once scrolled; then a 12px gap */
  top: calc(16px + var(--nav-h) * 0.94 + 12px);
  left: 0;
  right: 0;
  z-index: 45;
  width: fit-content;
  max-width: calc(100% - 2 * var(--pad-x));
  margin-inline: auto;
  padding: 6px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
          backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
.tabs.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition-delay: 0s;
}
.tabs__list {
  position: relative;
  list-style: none;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
}
.tabs__list::-webkit-scrollbar { display: none; }
/* Soft fades at the edges when there's more to scroll */
.tabs__list.fade-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.tabs__list.fade-left { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px); mask-image: linear-gradient(to right, transparent, #000 32px); }
.tabs__list.fade-left.fade-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.tabs__list li { position: relative; z-index: 1; flex-shrink: 0; }
/* Black pill that slides to the active tab (position and width set by main.js) */
.tabs__indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  height: 100%;
  width: var(--w, 0px);
  border-radius: 999px;
  background: var(--black);
  transform: translateX(var(--x, 0px));
  transition: transform var(--dur) var(--ease-out), width var(--dur) var(--ease-out);
  pointer-events: none;
}
.tabs__indicator.is-instant { transition: none; }
.tabs__link {
  display: block;
  padding: 0.7em 1.15em;
  border-radius: 999px;
  color: #3D3D3D;
  font-size: var(--fs-micro);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur) var(--ease-out);
}
@media (hover: hover) { .tabs__link:not(.is-active):hover { background: rgba(11, 11, 11, 0.05); } }
.tabs__link.is-active { color: var(--white); }
.tabs__link:focus-visible { outline-offset: -2px; }

@media (max-width: 640px) {
  /* Phones: full width minus the side margins, scrolls sideways */
  .tabs { width: auto; max-width: none; left: var(--gutter); right: var(--gutter); }
}

.deliv { padding-top: var(--space-xl); }
.deliv__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 32px;
  margin-bottom: var(--space-md);
}
.deliv__text { max-width: 30em; color: var(--gray); text-align: right; }
.deliv__body { display: grid; gap: clamp(12px, 1.4vw, 24px); }
.deliv-row { display: grid; gap: clamp(12px, 1.4vw, 24px); }
.deliv-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deliv-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.deliv-caption { margin-top: 10px; color: var(--gray); font-size: var(--fs-small); }
/* Desktop + two phones: column ratio chosen so their heights roughly match */
.deliv-web { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.deliv-web__phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 24px);
}
.deliv-email { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }

/* Process */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 24px;
  margin-top: var(--space-lg);
  border-top: 1px solid var(--black);
}
.step { padding-top: 20px; }
.step__num {
  display: block;
  color: var(--red-ink);
  font-size: var(--fs-micro);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.step__text {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

/* Result (empty parts are hidden by main.js) */
.case-result__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg) clamp(40px, 6vw, 120px);
  margin-top: var(--space-lg);
  align-items: start;
}
.case-result__text { color: var(--gray); font-size: var(--fs-lead); line-height: 1.6; }
.testimonial {
  padding: clamp(28px, 2.8vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.testimonial__quote {
  margin: 0;
  font-size: clamp(20px, 1.6vw, 28px);
  font-weight: 500;
  line-height: 1.35;
}
.testimonial__author { margin-top: var(--space-sm); color: var(--gray); font-size: var(--fs-small); }

/* Next project */
.case-next .container { container-type: inline-size; }
.case-next__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 24px;
  padding-block: clamp(24px, 3vw, 56px);
  border-block: 1px solid var(--black);
}
.case-next__label {
  grid-column: 1 / -1;
  color: var(--gray);
  font-size: var(--fs-small);
  font-weight: 500;
}
.case-next__name {
  font-size: min(var(--fs-ticker), 9cqi);
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  white-space: nowrap;
}
.case-next__name .spot-line { display: inline-block; padding-bottom: 0.04em; }
.case-next__arrow { font-size: clamp(32px, 4vw, 72px); line-height: 1; }
@media (hover: hover) { .case-next__link:hover .case-next__arrow { transform: translateX(10px); } }

/* All work page */
.work-all-hero__head { position: relative; }
.work-all-hero__note { position: absolute; right: 0; bottom: 0.4em; }
.work-all .container { container-type: inline-size; }
.work-all__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl) 6.37cqi;
}
.ph--soon {
  display: grid;
  place-items: center;
  aspect-ratio: 712 / 339;
  border: 1px dashed rgba(11, 11, 11, 0.25);
  border-radius: var(--radius-lg);
  color: var(--gray);
}

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
}
@media (max-width: 820px) {
  .case-intro,
  .case-overview__grid,
  .case-result__grid { grid-template-columns: minmax(0, 1fr); }
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliv__head { flex-direction: column; }
  .deliv__text { text-align: left; }
  .deliv-row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliv-web { grid-template-columns: minmax(0, 1fr); }
  .work-all__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  /* Phones: same size as the other headlines; long lines simply wrap */
  .case-title { font-size: var(--fs-display); }
  .steps { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .step {
    display: flex;
    gap: 16px;
    align-items: baseline;
    padding: 16px 0;
    border-top: 1px solid var(--line);
  }
  .step__text { margin-top: 0; }
  .work-all-hero__note { position: static; margin-top: 16px; text-align: left; }
  .case-next__name { font-size: 10cqi; }
}

/* Case studies: block layouts added for proposals, lead magnets, event kits, ad kits,
   motion and "More applications". Same placeholder rules as the other blocks. */
.ph--letter { aspect-ratio: 8.5 / 11; }
.ph--3x1    { aspect-ratio: 3 / 1; }
.ph--2x1    { aspect-ratio: 2 / 1; }
.ph--3x8    { aspect-ratio: 3 / 8; }
.ph--4x5    { aspect-ratio: 4 / 5; }
.ph--9x16   { aspect-ratio: 9 / 16; }
.ph--191x1  { aspect-ratio: 1.91 / 1; }

/* Meta row: Client, Industry, Scope, Year, Showcases */
.case-meta { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.case-meta a { font-weight: 500; text-decoration-line: underline; }

.deliv-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Email with a single piece: one tall page, left-aligned */
.deliv-email--single { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

/* Proposal / lead magnet: large page + two smaller pages stacked (heights roughly match) */
.deliv-doc { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.deliv-doc__side { display: grid; gap: clamp(12px, 1.4vw, 24px); }

/* Event kit: backdrop + two small pieces on the left, tall roll-up on the right */
.deliv-event { grid-template-columns: minmax(0, 2.85fr) minmax(0, 1fr); align-items: start; }
.deliv-event__main { display: grid; gap: clamp(12px, 1.4vw, 24px); }

/* Ad kit: four formats side by side at the same height (widths follow each ratio) */
.deliv-ads { display: flex; align-items: flex-start; gap: clamp(12px, 1.4vw, 24px); }
.deliv-ads > * { flex: var(--ad-ratio, 1) 1 0; min-width: 0; }

/* Motion: 16:9 piece + vertical ad at the same height */
.deliv-motion { grid-template-columns: minmax(0, 3.16fr) minmax(0, 1fr); align-items: start; }

@media (max-width: 1024px) {
  .case-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliv-doc { grid-template-columns: minmax(0, 1fr); }
  .deliv-doc__side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deliv-event { grid-template-columns: minmax(0, 1fr); }
  .deliv-event > .deliv-item { max-width: 50%; }
  .deliv-ads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
  .deliv-motion { grid-template-columns: minmax(0, 1fr); }
  .deliv-motion > :last-child { max-width: 50%; }
  .deliv-email--single { grid-template-columns: minmax(0, 1fr); }
  .deliv-email--single > * { max-width: 70%; }
}
@media (max-width: 640px) {
  .ph[data-concept="true"]::after { top: 8px; left: 8px; max-width: calc(100% - 16px); font-size: 10px; }
}

/* Case studies: "What they got" as a quiet gallery.
   No grid here; instead a numbered label per block, hairline dividers between
   blocks and faint registration marks around each block's main piece only. */
.deliv__label {
  display: flex;
  gap: 0.35em;
  margin-bottom: var(--space-sm);
  color: var(--gray);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.deliv__num { color: var(--black); font-variant-numeric: tabular-nums; }

/* Hairline between blocks, with generous space above and below */
.deliv + .deliv {
  margin-top: var(--space-xl);
  border-top: 1px solid rgba(11, 11, 11, 0.08);
}

/* Registration marks around the main piece: even fainter than elsewhere */
.deliv .deco-frame::after { opacity: 0.16; }

/* FAQ (homepage, before About). Same accordion behavior as the problem section. */
.faq {
  --faq-pad: clamp(0px, 1.9vw, 36px);
  --faq-num: clamp(44px, 5.5vw, 105px);
  --faq-gap: clamp(12px, 1.6vw, 32px);
}
.faq__head { position: relative; margin-bottom: var(--space-xl); }
.faq__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.faq__line--2 { align-self: flex-end; }
/* Top right, on the baseline of line 1 ("QUESTIONS,") */
.faq__note {
  position: absolute;
  right: 0;
  top: calc(var(--fs-display) * 0.88 - var(--fs-note) * 2.15);
  text-align: right;
}
.faq__note a { text-decoration-line: underline; }

.faq-list {
  list-style: none;
  border-bottom: 1px solid var(--black);
  overflow-anchor: none; /* main.js keeps the clicked question in place instead */
}
.faq-item { border-top: 1px solid var(--black); }
.faq-item__heading { font: inherit; }
.faq-item__btn {
  display: grid;
  grid-template-columns: var(--faq-num) minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: var(--faq-gap);
  width: 100%;
  padding: clamp(22px, 2.4vw, 40px) 0 clamp(22px, 2.4vw, 40px) var(--faq-pad);
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.faq-item__btn:focus-visible { outline-offset: -2px; }
.faq-item__num {
  font-size: clamp(15px, 1.16vw, 22px);
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast) var(--ease-out);
}
.faq-item__q {
  font-size: clamp(20px, 1.8vw, 32px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: transform var(--dur) var(--ease-out);
}
.faq-item.is-open .faq-item__num { color: var(--red-ink); }
.faq-item.is-open .row__icon::after { transform: rotate(180deg); }
@media (hover: hover) {
  .faq-item__btn:hover .faq-item__q { transform: translateX(8px); }
  .faq-item__btn:hover .row__icon { transform: scale(1.2); }
}
/* Smooth open/close: grid rows animate 0fr → 1fr */
.js .faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-accordion) var(--ease-out);
}
.js .faq-item.is-open .faq-item__panel { grid-template-rows: 1fr; }
.faq-item__clip { min-height: 0; overflow: hidden; }
.faq-item__a {
  max-width: 42em;
  padding: 0 0 clamp(24px, 2.6vw, 44px) calc(var(--faq-pad) + var(--faq-num) + var(--faq-gap));
  color: var(--gray);
  font-size: var(--fs-lead);
  line-height: 1.6;
}
.js .faq-item__a { opacity: 0; transition: opacity var(--dur-accordion) var(--ease-out); }
.js .faq-item.is-open .faq-item__a { opacity: 1; transition-delay: 0.08s; }

@media (max-width: 768px) {
  .faq { --faq-pad: 0px; --faq-num: 36px; }
  .faq-item__btn { grid-template-columns: var(--faq-num) minmax(0, 1fr) 20px; }
}
@media (max-width: 640px) {
  .faq__line--2 { align-self: flex-start; }
  .faq__note { position: static; margin-top: 20px; text-align: left; }
}

/* Accessible hiding (screen readers keep it) */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* <button class="btn"> looks exactly like the link buttons */
button.btn { border: 0; cursor: pointer; font-family: inherit; }

/* Homepage final CTA: the message form sits under the booking button, as the secondary option */
.cta__write { margin-top: var(--space-xl); }
.cta__write-title { margin-bottom: var(--space-md); text-align: left; }
.contact-form { max-width: 880px; }
.contact-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md) clamp(24px, 3vw, 48px);
}
.field--full { grid-column: 1 / -1; }
.field__label {
  display: block;
  font-size: var(--fs-note);
  font-weight: 500;
  line-height: 1.2;
}
.field__input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 0.55em 0;
  border: 0;
  border-bottom: 1px solid rgba(11, 11, 11, 0.35);
  border-radius: 0;
  background: transparent;
  color: var(--black);
  font: inherit;
  font-size: var(--fs-lead);
  line-height: 1.4;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.field__input:hover { border-bottom-color: var(--black); }
/* Focus: the bottom border turns red and thickens */
.field__input:focus,
.field__input:focus-visible {
  outline: none;
  border-bottom-color: var(--red-ink);
  box-shadow: 0 1px 0 0 var(--red-ink);
}
.field__input[aria-invalid="true"] { border-bottom-color: var(--red-ink); }
.field__textarea { min-height: 3.2em; resize: vertical; }
.field__select {
  -webkit-appearance: none;
          appearance: none;
  padding-right: 1.6em;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230B0B0B' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}
.field__error {
  margin-top: 6px;
  color: var(--red-ink);
  font-size: var(--fs-micro);
  font-weight: 500;
}
.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px clamp(24px, 3vw, 48px);
  margin-top: var(--space-lg);
}
.contact-form__alt { color: var(--gray); font-size: var(--fs-small); }
.contact-form__error { margin-top: var(--space-sm); color: var(--red-ink); font-size: var(--fs-small); font-weight: 500; }
.contact-form.is-sending .btn { opacity: 0.6; pointer-events: none; }
.contact-form__thanks { max-width: 880px; outline: none; }
.contact-form__thanks-title {
  font-size: clamp(24px, 2.4vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

@media (max-width: 640px) {
  .contact-form__fields { grid-template-columns: minmax(0, 1fr); }
  .contact-form__actions .btn { width: 100%; min-width: 0; }
}

/* ==========================================================================
   Cookie consent banner (built by analytics.js), footer legal links, privacy page
   ========================================================================== */
.consent {
  position: fixed;
  left: clamp(12px, 2vw, 32px);
  bottom: clamp(12px, 2vw, 32px);
  z-index: 60; /* above the nav, below the Calendly popup */
  width: min(440px, calc(100vw - 24px));
  padding: 20px 22px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  font-size: var(--fs-small);
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease-out), transform 0.4s var(--ease-out);
}
.consent.is-visible { opacity: 1; transform: none; }
.consent__text .text-link { text-decoration: underline; white-space: nowrap; }
.consent__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.consent__btn {
  min-width: 104px;
  min-height: 42px;
  padding: 0 1.4em;
  border: 1px solid var(--black);
  border-radius: 999px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.consent__btn--light { background: var(--white); color: var(--black); }
.consent__btn--dark { background: var(--black); color: var(--white); }
.consent__btn:focus-visible { outline-offset: 3px; }
@media (hover: hover) {
  .consent__btn:hover { background: var(--red-ink); border-color: var(--red-ink); color: var(--white); }
}
@media (max-width: 480px) {
  .consent__btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { transition: none; }
}

.footer__legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.footer__legal .text-link { font-weight: 400; }
.footer__legal .text-link:hover { color: var(--black); }
.footer__cookies { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; cursor: pointer; }

/* Privacy policy page */
.legal-hero { padding-top: clamp(48px, 5vw, 96px); container-type: inline-size; }
.legal-hero .case-title { font-size: min(var(--fs-display), 12cqi); }
.legal-hero__updated { margin-top: var(--space-md); color: var(--gray); font-size: var(--fs-small); }
.legal {
  max-width: 46em;
  padding-top: var(--space-xl);
  font-size: var(--fs-body);
  line-height: 1.6;
}
.legal h2 {
  margin-top: var(--space-lg);
  margin-bottom: 0.6em;
  font-size: clamp(22px, 1.7vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.legal h2:first-child { margin-top: 0; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 0.9em; }
.legal ul { padding-left: 1.2em; list-style: disc; }
.legal li + li { margin-top: 0.4em; }
.legal a { text-decoration: underline; text-underline-offset: 0.2em; }
.legal a:hover { color: var(--red-ink); }
.legal code { font-size: 0.9em; }
.legal .footer__cookies { text-decoration: underline; text-underline-offset: 0.2em; }
.legal .footer__cookies:hover { color: var(--red-ink); }
.contact-form__thanks-note { margin-top: 16px; color: var(--gray); font-size: var(--fs-body); }
.contact-form__thanks-note .text-link { color: var(--black); text-decoration: underline; }

/* Autofill: keep autofilled fields transparent-looking (no light blue/yellow fill).
   The inset shadow paints the page background over the browser's fill. */
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:hover {
  -webkit-text-fill-color: var(--black);
  caret-color: var(--black);
  -webkit-box-shadow: inset 0 0 0 1000px var(--white);
          box-shadow: inset 0 0 0 1000px var(--white);
  transition: background-color 600000s 0s, color 600000s 0s;
}
.field__input:-webkit-autofill:focus {
  -webkit-box-shadow: inset 0 0 0 1000px var(--white), 0 1px 0 0 var(--red-ink);
          box-shadow: inset 0 0 0 1000px var(--white), 0 1px 0 0 var(--red-ink);
}
.field__input:autofill { background: transparent; }

/* ==========================================================================
   Slide gallery (case studies) and full-screen viewer (viewer.js)
   ========================================================================== */
/* Images that are buttons (open a slide or the viewer): same look as .ph */
.gallery__stage,
.gallery__thumb,
.ph-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
}
.gallery__thumb { cursor: pointer; }
.ph-open img,
.gallery__stage img { transition: transform 0.6s var(--ease-out); }
@media (hover: hover) {
  .ph-open:hover img { transform: scale(1.015); }
}
.ph-open:focus-visible,
.gallery__stage:focus-visible,
.gallery__thumb:focus-visible { outline-offset: 3px; }

/* Homepage "The deck" strip: slides keep their 16:9 shape */
.row__strip--slides .ph { aspect-ratio: 16 / 9; }

.gallery { display: grid; }
.gallery.is-manual .gallery__thumbs { margin-top: clamp(12px, 1.4vw, 24px); }

/* Large slide: stacked slides; the next one fades in on top (GSAP) */
.gallery__stage { position: relative; }
.gallery__slide {
  opacity: 0;
  transition: none; /* GSAP crossfades the slides (main.js setupGallery) */
}
.gallery__slide.is-active { opacity: 1; z-index: 1; }

/* Progress bar: fills during each slide's interval */
.gallery__progress {
  position: relative;
  height: 2px;
  margin: clamp(10px, 1vw, 16px) 0 clamp(12px, 1.4vw, 24px);
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}
.gallery__bar {
  position: absolute;
  inset: 0;
  background: var(--black);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.gallery__bar.is-running { animation: gallery-fill var(--gallery-interval, 4000ms) linear forwards; }
.gallery.is-paused .gallery__bar { animation-play-state: paused; }
.gallery.is-manual .gallery__progress { display: none; }
@keyframes gallery-fill { to { transform: scaleX(1); } }

/* Thumbnails: five in a row; the active one gets a thin red border, the rest are dimmed */
.deliv-row--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gallery__thumb { border-radius: var(--radius-sm); }
.gallery__thumb img { opacity: 0.6; transition: opacity var(--dur) var(--ease-out); }
.gallery__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1.5px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: border-color var(--dur) var(--ease-out);
}
.gallery__thumb[aria-current="true"] img { opacity: 1; }
.gallery__thumb[aria-current="true"]::after { border-color: var(--red); }
@media (hover: hover) {
  .gallery__thumb:hover img { opacity: 0.85; }
}
@media (max-width: 640px) {
  .deliv-row--5 { gap: 6px; }
  .gallery__thumb { border-radius: 6px; }
}

/* Full-screen viewer */
html.viewer-open { overflow: hidden; }
html.viewer-open body { padding-right: var(--viewer-scrollbar, 0px); }
.viewer {
  --viewer-pad-x: clamp(16px, 6vw, 112px);
  --viewer-pad-top: clamp(64px, 7vh, 88px);
  --viewer-pad-bottom: clamp(72px, 9vh, 104px);
  position: fixed;
  inset: 0;
  z-index: 10000; /* above everything, including the Calendly popup */
  display: grid;
  place-items: center;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
}
.viewer.is-open { opacity: 1; }
.viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 11, 0.94);
}
.viewer__figure {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: var(--viewer-pad-top) var(--viewer-pad-x) var(--viewer-pad-bottom);
}
/* As large as possible while keeping the image's proportion */
.viewer__frame {
  --viewer-ratio: 1.7778;
  width: min(100%, (100vh - var(--viewer-pad-top) - var(--viewer-pad-bottom)) * var(--viewer-ratio));
  width: min(100%, (100dvh - var(--viewer-pad-top) - var(--viewer-pad-bottom)) * var(--viewer-ratio));
  aspect-ratio: var(--viewer-ratio);
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #1a1a1a;
  transform: scale(0.96);
  transition: transform 0.32s var(--ease-out);
}
.viewer.is-open .viewer__frame { transform: none; }
.viewer__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.18s var(--ease-out);
}
.viewer__img.is-swapping { opacity: 0.35; }
.viewer__caption {
  position: absolute;
  left: var(--viewer-pad-x);
  right: var(--viewer-pad-x);
  bottom: calc(var(--viewer-pad-bottom) / 2 - 0.7em);
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: var(--fs-small);
  line-height: 1.4;
  text-align: center;
}
.viewer__count { font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.viewer__alt { color: var(--white-muted); }

.viewer__nav,
.viewer__close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--white-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.viewer__nav { top: 50%; transform: translateY(-50%); }
.viewer__nav--prev { left: clamp(12px, 2vw, 40px); }
.viewer__nav--next { right: clamp(12px, 2vw, 40px); }
.viewer__close { top: clamp(12px, 2vw, 32px); right: clamp(12px, 2vw, 40px); }
/* Close icon: two thin lines */
.viewer__close span { position: relative; width: 18px; height: 18px; }
.viewer__close span::before,
.viewer__close span::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
}
.viewer__close span::after { transform: rotate(-45deg); }
.viewer :focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
@media (hover: hover) {
  .viewer__nav:hover,
  .viewer__close:hover { background: var(--red-ink); border-color: var(--red-ink); }
}
@media (max-width: 640px) {
  .viewer { --viewer-pad-x: 12px; }
  /* Phones: arrows sit under the image, next to the counter; swipe works too */
  .viewer__nav { top: auto; bottom: 20px; transform: none; width: 44px; height: 44px; }
  .viewer__nav--prev { left: 12px; }
  .viewer__nav--next { right: 12px; }
  .viewer__caption { left: 68px; right: 68px; bottom: 20px; min-height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--fs-micro); }
}

/* Case study images that open the viewer (main.js initCaseImages) */
.ph-zoom { cursor: zoom-in; }
.ph-zoom img { transition: transform 0.6s var(--ease-out); }
@media (hover: hover) {
  .ph-zoom:hover img { transform: scale(1.015); }
}
.ph-zoom:focus-visible { outline-offset: 3px; }

/* LinkedIn carousel: continuous marquee (main.js initMarquee) */
.track { --track-gap: clamp(10px, 1.1vw, 18px); }
.track__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.track__label { margin: 0; }
/* Same pill as the "Concept application" label on images, outlined because it sits on white */
.concept-tag {
  flex: none;
  padding: 0.5em 0.9em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--black);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* Whole block is a concept application: the tag sits next to the block title */
.deliv__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.track__wrap { position: relative; }
.track__viewport {
  overflow: hidden;
  border-radius: var(--radius-md);
  touch-action: pan-y; /* vertical swipes scroll the page; horizontal ones drag the track */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.track.is-dragging .track__viewport,
.track.is-dragging .track__btn { cursor: grabbing; }
.track__list {
  display: flex;
  gap: var(--track-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}
/* ~3.3 slides visible on desktop, so the fourth peeks from the edge */
.track__slide { flex: 0 0 calc((100% - 3 * var(--track-gap)) / 3.3); }
.track__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  cursor: zoom-in;
}
.track__btn img { -webkit-user-drag: none; pointer-events: none; }
.track__btn:focus-visible { outline-offset: -3px; }

/* Arrows: shown while hovering the track (mouse) or when focused */
.track__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  box-shadow: var(--shadow-soft);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(0.9);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.track__nav--prev { left: 16px; }
.track__nav--next { right: 16px; }
.track__wrap:hover .track__nav,
.track__nav:focus-visible { opacity: 1; transform: translateY(-50%); }
@media (hover: hover) {
  .track__nav:hover { background: var(--red-ink); color: var(--white); }
}

@media (max-width: 900px) {
  .track__slide { flex-basis: calc((100% - 2 * var(--track-gap)) / 2.2); }
}
/* Phones: ~1.2 slides; swipe to drag */
@media (max-width: 640px) {
  .track__slide { flex-basis: calc((100% - var(--track-gap)) / 1.2); }
}
@media (hover: none) {
  .track__nav { display: none; }
}

/* Tall images (emails): the frame shows the top; hover scrolls through (main.js initScrollPreviews) */
.deliv-email--scroll { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph--scroll img {
  height: auto;
  bottom: auto;
  object-fit: fill;
  will-change: transform;
}
.deliv-caption--row { display: flex; justify-content: space-between; gap: 12px; }
.deliv-hint { color: var(--gray); opacity: 0.75; }
@media (hover: none), (max-width: 640px) {
  .deliv-hint { display: none; }
}

/* Viewer: very tall images (taller than twice their width) at reading width, scrolling vertically */
.viewer.is-tall .viewer__frame {
  width: min(640px, 100%);
  height: calc(100vh - var(--viewer-pad-top) - var(--viewer-pad-bottom));
  height: calc(100dvh - var(--viewer-pad-top) - var(--viewer-pad-bottom));
  aspect-ratio: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}
.viewer.is-tall .viewer__img { height: auto; object-fit: initial; }
@media (max-width: 640px) {
  .viewer.is-tall .viewer__frame { width: 100%; }
}

/* ==========================================================================
   Case study pages (body.case-page): deliverable spacing and gallery sizing.
   Desktop values at 1440px; they scale down proportionally on smaller screens.
   Font sizes and UI elements are unchanged.
   ========================================================================== */
.case-page {
  --cs-block: clamp(64px, 8.334vw, 120px);   /* between deliverable blocks: 120px */
  --cs-label: clamp(12px, 1.112vw, 16px);    /* block label → title: 16px */
  --cs-media: clamp(24px, 2.778vw, 40px);    /* title / description → media: 40px */
  --cs-gap: clamp(10px, 1.112vw, 16px);      /* large image → strip, grid gaps: 16px */
  --cs-caption: clamp(8px, 0.834vw, 12px);   /* media → caption: 12px */
  --cs-max-h: 78vh;                          /* tallest a large image can be */
}
/* 120px between blocks, with the hairline in the middle */
.case-page .deliv { padding-top: calc(var(--cs-block) / 2); }
.case-page .deliv + .deliv { margin-top: calc(var(--cs-block) / 2); }
.case-page .deliv__label { margin-bottom: var(--cs-label); }
.case-page .deliv__head { margin-bottom: var(--cs-media); }
.case-page .deliv__body,
.case-page .deliv-row,
.case-page .deliv-web__phones { gap: var(--cs-gap); }
.case-page .deliv-caption { margin-top: var(--cs-caption); }
.case-page .track__head { margin-bottom: var(--cs-caption); }

/* Large 16:9 image + its strip (Identity, Pitch deck): the group is capped so the large
   image is never taller than 78vh; the strip then has exactly the same width. Centered. */
.case-page .deliv__body:has(> .deco-frame > .ph--16x9),
.case-page .gallery {
  width: 100%;
  max-width: calc(var(--cs-max-h) * 16 / 9);
  margin-inline: auto;
}
/* Pitch deck: 16px from the slide to the thumbnails (the 2px progress bar sits in between) */
.case-page .gallery__progress { margin: calc((var(--cs-gap) - 2px) / 2) 0; }
.case-page .gallery.is-manual .gallery__thumbs { margin-top: var(--cs-gap); }

/* Website: desktop + two phones in one row, all the same height (columns ∝ their ratios) */
.case-page .deliv-web {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.4615fr) minmax(0, 0.4615fr);
  align-items: start;
  width: 100%;
  max-width: calc(var(--cs-max-h) * (1.6 + 2 * 0.4615) + 2 * var(--cs-gap));
  margin-inline: auto;
}
.case-page .deliv-web__phones { display: contents; }

/* Social: carousel slides at most 60vh tall; posts in one 4:5 row; banner full width */
.case-page .track__slide { max-width: calc(60vh * 4 / 5); }
.case-page .track { --track-gap: var(--cs-gap); }

/* Email: two 2:3 frames side by side, each at most 78vh tall, 16px apart, centered */
.case-page .deliv-email--scroll {
  grid-template-columns: repeat(2, minmax(0, calc(var(--cs-max-h) * 2 / 3)));
  justify-content: center;
}

@media (max-width: 820px) {
  /* Narrow screens: the desktop image on top, the two phones side by side below */
  .case-page .deliv-web { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .case-page .deliv-web > .deco-frame { grid-column: 1 / -1; }
}

/* Case study images: no dark edges. A frame with a real image drops its black placeholder
   background, and the image fills it completely (clipped by the frame's rounded corners). */
.case-page .ph:has(> img[src]:not([src=""])) { background: transparent; }
.case-page .ph > img[src] {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-page .ph--scroll > img[src] { height: auto; } /* tall emails scroll inside their frame */
.case-page .ph > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Two pieces side by side at the same height (widths follow each ratio), at every width */
.case-page .deliv-ads--pair { display: flex; align-items: flex-start; gap: var(--cs-gap); }
.case-page .ph { overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(white, black); } /* clean corners while images transform */

/* "Concept application" labels: bottom-left, clear of logos and headlines */
.case-page .ph[data-concept="true"]::after { top: auto; bottom: 14px; }
@media (max-width: 640px) {
  .case-page .ph[data-concept="true"]::after { top: auto; bottom: 8px; }
}

/* Proposal (deliv-doc--fit): cover 2fr + two pages stacked 1fr. The pages split the cover's
   exact height (top-aligned crop). The group is capped so the cover stays within 78vh. */
.deliv-doc--fit {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}
.case-page .deliv-doc--fit {
  gap: var(--cs-gap);
  width: 100%;
  max-width: calc(78vh * 1913 / 2475 * 1.5 + var(--cs-gap));
  margin-inline: auto;
}
.deliv-doc--fit > .deco-frame > .ph { aspect-ratio: 1913 / 2475; }
.deliv-doc--fit .deliv-doc__side {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-template-columns: minmax(0, 1fr);
  gap: inherit;
  min-height: 0;
}
.deliv-doc--fit .deliv-doc__side .ph { aspect-ratio: auto; height: 100%; }
.deliv-doc--fit .deliv-doc__side img { object-position: top; }
.deliv-doc--fit > .deliv-caption { grid-column: 1; margin-top: calc(var(--cs-caption, 12px) - var(--cs-gap, 16px)); }
@media (max-width: 820px) {
  .deliv-doc--fit { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .deliv-doc--fit .deliv-doc__side { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-row: 3; }
  .deliv-doc--fit .deliv-doc__side .ph { aspect-ratio: 1913 / 2475; height: auto; }
}


/* Nav "Book a call" button: same .btn (black, red hover fill), compact so the nav keeps its height. Always visible. */
.nav__links { margin-left: auto; }
.btn.nav__cta {
  flex: none;
  min-width: 0;
  min-height: 0;
  height: clamp(38px, 2.8vw, 48px);
  padding: 0 clamp(16px, 1.4vw, 24px);
  font-size: clamp(12px, 0.8vw, 14px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity var(--dur) var(--ease-out), visibility 0s linear 0s, background-color var(--dur) var(--ease-out), color 0.35s var(--ease-soft);
}
.nav__cta-short { display: none; }
@media (max-width: 820px) {
  .nav__links { margin-left: 0; }
  .btn.nav__cta { order: 2; margin-left: auto; height: 38px; padding: 0 16px; font-size: 12px; }
  .nav__toggle { order: 3; }
}
/* Small phones: shorter label so the logo, button and Menu all fit */
@media (max-width: 420px) {
  .nav__pill { gap: 10px; padding-inline: 20px 8px; }
  .btn.nav__cta { padding: 0 14px; }
  .nav__cta-long { display: none; }
  .nav__cta-short { display: inline; }
}

/* Image frames: no black anywhere. Frames with an image are transparent (also while it loads);
   empty placeholders are a light warm grey. */
.ph:has(img[src]:not([src=""])) { background: transparent; }
.ph img[src]:not([src=""]) { display: block; }

/* Final CTA without the signature line: same space between the headline and the button row */
.cta__title { margin-bottom: calc(var(--space-lg) * 2 + 1.6em); }

/* Small phones: "Book a call" stays in full; the Menu toggle shows only its icon (label kept for screen readers) */
@media (max-width: 420px) {
  .nav__cta-long { display: inline; }
  .nav__cta-short { display: none; }
  .nav__toggle { padding: 0 10px; }
  .nav__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Images whose file has a thin dark border at the edges (e.g. chestnut-hero.jpg):
   a slight zoom pushes it outside the frame. Uses `scale`, so hover/parallax transforms still work. */
.img--trim { scale: 1.012; }

/* First visible deliverable block (earlier ones may be hidden): no divider or extra space above */
.deliv.is-first,
.case-page .deliv.is-first { margin-top: 0; border-top: 0; }

/* Work card covers (main.js initCardPreviews): stacked images; GSAP animates their opacity and scale */
.card__media .card__preview {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: none;
}
.card__media .card__preview:not(.is-active) { opacity: 0; }
.card__media .card__preview.is-active { z-index: 1; transition: transform 0.35s var(--ease-out); } /* static image keeps the hover zoom */

/* Image labels with a name: data-concept-label replaces the default "Concept application" text */
.ph[data-concept-label]::after { content: attr(data-concept-label); }

/* Event kit grid (Dream Robotics): booth 2:1 across two columns, handout + badge 4:3 below,
   roll-up spanning both rows (cropped to fit exactly). Row gap = column gap.
   Column widths chosen so the roll-up keeps close to its own 2:5 shape. */
.deliv-event--grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1.38fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(12px, 1.4vw, 24px);
  align-items: stretch;
}
.case-page .deliv-event--grid {
  gap: var(--cs-gap);
  width: 100%;
  max-width: calc(78vh * 1.543 + 5px); /* keeps the whole kit (and the roll-up) within 78vh */
  margin-inline: auto;
}
.deliv-event__booth { grid-column: 1 / 3; grid-row: 1; }
.deliv-event__handout { grid-column: 1; grid-row: 2; }
.deliv-event__badge { grid-column: 2; grid-row: 2; }
.deliv-event__rollup { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; }
.deliv-event__rollup > .ph { flex: 1 1 0; min-height: 0; } /* fills both rows above its caption */
.deliv-event--grid > .deliv-item { max-width: none; }
@media (max-width: 820px) {
  .deliv-event--grid,
  .case-page .deliv-event--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; max-width: none; }
  .deliv-event__booth { grid-column: 1 / -1; }
  .deliv-event__rollup { grid-column: 1; grid-row: 3; }
  .deliv-event__rollup > .ph { flex: none; aspect-ratio: 2 / 5; }
}
@media (max-width: 640px) {
  /* Named labels wrap on small cards instead of being cut off */
  .ph[data-concept-label]::after { white-space: normal; text-overflow: clip; line-height: 1.25; border-radius: 10px; }
}

/* Problem rows (homepage): two images per row at the same height, each in its own ratio
   (--pair-ratio = width / height); click opens the full-screen viewer. Emails scroll on hover. */
.row__pair {
  display: flex;
  align-items: flex-start;
  gap: clamp(10px, 1.112vw, 16px);
  min-width: 0;
}
.row__pair > .ph {
  flex: var(--pair-ratio, 1) 1 0;
  min-width: 0;
  aspect-ratio: var(--pair-ratio, 1);
  border-radius: var(--radius-sm);
}
/* Link to the full case, under the last row, aligned with the rows' content */
.rows__more {
  margin-top: var(--space-md);
  padding-left: calc(var(--row-pad) + var(--row-num) + var(--row-gap));
}
@media (max-width: 820px) {
  .rows__more { padding-left: 0; }
}
/* "See the full Rudus case →" inside each problem row, under its text */
.row__more { margin-top: 16px; }
/* Text column stretches to the images' height; the link sits at its bottom (16px minimum gap) */
.row__info { align-self: stretch; }
.row__info .tags { margin-bottom: 16px; }
.row__more { margin-top: auto; }
@media (max-width: 768px) {
  /* Stacked: the link follows the tags with 24px */
  .row__info .tags { margin-bottom: 0; }
  .row__more { margin-top: 24px; }
}

/* ==========================================================================
   Pricing cards, simplified: summary + expandable full lists (main.js initPlanDetails).
   Cards size independently (no shared subgrid rows) and stay top-aligned.
   ========================================================================== */
.plans { align-items: start; }
.plan { grid-row: auto; display: flex; flex-direction: column; }
.plan__price { padding-top: var(--space-md); white-space: nowrap; }
.plan__price .plan__amount { font-size: clamp(30px, 2.4vw, 48px); }
.plan__price .plan__retainer { margin: 0; font-size: 16px; }
.plan__value { margin-top: 14px; }
.plan__meta {
  margin-top: 20px;
  padding-top: 18px;
  font-size: 15px;
  line-height: 1.5;
}
.plan__meta-label { color: var(--gray); font-weight: 500; }
.plan--featured .plan__meta-label { color: var(--white-muted); }
.plan__retainer-line {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--gray);
}
.plan--featured .plan__retainer-line { color: var(--white-muted); }

/* "See everything included" / "Show less" */
.plan__toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.plan__chevron {
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-accordion) var(--ease-out);
}
.plan__toggle[aria-expanded="true"] .plan__chevron { transform: translateY(4px) rotate(225deg); }
.js .plan__details { height: 0; overflow: hidden; }
.plan__details .plan__list:first-child { margin-top: 20px; }
.plan .plan__cta { margin-top: var(--space-md); }

/* Need something different? (same border and radius as the cards) */
.pricing__custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px 48px;
  margin-top: clamp(16px, 1.6vw, 28px);
  padding: clamp(28px, 2.4vw, 44px) clamp(32px, 2.8vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.pricing__custom-title {
  font-size: clamp(22px, 1.6vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.pricing__custom-text p { margin-top: 8px; max-width: 40em; color: var(--gray); }
.pricing__custom-btn { flex-shrink: 0; }
.pricing__terms { margin-top: 16px; color: var(--gray); font-size: var(--fs-small); }
@media (max-width: 1024px) {
  .plan__price { white-space: normal; }
}
@media (max-width: 640px) {
  .pricing__custom { flex-direction: column; align-items: stretch; }
  .pricing__custom-btn { width: 100%; min-width: 0; }
}

/* Shared contact section (cta--shared, contact.js): red final period, row 64px under the headline,
   availability on one line with the status dot, 96px before the footer divider. */
.cta__dot { color: var(--red); }
.cta--shared .cta__title { margin-bottom: 64px; }
.cta--shared .cta__row { align-items: center; }
.cta__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.cta__status .status__dot { flex: none; }
body:has(.cta--shared) .footer { margin-top: 96px; }
@media (max-width: 640px) {
  .cta--shared .cta__row,
  .cta--shared .cta__actions { flex-direction: column; align-items: flex-start; gap: 24px; }
  .cta--shared .cta__actions .btn { min-width: 0; }
  .cta--shared .cta__status { text-align: left; font-size: 14px; white-space: normal; }
}

/* Motion pair (Cardboard): 16:9 + 4:5 side by side at the same height, uncropped
   (flex-grow 1.778 / 0.8 with basis 0). Stacked full width on phones. */
.deliv-motion--pair { display: flex; align-items: flex-start; gap: clamp(12px, 1.4vw, 24px); }
.case-page .deliv-motion--pair { gap: var(--cs-gap); }
.deliv-motion--pair > .deliv-item { flex: var(--motion-grow, 1) 1 0; min-width: 0; max-width: none; }
@media (max-width: 640px) {
  .deliv-motion--pair { flex-direction: column; align-items: stretch; }
  .deliv-motion--pair > .deliv-item { flex: none; width: 100%; }
}

/* Two media side by side at the same height, uncropped (flex-grow = each ratio, basis 0).
   Stacked full width on phones. */
.ph--8x3 { aspect-ratio: 8 / 3; }
.deliv-pair { display: flex; align-items: flex-start; gap: clamp(12px, 1.4vw, 24px); }
.case-page .deliv-pair { gap: var(--cs-gap); }
.deliv-pair > .deliv-item { flex: var(--pair-grow, 1) 1 0; min-width: 0; }
@media (max-width: 640px) {
  .deliv-pair { flex-direction: column; align-items: stretch; }
  .deliv-pair > .deliv-item { flex: none; width: 100%; }
}

/* Hero slideshow (main.js initHeroSlides): stacked slides, GSAP crossfades their opacity */
.hero-slides > .hero-slides__slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: none;
}
.hero-slides > .hero-slides__slide.is-active { opacity: 1; z-index: 1; }
/* The homepage hero box keeps its own position/size; slides fill it */
.hero__media.hero-slides { overflow: hidden; }

/* Pricing cards: same height; the toggle + CTA sit at the bottom so the 3 buttons line up.
   When one card expands, the row grows and the others stretch with it. */
.plans { align-items: stretch; }
.plan .plan__details { order: 0; }
.plan .plan__toggle { margin-top: auto; padding-top: 14px; }
.plan .plan__cta { margin-top: 16px; }

/* 404 page */
.page404 { padding-bottom: var(--section); }
.page404__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: var(--space-lg); }

/* Language switcher (nav): "EN / ES", current language in bold */
.nav__lang { display: flex; align-items: center; gap: 6px; }
.nav__lang a { font-weight: 400; }
.nav__lang a[aria-current="true"] { font-weight: 700; }
.nav__lang span { color: var(--gray); }
@media (max-width: 820px) {
  .nav__lang { padding: 14px 0; }
  .nav__lang a { padding: 0; }
}

/* Spanish pages: the "Concept application" label drawn by CSS */
html[lang="es"] .ph[data-concept="true"]:not([data-concept-label])::after { content: "Aplicación conceptual"; }
/* Narrow desktop (821–1100px): tighter nav so the longer Spanish labels and EN / ES fit */
.nav__logo { flex-shrink: 0; }
@media (min-width: 821px) and (max-width: 1100px) {
  .nav__pill { padding-inline: 28px; gap: 16px; }
  .nav__links { gap: 14px; }
}
@media (min-width: 821px) and (max-width: 1010px) {
  /* Spanish only: "Agendar" on the nav button; the full label stays for screen readers */
  html[lang="es"] .nav__cta-short { display: inline; }
  html[lang="es"] .nav__cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 821px) and (max-width: 900px) {
  .nav__pill { padding-inline: 20px; gap: 12px; }
  .nav__links { gap: 10px; }
}

/* Nav (both languages): links never wrap; links, EN / ES and the CTA are vertically centered */
.nav__pill,
.nav__links { align-items: center; }
.nav__links a,
.nav__lang,
.nav__cta { white-space: nowrap; }
@media (max-width: 640px) {
  /* Spanish only: "Agendar" on the nav button on phones; the full label stays for screen readers */
  html[lang="es"] .nav__cta-short { display: inline; }
  html[lang="es"] .nav__cta-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* Long button labels (e.g. the Spanish form submit) may wrap to two lines instead of overflowing */
  .contact-form__actions .btn { white-space: normal; text-align: center; height: auto; min-height: 52px; padding-block: 12px; line-height: 1.25; }
}

/* Extras: small note next to an extra's name */
.extra__note { color: var(--gray); font-size: var(--fs-small); font-weight: 400; }

/* Studio (homepage): side note, 3-line title, intro + CTA, numbers, three principles */
.studio.section { padding-block: var(--space-xl); }
.studio__note {
  position: absolute;
  right: 0;
  top: calc(-1 * (var(--space-md) + 1.2em));
}
.studio__head { margin-bottom: var(--space-lg); }
.studio__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.studio__line--2 { align-self: flex-end; }
/* No cursor spotlight on touch: the highlighted line is solid red */
@media not (pointer: fine) {
  .studio__title .spot-line { color: var(--red); }
}
.studio__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-md);
}
.studio__intro {
  max-width: 46ch;
  font-size: clamp(19px, 0.55vw + 13.5px, 24px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.studio__cta { flex-shrink: 0; }
.studio__stats { margin-top: var(--space-lg); border-top-color: var(--black); }
.stat__num--plus::after { content: "+"; color: var(--red); }
.studio__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md) clamp(16px, 1.6vw, 28px);
  margin-top: var(--space-lg);
  list-style: none;
}
.studio__card {
  padding: clamp(24px, 2.2vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}
.studio__card-num {
  display: block;
  color: var(--red);
  font-size: var(--fs-small);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.studio__card-title {
  margin-top: var(--space-md);
  font-size: clamp(18px, 0.6vw + 12px, 24px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.studio__card-text {
  margin-top: 0.6em;
  color: var(--gray);
  line-height: 1.5;
}
@media (max-width: 767px) {
  .studio__note { position: static; margin-bottom: 20px; text-align: left; }
  .studio__line--2 { align-self: flex-start; }
  .studio__row { flex-direction: column; align-items: stretch; }
  .studio__cta { min-width: 0; }
  .studio__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio__stats .stat:nth-child(n + 3) { margin-top: var(--space-sm); }
  .studio__cards { grid-template-columns: minmax(0, 1fr); }
}
