/* zaino.design: a three-colour screen-printed poster, one page.
   Crimson paper, black grain, off-white ink. Montserrat only.
   Poster scenes share one stage box (giant word + cutout), so they cannot drift apart. */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/montserrat-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/montserrat-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --red: #9e1b1f;       /* solid crimson: badges and the big figures */
  --red-paper: #971111; /* the mean of the red paper tile, its fallback colour */
  --ink: #0b0b0b;
  --paper: #f2ede4;

  --sans: 'Montserrat', 'Segoe UI', system-ui, sans-serif;

  --pad: clamp(1.25rem, 2.4vw, 3rem);
  --bar: 4rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --track-label: 0.14em; /* every capital label and button */
  --track-wide: 0.5em;   /* the spaced units under the big figures */

  --red-tile: url(assets/v5/red-paper.jpg);
  --black-tile: url(assets/v5/black-grain.jpg);
  /* The coarse white-grain tile under a black veil: deep black, grain still readable. */
  --black-field: linear-gradient(rgba(11, 11, 11, 0.75), rgba(11, 11, 11, 0.75)), var(--ink) var(--black-tile) 0 0 / 512px 512px;

  /* Worn ink: speckles punched out of real text through a mask, so words stay selectable. */
  --worn: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='w' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'><feTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='3' seed='11'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 0 0 0 -4'/></filter><rect width='320' height='320' filter='url(%23w)'/></svg>");
  /* Off-white paper grain: faint dark flecks over the flat colour. */
  --grain: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'><feTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 .05 0 0 0 0 .04 0 0 0 0 .03 0 0 0 .4 -.18'/></filter><rect width='240' height='240' filter='url(%23g)'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--red-paper);
  color-scheme: light;
  scrollbar-width: thin;
  scrollbar-color: rgba(242, 237, 228, 0.45) var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--red-paper);
  color: var(--paper);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
.sheet ::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.sheet :focus-visible, .card :focus-visible, .bar[data-tone='paper'] :focus-visible { outline-color: var(--ink); }

.skip {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 40;
  padding: 0.75rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}
.skip:focus { top: 1rem; }

.sheet { background: var(--paper) var(--grain) 0 0 / 240px 240px; color: var(--ink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(2.75rem, 3.6vw, 4rem);
  padding: 0.9rem clamp(1.2rem, 1.8vw, 2.4rem);
  border: 1px solid transparent;
  border-radius: 0;
  font: 800 clamp(0.75rem, 0.9vw, 1.1rem)/1.2 var(--sans);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-solid {
  background: var(--paper);
  color: var(--ink);
}
.btn-solid:hover { background: var(--ink); color: var(--paper); }
.btn-line { border-color: currentColor; background: transparent; color: var(--paper); }
.btn-line:hover { background: var(--paper); color: var(--ink); }

/* ---------- Top bar ---------- */

.bar {
  --fg: var(--paper);
  --bg: var(--red-paper);
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bar);
  padding: 0.45rem var(--pad) 0;
  color: var(--fg);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
/* paper: over the off-white sheets; red-solid: over scrolling red scenes; red-open: over the pinned scenes, where it never covers the poster. */
.bar[data-tone='paper'] { --fg: var(--ink); --bg: var(--paper); }
.bar[data-floating='true'][data-tone='paper'],
.bar[data-floating='true'][data-tone='red-solid'] { background: var(--bg); padding-top: 0; }
.bar[data-floating='true'][data-tone='red-open'] { padding-top: 0; }

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font: 800 clamp(0.8rem, 0.95vw, 1.15rem)/1 var(--sans);
  letter-spacing: var(--track-label);
  text-decoration: none;
}

.bar .btn-line {
  position: relative;
  min-height: clamp(2rem, 2.4vw, 2.8rem);
  padding-block: 0.55rem;
  padding-inline: clamp(0.75rem, 0.9vw, 1.2rem);
  color: var(--fg);
  font-size: clamp(0.6875rem, 0.75vw, 0.95rem);
  letter-spacing: var(--track-label);
  border-color: var(--fg);
}
.bar .btn-line::before { content: ''; position: absolute; inset: -0.4rem -0.2rem; }
.bar .btn-line:hover { background: var(--fg); color: var(--bg); }

.menu-toggle {
  display: none;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: 800 0.75rem/1 var(--sans);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
}

.menu ul { display: flex; gap: 2rem; }
.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font: 800 0.7rem/1 var(--sans);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
}
.menu a:hover, .menu a[aria-current] { text-decoration: underline; text-underline-offset: 0.45em; }
.menu-wa { display: none; }

@media (min-width: 48rem) {
  /* Desktop keeps the comp's bare bar; the anchors appear for keyboard users. */
  .menu:not(:focus-within) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .menu:focus-within {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    padding: 0 1rem;
    background: var(--ink);
    color: var(--paper);
  }
}

@media (max-width: 47.99rem) {
  .bar .btn-bar { display: none; }
  .js .menu-toggle { display: inline-flex; align-items: center; }
  .menu {
    display: none;
    position: fixed;
    inset: var(--bar) 0 auto;
    padding: 0.5rem var(--pad) 1.25rem;
    background: var(--ink);
    color: var(--paper);
  }
  .js .menu[data-open='true'] { display: block; }
  .menu ul { flex-direction: column; gap: 0; }
  .menu li { padding-block: 0.25rem; border-top: 1px solid rgba(242, 237, 228, 0.25); }
  .menu a { width: 100%; min-height: 3rem; font-size: 0.8rem; }
  .menu-wa { display: block; }
}

/* ---------- Poster scenes: word + cutout on one stage ---------- */

.poster {
  --ratio: 1.7778; /* stage width / height */
  --ay: 0.5;       /* vertical anchor of the stage inside the screen */
  --pin: max(100svh, 34rem);
  position: relative;
  height: var(--pin);
  overflow: hidden;
  isolation: isolate;
  background: var(--red-paper) var(--red-tile) 0 0 / 512px 512px;
  color: var(--paper);
}
.pin {
  position: relative;
  height: 100%;
  overflow: hidden;
  container-type: size;
  isolation: isolate;
  background: var(--red-paper) var(--red-tile) 0 0 / 512px 512px;
}
.close { container-type: size; }

.stage {
  position: absolute;
  top: calc(var(--ay) * 100%);
  left: 50%;
  width: var(--stage-w, max(100cqw, 100cqh * var(--ratio)));
  aspect-ratio: var(--ratio);
  translate: -50% calc(var(--ay) * -100%);
  container-type: inline-size;
}

.layer { position: absolute; inset: 0; }
.cutout { z-index: 2; pointer-events: none; }
.cutout img { width: 100%; height: 100%; object-fit: fill; }

.word {
  position: absolute;
  z-index: 1;
  font: 900 var(--word-size)/1 var(--sans);
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: var(--paper);
}
.word-main, .report .word, .close .word {
  -webkit-mask-image: var(--worn);
  mask-image: var(--worn);
  -webkit-mask-size: 320px 320px;
  mask-size: 320px 320px;
  /* The tight line box is shorter than the glyphs: without this the mask slices descenders. */
  -webkit-mask-clip: no-clip;
  mask-clip: no-clip;
}
.word-main { display: block; }
.word-dot, .word-sub {
  position: absolute;
  right: 0;
  top: calc(var(--word-size) * 0.883);
  font-size: calc(var(--word-size) * 0.175);
  line-height: 1;
  letter-spacing: -0.03em;
}

.copy { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.copy > *, .copy a { pointer-events: auto; }

/* Hero: horse over the giant word, headline bottom left, button bottom right. */
.hero {
  --ay: 0.2;
  --word-size: min(24cqw, 24vw); /* the stage can be wider than the screen; the word never is */
}
.hero { overflow: visible; }
.hero .pin { position: sticky; top: 0; height: var(--pin); }
.hero .word { left: 50%; translate: -50% 0; top: 4.4cqw; }
/* A five-letter word: ".design" hangs under its first letter, clear of the horse. */
.hero .word-dot { right: auto; left: 0.07em; top: calc(var(--word-size) * 0.93); font-size: calc(var(--word-size) * 0.13); }
/* Wide screens: the word sits on the screen's left edge (not the stage's) and the horse moves
   right, so it crosses the last letter only and the name stays readable. */
@media (min-width: 48rem) and (orientation: landscape) {
  /* The stage is centred and can be wider than the screen (ratios under 16:9): step back in by half the excess. */
  .hero .word { left: calc((100cqw - 100vw) / 2 + var(--pad)); translate: none; }
  .hero .cutout { translate: 17cqw 0; }
}
/* The hero ends in torn paper: a strip of the red paper, torn along its top edge, lies over the foot of the horse. */
.hero .pin::after {
  --tear-strip: clamp(4.5rem, 7vw, 8rem);
  --tw: max(100cqw, 60rem);
  --th: calc(var(--tw) * 0.4286);
  content: '';
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: var(--tear-strip);
  pointer-events: none;
  background: var(--red-paper) var(--red-tile) 0 calc(var(--tear-strip) - 100cqh) / 512px 512px;
  -webkit-mask-image: url(assets/v5/torn-edge.png);
  mask-image: url(assets/v5/torn-edge.png);
  -webkit-mask-mode: luminance;
  mask-mode: luminance;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: var(--tw) var(--th);
  mask-size: var(--tw) var(--th);
  -webkit-mask-position: 50% calc(var(--tear-strip) * 0.5 - var(--th) * 0.46);
  mask-position: 50% calc(var(--tear-strip) * 0.5 - var(--th) * 0.46);
}
.hero .copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  inset: auto var(--pad) 4.4% var(--pad);
}
.hero h1 {
  font: 800 clamp(2.4rem, 5.5vw, 5.8rem)/0.93 var(--sans);
  letter-spacing: -0.03em;
}
.hero h1 span { display: block; }
.hero .btn { min-height: clamp(3.2rem, 3.9vw, 4.4rem); padding-inline: clamp(0.9rem, 1.5vw, 2rem); }
.tagline { margin-top: 0.85rem; font: 500 clamp(0.95rem, 1.41vw, 1.3rem)/1.35 var(--sans); }

/* Informe: red above a torn edge, black grain below; the paper card sits in front of the word. */
.report { --pin: max(100svh, 34rem); overflow: visible; }
.samples { overflow: visible; }
.report .pin { position: sticky; top: 0; height: var(--pin); }
.report .stage {
  --stage-w: min(100cqw, (100cqh - var(--bar)) * var(--ratio));
  top: var(--bar);
  translate: -50% 0;
}
.field-black {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--black-field);
}
.report .field-black {
  --sw: min(100cqw, (100cqh - var(--bar)) * var(--ratio));
  --tear-y: calc(var(--bar) + var(--sw) / var(--ratio) * 0.34);
  --torn-w: max(100cqw, 60rem);
  --torn-h: calc(var(--torn-w) * 0.4286);
  --ty: calc(var(--tear-y) - var(--torn-h) * 0.46);
  -webkit-mask-image: url(assets/v5/torn-edge.png), linear-gradient(#fff, #fff);
  mask-image: url(assets/v5/torn-edge.png), linear-gradient(#fff, #fff);
  -webkit-mask-mode: luminance, luminance;
  mask-mode: luminance, luminance;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: var(--torn-w) var(--torn-h), 100% calc(100% - var(--ty) - var(--torn-h) + 1px);
  mask-size: var(--torn-w) var(--torn-h), 100% calc(100% - var(--ty) - var(--torn-h) + 1px);
  -webkit-mask-position: 50% var(--ty), 0 100%;
  mask-position: 50% var(--ty), 0 100%;
}
.report { --word-size: 19.6cqw; }
.report .word { left: 50%; translate: -50% 0; top: 4.2cqw; }
.card {
  position: absolute;
  inset: 31.5% auto auto 40.3%;
  z-index: 2;
  width: 26.8%;
  padding: clamp(1rem, 2cqw, 2rem) clamp(1rem, 2.1cqw, 2.2rem) clamp(0.8rem, 1.5cqw, 1.4rem);
  background: var(--paper) var(--grain) 0 0 / 240px 240px;
  color: var(--ink);
}
.card-title {
  padding-bottom: 0.7em;
  font: 800 clamp(1.3rem, 2.15cqw, 2.4rem)/1.1 var(--sans);
  letter-spacing: -0.03em;
}
.card-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.62em;
  border-top: 1px solid var(--ink);
  font: 500 clamp(0.95rem, 1.55cqw, 1.7rem)/1.2 var(--sans);
}
.card-rows dd { text-align: right; }
.card-note { margin-top: 0.7em; font: 500 0.75rem/1.2 var(--sans); }

.report .copy {
  inset: auto auto 11% var(--pad);
  width: min(max(32rem, 32vw), 100% - 2 * var(--pad));
}
.lede { font: 600 clamp(1.5rem, max(0.9rem + 1.6vw, 3.25vw - 0.525rem), 3.6rem)/1.12 var(--sans); letter-spacing: -0.02em; text-wrap: balance; }
.report .text { margin-top: 0.8rem; font: 400 clamp(1.05rem, max(0.8rem + 0.7vw, 2.1vw - 0.4rem), 2.1rem)/1.4 var(--sans); }
.report .btn { margin-top: 1.8rem; }
.proof { margin-top: 1rem; font: 500 0.8125rem/1.4 var(--sans); }
.proof strong { font-weight: 800; }

/* ---------- Servicios ---------- */

.services {
  --cols: 430fr 450fr 330fr;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: calc(var(--bar) + clamp(1.5rem, 4.5vw, 3.6rem)) clamp(1.25rem, 4vw, 4rem) clamp(2rem, 4vw, 3.2rem);
}
.services h2 {
  font: 800 clamp(2.7rem, 7.4vw, 9.5rem)/1.02 var(--sans);
  letter-spacing: -0.04em;
}
.services h2 span { display: block; }
.services-list {
  display: grid;
  grid-template-columns: var(--cols);
  gap: 2rem 1.5rem;
  margin-top: clamp(2rem, 4.8vw, 4.2rem);
}
.badge {
  display: inline-grid;
  place-items: center;
  width: clamp(3.2rem, 6vw, 5.2rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  color: var(--paper);
  font: 800 clamp(1.1rem, 1.9vw, 1.9rem)/1 var(--sans);
}
.services-list h3 {
  margin-top: 0.7rem;
  font: 800 clamp(1.8rem, 3.6vw, 4.4rem)/1.08 var(--sans);
  letter-spacing: -0.035em;
}
.services-list p { margin-top: 0.7rem; font: 400 clamp(1.05rem, max(0.8rem + 0.6vw, 1.44vw + 0.08rem), 1.9rem)/1.35 var(--sans); }

.rule {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: auto;
  padding-top: 2.5rem;
  font: 800 0.8125rem/1 var(--sans);
  letter-spacing: var(--track-label);
}
.rule i { position: relative; flex: 1; height: 1px; background: var(--ink); }
.rule i::before, .rule i::after {
  content: '';
  position: absolute;
  top: -4px;
  width: 1px;
  height: 9px;
  background: var(--ink);
}
.rule i::before { left: 0; }
.rule i::after { right: 0; }

/* ---------- Muestras ---------- */

.samples { --word-size: 21cqw; }
.samples .pin { position: sticky; top: 0; height: var(--pin); }
.samples .stage {
  --stage-w: min(100cqw, (100cqh - var(--bar) * 0.55) * var(--ratio));
  top: calc(var(--bar) * 0.55);
  translate: -50% 0;
}
.samples .field-black {
  -webkit-mask-image: linear-gradient(to bottom, transparent 56%, #000 97%);
  mask-image: linear-gradient(to bottom, transparent 56%, #000 97%);
}
.samples .word { left: 50%; translate: -50% 0; top: 4.2cqw; }
.samples .word-sub { font-weight: 600; letter-spacing: -0.01em; }

.phones {
  --pw: 16.5cqw;
  position: absolute;
  left: 50%;
  top: 18.6cqw;
  z-index: 2;
  display: flex;
  gap: 2cqw;
  translate: -50% 0;
}
.phone {
  position: relative;
  flex: 0 0 var(--pw);
  width: var(--pw);
  padding: calc(var(--pw) * 0.045);
  border-radius: calc(var(--pw) * 0.17);
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(242, 237, 228, 0.3);
  transform-origin: 50% 100%;
}
.phone::before {
  content: '';
  position: absolute;
  top: calc(var(--pw) * 0.065);
  left: 50%;
  z-index: 1;
  width: 26%;
  height: calc(var(--pw) * 0.045);
  translate: -50% 0;
  border-radius: calc(var(--pw) * 0.05);
  background: var(--ink);
}
.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1072;
  border-radius: calc(var(--pw) * 0.125);
}
.samples .copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  inset: auto var(--pad) 5.5% var(--pad);
}
.caption { font: 500 clamp(1rem, 0.8rem + 0.5vw, 1.3rem)/1.35 var(--sans); }
.disclaimer { font: 800 0.75rem/1.3 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; text-align: right; }

/* ---------- Proceso y preguntas ---------- */

.process {
  --cols: 430fr 450fr 330fr;
  padding-top: calc(var(--bar) + clamp(1.25rem, 3vw, 2.4rem));
  padding-inline: clamp(1.25rem, 4vw, 4rem);
  padding-bottom: clamp(2rem, 3.5vw, 3rem);
}
.process h2 {
  font: 800 clamp(2.3rem, 5.2vw, 5.2rem)/1.05 var(--sans);
  letter-spacing: -0.04em;
}
.steps { display: grid; grid-template-columns: var(--cols); gap: 2.5rem 1.5rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.fig {
  display: block;
  color: var(--red);
  font: 800 clamp(4.6rem, 11.6vw, 15rem)/0.95 var(--sans);
  letter-spacing: -0.05em;
  white-space: nowrap;
  word-spacing: -0.05em;
  -webkit-mask-image: var(--worn);
  mask-image: var(--worn);
  -webkit-mask-size: 320px 320px;
  mask-size: 320px 320px;
  /* The tight line box is shorter than the glyphs: without this the mask slices descenders. */
  -webkit-mask-clip: no-clip;
  mask-clip: no-clip;
}
.unit {
  display: block;
  margin-top: 0.9rem;
  font: 800 clamp(0.8rem, 0.5rem + 0.6vw, 1.1rem)/1 var(--sans);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
}
.steps h3 {
  margin-top: clamp(0.9rem, 1.6vw, 1.4rem);
  font: 800 clamp(1.5rem, 2.3vw, 2.1rem)/1.15 var(--sans);
  letter-spacing: -0.02em;
}
.steps li > p:last-child { margin-top: 0.6rem; font: 400 clamp(1.05rem, 0.8rem + 0.55vw, 1.35rem)/1.4 var(--sans); max-width: 22ch; }

.questions { padding-inline: clamp(1.25rem, 4vw, 4rem); padding-bottom: clamp(2.5rem, 4.5vw, 4rem); }
.faq {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: clamp(1.5rem, 2.5vw, 2.2rem);
  border-top: 1px solid var(--ink);
}
.faq > div { padding-block: 0.25rem; padding-inline: clamp(1rem, 2.4vw, 2.4rem); border-left: 1px solid var(--ink); }
.faq > div:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
/* Two rows of three: the second row hangs from its own rule, like the first hangs from the list's. */
@media (min-width: 48rem) {
  .faq { row-gap: clamp(1.5rem, 2.5vw, 2.2rem); }
  .faq > div:nth-child(n + 4) { position: relative; padding-top: calc(clamp(1.5rem, 2.5vw, 2.2rem) + 0.25rem); }
  .faq > div:nth-child(n + 4)::before { content: ''; position: absolute; inset: 0 0 auto; border-top: 1px solid var(--ink); }
}
.faq dt { font: 800 clamp(1.1rem, 0.9rem + 0.5vw, 1.4rem)/1.2 var(--sans); letter-spacing: -0.01em; }
.faq dd { margin-top: 0.6rem; font: 400 clamp(1rem, 0.85rem + 0.3vw, 1.2rem)/1.4 var(--sans); max-width: 30ch; }

/* ---------- Cierre ---------- */

.close { --word-size: min(14.5cqw, 14.5vw); }
.close .word { left: 50%; translate: -50% 0; top: 8.9cqw; }
.close .copy {
  inset: auto 0 17% 0;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 1.1rem;
}
@media (min-width: 48rem) {
  .close .btn {
    min-height: clamp(4rem, 5.4vw, 6rem);
    padding-inline: clamp(1.8rem, 2.7vw, 3.6rem);
    font-size: clamp(1.1rem, 1.35vw, 1.65rem);
  }
}
.line { font: 400 clamp(1rem, 0.8rem + 0.45vw, 1.3rem)/1.3 var(--sans); text-align: center; text-wrap: balance; }
/* Secondary channels under the WhatsApp button: plain links, each a full tap target. */
.also { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(1rem, 2vw, 2.25rem); margin-top: -0.5rem; font-weight: 500; }
.also a { display: inline-flex; align-items: center; gap: 0.55em; min-height: 2.75rem; text-decoration: none; }
.also a span { text-decoration: underline; text-underline-offset: 0.3em; }
/* One-ink line icons: the app's own colours would be a fourth and fifth hue on the poster. */
.ico { flex: none; width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.ico .dot { fill: currentColor; stroke: none; }

.foot {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.75rem;
  margin-top: -3.75rem;
  padding: 0 var(--pad);
  color: var(--paper);
  font: 400 0.8125rem/1.3 var(--sans);
}
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* ---------- Torn paper between fields ----------
   A strip inside the top of the next section, drawn with the same torn-edge mask as the hero and
   report. Turned half a revolution so the paper (or black) shows above the tear and the edge faces
   down. Decorative: it takes no space, no clicks, and sits behind the stage and the copy. */

.services, .process { position: relative; }
.services::before, .process::before, .close::before {
  --tear: clamp(3rem, 4.5vw, 5.5rem);
  --tw: max(100vw, 60rem);
  --th: calc(var(--tw) * 0.4286);
  content: '';
  position: absolute;
  inset: -1px 0 auto; /* one pixel past the seam so the sheet behind never shows a hairline */
  height: calc(var(--tear) + 1px);
  pointer-events: none;
  rotate: 180deg;
  -webkit-mask-image: url(assets/v5/torn-edge.png);
  mask-image: url(assets/v5/torn-edge.png);
  -webkit-mask-mode: luminance;
  mask-mode: luminance;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: var(--tw) var(--th);
  mask-size: var(--tw) var(--th);
  -webkit-mask-position: 50% calc(var(--tear) * 0.5 - var(--th) * 0.46);
  mask-position: 50% calc(var(--tear) * 0.5 - var(--th) * 0.46);
}
/* Black field above, paper sheet below. */
.services::before, .process::before { background: var(--black-field); }
/* Paper sheet above, red below. */
.close::before { background: var(--paper) var(--grain) 0 0 / 240px 240px; }

/* ---------- Phone ---------- */

@media (orientation: portrait) {
  .hero { --ratio: 0.5652; --ay: 0.5; --word-size: 32vw; }
  /* The stage can be taller than the screen (tablets), so the word is anchored to the screen, not the stage. */
  .hero .word { top: calc(var(--bar) + 1.4rem - var(--ay) * (100cqh - 100cqw / var(--ratio))); }
  .hero .copy {
    inset: auto var(--pad) 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .hero h1 { font-size: clamp(2.3rem, 8.8vw, 5.6rem); }
}
@media (min-width: 48rem) and (orientation: portrait) {
  .tagline { max-width: 28ch; } /* keeps the line off the horse's neck on tablets */
}

@media (max-width: 47.99rem) {
  .hero { --word-size: 32vw; }
  .hero .word { top: calc(var(--bar) + 1.4rem); }
  .hero .copy {
    inset: auto var(--pad) 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }
  .hero h1 { font-size: clamp(2.3rem, 10.6vw, 3.4rem); }
  .hero .copy .btn { width: 100%; }

  /* Informe flows as a normal block on phones: word, card overlapping it, then the copy. */
  .report { height: auto; --word-size: 23cqw; }
  .report .pin { container-type: normal; position: relative; height: auto; padding: calc(var(--bar) + 1.25rem) var(--pad) 2.25rem; }
  .report .field-black { --tear-y: calc(var(--bar) + 1.25rem + 21vw); }
  .report .stage { position: relative; top: auto; left: auto; width: 100%; aspect-ratio: auto; translate: none; }
  .report .word { position: relative; left: auto; top: auto; translate: none; text-align: center; }
  .report .card {
    position: relative;
    inset: auto;
    width: min(100%, 22rem);
    margin: -0.6rem auto 0;
    padding: 1.1rem 1.25rem 1rem;
  }
  .card-title { font-size: 1.5rem; }
  .card-rows > div { font-size: 1.05rem; }
  .report .copy { position: relative; inset: auto; width: auto; margin-top: 2rem; }
  .report .btn { width: 100%; }

  /* Muestras: the three phones become a swipeable row. */
  .samples { height: auto; --word-size: 18.4cqw; }
  .samples .pin { position: relative; container-type: normal; height: auto; padding: calc(var(--bar) + 1.25rem) 0 2rem; }
  .samples .stage { position: relative; top: auto; left: auto; width: 100%; aspect-ratio: auto; translate: none; }
  .samples .word { position: relative; left: auto; top: auto; translate: none; margin-inline: var(--pad); }
  .samples .word-sub { position: static; display: block; margin-top: 0.15em; font-size: 6.6cqw; text-align: right; }
  .phones {
    --pw: min(62vw, 16rem);
    position: relative;
    left: auto;
    top: auto;
    translate: none;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 0.5rem var(--pad) 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--pad);
    scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone { scroll-snap-align: center; }
  .samples .copy { position: relative; inset: auto; flex-direction: column; align-items: flex-start; gap: 0.7rem; margin-top: 1.1rem; padding-inline: var(--pad); }
  .disclaimer { text-align: left; }

  .services { min-height: 0; }
  .services-list { grid-template-columns: 1fr; gap: 2.2rem; }
  .rule { display: none; }

  .steps { grid-template-columns: 1fr; gap: 2.4rem; }
  .fig { font-size: 6.2rem; word-spacing: normal; }
  .faq { grid-template-columns: 1fr; gap: 1.5rem; }
  .faq > div { padding: 1.25rem 0 0; border-left: 0; border-top: 1px solid var(--ink); }
  .faq > div:first-child { padding-top: 0; border-top: 0; }

  .close { --word-size: 14.6vw; }
  .close .stage { --stage-w: 175cqw; --ay: 0; left: auto; right: 0; top: 33%; translate: none; }
  .close .word { left: auto; right: 5vw; translate: none; top: -3.4cqw; }
  .close .copy { inset: auto var(--pad) 6.2rem; }
  .close .btn { width: 100%; }
  .foot { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; height: 4.5rem; margin-top: -4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .bar { transition: none; }
}

/* ---------- Motion ----------
   Everything below applies only while main.js has left the .motion class on <html>.
   Without it (no script, reduced motion) none of these start states exist and the page
   is the finished composition. The engine writes, per [data-motion] block:
     --p   -1..1 parallax phase: + arriving, 0 holding the screen, - leaving
     --hp  0..1 across the pinned scroll of a pinned scene
     --e-* eased entrance channels, 0 = start state, 1 = approved composition.
   Only transform, opacity and clip-path are animated. */

.motion [data-motion] {
  --p: 0;
  --hp: 0;
  --e-layer: 0; --e-word: 0; --e-copy: 0; --e-btn: 0; --e-line: 0;
  --e-s1: 0; --e-s2: 0; --e-s3: 0; --e-r1: 0; --e-r2: 0;
  --e-f1: 0; --e-f2: 0; --e-f3: 0; --e-head: 0;
  --e-p1: 0; --e-p2: 0; --e-p3: 0;
  --e-q1: 0; --e-q2: 0; --e-q3: 0; --e-q4: 0; --e-q5: 0; --e-q6: 0;
  --drift: max(var(--p), 0 - var(--p)); /* distance from the held position, 0 to 1 */
  --travel: 34cqw;
  --par: 3.6cqw;
}
@media (orientation: portrait), (max-width: 47.99rem) {
  .motion [data-motion] { --travel: 25cqw; --par: 2cqw; }
}
.motion [data-live] :is(.layer, .word, .phone, .card) { will-change: transform; }

/* Hero: a pinned scene. The word enters behind the horse, then travels while pinned and the horse drifts the other way. */
.motion .hero { height: calc(var(--pin) * 2.5); }
.motion { --rise: 9rem; }
@media (min-width: 48rem) {
  .motion .report { height: calc(var(--pin) + 70svh); }
  .motion .samples { height: calc(var(--pin) + 100svh); }
}
@media (max-width: 47.99rem) { .motion { --rise: 3.5rem; } }
.motion .hero .layer {
  opacity: calc(0.4 + 0.6 * var(--e-layer));
  transform: translate3d(calc((1 - var(--e-layer)) * 7cqw + var(--hp) * -2.6cqw), calc(var(--hp) * -1.4cqw), 0)
    scale(calc(1 + (1 - var(--e-layer)) * 0.04 + var(--hp) * 0.07));
}
.motion .hero .word {
  opacity: calc(0.15 + 0.85 * var(--e-word));
  transform: translate3d(calc((1 - var(--e-word)) * -125cqw + var(--hp) * var(--travel)), 0, 0) scale(calc(1 + var(--hp) * 0.2));
}
.motion .hero :is(h1, .tagline) {
  opacity: calc(var(--e-copy) * (1 - clamp(0, (var(--hp) - 0.5) * 2.2, 1)));
  transform: translate3d(0, calc((1 - var(--e-copy)) * 1.2rem - var(--hp) * 1.5rem), 0);
}
.motion .hero .btn {
  opacity: calc(var(--e-btn) * (1 - clamp(0, (var(--hp) - 0.55) * 2.2, 1)));
  transform: translate3d(0, calc((1 - var(--e-btn)) * 1.2rem - var(--hp) * 1.5rem), 0);
}

/* Informe: the word slides in from the right behind the card, the card rises. */
.motion .report .word {
  opacity: var(--e-word);
  transform: translate3d(calc((1 - var(--e-word)) * 60cqw + var(--p) * 3cqw), 0, 0);
}
.motion .report .card {
  opacity: var(--e-layer);
  transform: translate3d(0, calc((1 - var(--e-layer)) * 6cqw), 0);
}
.motion .report :is(.lede, .text, .proof) {
  opacity: var(--e-copy);
  transform: translate3d(0, calc((1 - var(--e-copy)) * 1.2rem), 0);
}
.motion .report .btn {
  opacity: var(--e-btn);
  transform: translate3d(0, calc((1 - var(--e-btn)) * 1.2rem), 0);
}

/* Servicios: the statement rises, the three columns arrive one by one, the rule draws itself. */
.motion .services h2 {
  opacity: var(--e-head);
  transform: translate3d(0, calc((1 - var(--e-head)) * 1.6rem), 0);
}
.motion .services-list li:nth-child(1) { --e: var(--e-s1); }
.motion .services-list li:nth-child(2) { --e: var(--e-s2); }
.motion .services-list li:nth-child(3) { --e: var(--e-s3); }
.motion .services-list li {
  opacity: var(--e);
  transform: translate3d(0, calc((1 - var(--e)) * 1.5rem), 0);
}
.motion .rule span:nth-of-type(1) { opacity: var(--e-s1); }
.motion .rule span:nth-of-type(2) { opacity: var(--e-s2); }
.motion .rule span:nth-of-type(3) { opacity: var(--e-s3); }
.motion .rule i:nth-of-type(1) { clip-path: inset(-6px calc((1 - var(--e-r1)) * 100%) -6px 0); }
.motion .rule i:nth-of-type(2) { clip-path: inset(-6px calc((1 - var(--e-r2)) * 100%) -6px 0); }

/* Muestras: the word first, then the three phones rise one after another and settle straight. */
.motion .samples .word {
  opacity: var(--e-word);
  transform: translate3d(calc((1 - var(--e-word)) * -40cqw), 0, 0);
}
.motion .samples .phone:nth-child(1) { --e: var(--e-p1); --tilt: -5deg; }
.motion .samples .phone:nth-child(2) { --e: var(--e-p2); --tilt: 3deg; }
.motion .samples .phone:nth-child(3) { --e: var(--e-p3); --tilt: 5deg; }
.motion .samples .phone {
  opacity: var(--e);
  transform: translate3d(0, calc((1 - var(--e)) * var(--rise)), 0) rotate(calc((1 - var(--e)) * var(--tilt)));
}
.motion .samples .caption {
  opacity: var(--e-copy);
  transform: translate3d(0, calc((1 - var(--e-copy)) * 0.8rem), 0);
}
.motion .samples .disclaimer {
  opacity: var(--e-line);
  transform: translate3d(0, calc((1 - var(--e-line)) * 0.8rem), 0);
}

/* Proceso y preguntas */
.motion .steps li:nth-child(1) { --e: var(--e-f1); }
.motion .steps li:nth-child(2) { --e: var(--e-f2); }
.motion .steps li:nth-child(3) { --e: var(--e-f3); }
.motion .faq > div:nth-child(1) { --e: var(--e-q1); }
.motion .faq > div:nth-child(2) { --e: var(--e-q2); }
.motion .faq > div:nth-child(3) { --e: var(--e-q3); }
.motion .faq > div:nth-child(4) { --e: var(--e-q4); }
.motion .faq > div:nth-child(5) { --e: var(--e-q5); }
.motion .faq > div:nth-child(6) { --e: var(--e-q6); }
.motion :is(.steps li, .faq > div) {
  opacity: var(--e);
  transform: translate3d(0, calc((1 - var(--e)) * 1.5rem), 0);
}
.motion .process h2 {
  opacity: var(--e-head);
  transform: translate3d(0, calc((1 - var(--e-head)) * 1.2rem), 0);
}

/* Cierre: the word settles from large while the hand slides in over it. */
.motion .close .word {
  opacity: var(--e-word);
  transform: translate3d(0, calc(var(--p) * var(--par) * 0.5), 0) scale(calc(1 + (1 - var(--e-word)) * 0.3));
}
.motion .close .layer {
  opacity: calc(0.4 + 0.6 * var(--e-layer));
  transform: translate3d(calc((1 - var(--e-layer)) * 16cqw), calc(var(--p) * var(--par) * 0.5), 0);
}
.motion .close .btn {
  opacity: var(--e-btn);
  transform: translate3d(0, calc((1 - var(--e-btn)) * 1.2rem), 0);
}
.motion .close .line {
  opacity: var(--e-line);
  transform: translate3d(0, calc((1 - var(--e-line)) * 0.8rem), 0);
}
