/* ────────────────────────────────────────────────────────────────────────────
   Diagonal — design system
   Warm-grey light + warm-dark dark · orange primary · editorial
   v3 · production · enriched microinteractions
──────────────────────────────────────────────────────────────────────────── */

:root {
  --bg:        #C9C1B3;
  --bg-soft:   #BFB6A6;
  --bg-deep:   #B0A696;
  --surface:   #D2CABE;
  --ink:       #1A1612;
  --ink-2:     #2D2620;
  --ink-soft:  #49423A;   /* ~5:1 on pewter bg (was 4.35, sub-AA) */
  --ink-mute:  #524A3E;   /* ~4.6:1 (was 2.75, failed AA badly) */
  --line:      #1A161214;
  --line-2:    #1A161228;
  --line-3:    #1A161255;
  --accent:    #E96B2E;
  --accent-ink: #14110D;
  --accent-soft: #F18A55;

  --display: "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sans:    "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono:  "Geist Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --display-feat: normal;
  --sans-feat: "ss01" 1, "cv11" 1;

  --pad:       clamp(20px, 4vw, 56px);
  --pad-2:     clamp(28px, 6vw, 96px);
  --section-y: clamp(80px, 10vw, 160px);
  --grid-gap:  24px;

  --radius:    4px;
  --radius-lg: 12px;

  --ease-out:  cubic-bezier(.2,.8,.2,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
}

html[data-theme="dark"] {
  --bg:        #15110D;
  --bg-soft:   #1D1812;
  --bg-deep:   #261F18;
  --surface:   #221C16;
  --ink:       #EFE7D9;
  --ink-2:     #DDD3C2;
  --ink-soft:  #A89D8B;
  --ink-mute:  #9D9180;   /* ~5.7:1 on dark bg (was 3.75, sub-AA) */
  --line:      #EFE7D914;
  --line-2:    #EFE7D928;
  --line-3:    #EFE7D955;
  --accent:    #FF7A39;
  --accent-soft: #FFA275;
  --accent-ink: #14110D;
}

html[data-density="cozy"]  { --section-y: clamp(110px, 12vw, 200px); --grid-gap: 32px; }
html[data-density="tight"] { --section-y: clamp(56px, 7vw, 100px);   --grid-gap: 16px; }

/* ─── reset & base ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: var(--sans-feat);
  overflow-x: hidden;
  transition: background .35s var(--ease-out), color .35s var(--ease-out);
}
.serif, h1, h2, h3, .hero-headline, .s-title, .contact-headline, .signoff,
.member-name, .reel-bottom .t, .pf-modal-panel h3, .reel-modal-meta h3,
.section-head h2, .manifesto h2, .pf-meta .title, .map-overlay .val,
.brand-word, .brand-word--fallback {
  font-family: var(--display);
  font-feature-settings: var(--display-feat);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.s-title, .pf-meta .title, .reel-bottom .t, .member-name { font-weight: 500; }
.pill, .crumbs, .mono-tag, .section-num, .topbar, .topbar-row,
.s-num, .s-tag, .s-tags span, .pf-tag, .pf-meta, .map-legend, .map-overlay,
.region-list .idx, .region-list .count, .reel-bottom .d, .lang-toggle,
.member-photo .badge, .member-tags span, .form-tags label, .field > span,
.address, .footer-row, .cf-step, .cf-aside-label, .cf-promise, .cf-field i,
.channel .lbl, .nav-cta, .nav-links a, .hero-mark, .hero-eyebrow-row .crumbs {
  font-family: var(--mono);
  font-feature-settings: "ss01" 1, "ss02" 1;
}
em { font-style: normal; }
/* Headline emphasis: accent colour + a touch heavier — replaces the old serif
   italic, which read dated. */
.hero-headline em, .s-title em, .section-head h2 em, .manifesto h2 em,
.contact-headline em, .signoff em, .three .word em {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── layout primitives ────────────────────────────────────────────────── */
.wrap { padding-inline: var(--pad); }
.max  { max-width: 1480px; margin-inline: auto; }
.rule { height: 1px; background: var(--line-2); border: 0; margin: 0; }
.section { padding-block: var(--section-y); }
.serif { font-family: var(--display); font-weight: 400; }
.italic { font-style: normal; }

.section-num {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}
.section-num::before {
  content: ""; flex: 0 0 32px; height: 1px; background: currentColor; opacity: 0.45;
  transform: translateY(-3px);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }
.section-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.022em;
  margin: 16px 0 0;
  text-wrap: balance;
}
.section-head h2 em { font-style: normal; }
.section-head h2 .underline { position: relative; display: inline-block; }
.section-head h2 .underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em;
  height: 0.34em; background: var(--accent); z-index: -1;
  transform: skewX(-8deg) scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--ease-out);
}
.reveal.is-in .underline::after,
.is-in .underline::after { transform: skewX(-8deg) scaleX(1); }

.section-head .lede {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 44ch;
  justify-self: end;
  line-height: 1.55;
}
@media (max-width: 760px) { .section-head .lede { justify-self: start; } }

/* ─── reveal animations ────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal[data-stagger="1"] { transition-delay: .06s; }
.reveal[data-stagger="2"] { transition-delay: .12s; }
.reveal[data-stagger="3"] { transition-delay: .18s; }
.reveal[data-stagger="4"] { transition-delay: .24s; }
.reveal[data-stagger="5"] { transition-delay: .30s; }

/* ─── custom cursor ──────────────────────────────────────────────────────
   No mix-blend-mode: it forces a full-screen backdrop repaint every frame
   (the classic "laggy custom cursor" culprit). Instead a dark dot + ring
   with a thin light halo — like the native macOS pointer — stays legible on
   the light pewter UI *and* over photos / the few dark bands, with zero
   blend cost. The JS keeps the elements on their own GPU layer (translate3d
   + will-change) and only spins rAF while the ring is catching up. */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9999;
  pointer-events: none;
}
@media (pointer: coarse) { .cursor { display: none; } html, body { cursor: auto; } }
@media (pointer: fine) { html, body { cursor: none; } a, button, [role="button"], input, textarea, label { cursor: none; } }
.cursor-dot, .cursor-ring {
  position: fixed; left: 0; top: 0;
  border-radius: 999px;
  pointer-events: none;
  will-change: transform;
}
.cursor-dot {
  width: 7px; height: 7px;
  background: var(--ink);
  /* halo uses --bg (opposite luminance of --ink) so it adapts per theme AND
     keeps contrast over photos that match the ink tone. */
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--bg) 62%, transparent);
  transform: translate(-50%, -50%);
  transition: width .2s var(--ease-out), height .2s var(--ease-out), opacity .2s ease;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid var(--ink);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg) 45%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bg) 45%, transparent);
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease-out), height .25s var(--ease-out), border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
body.cursor-hover .cursor-ring {
  width: 46px; height: 46px;
  background: transparent;          /* see-through: never cover the link underneath */
  border-color: var(--accent);      /* enlarge as a thin accent OUTLINE ring, not a solid disc */
}
body.cursor-hover .cursor-dot { opacity: 0; }   /* hide the center dot so the link stays fully readable */
body.cursor-press .cursor-ring { width: 28px; height: 28px; }

/* ─── scroll progress ──────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed; left: 0; top: 0; right: 0; height: 2px;
  z-index: 90;
  background: transparent;
}
.scroll-progress span {
  display: block; height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width .12s linear;
}

/* ─── nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease-out), border-color .3s ease;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  border-bottom-color: var(--line-2);
}
.nav-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 18px;
  padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; transition: transform .3s var(--ease-out); }
.brand:hover { transform: rotate(-2deg) scale(1.03); }
.brand-word {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-word .dot { color: var(--accent); }

.nav-links {
  display: flex; gap: 2px; justify-self: center;
  background: var(--surface);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  position: relative;
}
.nav-links a {
  padding: 8px 14px; font-size: 14.5px; color: var(--ink-soft);
  border-radius: 999px;
  transition: background .25s var(--ease-out), color .25s var(--ease-out), transform .25s var(--ease-out);
  font-weight: 500;
  position: relative;
}
/* Menu + CTA in the main typeface (Manrope), not the mono labels. */
.nav-links a, .nav-cta { font-family: var(--sans); font-feature-settings: var(--sans-feat); letter-spacing: -0.01em; text-transform: none; }
.nav-links a:hover { color: var(--ink); transform: translateY(-1px); }
.nav-links a.is-active { background: var(--ink); color: var(--bg); }
@media (max-width: 1100px) { .nav-links { display: none; } }

.nav-tools {
  display: inline-flex; align-items: center; gap: 4px;
}
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  display: grid; place-items: center;
  position: relative;
  transition: color .25s ease, background .25s ease, transform .25s var(--ease-out);
}
.theme-toggle:hover { color: var(--ink); transform: rotate(20deg); }
.theme-toggle .i-sun, .theme-toggle .i-moon { position: absolute; transition: opacity .3s ease, transform .3s var(--ease-out); }
html[data-theme="light"] .theme-toggle .i-sun { opacity: 1; transform: scale(1) rotate(0deg); }
html[data-theme="light"] .theme-toggle .i-moon { opacity: 0; transform: scale(.4) rotate(-90deg); }
html[data-theme="dark"] .theme-toggle .i-sun { opacity: 0; transform: scale(.4) rotate(90deg); }
html[data-theme="dark"] .theme-toggle .i-moon { opacity: 1; transform: scale(1) rotate(0deg); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
}
.lang-toggle button {
  background: transparent; border: 0; padding: 4px 6px;
  color: var(--ink-soft); font: inherit; letter-spacing: inherit;
  transition: color .2s ease;
}
.lang-toggle button.is-active { color: var(--ink); }
.lang-toggle .sep { color: var(--ink-mute); }
.nav-lang {
  border-left: 1px solid var(--line);
  padding-left: 14px;
  margin-left: 2px;
}
@media (max-width: 760px) { .nav-lang { display: none; } }

.nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  padding: 10px 18px 10px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  transition: transform .25s var(--ease-out), background .25s var(--ease-out), color .25s var(--ease-out);
  will-change: transform;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--accent); color: var(--accent-ink); }
.nav-cta .dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
}
.nav-cta:hover .dot { background: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 25%, transparent); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); }
  50%       { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* mobile burger */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  position: relative;
}
.nav-burger span {
  width: 16px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .2s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
@media (max-width: 1100px) {
  .nav-burger { display: inline-flex; }
  .nav-tools { display: none; }
}

.nav-drawer {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg);                 /* solid — items must stay legible if blur is unsupported */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-2);
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease-out);
}
.nav-drawer.is-open { max-height: 480px; }
.nav-drawer .max {
  display: flex; flex-direction: column; gap: 2px;
  padding-block: 16px;
}
.nav-drawer a {
  font-family: var(--display); font-size: 28px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: color .25s ease, padding .25s ease;
}
.nav-drawer a:hover { color: var(--accent); padding-left: 10px; }
.nav-drawer .drawer-cta { color: var(--accent); border-bottom: 0; }
/* Theme + language toggles inside the drawer (they're hidden in the top bar on
   mobile). Override the bar's hide rules and give them ≥44px touch targets. */
.drawer-tools {
  display: flex; align-items: center; gap: 20px;
  padding-top: 16px; margin-top: 8px;
  border-top: 1px solid var(--line);
}
.drawer-tools .nav-lang { display: inline-flex; align-items: center; gap: 6px; }
.drawer-tools .lang-toggle button { font-size: 15px; padding: 10px 6px; min-height: 44px; }
.drawer-tools .theme-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; }

/* ─── hero ─────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(40px, 6vw, 88px); padding-bottom: 0; position: relative; }

.hero-eyebrow-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: clamp(24px, 4vw, 48px);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
.hero-eyebrow-row .crumbs {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
}
/* On phones the crumbs crowd the right edge and just echo the services list. */
@media (max-width: 520px) { .hero-eyebrow-row .crumbs { display: none; } }

.hero-headline {
  font-family: var(--display); font-weight: 500;
  /* Manrope is wider than the old display face — smaller floor so the longest
     word ("Respondemos.") never clips on phones; scales up fast on desktop. */
  font-size: clamp(46px, 11.5vw, 208px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
}
.hero-headline em { font-style: normal; }
.hero-headline .accent {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 0.16em 0.04em;
  margin: 0 0.04em;
  transform: skewX(-7deg);
  line-height: 0.95;
  position: relative;
}
.hero-headline .accent::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, #fff 35%, transparent), transparent);
  transform: translateX(-150%);
  animation: shine 3.6s ease-in-out infinite 1.6s;
  mix-blend-mode: overlay;
  pointer-events: none;
}
@keyframes shine {
  0%, 50%, 100% { transform: translateX(-150%); }
  60%, 80%      { transform: translateX(150%); }
}
.hero-headline .accent > span { display: inline-block; transform: skewX(7deg); }
/* The emphasised word sits INSIDE the accent box → keep it dark, not orange-on-orange. */
.hero-headline .accent em, .contact-headline .accent em { color: var(--accent-ink); }

.hero-grid {
  margin-top: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

.hero-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-soft);
  max-width: 56ch;
  line-height: 1.55;
}
.hero-sub strong { color: var(--ink); font-weight: 500; }

.hero-actions { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500;
  border: 1px solid transparent;
  transition: transform .25s var(--ease-out), background .25s var(--ease-out), color .25s var(--ease-out), box-shadow .25s ease;
  font-family: var(--sans);
  background: transparent;
  color: inherit;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, #fff 30%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-primary:hover { background: var(--ink); color: var(--bg); box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--ink) 50%, transparent); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-3); }
.btn-ghost:hover { background: var(--surface); }
.btn .arrow { transition: transform .25s var(--ease-out); }
.btn:hover .arrow { transform: translate(2px, -2px); }

body[data-hero="max"] .hero-feature { display: none; }
body[data-hero="max"] .hero-grid { grid-template-columns: 1.3fr 1fr; }
body[data-hero="max"] .hero-sub-cell { grid-column: 1 / -1; }

/* hero stats */
.hero-stats {
  margin-top: clamp(56px, 7vw, 100px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.hero-stats > div {
  padding: 28px 24px 28px 0;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  transition: padding .35s var(--ease-out);
}
.hero-stats > div:hover {
  padding-top: 24px;
}
.hero-stats > div:hover::before {
  width: 60% !important;
  background: var(--accent);
}
.hero-stats > div::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--accent);
  transition: width .8s var(--ease-out);
}
.hero-stats.is-in > div:nth-child(1)::before { width: 30%; transition-delay: .1s; }
.hero-stats.is-in > div:nth-child(2)::before { width: 30%; transition-delay: .2s; }
.hero-stats.is-in > div:nth-child(3)::before { width: 30%; transition-delay: .3s; }
.hero-stats.is-in > div:nth-child(4)::before { width: 30%; transition-delay: .4s; }
.hero-stats > div:last-child { border-right: 0; padding-right: 0; }
.hero-stats .num {
  font-family: var(--display);
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-feature-settings: "ss01";
}
.hero-stats .num em { font-style: normal; color: var(--accent); }
.hero-stats .lab {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 0; }
  .hero-stats > div:nth-child(2n) { border-right: 0; }
  .hero-stats > div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ─── marquee ──────────────────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  background: var(--bg);
}
.marquee-a {
  border-top: 1px solid var(--line-2);
  margin-top: clamp(60px, 8vw, 100px);
}
.marquee-b {
  border-bottom: 1px solid var(--line-2);
  background: var(--ink);
  color: var(--bg);
}
.marquee-track {
  display: flex;
  /* Inter-item spacing lives on each span as padding-inline-end, NOT a flex `gap`
     nor a margin. A flex gap is only added BETWEEN items, and a trailing margin is
     OUTSIDE the border-box — both excluded from the width that translateX(-50%)
     measures, so -50% undershot one set by half a gap → the marquee jumped and
     never closed the loop. Padding IS in the border-box, so with equal trailing
     padding on every span the track is two identical halves and -50% hits the seam
     exactly (verified: 0px drift). */
  padding-block: 22px;
  animation: scroll 26s linear infinite;
  white-space: nowrap;
  will-change: transform;
}
.marquee-track.reverse {
  animation: scroll-rev 34s linear infinite;
}
/* Pause on hover ONLY on hover-capable devices — on touch, :hover sticks after a
   tap and freezes the marquee (looked "extremely slow" on mobile). */
@media (hover: hover) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
/* Mobile: smaller type + shorter duration so it doesn't crawl on narrow screens. */
@media (max-width: 600px) {
  .marquee-track { animation-duration: 15s; padding-block: 16px; }
  .marquee-track.reverse { animation-duration: 19s; }
  .marquee-track > span { font-size: 22px; gap: 28px; padding-inline-end: 28px; }
  .marquee-b .marquee-track > span { font-size: 15px; }
}
.marquee-track > span {
  font-family: var(--display);
  font-size: 32px;
  font-style: normal;
  display: inline-flex; align-items: center; gap: 40px;
  padding-inline-end: 40px;   /* inter-item spacing — padding (in border-box) so -50% is exact */
  letter-spacing: -0.01em;
  transition: color .25s ease;
}
.marquee-track > span:hover { color: var(--accent); }
.marquee-track > span::after {
  content: ""; width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent);
}
.marquee-b .marquee-track > span {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: var(--bg);
}
.marquee-b .marquee-track > span::after {
  background: var(--accent);
  width: 6px; height: 6px;
}
.marquee-b .marquee-track > span.ghost {
  color: color-mix(in srgb, var(--bg) 35%, transparent);
}
.marquee-b .marquee-track > span.ghost:hover { color: var(--bg); }
@keyframes scroll     { to { transform: translateX(-50%); } }
@keyframes scroll-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ─── manifiesto ───────────────────────────────────────────────────────── */
.manifesto {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 880px) { .manifesto { grid-template-columns: 1fr; gap: 32px; } }
.manifesto h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 0.94;
  letter-spacing: -0.024em;
  margin: 12px 0 0;
}
.manifesto h2 em { font-style: normal; }
.manifesto .body {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}
.manifesto .body p { margin: 0 0 1em; }
.manifesto .body p strong { color: var(--ink); font-weight: 500; }
.manifesto .body p:last-child { margin-bottom: 0; }
.manifesto .three {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.manifesto .three > div {
  padding: 20px 0;
  border-top: 1px solid var(--line-2);
  position: relative;
  transition: padding .35s var(--ease-out);
}
.manifesto .three > div::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px;
  width: 0;
  background: var(--accent);
  transition: width .55s var(--ease-out);
}
.manifesto .three > div:hover::before { width: 30%; }
.manifesto .three .word {
  font-family: var(--display); font-size: 28px; line-height: 1;
}
.manifesto .three .word em { font-style: normal; color: var(--accent); }
.manifesto .three .meta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 10px;
}
@media (max-width: 600px) { .manifesto .three { grid-template-columns: 1fr; } }

/* ─── services (collapse + expand accordion) ───────────────────────────── */
.services {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line-2);
}
.service-row {
  position: relative;
  border-bottom: 1px solid var(--line-2);
  transition: background .45s var(--ease-in-out), color .45s var(--ease-in-out);
}
.service-row.is-open {
  background: var(--accent); color: var(--accent-ink);
  margin-inline: calc(var(--pad) * -1);
  padding-inline: var(--pad);
  border-radius: 4px;
  border-bottom-color: transparent;
}
.s-head {
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
  background: transparent; border: 0;
  font-family: inherit; color: inherit;
  text-align: left;
  cursor: pointer;
  transition: padding .45s var(--ease-in-out);
}
.service-row.is-open .s-head { padding-block: 32px 8px; }
.s-num {
  font-size: 12px;
  letter-spacing: 0.14em; color: var(--ink-soft);
  transition: color .35s ease;
}
.service-row.is-open .s-num { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.s-title-wrap { display: flex; flex-direction: column; gap: 6px; }
.s-title {
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.02;
  margin: 0;
  font-weight: 500;
}
.s-tag {
  font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
}
.service-row.is-open .s-tag { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }

/* + / × toggle */
.s-toggle {
  width: 48px; height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line-3);
  position: relative;
  display: inline-block;
  transition: border-color .35s ease, background .35s ease, transform .55s var(--ease-out);
  flex-shrink: 0;
}
.s-toggle-h, .s-toggle-v {
  position: absolute; left: 50%; top: 50%;
  background: currentColor;
  transition: transform .55s var(--ease-in-out), opacity .35s ease;
}
.s-toggle-h { width: 14px; height: 1.5px; transform: translate(-50%, -50%); }
.s-toggle-v { width: 1.5px; height: 14px; transform: translate(-50%, -50%); }
.service-row.is-open .s-toggle {
  background: var(--accent-ink); color: var(--accent);
  border-color: var(--accent-ink);
  transform: rotate(45deg);
}
.service-row.is-open .s-toggle-v { opacity: 0; }

/* Body — animated grid-template-rows trick */
.s-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease-in-out);
  overflow: hidden;
}
.service-row.is-open .s-body-wrap { grid-template-rows: 1fr; }
.s-body-grid {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 40px;
  align-items: start;
  padding: 12px 0 36px 84px;
}
@media (max-width: 760px) {
  .s-body-grid { grid-template-columns: 1fr; gap: 18px; padding: 4px 0 28px 0; }
}
.s-image {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid color-mix(in srgb, var(--accent-ink) 12%, transparent);
  position: relative;
  overflow: hidden;
  transform: scale(.96);
  opacity: 0;
  transition: transform .7s var(--ease-out) .15s, opacity .55s ease .15s;
}
.s-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--accent-ink) 28%, transparent));
}
.service-row.is-open .s-image { transform: scale(1); opacity: 1; }
.s-text {
  display: grid; gap: 16px;
  transform: translateY(10px); opacity: 0;
  transition: transform .55s var(--ease-out) .25s, opacity .45s ease .25s;
}
.service-row.is-open .s-text { transform: translateY(0); opacity: 1; }
.s-body {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.55;
  max-width: 56ch;
  color: color-mix(in srgb, var(--accent-ink) 80%, transparent);
  margin: 0;
}
.service-row.is-open .s-body { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
.s-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.s-tags span {
  font-size: 10.5px;
  padding: 5px 10px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent-ink) 22%, transparent);
  color: color-mix(in srgb, var(--accent-ink) 75%, transparent);
  letter-spacing: 0.06em;
}
.s-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent-ink); color: var(--accent);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  width: max-content;
  transition: transform .25s var(--ease-out), background .25s ease;
}
.s-cta:hover { transform: translateY(-1px); }
.s-cta svg { transition: transform .25s var(--ease-out); }
.s-cta:hover svg { transform: translate(2px, -2px); }

/* Hover hint — only on closed rows; subtle */
.service-row:not(.is-open):hover .s-toggle { border-color: var(--accent); color: var(--accent); }
.service-row:not(.is-open):hover .s-title { color: var(--accent); }

/* Idle pulse on closed-row toggles — quiet, indicates clickability */
@keyframes togglePulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent); }
}
.service-row:not(.is-open) .s-toggle { animation: togglePulse 3.2s ease-in-out infinite; }
.service-row:not(.is-open):hover .s-toggle { animation: none; }
.service-row:not(.is-open):nth-child(1) .s-toggle { animation-delay: 0s; }
.service-row:not(.is-open):nth-child(2) .s-toggle { animation-delay: .35s; }
.service-row:not(.is-open):nth-child(3) .s-toggle { animation-delay: .7s; }
.service-row:not(.is-open):nth-child(4) .s-toggle { animation-delay: 1.05s; }

/* ─── portafolio (editorial mosaic — explicit row heights) ────────────── */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(300px, 30vw);   /* uniform rows — robust, no fragile fixed template */
  grid-auto-flow: dense;                 /* self-heals: backfills any gap from odd spans */
  gap: var(--grid-gap);
}
.pf {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
  cursor: pointer;
  display: block;
  transform-style: preserve-3d;
  will-change: transform;
  grid-column: span 4;
  /* height comes from the grid row — no aspect-ratio */
}
/*  Row layout (items flow naturally in order):
    Row 1:  item 1 (span 8) + item 2 (span 4)
    Row 2:  items 3, 4, 5  (span 4 each)
    Row 3:  item 6 (span 4) + item 7 (span 8)  — mirror
    Row 4:  items 8, 9, 10 (span 4 each)
    Row 5:  item 11 (span 6) + growth CTA tile (span 6)
*/
.pf:nth-child(1) { grid-column: span 8; }   /* featured — sums to 12 with item 2 (span 4) */
.pf:nth-child(7) { grid-column: span 8; }   /* featured mirror */
.pf:nth-child(11) { grid-column: span 6; }  /* last work, 2-up with CTA */
.pf-cta { grid-column: span 6; }

/* Tablet — 6 cols. Featured span 4 (+small=6), rest span 2 (3-up), last row 2-up. */
@media (max-width: 1024px) {
  .pf-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(260px, 38vw);
  }
  .pf { grid-column: span 2; }
  .pf:nth-child(1), .pf:nth-child(7) { grid-column: span 4; }
  .pf:nth-child(11), .pf-cta { grid-column: span 3; }
}
/* Phone — 2 cols. Featured + CTA full-width, rest paired. */
@media (max-width: 600px) {
  .pf-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(200px, 46vw);
  }
  .pf { grid-column: span 1; }
  .pf:nth-child(1), .pf:nth-child(7), .pf:nth-child(11), .pf-cta { grid-column: span 2; }
}
/* Phones — single column (2-col was too cramped on 360–430px; labels shrank). */
@media (max-width: 520px) {
  .pf-grid { grid-template-columns: 1fr; grid-auto-rows: minmax(240px, 58vw); }
  .pf, .pf:nth-child(n) { grid-column: span 1; }
}

/* Growth CTA tile — closes the portfolio with an invitation, not a photo. */
.pf-cta {
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 55%),
    var(--bg-deep);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line-2));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 2.4vw, 34px);
  text-decoration: none;
  isolation: isolate;
}
.pf-cta::before,
.pf-cta::after { display: none; }            /* no photo scrim/overlay */
.pf-cta .pf-cta-k {
  font-family: var(--mono, monospace);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.pf-cta .pf-cta-h {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: auto;
}
.pf-cta .pf-cta-go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-family: var(--mono, monospace);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: gap .35s var(--ease-out), color .35s var(--ease-out);
}
.pf-cta .pf-cta-go svg { transition: transform .35s var(--ease-out); }
.pf-cta:hover { border-color: var(--accent); }
.pf-cta:hover .pf-cta-go { gap: 14px; color: var(--accent); }
.pf-cta:hover .pf-cta-go svg { transform: translate(2px, -2px); }
.pf:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--ink) 35%, transparent);
}
.pf-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--bg-soft);
  transition: transform .8s var(--ease-out), filter .8s var(--ease-out);
}
.pf:hover .pf-img { transform: scale(1.06); filter: brightness(1.05); }
.pf::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, color-mix(in srgb, var(--ink) 38%, transparent));
  pointer-events: none;
  z-index: 1;
}
.pf::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(40% 40% at var(--mx, 50%) var(--my, 50%),
                color-mix(in srgb, var(--accent) 22%, transparent) 0%,
                transparent 70%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 2;
}
.pf:hover::after { opacity: 1; }

.pf-meta {
  position: absolute;
  left: 20px; bottom: 20px;
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--ink) 95%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 11px; letter-spacing: 0.06em;
  max-width: calc(100% - 80px);
  transform: translateY(0);
  transition: transform .35s var(--ease-out);
  z-index: 3;
}
.pf:hover .pf-meta { transform: translateY(-3px); }
.pf-meta .title { font-weight: 500; letter-spacing: 0.04em; }
.pf-meta .yr { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.pf-tag {
  position: absolute; top: 20px; left: 20px;
  background: var(--accent); color: var(--accent-ink);
  padding: 6px 12px; border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500;
  transform: translateY(0);
  transition: transform .35s var(--ease-out);
  z-index: 3;
}
.pf:hover .pf-tag { transform: translateY(-3px); }
.pf-arrow {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ink);
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  transition: transform .35s var(--ease-out), background .35s ease, color .35s ease, border-color .35s ease;
  z-index: 3;
}
.pf:hover .pf-arrow { transform: rotate(45deg) scale(1.05); background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pf-watermark {
  position: absolute;
  font-family: var(--display);
  font-size: clamp(80px, 13vw, 200px);
  font-style: normal;
  line-height: 0.8;
  color: color-mix(in srgb, var(--ink) 18%, transparent);
  letter-spacing: -0.04em;
  bottom: -0.2em; right: -0.05em;
  pointer-events: none;
  user-select: none;
  transition: transform .8s var(--ease-out);
}
.pf:hover .pf-watermark { transform: translate(-6px, -6px) rotate(-2deg); }
.pf.tone-dark .pf-watermark { color: color-mix(in srgb, var(--bg) 18%, transparent); }

/* ─── cobertura ────────────────────────────────────────────────────────── */
.coverage {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 980px) {
  .coverage { grid-template-columns: 1fr; }
  .map-wrap { max-width: 460px; margin-inline: auto; }
}
.map-wrap {
  position: relative;
  aspect-ratio: 302 / 435;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
}
#pe-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-svg, #pe-map { width: 100%; height: 100%; display: block; color: var(--ink); }
#pe-map g {
  transition: transform .35s var(--ease-out), opacity .25s ease, filter .25s ease;
  transform-origin: center;
  transform-box: fill-box;
  cursor: pointer;
}
#pe-map g path {
  fill: transparent;
  stroke: var(--ink-mute);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: fill .25s ease, stroke .25s ease, stroke-width .25s ease;
}
#pe-map g:hover path,
#pe-map g.is-active path {
  fill: var(--accent);
  stroke: var(--accent);
  stroke-width: 1.8;
}
/* sequential reveal */
#peru-map.is-in #pe-map g {
  opacity: 0;
  animation: regionIn .35s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 30ms + 80ms);
}
@keyframes regionIn { to { opacity: 1; } }
.coverage-aside {
  display: flex; flex-direction: column; gap: 24px;
}
.map-overlay {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-2);
}
.map-overlay .lbl {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.map-overlay .val {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1;
  transition: color .25s ease, transform .35s var(--ease-out);
}
.map-overlay .ev {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.map-overlay .ev::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
}

.region-list {
  columns: 2;
  column-gap: 12px;
  column-fill: balance;
}
@media (max-width: 600px) { .region-list { columns: 2; } }
.region-list button {
  width: 100%;
  break-inside: avoid;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 7px 12px;
  margin-bottom: 2px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .25s var(--ease-out);
}
.region-list button:hover {
  background: var(--surface);
  color: var(--accent);
  transform: translateX(2px);
}
.region-list button.active {
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateX(2px);
}
.region-list .idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  transition: color .25s ease;
}
.region-list button:hover .idx { color: var(--accent); }
.region-list button.active .idx { color: color-mix(in srgb, var(--accent-ink) 65%, transparent); }
.region-list .name {
  font-weight: 600;
  letter-spacing: -0.005em;
}
.region-list .count { display: none; }

/* ─── clientes ─────────────────────────────────────────────────────────── */
.clients {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 880px) { .clients { grid-template-columns: repeat(3, 1fr); } }
.clients .cell {
  aspect-ratio: 4/3;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 22px;
  color: var(--ink-soft);
  transition: background .35s ease, color .35s ease, transform .35s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.clients .cell em { font-style: normal; transition: transform .4s var(--ease-out); }
.clients .cell:hover { background: var(--surface); color: var(--ink); }
.clients .cell:hover em { transform: scale(1.08); }
.clients .cell:nth-child(6n) { border-right: 0; }
.clients .cell:nth-last-child(-n+6) { border-bottom: 0; }
@media (max-width: 880px) {
  .clients .cell:nth-child(6n) { border-right: 1px solid var(--line); }
  .clients .cell:nth-child(3n) { border-right: 0; }
  .clients .cell:nth-last-child(-n+6) { border-bottom: 1px solid var(--line); }
  .clients .cell:nth-last-child(-n+3) { border-bottom: 0; }
}
.clients .cell::after {
  content: ""; position: absolute; inset: auto auto 14px 14px;
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); opacity: 0;
  transition: opacity .35s ease;
}
.clients .cell:hover::after { opacity: 1; }

/* Growth bar under the client grid — count + invitation, scales with the list. */
.clients-growth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
  padding: 16px clamp(16px, 2vw, 24px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 60%),
    var(--surface);
}
.clients-growth .cg-count {
  font-family: var(--mono, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.clients-growth .cg-count b { color: var(--accent); font-weight: 600; }
.clients-growth .cg-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink, #15110D);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: filter .2s ease, transform .25s var(--ease-out);
}
.clients-growth .cg-cta:hover { filter: brightness(1.06); }
.clients-growth .cg-cta svg { transition: transform .3s var(--ease-out); }
.clients-growth .cg-cta:hover svg { transform: translate(2px, -2px); }
@media (max-width: 600px) {
  .clients-growth { flex-direction: column; align-items: flex-start; }
  .clients-growth .cg-cta { width: 100%; justify-content: center; }
}

/* ─── equipo ───────────────────────────────────────────────────────────── */
.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}
@media (max-width: 1000px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .team { grid-template-columns: 1fr; } }

.member { display: flex; flex-direction: column; gap: 12px; }
.member-photo {
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-deep);
  border: 1px solid var(--line-2);
  cursor: pointer;
}
.member-photo .canvas {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 80% at 50% 30%, color-mix(in srgb, var(--accent) 24%, transparent) 0%, transparent 70%),
    repeating-linear-gradient(135deg, var(--bg-soft) 0 12px, color-mix(in srgb, var(--ink) 8%, var(--bg-soft)) 12px 24px);
  transition: transform .8s var(--ease-out);
}
.member:hover .member-photo .canvas { transform: scale(1.06); }
.member-photo .ini {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: clamp(56px, 7vw, 96px);
  letter-spacing: -0.02em;
  color: var(--ink); opacity: 0.78;
  font-style: normal;
  transition: transform .55s var(--ease-out), opacity .35s ease;
}
.member:hover .member-photo .ini { transform: scale(1.05) translateY(-2px); opacity: 1; }
.member-photo .badge {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--bg); color: var(--ink);
  padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line-2);
}
.member-photo .arrow {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--bg); color: var(--ink);
  display: grid; place-items: center;
  border: 1px solid var(--line-2);
  opacity: 0; transform: translateY(-6px);
  transition: opacity .3s ease, transform .3s var(--ease-out), background .3s ease, color .3s ease;
}
.member:hover .member-photo .arrow { opacity: 1; transform: translateY(0); background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.member-name { font-family: var(--display); font-size: 24px; line-height: 1.05; margin-top: 4px; transition: color .25s ease; }
.member:hover .member-name { color: var(--accent); }
.member-role { font-size: 14px; color: var(--ink-soft); }
.member-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.member-tags span {
  font-family: var(--mono); font-size: 10px; padding: 3px 8px;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ─── reels (horizontal scroller w/ snap) ──────────────────────────────── */
.reels-wrap {
  position: relative;
  margin-inline: calc(var(--pad) * -1);
}
.reels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 26%);
  gap: var(--grid-gap);
  overflow-x: auto;
  padding-inline: var(--pad);
  padding-bottom: 8px;
  scroll-snap-type: none;          /* continuous scroll for the infinite wrap */
  scrollbar-width: none;
}
.reels::-webkit-scrollbar { display: none; }
@media (max-width: 880px) { .reels { grid-auto-columns: minmax(70%, 80%); } }
@media (max-width: 600px) { .reels { grid-auto-columns: 86%; } }
/* Edge fades — signal there's more to scroll. No buttons on desktop: hover an
   edge to glide (closer = faster, see scripts.js). JS toggles .at-start /
   .at-end to hide the spent side. */
.reels-fade {
  position: absolute; top: 0; bottom: 8px;   /* matches scroller padding-bottom */
  width: clamp(64px, 9vw, 130px);
  z-index: 3; pointer-events: none;
  opacity: 1; transition: opacity .3s ease;
}
.reels-fade--l { left: 0;  background: linear-gradient(to right, var(--bg) 16%, transparent); }
.reels-fade--r { right: 0; background: linear-gradient(to left,  var(--bg) 16%, transparent); }
.reels-wrap.at-start .reels-fade--l { opacity: 0; }
.reels-wrap.at-end   .reels-fade--r { opacity: 0; }
/* Direction hint — a glyph (not a button) that brightens when you near the edge. */
.reels-hint {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-style: normal; font-size: 32px; line-height: 1;
  color: var(--ink); opacity: .32;
  transition: opacity .3s ease, transform .3s var(--ease-out);
}
.reels-fade--l .reels-hint { left: 16px; }
.reels-fade--r .reels-hint { right: 16px; }
.reels-wrap:hover .reels-hint { opacity: .6; }
.reels-wrap:hover .reels-fade--l .reels-hint { transform: translateY(-50%) translateX(-3px); }
.reels-wrap:hover .reels-fade--r .reels-hint { transform: translateY(-50%) translateX(3px); }
/* Touch / no-hover: rely on native horizontal scroll (swipe); hints stay as cues. */
@media (hover: none) { .reels-hint { opacity: .25; } }
.reel {
  aspect-ratio: 9/16;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;                       /* scoped stacking + clean rounded clip */
  transition: transform .55s var(--ease-out), box-shadow .55s var(--ease-out);
}
.reel .canvas, .reel video { border-radius: inherit; }  /* corners survive child transforms */
.reel:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--ink) 45%, transparent);
}
/* Legibility scrim (difuminado) — keeps play + labels readable over any frame. */
.reel::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(to top, color-mix(in srgb, #000 80%, transparent), transparent 42%),
    linear-gradient(to bottom, color-mix(in srgb, #000 26%, transparent), transparent 24%);
}
.reel .canvas {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 30%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 70%),
    repeating-linear-gradient(135deg, var(--bg-soft) 0 12px, color-mix(in srgb, var(--ink) 8%, var(--bg-soft)) 12px 24px);
  transition: transform .8s var(--ease-out);
}
.reel:hover .canvas { transform: scale(1.06); }
/* Play button — frosted glass, refined. */
.reel-play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; }
.reel-play .circle {
  width: 64px; height: 64px; border-radius: 999px;
  background: color-mix(in srgb, #000 24%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 8px 26px -8px rgba(0, 0, 0, .6);
  transition: background .35s ease, transform .35s var(--ease-out), color .35s ease, border-color .35s ease;
}
.reel-play .circle svg { transform: translateX(1px); }   /* optical centre of the triangle */
.reel:hover .reel-play .circle {
  background: var(--accent); color: var(--accent-ink);
  border-color: transparent; transform: scale(1.08);
}
/* Labels — over the scrim, tag chip above a clean serif title. */
.reel-bottom {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 8px;
  color: #fff;
}
.reel-bottom .t {
  font-family: var(--display); font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.08; letter-spacing: -0.01em; color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .55);
}
.reel-bottom .d {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff;
  background: color-mix(in srgb, #fff 16%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, #fff 26%, transparent);
}

/* ─── contacto (figari-style progressive disclosure) ───────────────────── */
.contact-stage {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 920px;
  margin-inline: auto;
  margin-top: 24px;
}
.contact-headline {
  font-size: clamp(54px, 8.5vw, 132px);
  line-height: 0.94;
  margin: 16px 0 0;
  text-wrap: balance;
}
.contact-headline em { font-style: normal; }
.contact-headline .accent {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 0 0.14em 0.04em; transform: skewX(-7deg);
  position: relative; overflow: hidden;
}
.contact-headline .accent::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, #fff 35%, transparent), transparent);
  transform: translateX(-150%);
  animation: shine 4s ease-in-out infinite 2s;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.contact-headline .accent > span { display: inline-block; transform: skewX(7deg); }
.contact-lede {
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 28px 0 56px;
}
.contact-lede strong { color: var(--ink); font-weight: 500; }

.contact-form { display: grid; gap: 36px; }
.cf-block { border: 0; padding: 0; margin: 0; min-width: 0; }
.cf-block > legend {
  display: inline-flex; align-items: baseline; gap: 12px;
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding: 0;
}
.cf-step {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line-2);
  padding: 4px 8px; border-radius: 999px;
  margin-right: 4px;
}

.cf-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.cf-chips label {
  position: relative;
  cursor: pointer;
}
.cf-chips input { position: absolute; opacity: 0; pointer-events: none; }
.cf-chips span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease-out);
}
.cf-chips span::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--ink-mute);
  transition: background .25s ease, transform .25s var(--ease-out);
}
.cf-chips label:hover span { color: var(--ink); transform: translateY(-1px); border-color: var(--line-3); }
.cf-chips label:has(input:checked) span {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.cf-chips label:has(input:checked) span::before { background: var(--accent); transform: scale(1.4); }

/* Step 2 is gated until a need is chosen (anti-bot). Clean dim — NO blur, which
   read as a broken form. The fields/submit are truly disabled via JS. */
.cf-fields { position: relative; transition: opacity .4s ease; }
.cf-fields:not(.is-active) { opacity: 0.5; }
.cf-fields:not(.is-active) legend::after {
  content: " — elige uno arriba ↑";
  color: var(--accent); letter-spacing: 0;
}
.cf-field input:disabled,
.cf-field textarea:disabled { cursor: not-allowed; }
.cf-submit:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
/* Honeypot — off-screen (not display:none, which smart bots skip). */
.cf-hp {
  position: absolute !important; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.cf-status {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--accent); margin: 14px 0 0; min-height: 1.2em;
}
.cf-field input[aria-invalid="true"],
.cf-field textarea[aria-invalid="true"] { box-shadow: 0 2px 0 0 #c0392b; }
.cf-field input[aria-invalid="true"] + span,
.cf-field:has([aria-invalid="true"]) > span { color: #c0392b; }

.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  margin-bottom: 28px;
}
@media (max-width: 600px) { .cf-row { grid-template-columns: 1fr; gap: 28px; margin-bottom: 16px; } }

.cf-field {
  display: flex; flex-direction: column;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-2);
  border-radius: 0;
  padding: 6px 0 14px;
  gap: 2px;
  transition: border-color .35s ease;
  position: relative;
}
.cf-field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1.5px; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease-out);
}
.cf-field:focus-within::after { transform: scaleX(1); }
.cf-field > span {
  font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
  display: flex; align-items: baseline; gap: 8px;
  transition: color .25s ease;
}
.cf-field > span i {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: lowercase;
}
.cf-field:focus-within > span { color: var(--accent); }
.cf-field input, .cf-field textarea {
  background: transparent; border: 0; outline: 0; padding: 0;
  color: var(--ink); resize: none; width: 100%;
  font-family: var(--display);
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.3;
  appearance: none; -webkit-appearance: none;
  margin-top: 6px;
}
.cf-field input::placeholder,
.cf-field textarea::placeholder {
  color: var(--ink-mute);
  font-style: normal;
  font-weight: 400;
  opacity: 1;
}
.cf-field textarea { min-height: 84px; line-height: 1.4; }
.cf-field--message { margin-bottom: 24px; }

.cf-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-top: 12px;
}
.cf-promise {
  margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; letter-spacing: 0.05em;
  color: var(--ink-soft);
  max-width: 36ch;
}
.cf-promise i { color: var(--ink); font-style: normal; font-family: var(--display); font-size: 13px; letter-spacing: 0; }
.cf-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

/* aside (channels) */
.contact-aside {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line-2);
}
.cf-aside-label {
  display: block;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.channels { margin-top: 4px; }
.channel {
  display: grid;
  grid-template-columns: 100px 1fr 28px;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  transition: padding .35s var(--ease-out), color .25s ease;
  position: relative;
}
.channel::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--accent);
  opacity: 0.10;
  transition: width .45s var(--ease-out);
}
.channel:hover { padding-inline: 14px; color: var(--accent); }
.channel:hover::before { width: 100%; }
.channel .lbl {
  font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.channel:hover .lbl { color: var(--accent); opacity: 0.85; }
.channel .val { font-weight: 500; letter-spacing: -0.005em; }
.channel .arr {
  width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  transition: transform .35s var(--ease-out), background .25s ease, color .25s ease, border-color .25s ease;
}
.channel:hover .arr { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ─── giant sign-off ───────────────────────────────────────────────────── */
.signoff {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(72px, 22vw, 360px);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-align: center;
  padding-block: clamp(40px, 6vw, 80px) clamp(8px, 2vw, 24px);
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
}
.signoff em { font-style: normal; }
.signoff .signoff-line { display: block; line-height: 0.86; transition: transform .8s var(--ease-out); }
.signoff .signoff-line.ink {
  color: var(--ink);
  font-style: normal;
  margin-block: -0.06em;
}
.signoff .signoff-line .dot { color: var(--accent); }
.signoff .signoff-line:nth-child(1) { transform: translateX(-2vw); }
.signoff .signoff-line:nth-child(3) { transform: translateX(2vw); }

/* ─── rotor (manifesto rotating word — smoother) ───────────────────────── */
.rotor {
  display: inline-block;
  vertical-align: baseline;
  height: 1em;
  overflow: hidden;
  position: relative;
  color: var(--accent);
}
.rotor-track {
  display: flex; flex-direction: column;
  animation: rotor 7.5s cubic-bezier(.6, 0, .2, 1) infinite;
}
.rotor-track > span {
  line-height: 1; padding-bottom: 0.04em;
  font-style: normal;
  font-weight: 400;
}
@keyframes rotor {
  0%, 22%   { transform: translateY(0); }
  28%, 55%  { transform: translateY(-1em); }
  61%, 88%  { transform: translateY(-2em); }
  94%, 100% { transform: translateY(-3em); }
}

/* ─── magnetic / animated headline lines ───────────────────────────────── */
.hero-headline .line {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease var(--d, 0s), transform .9s var(--ease-out) var(--d, 0s);
}
.hero-headline.is-in .line { opacity: 1; transform: translateY(0); }
.hero-headline .line:nth-child(1) { --d: 0.05s; }
.hero-headline .line:nth-child(2) { --d: 0.18s; }
.hero-headline .line:nth-child(3) { --d: 0.32s; }

/* ─── hero scroll indicator ────────────────────────────────────────────── */
.hero-scroll {
  position: absolute;
  right: var(--pad); bottom: clamp(20px, 3vw, 36px);
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 2;
  transition: color .25s ease;
}
/* A bouncing down-arrow + "Ver más": an unambiguous "scroll down" cue. The old
   "Desliza" (= swipe, a touch gesture) over an abstract vertical line read as a
   decoration, not a scroll hint. */
.hero-scroll-arrow {
  display: inline-flex;
  color: var(--accent);
  animation: scrollHint 1.6s var(--ease-in-out) infinite;
}
.hero-scroll-arrow svg { display: block; }
@keyframes scrollHint {
  0%, 100% { transform: translateY(0);   opacity: .55; }
  50%      { transform: translateY(5px); opacity: 1; }
}
.hero-scroll:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .hero-scroll-arrow { animation: none; } }
@media (max-width: 760px) { .hero-scroll { display: none; } }

/* ─── footer ───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line-2);
  padding-block: 32px 28px;
}
.footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .footer-row { grid-template-columns: 1fr; text-align: center; }
  .footer-row .links { justify-content: center; }
  .footer-top { justify-self: center; }
}
.footer-services {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
}
.footer-services a { color: var(--ink-mute); text-decoration: none; }
.footer-services a:hover { color: var(--accent); }
.footer-legal { white-space: normal; }   /* never truncate the legal name/RUC */
.footer-top {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .35s var(--ease-out);
  justify-self: center;
}
.footer-top:hover {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  transform: translateY(-2px);
}
.footer-top svg { transition: transform .35s var(--ease-out); }
.footer-top:hover svg { transform: translateY(-2px); }
.footer-row a {
  position: relative;
  transition: color .2s ease;
}
.footer-row .links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.footer-row .links a:hover { color: var(--ink); }
.footer-row .links a:hover::after { transform: scaleX(1); transform-origin: left; }
.footer-row .links { display: flex; gap: 18px; justify-content: flex-end; }

/* ─── arrow icon helper ────────────────────────────────────────────────── */
.icon { width: 14px; height: 14px; display: inline-block; }

/* ─── brand wordmark (Diagonal SVG paths) ──────────────────────────────── */
.brand { gap: 12px; }
.brand-wordmark {
  height: 26px;
  width: auto;
  display: block;
  color: var(--ink);
  transition: transform .35s var(--ease-out);
}
.brand:hover .brand-wordmark { transform: translateX(2px); }
/* Letters adapt to the theme; the TWO "A"s are brand orange (the original logo
   has both A's accented on white — one orange + one black was the bug). */
.brand-wordmark path { fill: currentColor; transition: fill .35s ease; }
.brand-wordmark .brand-accent { fill: var(--accent); }
.brand-word--fallback { display: none; }
@media (max-width: 540px) { .brand-wordmark { display: none; } .brand-word--fallback { display: inline; font-size: 24px; font-family: var(--display); line-height: 1; } .brand-word--fallback .dot { color: var(--accent); } }

/* ─── hero marks (real SVG logos, theme-aware) ─────────────────────────── */
.hero-marks {
  margin-top: clamp(40px, 5vw, 64px);
  display: flex; flex-wrap: wrap;
  gap: 28px 40px;
  align-items: center;
  border-top: 1px solid var(--line-2);
  padding-top: clamp(24px, 3vw, 36px);
}
.hero-mark {
  height: 22px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.55;
  transition: opacity .25s ease, transform .35s var(--ease-out);
}
.hero-mark:hover { opacity: 1; transform: translateY(-2px); }
html[data-theme="dark"] .hero-mark { filter: none; opacity: 0.65; }
html[data-theme="dark"] .hero-mark:hover { opacity: 1; }
@media (max-width: 600px) {
  .hero-marks { gap: 18px 24px; }
  .hero-mark { height: 18px; max-width: 90px; }
}

/* ─── client logos (img + theme-aware filter) ──────────────────────────── */
.client-logo {
  display: block;
  width: 72%; max-width: 150px;
  height: 48px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.55;
  transition: opacity .35s ease, transform .35s var(--ease-out);
}
.clients .cell:hover .client-logo { opacity: 1; transform: scale(1.06); }
html[data-theme="dark"] .client-logo { filter: none; opacity: 0.6; }
html[data-theme="dark"] .clients .cell:hover .client-logo { opacity: 1; }

/* ─── reel video preview ───────────────────────────────────────────────── */
.reel video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.reel:hover video { opacity: 1; }
.reel:hover .canvas { opacity: 0; }
.reel .canvas { transition: opacity .35s ease, transform .8s var(--ease-out); }

/* ─── portfolio modal ──────────────────────────────────────────────────── */
.pf-modal, .reel-modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.pf-modal.is-open, .reel-modal.is-open { opacity: 1; pointer-events: auto; }
.pf-modal-backdrop, .reel-modal-backdrop {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.pf-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%; max-width: 1200px;
  max-height: 90vh;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(.98);
  transition: transform .45s var(--ease-out);
  box-shadow: 0 40px 100px -30px color-mix(in srgb, var(--ink) 70%, transparent);
}
.pf-modal.is-open .pf-modal-panel { transform: translateY(0) scale(1); }
.pf-modal-panel header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line-2);
}
.pf-modal-panel .tag {
  display: inline-block;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 8px;
}
.pf-modal-panel h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05; letter-spacing: -0.02em;
  margin: 0;
}
.pf-modal-close, .reel-modal-close {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink);
  display: grid; place-items: center;
  transition: background .25s ease, transform .35s var(--ease-out), color .25s ease;
  flex-shrink: 0;
}
.pf-modal-close:hover, .reel-modal-close:hover {
  background: var(--accent); color: var(--accent-ink); transform: rotate(90deg);
  border-color: transparent;
}
/* High-contrast close on the light modal header (surface-on-surface was invisible). */
.pf-modal-close { background: var(--ink); color: var(--bg); border-color: transparent; }
/* Masonry columns — every photo keeps its natural aspect ratio (the campaign
   set mixes 3:2, portrait and ultra-wide shots; the old 4/3 cover-crop
   butchered the verticals and panoramas, which read as "broken" on phones).
   columns + break-inside:avoid flows them as a compact 2-up masonry at every
   width — no tall single-file stack, even on phones. */
.pf-modal-grid {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  columns: 2;            /* 2 columns on every size — a compact masonry, never a
                           tall single-file stack (which read "apiñado" on phones) */
  column-gap: 14px;
}

/* Phones: full-screen modal with a sticky compact header — the floating panel
   read cramped and the close button was easy to lose. */
@media (max-width: 600px) {
  .pf-modal, .reel-modal { padding: 0; }
  .pf-modal-panel {
    max-width: 100%; width: 100%;
    max-height: 100vh; height: 100vh;          /* fallback for Safari < 15.4 */
    max-height: 100svh; height: 100svh;
    border-radius: 0; border: 0;
  }
  .pf-modal-panel header {
    position: sticky; top: 0; z-index: 2;
    background: var(--bg);
    padding: 14px 16px;
  }
  .pf-modal-panel h3 { font-size: 22px; }
  .pf-modal-panel .tag { margin-bottom: 6px; }
  .pf-modal-grid { padding: 14px; column-gap: 10px; }   /* multi-column → column-gap, not gap */
  .pf-modal-grid figure { margin-bottom: 10px; }        /* match the tighter column-gap */
}
.pf-modal-grid figure {
  margin: 0 0 14px;            /* column-gap = horizontal; margin = vertical rhythm */
  break-inside: avoid;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-2);
  position: relative;         /* no aspect-ratio → respect each photo's shape */
  opacity: 0;
  transform: translateY(12px);
  animation: figIn .55s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}
.pf-modal-grid figure img {
  width: 100%; height: auto;  /* natural aspect, full frame — never cropped */
  display: block;
  background: var(--surface); /* placeholder tint while the photo decodes */
  transition: transform .8s var(--ease-out);
}
.pf-modal-grid figure:hover img { transform: scale(1.04); }
@keyframes figIn { to { opacity: 1; transform: translateY(0); } }

/* ─── reel modal ───────────────────────────────────────────────────────── */
.reel-modal { padding: 56px 24px 24px; }
.reel-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(1100px, calc(100vw - 48px));
  aspect-ratio: var(--video-ratio, 16/9);
  max-height: calc(100vh - 100px);
  background: #000;
  border: 1px solid color-mix(in srgb, #fff 8%, transparent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: translateY(20px) scale(.97);
  transition: transform .45s var(--ease-out);
  box-shadow: 0 40px 100px -30px color-mix(in srgb, var(--ink) 80%, transparent);
}
.reel-modal.is-open .reel-modal-panel { transform: translateY(0) scale(1); }
.reel-modal-panel video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.reel-modal-meta {
  position: absolute; left: 20px; bottom: 20px; z-index: 3;
  display: flex; flex-direction: column; gap: 8px;
  max-width: calc(100% - 100px);
  pointer-events: none;
}
.reel-modal-meta .tag {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
  padding: 5px 10px; border-radius: 999px;
  align-self: flex-start;
}
.reel-modal-meta h3 {
  font-family: var(--display); font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 400; line-height: 1.1; letter-spacing: -0.015em;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.65);
}
/* close button — bigger, floating outside panel, very visible */
.reel-modal-close {
  position: absolute; top: 16px; right: 16px;
  z-index: 5;
  width: 56px; height: 56px;
  border-radius: 999px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .35s var(--ease-out);
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.45);
}
.reel-modal-close:hover {
  background: var(--accent); color: var(--accent-ink); border-color: transparent;
  transform: rotate(90deg) scale(1.05);
}
.reel-modal-close svg { width: 18px; height: 18px; }
.reel-modal-hint {
  position: absolute; left: 50%; bottom: 16px;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, #fff 65%, transparent);
  background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0; transition: opacity .35s ease .25s;
  white-space: nowrap;
}
.reel-modal-hint b {
  font-weight: 500;
  color: #fff;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, #fff 12%, transparent);
  margin: 0 2px;
}
.reel-modal.is-open .reel-modal-hint { opacity: 1; }
@media (max-width: 600px) { .reel-modal-hint { display: none; } }
@media (max-width: 700px) {
  .reel-modal { padding: 24px 16px; }
  .reel-modal-close { width: 44px; height: 44px; top: 8px; right: 8px; }
}

body.modal-open {
  overflow: hidden;
  padding-right: var(--sb-w, 0px);
}


/* ─── accessibility ──────────────────────────────────────────────────────── */
/* Skip link — hidden until focused, then drops into the warm card style. */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -150%);
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono, monospace);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translate(-50%, 0); outline: 2px solid var(--accent); outline-offset: 2px; }

/* Keyboard focus ring — only for keyboard users, never on mouse click. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ink);   /* ink, not accent — accent fails the 3:1 focus-indicator rule */
  outline-offset: 3px;
  border-radius: 3px;
}
/* The form fields paint their own focus state; reinforce it for keyboard nav. */
.cf-field input:focus-visible,
.cf-field textarea:focus-visible {
  outline: 0;
  box-shadow: 0 2px 0 0 var(--ink);
}
/* <main> is a focus target for the skip link but must show no ring itself. */
#main:focus { outline: none; }
