/* ─────────────────────────────────────────────────────────────────────────
   Portfolio Anita Sevilla Ull — design system
   Wireframe DNA, polished. Grayscale base, teal accent.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* warm grayscale */
  --bg:        oklch(0.985 0.004 80);
  --bg-soft:   oklch(0.965 0.004 80);
  --bg-card:   oklch(0.975 0.004 80);
  --line:      oklch(0.88 0.004 80);
  --line-soft: oklch(0.93 0.004 80);
  --line-strong: oklch(0.78 0.004 80);

  --ink:       oklch(0.20 0.005 80);
  --ink-2:     oklch(0.36 0.005 80);
  --ink-3:     oklch(0.52 0.005 80);
  --ink-4:     oklch(0.68 0.005 80);
  --ink-mute:  oklch(0.78 0.004 80);

  --inverse:   oklch(0.16 0.005 80);
  --inverse-ink: oklch(0.98 0.004 80);

  /* accent */
  --teal:      oklch(0.60 0.08 195);
  --teal-ink:  oklch(0.42 0.07 195);
  --teal-soft: oklch(0.92 0.03 195);
  --teal-line: oklch(0.78 0.05 195);

  /* type */
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --hand: "Caveat", "Reenie Beanie", cursive;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* metrics */
  --maxw: 1200px;
  --gutter: 32px;
  --radius: 4px;
  --radius-lg: 8px;
  --border-w: 1px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

button { font: inherit; color: inherit; cursor: pointer; }

/* ── A11y: focus-visible ──────────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}
/* Make sure the dark-panel buttons get a visible ring against dark bg */
.desborde-col :focus-visible {
  outline: 2px solid var(--teal-soft);
  outline-offset: 2px;
}

/* ── A11y: skip link ─────────────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -60px;
  left: 0;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--inverse-ink);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
  transition: top 160ms ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 0;
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}
/* Lang-scoped visibility: only one skip link is in the DOM flow per lang.
   The other is removed from rendering & accessibility tree.            */
html[lang="es"] .skip-link-en,
html[lang="en"] .skip-link-es {
  display: none !important;
}

/* ── A11y: visually-hidden helper (screen-reader-only text) ──────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Typography helpers ────────────────────────────────────────────────── */

.mono { font-family: var(--mono); font-feature-settings: "ss01"; letter-spacing: -0.005em; }
.hand { font-family: var(--hand); font-weight: 500; }
.tag  {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tag-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag-line::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* ── Wireframe markings ────────────────────────────────────────────────── */

.frame {
  position: relative;
  border: var(--border-w) solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
}
.frame--strong { border-color: var(--line-strong); }
.frame--dashed { border-style: dashed; }

/* tiny corner crosshairs, the wireframe annotation look */
.frame::before,
.frame::after,
.frame > .corner-tl,
.frame > .corner-bl {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 0;
}
.frame::before { /* tr */
  top: -4px; right: -4px;
  border-top: 1px solid var(--ink-4);
  border-right: 1px solid var(--ink-4);
}
.frame::after { /* br */
  bottom: -4px; right: -4px;
  border-bottom: 1px solid var(--ink-4);
  border-right: 1px solid var(--ink-4);
}

/* dimension annotation badges */
.dim {
  position: absolute;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  pointer-events: none;
  background: var(--bg);
  padding: 0 4px;
}
.dim--tl { top: -6px; left: 10px; }
.dim--tr { top: -6px; right: 10px; }
.dim--bl { bottom: -6px; left: 10px; }
.dim--br { bottom: -6px; right: 10px; }

/* ── Layout primitives ─────────────────────────────────────────────────── */

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 72px var(--gutter);
}
.section--tight { padding: 48px var(--gutter); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 24px;
}
.section-head .tag { white-space: nowrap; }
/* Si el h2 está oculto (sr-only), el tag tiene que ir a la derecha
   solo — sin un h2 visible ancla al cual el space-between lo pueda
   alinear. */
.section-head:has(> h2.sr-only) .tag { margin-left: auto; }
.section-head h2 {
  font-family: var(--mono);
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-head h2 .accent {
  font-family: var(--hand);
  font-weight: 500;
  font-size: 1.45em;
  line-height: 0.9;
  margin-left: 0.06em;
  color: var(--ink);
  letter-spacing: 0;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}
.btn:hover { background: var(--bg-soft); border-color: var(--ink-3); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--ink-3); color: var(--ink); }

/* CTA primario "Contratame" — único patrón en todo el portfolio.
   Selectores duplicados con tipo (a.btn--solid, button.btn--solid) para
   ganar especificidad sobre overrides de contexto como `.foot-grid a`.
   Contraste WCAG AAA (ink/inverse-ink) en default y hover. */
.btn.btn--solid,
a.btn--solid,
button.btn--solid {
  background: var(--ink);
  color: var(--inverse-ink);
  border-color: var(--ink);
  text-decoration: none;
}
/* Hover: shift de color marcado + lift + sombra para depth — mismo
   patrón de feedback que .foot-social y .case-carousel-btn. El teal-ink
   ata el hover al color del focus ring, refuerza el affordance de marca. */
.btn.btn--solid:hover,
a.btn--solid:hover,
button.btn--solid:hover {
  background: var(--teal-ink);
  border-color: var(--teal-ink);
  color: var(--inverse-ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px oklch(0.20 0.005 80 / 0.45);
}
.btn.btn--solid:active,
a.btn--solid:active,
button.btn--solid:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px -4px oklch(0.20 0.005 80 / 0.45);
}
.btn.btn--solid:focus-visible,
a.btn--solid:focus-visible,
button.btn--solid:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.btn--teal {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.btn--teal:hover { background: var(--teal-ink); border-color: var(--teal-ink); color: white; }
.btn .arrow {
  display: inline-block;
  transition: transform 200ms ease;
}
.btn:hover .arrow { transform: translateX(2px); }

/* ── Nav ───────────────────────────────────────────────────────────────── */

/* La <nav> vive dentro de un <header role="banner">. Para que sticky
   funcione bien (la nav se queda visible durante todo el scroll del home),
   el sticky se aplica al header — el padre estructural — no al nav que
   queda atrapado en sus bounds. */
header:has(> .nav) {
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav {
  background: color-mix(in oklch, var(--bg), transparent 8%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.nav-brand .mark {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0;
  font-size: 14px;
}
.nav-brand .mark em {
  font-style: normal;
  color: var(--ink-3);
}
.nav-brand .role {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  position: relative;
  color: var(--ink-2);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 6px 0;
  transition: color 160ms ease;
}
/* Underline animada de izquierda a derecha — feedback claro de hover
   sin alterar el layout del nav. */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-links a:focus-visible {
  outline: none;
}
.nav-lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
}
.nav-lang button {
  background: transparent;
  border: 0;
  padding: 5px 10px;
  color: var(--ink-3);
}
.nav-lang button.on {
  background: var(--ink);
  color: var(--inverse-ink);
}
.nav-lang--compact {
  font-size: 11px;
}
.nav-lang--compact button {
  padding: 3px 7px;
}

/* hamburger — hidden by default, shown <768px */
.nav-burger {
  display: none;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
}
.nav-burger span {
  display: block;
  width: 16px;
  height: 0;
  position: relative;
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 200ms ease, top 200ms ease, bottom 200ms ease;
}
.nav-burger span::before { top: -4px; }
.nav-burger span::after  { top: 4px; }
.nav-burger.is-open span::before { top: 0; transform: rotate(45deg); }
.nav-burger.is-open span::after  { top: 0; transform: rotate(-45deg); }

/* mobile dropdown panel */
.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 18px;
  flex-direction: column;
  gap: 0;
  animation: nav-mobile-in 220ms cubic-bezier(.2,.7,.2,1);
}
@keyframes nav-mobile-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.nav-mobile a,
.nav-mobile button.nav-mobile-cta {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  text-align: left;
  width: 100%;
}
.nav-mobile a .arrow,
.nav-mobile button.nav-mobile-cta .arrow { color: var(--ink-3); font-size: 12px; }
.nav-mobile .nav-mobile-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  gap: 12px;
}
.nav.is-mobile-open .nav-mobile { display: flex; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  padding: 80px var(--gutter) 56px;
  position: relative;
}
.hero-eyebrow {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  max-width: 18ch;
  color: var(--ink);
}
.hero-title .accent {
  font-family: var(--hand);
  font-weight: 500;
  color: var(--ink);
  display: inline-block;
  font-size: 1.35em;
  line-height: 0.85;
  margin: 0 0.02em;
  letter-spacing: 0;
}
/* "diseñadora" del H1 en teal — color de acento de marca. Mantiene la
   fuente hand pero gana presencia cromática en el bloque del hero. */
.hero-title .case-hand { color: var(--teal); }
.hero-baja {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  max-width: 56ch;
  color: var(--ink-2);
  margin: 0 0 32px;
}
.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.hero-meta b { color: var(--ink); font-weight: 600; }

/* hero typewriter / reveal */
.reveal-line {
  display: block;
  overflow: hidden;
}
.reveal-line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 700ms cubic-bezier(.2,.7,.2,1) forwards;
}
.reveal-line:nth-child(1) > span { animation-delay: 60ms; }
.reveal-line:nth-child(2) > span { animation-delay: 200ms; }
.reveal-line:nth-child(3) > span { animation-delay: 340ms; }
@keyframes rise { to { transform: translateY(0); } }

/* caret removed — no permanent loops per design rules */

/* ── Splash — Figma-style assembling ───────────────────────────────────── */

.splash {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: grid;
  place-items: center;
  z-index: 60;
  padding: 24px;
}
.splash-frame {
  /* `100%` (en vez de 96vw) respeta el padding 24px del .splash padre.
     Sin esto, en mobile el frame se va por la derecha (96vw > viewport
     menos 48px de padding lateral). */
  width: min(1000px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px -28px oklch(0.20 0.005 80 / 0.18);
}

/* toolbar */
.splash-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.splash-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.splash-file {
  margin-left: 8px;
  color: var(--ink-2);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.splash-collab {
  margin-left: auto;
  display: inline-flex;
  gap: -6px;
}
.splash-collab .chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--bg-soft);
  margin-left: -6px;
  letter-spacing: 0.02em;
}

/* body — canvas left + big % aside right */
.splash-body {
  display: grid;
  grid-template-columns: 1fr 260px;
  align-items: stretch;
}

/* aside with prominent loading % */
.splash-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 24px;
  border-left: 1px solid var(--line);
  background: var(--bg-soft);
}
.splash-aside-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.splash-pct-big {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-weight: 500;
  color: var(--ink);
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  margin-top: auto;
  margin-bottom: 8px;
}
.splash-pct-num {
  font-size: clamp(56px, 9vw, 92px);
}
.splash-pct-sign {
  font-size: clamp(22px, 3vw, 32px);
  color: var(--ink-3);
  letter-spacing: 0;
  padding-top: 0.3em;
}
.splash-pct-bar {
  position: relative;
  height: 3px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.splash-pct-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--ink);
  transition: width 220ms linear;
}

/* canvas */
.splash-canvas {
  position: relative;
  min-height: 420px;
  max-height: 62vh;
  background: var(--bg);
  overflow: hidden;
}
.splash-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, oklch(0.93 0.004 80 / 0.7) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.93 0.004 80 / 0.7) 1px, transparent 1px);
  background-size: 32px 32px;
}
.splash-frame-label {
  position: absolute;
  top: 8px;
  left: 14px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  pointer-events: none;
  background: var(--bg);
  padding: 0 4px;
}

/* pieces */
.sp-piece {
  position: absolute;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  overflow: hidden;
  border: 1px dashed oklch(0.88 0.004 80);
  background: transparent;
}
.sp-piece.is-placed {
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
}

.sp-piece.bar.is-placed       { background: var(--bg-card); }
.sp-piece.pill.is-placed      { background: var(--teal-soft); border-color: var(--teal-line); }
.sp-piece.btn.is-placed       { background: var(--inverse); border-color: var(--inverse); }
.sp-piece.img.is-placed       {
  background:
    repeating-linear-gradient(135deg, var(--bg-soft) 0 8px, var(--bg-card) 8px 9px);
}
.sp-piece.bar-dim.is-placed   { background: var(--bg-soft); }
.sp-piece.block.is-placed     { background: var(--bg-card); }
.sp-piece.card.is-placed      { background: var(--bg-card); }

.sp-piece-label {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  align-self: center;
  margin: auto;
}
.sp-sub {
  height: 6px;
  background: oklch(0.92 0.004 80);
  border-radius: 2px;
  display: block;
}
.sp-piece.btn .sp-sub,
.sp-piece.bar .sp-sub { display: none; }

/* cursors */
.sp-cursor {
  position: absolute;
  pointer-events: none;
  transition: left 1100ms cubic-bezier(.5,.05,.2,1), top 1100ms cubic-bezier(.5,.05,.2,1);
  z-index: 5;
  transform: translate(-2px, -2px);
}
.sp-cursor svg {
  display: block;
  filter: drop-shadow(0 1px 2px oklch(0.20 0.005 80 / 0.25));
}
.sp-cursor-tag {
  position: absolute;
  top: 14px;
  left: 12px;
  font-size: 12px;
  font-weight: 500;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* footer */
.splash-foot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.splash-date {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}
.splash-line {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  color: var(--ink-2);
  letter-spacing: 0.005em;
}
.splash-line .accent {
  font-family: var(--hand);
  color: var(--ink);
  font-size: 28px;
  vertical-align: -0.12em;
  margin: 0 4px;
  letter-spacing: 0;
}
.splash-pct {
  text-align: right;
  font-size: 12px;
  color: var(--teal-ink);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .splash-frame { width: 96vw; }
  .splash-body { grid-template-columns: 1fr; }
  .splash-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
  }
  .splash-pct-big { margin: 0; }
  .splash-pct-num { font-size: 56px; }
  .splash-pct-sign { font-size: 22px; }
  .splash-pct-bar { flex: 1; max-width: 120px; }
  .splash-foot { grid-template-columns: 1fr; text-align: center; }
  .splash-date { text-align: center; }
  .splash-line { font-size: 22px; text-align: center; }
  .splash-toolbar .splash-file { display: none; }
}

/* ── PreHome / profile picker ──────────────────────────────────────────── */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
.profile-card {
  position: relative;
  text-align: left;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 180ms ease, transform 220ms cubic-bezier(.2,.7,.2,1), box-shadow 220ms ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  animation: card-in 600ms cubic-bezier(.2,.7,.2,1) backwards;
}
.profile-card:nth-child(1) { animation-delay: 80ms; }
.profile-card:nth-child(2) { animation-delay: 200ms; }
.profile-card:nth-child(3) { animation-delay: 320ms; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.profile-card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -16px oklch(0.20 0.005 80 / 0.18);
}
.profile-card .role-id {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.profile-card h3 {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.profile-card .hook {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.45;
  margin: 0;
}
.profile-card .pc-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.profile-card .pc-meta .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}
.profile-card:hover .pc-meta .go .arrow { transform: translateX(4px); }
.profile-card .arrow { transition: transform 200ms ease; }

.profile-card.is-active {
  border-color: var(--ink);
  background: var(--bg-card);
}

.skip-row {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.skip-row button {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--ink-4);
}
.skip-row button:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ── Bento ─────────────────────────────────────────────────────────────── */

.bento {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: 280px 220px auto;
  gap: 14px;
}
/* Variante "par" — solo 2 cards featured lado a lado, mismo tamaño. */
.bento--pair {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
}
.bento--pair .bento-card.is-featured {
  grid-row: auto;
  min-height: 480px;
}
.bento-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, transform 220ms ease;
}
.bento-card:hover { border-color: var(--ink-3); }
.bento-card:hover .preview { transform: scale(1.02); }

.bento-card.is-featured {
  grid-row: span 2;
  background: var(--inverse);
  border-color: var(--inverse);
  color: var(--inverse-ink);
  padding: 28px;
}
.bento-card.is-featured:hover {
  border-color: var(--inverse);
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -24px oklch(0.16 0.005 80 / 0.45);
}
.bento-card.is-featured .meta {
  color: oklch(0.72 0.005 80);
  font-size: 13px;
}
.bento-card.is-featured h4 {
  color: var(--inverse-ink);
}
.bento-card.is-featured .featured-desc {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: oklch(0.82 0.005 80);
  max-width: 34ch;
  margin: 10px 0 0;
}
.bento-card.is-featured .featured-foot {
  display: flex;
  justify-content: flex-start;    /* left-align consistente entre cards */
  align-items: flex-end;
}
.bento-card.is-featured .kpis {
  color: oklch(0.72 0.005 80);
  gap: 36px;
  position: relative;
  flex-wrap: wrap;                /* fallback si por alguna razón no entra */
  max-width: 100%;
}
/* Divisor sutil entre los dos pares de KPI — ancla cada grupo como una
   unidad visual propia. */
.bento-card.is-featured .kpis > div + div::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 28px;
  background: currentColor;
  opacity: 0.25;
  margin-left: -18px;
  margin-top: 4px;
}
.bento-card.is-featured .kpis b {
  color: var(--inverse-ink);
  font-size: 18px;                /* baja de 24 → 18 para evitar wrap */
  letter-spacing: -0.005em;
  line-height: 1.2;
  white-space: nowrap;            /* never break — siempre 1 línea */
}

/* En mobile / cards angostas: stack vertical, sin divider, font más chico. */
@media (max-width: 720px) {
  .bento-card.is-featured .kpis {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .bento-card.is-featured .kpis > div + div::before { display: none; }
  .bento-card.is-featured .kpis b { font-size: 16px; }
}
/* Featured card preview — solid ink background with the device-mockup
   anchored in the bottom-right, just above the result line. Scales
   proportionally; card height grows on narrow widths so the image
   never has to fight the wrapped title/description above it. */
.bento-card.is-featured .preview {
  background: var(--inverse);
  opacity: 1;
}
.bento-card.is-featured .preview picture {
  position: absolute;
  inset: auto 24px 120px auto;
  width: min(56%, 280px);
  display: block;
  pointer-events: none;
  user-select: none;
}
.bento-card.is-featured .preview img {
  display: block;
  width: 100%;
  height: auto;
}

/* Narrow desktop / tablet — image shrinks proportionally; sits closer
   to the result line so the eye still flows from image to metric. */
@media (max-width: 1100px) {
  .bento-card.is-featured .preview picture {
    inset: auto 20px 124px auto;
    width: min(44%, 200px);
  }
}

/* Below ~1020px "78% de retención" wraps to two lines, so the result
   block is taller — lift the image to keep the clearance balanced. */
@media (max-width: 1020px) {
  .bento-card.is-featured .preview picture {
    inset: auto 20px 152px auto;
    width: min(40%, 180px);
  }
}

.bento-card.is-wide { grid-column: span 2; }

.bento-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.bento-card h4 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.bento-card.is-featured h4 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  max-width: 22ch;
  letter-spacing: -0.015em;
}
.bento-card .preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(45deg,
      transparent 0 8px,
      oklch(0.93 0.004 80 / 0.45) 8px 9px);
  transition: transform 400ms ease;
}
.bento-card .preview-color { display: none; }
.bento-card > .content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; height: 100%; gap: 16px; }
.bento-card.is-featured .preview { opacity: 0.9; }
/* (badge rules removed — featured card now relies on inverted styling alone) */
.bento-card .kpis {
  display: flex;
  gap: 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.bento-card .kpis b { display: block; font-size: 18px; color: var(--ink); font-weight: 600; }

/* ── Bio ───────────────────────────────────────────────────────────────── */

.bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.bio-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 380px;
  max-width: 460px;
}
.bio-photo picture,
.bio-photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  object-position: center;
}
/* B&N por default, color al hover/focus — el portfolio es low-fi y la
   foto a todo color robaba peso visual. */
.bio-photo img {
  filter: grayscale(100%) contrast(1.02);
  transition: filter 320ms ease;
}
.bio-photo:hover img,
.bio-photo:focus-within img,
/* También se colorea cuando el usuario hace hover/foco en el CTA primario
   "Conoce más de mí" — gesto que conecta el "leeme más" con la persona. */
.bio:has(.bio-cta-row .btn:not(.btn--ghost):hover) .bio-photo img,
.bio:has(.bio-cta-row .btn:not(.btn--ghost):focus-visible) .bio-photo img {
  filter: grayscale(0%) contrast(1);
}

/* Chips del bio (mismo lenguaje que el toolkit del caso) */
.bio-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 8px;
}
.bio-chips .chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-card);
}
.bio-body p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}
.bio-body p strong { color: var(--ink); font-weight: 600; }
.bio-spec {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bio-spec > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.bio-spec .l {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.bio-spec .v {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
}

/* ── Bio block (profile-aware) ─────────────────────────────────────────── */
.bio-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.bio-block-head { margin-bottom: 14px; }

/* stats — founder */
.bio-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bio-stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.bio-stat .v {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.bio-stat .l {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.35;
}

/* skills — recruiter */
.bio-skills {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bio-skill-group {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: start;
}
.bio-skill-l {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 4px;
}
.bio-skill-v {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bio-skill-v .chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--bg-card);
}

/* process — designer */
.bio-process {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bio-process li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.bio-process .n {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.bio-process li > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bio-process strong {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.bio-process li > span:last-child > span {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* bio CTA row */
.bio-cta-row {
  margin-top: 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Comunidad ─────────────────────────────────────────────────────────── */

.comunidad {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  background: var(--bg-card);
}
.comunidad-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 24px;
}
.comunidad h3 {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.comunidad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 720px) {
  .comunidad-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Logo CUXUI como título visual */
.comunidad-logo {
  display: block;
  max-width: 280px;
  margin-bottom: 16px;
}
.comunidad-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.comunidad-sub {
  max-width: 56ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}
.comunidad-stat .v {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.comunidad-stat .l {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ── Reviews ───────────────────────────────────────────────────────────── */

.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.review {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* Stars eliminadas — sin tratamiento.
   Label de categoría: chip pequeño uppercase, agrega contexto sin
   romper el ritmo visual (todas las cards iguales). */
.review-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg);
}
.review blockquote {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
}
.review .who {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: auto;
}
.review .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--line-soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
}

/* ── Metrics ───────────────────────────────────────────────────────────── */

.metrics {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.metric {
  padding: 28px;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }
.metric .l {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.metric .v {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.metric .sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.metric .bar-mini {
  margin-top: 10px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 22px;
}
.metric .bar-mini i {
  flex: 1;
  background: var(--ink-mute);
  border-radius: 1px;
}
.metric .bar-mini i.on { background: var(--teal); }

/* ── Footer ────────────────────────────────────────────────────────────── */

.foot {
  padding: 48px var(--gutter) 32px;
  border-top: 1px solid var(--line-soft);
  margin-top: 40px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
}
.foot-brand .foot-cta {
  display: inline-flex;
  margin-top: 18px;
}

/* ── Footer condensed: sólo íconos sociales, slim y centrado. ──────────── */
.foot--condensed {
  padding: 14px var(--gutter);
  margin-top: 20px;
  display: flex;
  justify-content: center;
}
.foot-socials {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.foot-social {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}
.foot-social:hover {
  color: var(--ink);
  border-color: var(--ink-3);
  transform: translateY(-1px);
  background: var(--bg-card);
}
.foot-social:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.foot-grid h3 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink); text-decoration: none; }
.foot-grid a:hover { color: var(--teal-ink); }
.foot-coda {
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.foot-sig {
  font-family: var(--hand);
  font-size: 42px;
  color: var(--ink);
  line-height: 1;
}

/* ── Desborde panel ────────────────────────────────────────────────────── */

.app-shell {
  position: relative;
  min-height: 100vh;
}

.main-col {
  position: relative;
  transition: padding-right 880ms cubic-bezier(.16, 1, .3, 1);
}
.app-shell.is-expanded .main-col {
  /* reserve space for the panel + breathing room */
  padding-right: calc(min(440px, 32vw) + 28px);
}

.desborde-col {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(440px, 32vw);
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--inverse);
  color: var(--inverse-ink);
  transform: translateX(100%);
  /* slight overshoot at the end → soft bounce when it docks */
  transition: transform 880ms cubic-bezier(.34, 1.22, .4, 1);
  z-index: 20;
  will-change: transform;
}
.app-shell.is-expanded .desborde-col {
  transform: translateX(0);
}

.desborde-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  min-width: 320px;
  opacity: 0;
  transform: translateX(16px);
  animation: desborde-fade-in 600ms cubic-bezier(.16, 1, .3, 1) 420ms forwards;
}
@keyframes desborde-fade-in {
  to { opacity: 1; transform: translateX(0); }
}
.desborde-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.desborde-head .tag { color: oklch(0.78 0.005 80); }
.desborde-x {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid oklch(1 0 0 / 0.18);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-family: var(--mono);
  transition: background 150ms ease;
  flex-shrink: 0;
}
.desborde-x:hover { background: oklch(1 0 0 / 0.08); }

/* Scrollable body — header pinned-top, footer pinned-bottom */
.desborde-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-right: 4px;
  /* subtle scrollbar */
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.18) transparent;
}
.desborde-body::-webkit-scrollbar { width: 6px; }
.desborde-body::-webkit-scrollbar-thumb { background: oklch(1 0 0 / 0.18); border-radius: 999px; }
.desborde-body--center { justify-content: center; }

.desborde-foot {
  flex-shrink: 0;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid oklch(1 0 0 / 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.desborde-foot-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: oklch(0.7 0.005 80);
}
.desborde-nav {
  display: flex;
  gap: 8px;
}
.desborde-nav-btn {
  flex: 1;
  justify-content: center;
  background: transparent;
  color: white;
  border-color: oklch(1 0 0 / 0.2);
}
.desborde-nav-btn:hover { background: oklch(1 0 0 / 0.06); border-color: oklch(1 0 0 / 0.3); }

/* Review content (reviews mode body) */
.desborde-review-count {
  font-size: 12px;
  color: oklch(0.7 0.005 80);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.desborde-review-text {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.45;
  color: white;
  margin: 0 0 18px;
}
.desborde-review-who {
  font-size: 12px;
  color: oklch(0.82 0.005 80);
  line-height: 1.45;
}
.desborde-review-who .who-name { color: white; font-weight: 500; }

/* VSL labels inside the 9:16 frame */
.vsl-corner {
  font-size: 12px;
  color: oklch(0.7 0.005 80);
  margin-bottom: auto;
}
.vsl-title {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  color: white;
  letter-spacing: -0.01em;
}

.desborde-tab {
  position: fixed;
  right: 0;
  top: 38%;
  z-index: 30;
  background: var(--inverse);
  color: var(--inverse-ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 16px 12px;
  border-radius: var(--radius) 0 0 var(--radius);
  writing-mode: vertical-rl;
  border: 0;
  transition: transform 220ms ease, background 220ms ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.desborde-tab:hover { transform: translateX(-3px); background: var(--ink); }
.desborde-tab .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* VSL screen */
.vsl-frame {
  flex: 1;
  background: oklch(0.12 0.005 80);
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: var(--radius);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 18px;
  min-height: 0;
}
.vsl-frame .nineteen {
  aspect-ratio: 9 / 16;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  background:
    repeating-linear-gradient(135deg,
      oklch(0.18 0.005 80) 0 14px,
      oklch(0.16 0.005 80) 14px 15px);
  border: 1px dashed oklch(1 0 0 / 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  gap: 12px;
}
.vsl-frame .play {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.08);
  border: 1px solid oklch(1 0 0 / 0.3);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 16px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}
.vsl-frame .play:hover { transform: scale(1.05); background: oklch(1 0 0 / 0.14); }
.vsl-frame .play::after {
  content: "";
  width: 0; height: 0;
  border-left: 14px solid white;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  transform: translateX(2px);
}
.vsl-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: oklch(0.78 0.005 80);
  line-height: 1.5;
}
.vsl-meta b { color: white; font-weight: 500; }

/* desborde natural (inline section) */
.desborde-natural {
  background: var(--inverse);
  color: var(--inverse-ink);
  border-radius: var(--radius);
  padding: 48px;
  margin-top: 0;
  position: relative;
}
.desborde-natural .tag { color: oklch(0.72 0.005 80); }
.desborde-natural h3 {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 500;
  margin: 12px 0 16px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 20ch;
  color: white;
}
.desborde-natural h3 .accent {
  font-family: var(--hand);
  font-weight: 500;
  font-size: 1.6em;
  line-height: 0.85;
  letter-spacing: 0;
  display: inline-block;
  vertical-align: -0.05em;
}
.desborde-natural p {
  font-size: 16px;
  color: oklch(0.82 0.005 80);
  max-width: 56ch;
  margin: 0 0 24px;
}
.dn-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: end;
}
.dn-frame {
  aspect-ratio: 9 / 16;
  background:
    repeating-linear-gradient(135deg,
      oklch(0.20 0.005 80) 0 12px,
      oklch(0.18 0.005 80) 12px 13px);
  border: 1px dashed oklch(1 0 0 / 0.16);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: oklch(0.7 0.005 80);
  border-radius: 2px;
  position: relative;
}

/* ── Process page (second-level) ───────────────────────────────────────── */

.process-page {
  min-height: 100vh;
  padding-bottom: 80px;
}
.process-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklch, var(--bg), transparent 8%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.process-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Padding lateral propio + max-width: el .shell que vive en el mismo
     elemento setea max-width pero su padding se pisaba con el `16px 0`
     anterior, dejando el header pegado al borde en mobile. Ahora el
     inner respeta su propio gutter sin depender del shell. */
  padding: 16px var(--gutter);
  gap: 16px;
}
.process-nav-end {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.process-back {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.process-back:hover { background: var(--bg-soft); border-color: var(--ink-3); }

/* ── Breadcrumb del header de caso ────────────────────────────────────── */
.case-crumbs {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0;
}
.case-crumbs-link {
  background: transparent;
  border: 0;
  padding: 4px 2px;
  font: inherit;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: 3px;
  transition: color 160ms ease, background-color 160ms ease;
}
.case-crumbs-link:hover { color: var(--ink); }
.case-crumbs-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
/* El último link es la página actual: peso más fuerte para anclar al usuario. */
.case-crumbs-link:last-child { color: var(--ink); font-weight: 500; }
.case-crumbs-sep {
  margin: 0 4px;
  color: var(--ink-3);
}
/* Arrow del link "parent" — solo visible en mobile cuando hay 2 niveles. */
.case-crumbs-arrow-mobile { display: none; }

/* Mobile: dejo solo la flecha (sin texto del breadcrumb).
   Si hay parent, oculto el link "Home" entero y la flecha aparece en el
   link parent → un solo click vuelve UN nivel atrás, no todo al home. */
@media (max-width: 600px) {
  .case-crumbs-text { display: none; }
  .case-crumbs-sep { display: none; }
  .case-crumbs:has(.case-crumbs-link--parent) .case-crumbs-link--home { display: none; }
  .case-crumbs-arrow-mobile { display: inline; }
}

/* ── Modal Contratame ──────────────────────────────────────────────────
   Modal global con 3 pantallas (bifurcación / empresa / diseñador).
   Se monta encima de todo el sitio, scroll-lock + escape, backdrop
   oscuro. Reutiliza .btn, .btn--solid y .tag del sistema. */
.contratame-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0.10 0.005 80 / 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4vh 16px;
  overflow-y: auto;
  animation: ctm-fade-in 180ms ease;
}
@keyframes ctm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.contratame-modal {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  /* Top padding 0: the sticky .ctm-topbar provides its own internal padding
     so the topbar sits flush with the modal's top edge and never overlaps
     scrolled content. Body content gets its breathing room below the bar. */
  padding: 0 48px 40px;
  box-shadow:
    0 30px 60px -24px oklch(0.10 0.005 80 / 0.45),
    0 10px 24px -12px oklch(0.10 0.005 80 / 0.30);
  animation: ctm-slide-in 220ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes ctm-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Sticky topbar — back (cuando aplica) + close, alineados en el mismo eje
   vertical. Se mantiene fijo arriba mientras el contenido scrollea para que
   "volver" y "cerrar" estén siempre a un click. */
.ctm-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  /* Extiende a los bordes del modal (modal-padding-x = 48px) */
  margin: 0 -48px 24px;
  padding: 14px 20px 14px 48px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  min-height: 64px;
}
/* Spacer cuando no hay back (screen bifurcation) — empuja el close a la derecha. */
.ctm-topbar-spacer { flex: 1; }

.ctm-close {
  /* Ya no es absolute — vive dentro del topbar sticky. */
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.ctm-close:hover { border-color: var(--ink-3); background: var(--bg-soft); transform: scale(1.05); }
.ctm-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Botón "Volver" (en empresa / diseñador) — hover con underline para que
   se sienta consistente con los links de la nav global. */
.ctm-back {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-underline-offset: 4px;
  transition: color 160ms ease;
}
.ctm-back:hover {
  color: var(--ink);
  text-decoration: underline;
}
.ctm-back:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 2px;
}

.ctm-screen { display: flex; flex-direction: column; }

.ctm-head { margin-bottom: 28px; }
.ctm-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ctm-title {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
  max-width: 26ch;
}
.ctm-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 52ch;
}

/* Pantalla 1: opciones de bifurcación */
.ctm-options {
  display: grid;
  gap: 14px;
}
.ctm-option {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  text-align: left;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background-color 160ms ease;
}
.ctm-option:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  background: var(--bg);
}
.ctm-option:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.ctm-option-name {
  grid-column: 1;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
}
.ctm-option-desc {
  grid-column: 1;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.ctm-option-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--ink-3);
  transition: transform 160ms ease, color 160ms ease;
}
.ctm-option:hover .ctm-option-arrow { color: var(--ink); transform: translateX(3px); }

/* Pitch (texto largo de la pantalla "diseñador") */
.ctm-pitch {
  margin: 0 0 28px;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 64ch;
}

/* Lista de servicios / modalidades — tratamiento "editorial" SIN card.
   La diferencia visual con las opciones de bifurcación (que son cards
   interactivas) es deliberada: acá la info es lectura, no acción.
   Cada ítem es una FILA con divisor horizontal arriba, contador grande
   a la izquierda en mono ligero, contenido al centro y precio a la derecha. */
.ctm-services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  counter-reset: ctm-service;
}
.ctm-service {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  column-gap: 18px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
  counter-increment: ctm-service;
}
.ctm-service::before {
  content: counter(ctm-service, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
  line-height: 1.4;
  padding-top: 3px;
  align-self: baseline;
}
.ctm-service--soldout { opacity: 0.72; }
.ctm-service--custom .ctm-service-name { color: var(--ink); }

.ctm-service-name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-family: var(--mono);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.ctm-service-price {
  grid-column: 3;
  grid-row: 1;
  text-align: right;
  white-space: nowrap;
  align-self: baseline;
}
.ctm-service > .ctm-service-badge:not(.ctm-service-badge--soldout) {
  grid-column: 3;
  grid-row: 1;
  align-self: baseline;
  justify-self: end;
}
.ctm-service-price-v {
  display: inline-block;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
/* Prefijo opcional para indicar moneda (ej. "USD $100").
   Mismo tamaño que el label de unidad para no competir con el monto. */
.ctm-service-price-currency {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-right: 4px;
}
.ctm-service-price-u {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.ctm-service-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--line);
}
.ctm-service-badge--soldout {
  color: oklch(0.96 0.004 80);
  background: var(--ink);
  border-color: var(--ink);
}
/* "A medida" para el servicio custom (sin precio) — chip teal sutil */
.ctm-service--custom .ctm-service-badge {
  color: var(--teal-ink);
  background: var(--teal-soft);
  border-color: var(--teal-soft);
}
.ctm-service-desc {
  grid-column: 2 / -1;
  grid-row: 2;
  margin: 6px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.ctm-service-note {
  grid-column: 2 / -1;
  grid-row: 3;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.ctm-prices-note {
  margin: 8px 0 14px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-align: center;
}
.ctm-service-cta {
  grid-column: 2 / -1;
  grid-row: 4;
  margin-top: 14px;
  justify-self: flex-start;
}
/* Nota debajo del CTA (ej. condición de membresía para "Reservar sesión"). */
.ctm-service-cta-note {
  grid-column: 2 / -1;
  grid-row: 5;
  margin: 12px 0 0;
  max-width: 56ch;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* En el pitch del flujo diseñador, el <strong> de la oración final
   resalta el insight de venta sin recurrir a tipografía especial. */
.ctm-pitch strong {
  color: var(--ink);
  font-weight: 600;
}

.ctm-cta-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

@media (max-width: 560px) {
  /* Top=0: la sticky .ctm-topbar provee su propia altura/padding interno.
     Si dejamos padding-top: 56px (legacy del close absoluto), el topbar
     no se pega arriba del modal y el title escapa por encima. */
  .contratame-modal { padding: 0 24px 28px; border-radius: 14px; }
  /* Reajuste del bleed del topbar — modal padding mobile es 24px (no 48). */
  .ctm-topbar {
    margin: 0 -24px 20px;
    padding: 12px 16px 12px 24px;
    min-height: 56px;
    border-radius: 14px 14px 0 0;
  }
  .ctm-option { padding: 18px 18px; grid-template-columns: 1fr; }
  .ctm-option-arrow { grid-column: 1; grid-row: auto; align-self: flex-start; margin-top: 6px; }
  /* Servicios en mobile: el nombre y el precio en la misma línea
     (space-between via grid), descripción debajo a todo el ancho. */
  .ctm-service {
    grid-template-columns: auto 1fr auto;
    column-gap: 12px;
    row-gap: 6px;
    padding: 16px 0 18px;
  }
  .ctm-service-price { white-space: nowrap; }
  .ctm-service-desc { grid-column: 1 / -1; grid-row: 2; margin-top: 4px; }
  .ctm-service-note { grid-column: 1 / -1; grid-row: 3; }
  .ctm-service-cta { grid-column: 1 / -1; grid-row: 4; }
  .ctm-service-cta-note { grid-column: 1 / -1; grid-row: 5; }
}

/* ── Footer condensed para páginas de caso ──────────────────────────── */
.foot-case-condensed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter);
  margin-top: 48px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .foot-case-condensed {
    gap: 10px;
    padding: 16px var(--gutter);
    margin-top: 36px;
  }
}

.process-hero {
  padding: 64px var(--gutter) 40px;
}
.process-title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 20px 0 24px;
  color: var(--ink);
}
.process-title .accent {
  font-family: var(--hand);
  font-weight: 500;
  font-size: 1.45em;
  line-height: 0.85;
  letter-spacing: 0;
  color: var(--ink);
}
.process-lede {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
}

.process-section {
  padding: 40px var(--gutter);
}
.process-section .section-head { margin-bottom: 22px; }

/* timeline */
.process-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.process-timeline li {
  display: grid;
  grid-template-columns: 120px 1fr 1.6fr;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.process-timeline li:last-child { border-bottom: 0; }
.pt-y {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0;
  padding-top: 2px;
}
.pt-mid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pt-mid strong {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.pt-c {
  font-size: 12px;
  color: var(--ink-3);
}
.pt-n {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* steps */
.process-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.process-steps li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.ps-n {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.ps-body { display: flex; flex-direction: column; gap: 6px; }
.ps-body strong {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.ps-body > span {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* prose */
.process-prose {
  max-width: 64ch;
}
.process-prose p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 14px;
}

/* foot */
.process-foot {
  margin-top: 60px;
  padding: 40px var(--gutter);
  border-top: 1px solid var(--line);
}
.process-foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.process-foot-line {
  font-size: 18px;
  color: var(--ink);
  margin-top: 8px;
}
.process-foot-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .process-timeline li { grid-template-columns: 1fr; gap: 6px; }
  .process-steps { grid-template-columns: 1fr; }
  .process-title { font-size: clamp(36px, 9vw, 56px); }
}

/* ── Reveal-on-scroll: disabled — content is visible from the start. ──── */
.appear,
.appear.on {
  opacity: 1;
  transform: none;
}

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 100ms !important;
  }
  .appear { opacity: 1; transform: none; }
}

/* ── Tablet (768–1279px) — reduce nav ── */
@media (max-width: 1279px) {
  .nav-links a.nav-link-community { display: none; }
}

/* ── Mobile (<768px) — hamburger ── */
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ── Case page (DJY Pro) ───────────────────────────────────────────────── */
.case-page {
  min-height: 100vh;
  padding-bottom: 60px;
}
.case-hero {
  padding: 56px var(--gutter) 40px;
}
.case-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: start;
}
.case-hero-text { min-width: 0; }
.case-title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 20px 0 28px;
  color: var(--ink);
  max-width: 22ch;
}
.case-headline {
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.case-stat {
  display: inline-block;
  color: var(--teal);
  font-weight: 600;
  font-size: 1.35em;
  letter-spacing: -0.02em;
  margin-right: 0.15em;
}
.case-sub {
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 28px;
}
/* meta row: single inline line, teal "role" highlight */
.case-meta {
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.005em;
  line-height: 1.7;
}
.case-meta b { color: var(--ink); font-weight: 500; }
.case-meta-mark {
  background: var(--teal-soft);
  color: var(--teal-ink);
  padding: 1px 8px;
  border-radius: 3px;
  font-weight: 500;
}

/* hero media (tilted iPad mockup) */
.case-hero-media {
  margin: 0;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-hero-media picture,
.case-hero-media img {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  object-fit: contain;
  /* slight perspective so a flat screenshot reads as a tilted device */
  filter: drop-shadow(0 30px 50px oklch(0.20 0.005 80 / 0.18));
}
.case-hero-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, var(--bg-soft) 0 10px, var(--bg-card) 10px 11px);
  color: var(--ink-3);
  font-size: 12px;
  padding: 20px;
  aspect-ratio: 16 / 10;
  min-height: 280px;
}
.case-hero-media.is-missing img,
.case-hero-media.is-missing picture { display: none; }
.case-hero-media.is-missing .case-hero-fallback { display: grid; }

/* Nota de confidencialidad — banner sutil entre el hero y // CONTEXTO. */
.case-confidential {
  padding: 18px var(--gutter) 22px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.case-confidential-body {
  margin: 8px 0 0;
  max-width: 80ch;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}
.case-confidential-body strong {
  color: var(--ink);
  font-weight: 500;
}

/* ── OrbAle (animated glassy chatbot orb) ──────────────────────────────── */
.orb-ale {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.orb-ale-canvas {
  display: block;
  filter: drop-shadow(0 30px 50px oklch(0.20 0.005 80 / 0.30));
}
/* Hero placement: square stage so the orb fills the right column. */
.case-hero-media--orb {
  aspect-ratio: 1 / 1;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}
.orb-ale--hero { min-height: 320px; }

/* Bento card with orb (no featured) — fondo claro plano. */
.bento-card.is-orb .preview {
  background: var(--bg-card);
}
.bento-card.is-orb:hover .preview { transform: none; }

/* Orb anclado a la derecha en cards no-featured. */
.orb-ale--card {
  position: absolute;
  inset: 0 0 0 auto;
  width: 55%;
  max-width: 320px;
}

/* Orb dentro de una card featured — fondo CLARO (no inverse). Override
   total: el card vuelve a verse blanco como las cards no-featured. */
.bento-card.is-orb.is-featured {
  background: var(--bg-card);
  border-color: var(--line);
  color: var(--ink);
}
.bento-card.is-orb.is-featured .preview { background: var(--bg-card); }
.bento-card.is-orb.is-featured h4 { color: var(--ink); }
.bento-card.is-orb.is-featured .meta { color: var(--ink-3); }
.bento-card.is-orb.is-featured .featured-desc { color: var(--ink-2); }
.bento-card.is-orb.is-featured .kpis { color: var(--ink-3); }
.bento-card.is-orb.is-featured .kpis b { color: var(--ink); }
.bento-card.is-orb.is-featured:hover {
  border-color: var(--ink-3);
  box-shadow: 0 18px 36px -22px oklch(0.20 0.005 80 / 0.35);
}

/* Orb más chico y bien metido en el cuadrante inferior derecho — sin
   pisar el título ni la descripción. `height: auto` corrige el
   `height: 100%` heredado de .orb-ale, dejando que aspect-ratio mande. */
.orb-ale--card-featured {
  position: absolute;
  inset: auto 20px 108px auto;
  width: min(40%, 200px);
  height: auto;
  aspect-ratio: 1 / 1;
  pointer-events: none;
}
@media (max-width: 1100px) {
  .orb-ale--card-featured { inset: auto 18px 124px auto; width: min(36%, 170px); }
}
@media (max-width: 1020px) {
  .orb-ale--card-featured { inset: auto 18px 152px auto; width: min(34%, 150px); }
}

.case-section {
  padding: 56px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.case-section:last-of-type { border-bottom: 0; }
.case-section .section-head { margin-bottom: 24px; }

.case-sub-section { margin-bottom: 56px; }
.case-sub-section:last-child { margin-bottom: 0; }

/* Diagrama de proceso (3 movimientos) — arriba de "01 · Entender". */
.case-process-intro {
  margin: 4px 0 48px;
}
.case-process-diagram {
  margin: 0 auto;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.case-process-diagram picture,
.case-process-diagram img {
  display: block;
  width: 100%;
  height: auto;
}
/* El webp viene con trazos negros sólidos pre-procesados (alfa amplificado),
   así que no hace falta filtro CSS — se ve nítido sobre el bg claro. */
.case-process-diagram img { filter: none; }
.case-process-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  text-align: center;
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1;
  color: var(--ink);
  margin: 0;
}
.case-process-labels .case-hand {
  font-size: 1em;
  margin: 0;
  vertical-align: baseline;
  line-height: 1;
}

/* ── Carrusel de muestras (case-carousel) ──────────────────────────────── */
/* Toda la diapositiva vive dentro de UNA tarjeta (mismo lenguaje que las
   `.case-options li` del caso DJY): imagen arriba, body con padding y
   controles + descripción abajo. El frame mantiene una relación de aspecto
   FIJA = imagen más corta del set (Datos 1 = 1908×670 → ratio ≈ 2.847);
   los slides más altos se rinden con object-fit:contain. */
.case-carousel {
  margin: 28px 0 36px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  outline: none;
}
.case-carousel:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}
.case-carousel-frame {
  margin: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 1908 / 670;
  max-height: var(--carousel-max-h, 600px);
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.case-carousel-frame picture {
  display: block;
  position: absolute;
  inset: 0;
}
.case-carousel-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Body de la tarjeta: padding generoso, controles inmediatamente encima del
   texto para que el ojo aterrice en la descripción justo después del click. */
.case-carousel-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.case-carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.case-carousel-dot {
  width: 26px;
  height: 3px;
  border-radius: 2px;
  border: 0;
  background: var(--line);
  cursor: pointer;
  padding: 0;
  transition: background-color 160ms ease, transform 160ms ease;
}
.case-carousel-dot:hover { background: var(--ink-3); }
.case-carousel-dot.is-on {
  background: var(--ink);
  transform: scaleX(1.15);
}
.case-carousel-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-left: 8px;
}
.case-carousel-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.case-carousel-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.case-carousel-btn:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.case-carousel-btn:active { transform: translateY(0); }
.case-carousel-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Texto descriptivo: mono pequeño, baja jerarquía para no competir con
   los títulos de sub-sección ("01 · Entender"). Kicker apenas más fuerte. */
.case-carousel-desc {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink-2);
  margin: 0;
  max-width: 78ch;
}
.case-carousel-kicker {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 760px) {
  .case-carousel-body { padding: 14px 14px 16px; }
  .case-carousel-controls { gap: 10px; }
  .case-carousel-btn { width: 32px; height: 32px; }
}

/* ── Journey: fila de 2 imágenes + prose abajo ────────────────────────── */
.case-journey-row {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.case-journey-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.case-journey-fig picture,
.case-journey-fig img {
  display: block;
  width: 100%;
  height: auto;
  /* drop-shadow sigue el contorno transparente del asset (los devices que
     traen alfa proyectan sombra recortada al silueta). */
  filter: drop-shadow(0 20px 40px oklch(0.20 0.005 80 / 0.22));
}
/* Variante para assets rectangulares sin chrome (presentación, deck):
   bordes redondeados aplicados nosotros + sombra más sutil. */
.case-journey-fig--flat img {
  border-radius: var(--radius);
  filter: drop-shadow(0 14px 30px oklch(0.20 0.005 80 / 0.16));
}
.case-journey-caption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.case-journey-prose {
  margin-top: 24px;
  max-width: 72ch;
}

@media (max-width: 900px) {
  .case-journey-row {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }
  .case-journey-prose { margin-top: 18px; }
}

/* ── 02 · Definir: prose izq + iPad mockup der ─────────────────────────── */
.case-definir-grid {
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 48px;
  align-items: center;
}
.case-definir-prose { max-width: 56ch; }

/* ── iPad mockup (portado del entregable de Claude Design) ─────────────── */
/* Relación de pantalla 800×1059 (vertical, ~3:4). Todo el dispositivo escala
   con el ancho disponible — los radii/sombras crecen proporcionalmente para
   que la pieza no se vea quebrada a distintos tamaños. */
.ipad-mockup {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  --ipad-bezel: clamp(16px, 8.5%, 26px);
  --ipad-radius-outer: clamp(34px, 8%, 64px);
  --ipad-radius-inner: clamp(20px, 5%, 40px);
}
.ipad-mockup-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: var(--ipad-bezel);
  background:
    linear-gradient(135deg,
      #d7d8da 0%,
      #b9bbbe 18%,
      #cfd0d3 50%,
      #aeb0b4 82%,
      #d2d3d6 100%);
  border-radius: var(--ipad-radius-outer);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,0.55),
    inset 0 0 0 3px rgba(120,122,126,0.35),
    0 2px 4px rgba(0,0,0,0.18),
    0 30px 70px -18px rgba(0,0,0,0.45),
    0 10px 28px -12px rgba(0,0,0,0.35);
}
.ipad-mockup-camera {
  position: absolute;
  top: calc(var(--ipad-bezel) / 2);
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2b3b4a 0%, #0a0f14 60%, #000 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
  transform: translate(-50%, -50%);
  z-index: 3;
}
.ipad-mockup-bezel {
  background: #050505;
  border-radius: var(--ipad-radius-inner);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,0.9),
    inset 0 0 14px 2px rgba(0,0,0,0.6);
  overflow: hidden;
}
.ipad-mockup-screen {
  width: 100%;
  aspect-ratio: 800 / 1059;
  background: #000;
  border-radius: var(--ipad-radius-inner);
  overflow: hidden;
  position: relative;
}
.ipad-mockup-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--ipad-radius-inner);
}
.ipad-mockup-caption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 36ch;
}

@media (max-width: 900px) {
  .case-definir-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }
  .case-definir-prose { max-width: none; }
  .ipad-mockup-frame { max-width: 320px; margin: 0 auto; }
}

/* prefers-reduced-motion se respeta desde JS en IPadMockup (pausa el video). */

/* ── MacBook mockup (portado del entregable de Claude Design) ──────────── */
/* Pantalla 16:10 + notch + base con bisagra y lip. Dimensiones derivadas
   del alto máximo (--mac-max-h): el ancho se calcula a partir de la
   relación 16:10 + el padding del lid + la base. Todo escala con clamp(). */
.mac-mockup {
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mac-mockup-stage {
  /* Ancho derivado del max-h: pantalla 16:10 ocupa la mayor parte del alto;
     dejo ~50 px de margen para padding del lid + base. */
  width: 100%;
  max-width: calc((var(--mac-max-h, 500px) - 50px) * (16 / 10) + 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.30));
}
.mac-mockup-lid {
  width: 100%;
  background: linear-gradient(180deg, #2b2b2f 0%, #1d1d20 100%);
  border-radius: 24px 24px 10px 10px;
  padding: 12px 12px 14px;
  box-sizing: border-box;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    inset 0 1px 1px rgba(255,255,255,0.10);
  position: relative;
}
.mac-mockup-lid::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 24px;
  border-radius: 23px 23px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0));
  pointer-events: none;
}
.mac-mockup-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: 150px;
  height: 18px;
  background: #1d1d20;
  border-radius: 0 0 10px 10px;
  transform: translateX(-50%);
  z-index: 3;
}
.mac-mockup-display {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mac-mockup-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.mac-mockup-base {
  width: 113%;
  height: 18px;
  position: relative;
  background: linear-gradient(180deg, #c4c6cb 0%, #a8abb2 18%, #84878e 70%, #6f7177 100%);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.25);
}
.mac-mockup-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(180deg, #4a4b50, #2e2f33);
  border-radius: 2px 2px 0 0;
}
.mac-mockup-lip {
  position: absolute;
  top: 0;
  left: 50%;
  width: 160px;
  height: 9px;
  background: linear-gradient(180deg, #777a80, #93969c);
  border-radius: 0 0 10px 10px;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,0.25);
  transform: translateX(-50%);
}
.mac-mockup-caption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-align: center;
}

@media (max-width: 640px) {
  .mac-mockup-notch { width: 110px; height: 14px; }
  .mac-mockup-lip { width: 120px; height: 7px; }
}

/* Caja-índice del manual — mismo lenguaje que .case-highlight (eyebrow tag +
   contenido en card con borde y barra izquierda), pero como lista limpia. */
.case-toc-box {
  margin: 18px 0 0;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
}
.case-toc-box-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.case-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
}
.case-toc-list li { letter-spacing: 0; }

.case-h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.005em;
  margin: 0 0 18px;
  color: var(--ink);
}

.case-prose { max-width: 68ch; }
.case-prose p {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.case-prose p strong { color: var(--ink); font-weight: 600; }
.case-bullets {
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 68ch;
}
.case-bullets li {
  position: relative;
  padding-left: 22px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}
.case-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink-3);
  font-family: var(--mono);
}

/* Arrow bullets: same idea as .case-bullets but with → as marker */
.case-arrows {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 68ch;
}
.case-arrows li {
  position: relative;
  padding-left: 28px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}
.case-arrows li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink-3);
  font-family: var(--mono);
  font-weight: 600;
}
.case-arrows li strong { color: var(--ink); font-weight: 600; }

/* ── Layer pipeline diagram (4.5 metodología) ─────────────────────────── */
.case-layers {
  --rail: oklch(0.55 0.005 80);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) 64px minmax(0, 0.9fr);
  align-items: center;
  margin: 26px 0;
  position: relative;
}

.case-layers-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.case-layer-row {
  display: flex;
  align-items: center;
  gap: 0;
}
/* Each layer card progressively narrower — visualizes "stacked layers" and
   gives each its own dashed feed line to the bus. */
.case-layer-row--01 .case-layer { flex: 0 0 92%; }
.case-layer-row--02 .case-layer { flex: 0 0 80%; }
.case-layer-row--03 .case-layer { flex: 0 0 68%; }

.case-layer {
  border-radius: var(--radius);
  padding: 18px 22px;
  position: relative;
  min-width: 0;
}
.case-layer--01 { background: var(--inverse);            color: var(--inverse-ink); }
.case-layer--02 { background: oklch(0.32 0.005 80);      color: var(--inverse-ink); }
.case-layer--03 { background: oklch(0.48 0.005 80);      color: var(--inverse-ink); }
.case-layer--dev {
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 22px 24px;
  align-self: center;
}

.case-layer-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.case-layer--dev .case-layer-head {
  justify-content: flex-start;
  margin-bottom: 8px;
}
.case-layer-tag {
  color: oklch(0.78 0.005 80);
  font-weight: 500;
}
.case-layer--dev .case-layer-tag { color: var(--ink-3); }
.case-layer-role {
  font-weight: 600;
  letter-spacing: 0.10em;
}
.case-layer--dev .case-layer-role { color: var(--ink); }
.case-layer-title {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: inherit;
}
.case-layer-body {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0;
  color: oklch(0.82 0.005 80);
}
.case-layer--dev .case-layer-body { color: var(--ink-2); }

/* Horizontal feed: dashed line from each card's right edge → terminal dot.
   flex:1 makes each feed fill the remaining row width so all dots land on
   the same x where the vertical bus runs. */
.case-layer-feed {
  flex: 1;
  height: 0;
  border-top: 1.5px dashed var(--rail);
  position: relative;
}
.case-layer-feed::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rail);
}

/* Vertical bus: position top/bottom set inline by JS to match c01/c03 centers */
.case-layers-bus {
  position: absolute;
  right: 0;
  top: 28px;
  bottom: 28px;
  width: 0;
  border-left: 1.5px solid var(--rail);
  transform: translateX(-1px);
  pointer-events: none;
}

/* Bridge: lives in the middle grid column. Its content centers in the cell
   via flex, and the cell is align-items:center in the grid → bridge arrow
   lands at the grid row's vertical centerline, where DEV also centers. */
.case-layers-bridge {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  color: var(--rail);
  pointer-events: none;
}
.case-layers-bridge-line {
  flex: 1;
  height: 0;
  border-top: 1.5px dashed var(--rail);
}
.case-layers-bridge-arrow {
  font-size: 16px;
  line-height: 1;
  color: var(--ink);
  margin-left: 4px;
}

/* Step arrow ↓ — hidden on desktop, shown between cards on mobile */
.case-layer-step {
  display: none;
}
.case-layer-step--final { display: none; }

/* ── Mobile layout ── */
@media (max-width: 900px) {
  .case-layers {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 14px;
  }
  .case-layers-stack {
    gap: 0;
  }
  .case-layer-row {
    flex-direction: column;
    gap: 0;
  }
  .case-layer-row .case-layer { flex: 0 0 auto; width: 100%; }
  .case-layer-feed { display: none; }
  .case-layers-bus { display: none; }
  .case-layers-bridge { display: none; }
  /* Step arrows between rows */
  .case-layer-step {
    display: block;
    margin: 8px auto;
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 18px;
    line-height: 1;
    text-align: center;
  }
  .case-layer-step--final {
    display: block;
    margin-bottom: 0;
  }
  .case-layer--dev {
    align-self: stretch;
    width: 100%;
  }
}

/* Disclosure list: each item is a <details> that opens to show an illustration.
   Affordance layered with multiple signifiers (border, hover bg, mono CTA pill,
   "Ver detalle" label, animated + icon). */
.case-disclose {
  margin: 8px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-disclose-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.case-disclose-item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.005em;
  transition: color 150ms ease;
}
.case-disclose-item summary::-webkit-details-marker { display: none; }
.case-disclose-item summary::marker { content: ""; }

/* Hover/focus: dark border + subtle background lift — clearly interactive */
.case-disclose-item:hover,
.case-disclose-item:focus-within {
  border-color: var(--ink);
  background: var(--bg);
  box-shadow: 0 6px 16px -10px oklch(0.20 0.005 80 / 0.18);
}

.case-disclose-label {
  display: block;
}

/* "+" icon in a circle — the only visible affordance signifier alongside the
   card border + hover bg + mono font. */
.case-disclose-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ink-3);
  border-radius: 50%;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  transition: transform 220ms cubic-bezier(.34, 1.22, .4, 1), background 200ms ease, color 200ms ease, border-color 200ms ease;
  user-select: none;
  flex-shrink: 0;
}
.case-disclose-item:hover .case-disclose-icon,
.case-disclose-item:focus-within .case-disclose-icon {
  background: var(--ink);
  color: var(--inverse-ink);
  border-color: var(--ink);
}

/* Open state */
.case-disclose-item[open] {
  border-color: var(--ink);
  background: var(--bg);
}
.case-disclose-item[open] > summary .case-disclose-icon {
  transform: rotate(45deg);
  background: var(--ink);
  color: var(--inverse-ink);
  border-color: var(--ink);
}

/* Keyboard focus ring on the summary itself (a11y) */
.case-disclose-item summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 2px;
}

.case-disclose-panel {
  padding: 4px 18px 22px 18px;
  animation: case-disclose-in 280ms cubic-bezier(.16, 1, .3, 1);
}
.case-disclose-panel .case-fig { margin: 0; }
@keyframes case-disclose-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Compact paddings on narrow widths */
@media (max-width: 640px) {
  .case-disclose-item summary { padding: 14px 14px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .case-disclose-panel { animation: none; }
  .case-disclose-icon,
  .case-disclose-item { transition: none; }
}
.case-prose p em { color: var(--ink-2); font-style: italic; }
.case-prose--ontop { position: relative; z-index: 1; }

/* Closing line under a sub-section — quiet mono punctuation that
   signals the section landed. No divider — sits as its own beat. */
.case-prose-close {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* Two-column context: prose left, highlight box right */
.case-context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.case-context-grid .case-prose { max-width: 56ch; }

.case-highlight {
  margin: 0;
  padding: 28px 30px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  position: sticky;
  top: 90px;
}
.case-highlight-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.case-highlight p {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}
.case-highlight p strong {
  color: var(--ink);
  font-weight: 600;
  display: block;
  font-size: 17px;
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Inline handwriting accent (e.g. project name "Giants") */
.case-hand {
  font-family: var(--hand);
  font-weight: 600;
  font-size: 1.45em;
  line-height: 0.85;
  letter-spacing: 0;
  color: var(--ink);
  vertical-align: -0.08em;
  margin: 0 0.04em;
  display: inline-block;
}

.case-fig {
  margin: 28px 0;
}
.case-ph {
  width: 100%;
  background:
    repeating-linear-gradient(45deg, var(--bg-soft) 0 10px, var(--bg-card) 10px 11px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.case-img-wrap {
  width: 100%;
  max-height: min(600px, 70vh);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
}
/* "Bare" variant: image floats without the wrap chrome (no border, no bg).
   Used for diagrams/illustrations that already have their own framing. */
.case-fig--bare .case-img-wrap {
  border: 0;
  background: transparent;
}
.case-img-wrap picture {
  display: block;
  position: absolute;
  inset: 0;
}
.case-img-wrap img,
.case-img-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.case-fig figcaption {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.case-options {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.case-options li {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
  overflow: hidden;
}
.case-option-thumb {
  width: 100%;
  aspect-ratio: 516 / 240;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.case-option-thumb picture,
.case-option-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-option-body {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 16px;
}
.case-options .case-n {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.case-options strong {
  font-weight: 500;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}

.case-ab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
}
.case-ab-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}
.case-ab-results .case-fig { margin: 0; }

/* "Flow" modifier — section connects to the previous one with less top space */
.case-section.case-section--flow {
  padding-top: 12px;
}

/* Benchmark section: image on the left, dimensions list on the right */
.case-benchmark-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin: 22px 0;
}
.case-benchmark-grid .case-fig { margin: 0; }
.case-benchmark-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.case-benchmark-title {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--ink);
  max-width: 28ch;
}

/* Scale-context section: calendar thumb (readable size) beside the prose */
.case-scale-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.case-scale-thumb {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-scale-thumb picture,
.case-scale-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.case-scale-thumb figcaption {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}

/* Responsive Resize animation — desktop ↔ mobile crossfade as frame resizes.
   Stage is a clean surface (no checkerboard); the frame inside represents
   the "viewport" and animates width + height to track the current image
   without ever cutting it off. */
.case-resize {
  margin: 28px 0;
}
.case-resize-stage {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* height set by JS to the peak frame height — fixed so the page below
     doesn't reflow as the frame morphs inside */
}
.case-resize-frame {
  position: relative;
  /* width + height set by JS each frame. Initial values just avoid a
     0×0 flash before the first paint. */
  width: 100%;
  height: 200px;
  max-width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 32px -18px oklch(0.20 0.005 80 / 0.25);
  overflow: hidden;
  will-change: width, height;
  transition: box-shadow 200ms ease;
}
.case-resize-frame img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
/* Width readout below the stage — adds context to what the animation shows */
.case-resize-readout {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.case-resize-readout-label {
  text-transform: uppercase;
}
.case-resize-readout-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 13px;
}

/* Typography rule + image side-by-side */
.case-typo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin: 22px 0;
}
.case-typo-grid .case-prose { max-width: 52ch; }
.case-typo-grid .case-fig { margin: 0; }

/* Compact figure: caps width so the gif/image doesn't dominate */
.case-fig--compact {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* A/B variant of options: 2 columns instead of 3 */
.case-options--ab {
  grid-template-columns: repeat(2, 1fr);
}
.case-options--ab .case-option-thumb {
  aspect-ratio: 740 / 417;
}
.case-ab-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.case-ab-label {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.case-ab-card p {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}

.case-flow {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 16px 20px;
}
.case-flow li {
  display: grid;
  grid-template-columns: 56px 16px 1fr;
  gap: 14px;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.case-flow li:last-child { border-bottom: 0; }
.case-flow .case-flow-role {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.case-flow .case-flow-arrow { color: var(--ink-3); }

/* Japan section — kanji texture in background */
.case-section--japan { position: relative; overflow: hidden; }
.case-japan-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.case-japan-bg span {
  display: grid;
  place-items: center;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic Pro", system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 56px);
  color: var(--ink);
  opacity: 0.06;
  letter-spacing: 0.08em;
}

/* Result metrics */
.case-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin: 8px 0 22px;
}
.case-metric {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}
.case-metric:last-child { border-right: 0; }
.case-metric-v {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.case-metric.is-highlight .case-metric-v { color: var(--teal); }
.case-metric-suffix {
  font-size: 0.6em;
  color: var(--ink-3);
  letter-spacing: 0;
  font-weight: 500;
}
.case-metric.is-highlight .case-metric-suffix { color: var(--teal-ink); }
.case-metric-l {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.case-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dashed var(--ink-4);
  padding-bottom: 1px;
}
.case-link:hover { border-bottom-color: var(--ink); }

/* Reflection quote + feature paragraph: prominent typography, centered block,
   left-aligned text inside. Used for stand-alone insights/quotes. */
.case-section--quote {
  padding-top: 80px;
  padding-bottom: 80px;
}
/* ── ALE case — toolkit chips ── */
.case-toolkit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 28px;
}
.case-toolkit .chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-card);
}

/* ── ALE case — four states ── */
.case-states {
  list-style: none;
  padding: 0;
  margin: 8px 0 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.case-state {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  align-items: start;
}
/* Orb a la IZQUIERDA, ocupando ambas filas — sin fondo: el orb flota sobre
   el bg de la tarjeta. Mantiene visibles los estados oscuros (Offline). */
.case-state-orb {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  background: transparent;
}
.case-state-orb picture {
  display: grid;
  place-items: center;
  height: 100%;
}
.case-state-orb img {
  display: block;
  height: 88%;
  width: auto;
  max-width: 88%;
  object-fit: contain;
}
.case-state-head {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.case-state-tag {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}
.case-state-role {
  font-size: 12px;
  color: var(--ink-3);
}
.case-state-body {
  grid-column: 2;
  grid-row: 2;
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}
@media (max-width: 900px) {
  .case-states { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .case-states { grid-template-columns: 1fr; }
  .case-state { grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; }
  .case-state-orb { width: 88px; height: 88px; }
}

.case-feature {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 32ch;
  margin: 28px auto;
  text-align: left;
  position: relative;
}
.case-quote {
  /* keep the original heavier sizing for the reflection quote */
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.25;
  max-width: 28ch;
}
/* Cada línea de la cita es su propio bloque con altura fija = strut del
   párrafo (line-height: 1.25em). El accent (1.45em) overflowea visualmente
   SIN crecer la línea, así el espaciado entre líneas es idéntico. */
.case-quote-line {
  display: block;
  height: 1.25em;
  line-height: 1.25em;
  overflow: visible;
  white-space: nowrap;
}
.case-quote .case-quote-line:first-child {
  white-space: normal;   /* la primera frase wrappea naturalmente */
  height: auto;          /* y ocupa las líneas que necesite */
}
.case-quote .accent {
  font-family: var(--hand);
  font-weight: 500;
  font-size: 1.45em;
  line-height: 0.85;
  letter-spacing: 0;
  display: inline-block;
  vertical-align: -0.06em;
}

/* ── About page (p · 02 · sobre mí) ───────────────────────────────────── */
.about-page {
  min-height: 100vh;
}

/* APERTURA — dos líneas grandes, mucho aire. */
.about-apertura {
  padding: 80px var(--gutter) 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}
.about-apertura-title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  max-width: 28ch;
}
.about-apertura-line1 { display: inline-block; }
.about-apertura-line2 {
  display: inline-block;
  color: var(--ink-2);
}

/* Secciones: prose narrativo, con tag uppercase consistente con casos. */
.about-section {
  padding: 48px var(--gutter);
  border-top: 1px solid var(--line-soft);
}
.about-section .section-head { margin-bottom: 22px; }
.about-prose {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 66ch;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}
.about-prose p { margin: 0; }
.about-prose strong {
  color: var(--ink);
  font-weight: 600;
}
/* Una línea suelta en Quién soy ("Llegué por las personas.") — peso visual
   propio sin gritar. */
.about-emphasis {
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}

/* Pull-quote de "Lo que no verás" — mismo tratamiento que las quotes
   de reflexión de los casos (sin caja, tipografía grande, accent hand). */
.about-pullquote-flat {
  margin: 24px 0 14px;
}
.about-closing {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
}

/* Lo que me formó — lista limpia de libros, mono, sin iconografía. */
.about-books-intro {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 18px;
}
.about-books {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  max-width: 70ch;
}
.about-books li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.about-books li:last-child { border-bottom: 0; }
.about-book-title { font-weight: 500; color: var(--ink); }
.about-book-sep { color: var(--ink-3); }
.about-book-author { color: var(--ink-3); }

/* Outro: pitch corto + CTA primario único debajo de los libros. */
.about-outro {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 64ch;
}
.about-outro-para {
  margin: 0;
  color: var(--ink);
}
.about-outro-para--sans {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  letter-spacing: 0;
}
.about-outro-para--sans strong {
  color: var(--ink);
  font-weight: 600;
}
.about-outro-para--mono {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
}
.about-outro-para--mono strong {
  color: var(--ink);
  font-weight: 600;
}
.about-outro-cta {
  align-self: flex-start;
  margin-top: 8px;
}
/* CTAs del outro lado a lado (primary + descargar CV).
   Se apilan en mobile cuando no entran. */
.about-outro-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.about-outro-ctas .about-outro-cta { margin-top: 0; }

@media (max-width: 760px) {
  .about-apertura { padding: 56px var(--gutter) 40px; }
  .about-section { padding: 40px var(--gutter); }
  .about-community-stats { gap: 22px 32px; }
}

/* ── Reviews del caso (sección "// LO QUE ME DIJERON") ───────────────────
   Dos tarjetas en grilla; colapsan a 1 columna en mobile. */
.case-reviews {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.case-review {
  margin: 0;
  padding: 26px 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.case-review-text {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.case-review-who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.case-review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.case-review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.case-review-meta strong {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.case-review-role {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

@media (max-width: 760px) {
  .case-reviews { grid-template-columns: 1fr; gap: 16px; }
  .case-review { padding: 22px 22px 20px; }
}

/* Orb ALE chiquito entre la cita y el "Gracias por leer" */
.case-cierre-orb {
  margin: 32px auto 0;
  width: clamp(140px, 22vw, 200px);
  height: clamp(140px, 22vw, 200px);
}

/* Small "Gracias por leer" line below the reflection quote */
.case-thanks {
  margin: 24px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.case-thanks span[aria-hidden] {
  color: var(--teal);
  margin-right: 4px;
}

/* Reviews dentro de la sección RESULTADO (caso DJY) — separadas del link
   "Ver producto vivo" con un margen claro, mismo tratamiento que las
   reviews del flow original. */
.case-result-reviews {
  margin-top: 36px;
  display: grid;
  gap: 18px;
}

/* Natural-overflow reviews fallback */
.case-natural-reviews {
  display: grid;
  gap: 18px;
}
.case-natural-review {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.case-natural-review p {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
}
.case-natural-review footer {
  font-size: 12px;
  color: var(--ink-3);
}
.case-natural-review footer strong { color: var(--ink); font-weight: 500; }

.case-foot {
  margin-top: 40px;
  padding: 40px var(--gutter);
  border-top: 1px solid var(--line);
}
.case-foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* ── Bridge card · 3rd-level entry from DJY Pro case ───────────────── */
.case-more-bridge {
  padding-top: 24px;
  padding-bottom: 24px;
}
.case-more-card {
  background: var(--inverse);
  color: var(--inverse-ink);
  border-radius: var(--radius);
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.case-more-card .tag { color: oklch(0.72 0.005 80); }
.case-more-title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 26ch;
  color: var(--inverse-ink);
}
.case-prose-inline {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: oklch(0.82 0.005 80);
  max-width: 60ch;
  margin: 0 0 8px;
}
.case-more-card .btn--solid {
  background: var(--inverse-ink);
  color: var(--inverse);
  border-color: var(--inverse-ink);
}
.case-more-card .btn--solid:hover {
  background: oklch(0.92 0.004 80);
  border-color: oklch(0.92 0.004 80);
}

/* ── DJY-more · MarketWatch · before/after side-by-side ──────────── */
/* No frame, no background — images sit directly on the page surface.
   Caption sits tight against the image (single explicit gap, no flex
   stretching, no inline-image whitespace). */
.case-mw-ba {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin: 22px 0 28px;
}
.case-mw-ba .case-fig {
  margin: 0;
  display: block;
  line-height: 0; /* strips the inline-block descender gap below the img */
}
.case-mw-ba-fig .case-img-wrap {
  position: static;
  width: 100%;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  display: block;
  margin: 0;
  padding: 0;
}
.case-mw-ba-fig .case-img-wrap picture {
  position: static;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}
.case-mw-ba-fig .case-img-wrap img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
}
.case-mw-ba .case-fig figcaption {
  margin-top: 8px;
  line-height: 1.4;
}

/* ── DJY-more · Auditoría de artículos · prose + infographic ───────
   Image shown in its natural full length on every viewport — sticky
   prose on the left follows the scroll along the tall image. */
.case-articles-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin: 22px 0 0;
}
.case-articles-grid .case-prose { max-width: none; }
/* Sticky prose — follows the scroll along the tall image on the right. */
.case-articles-prose-wrap {
  position: sticky;
  top: 24px;
  align-self: start;
}
.case-articles-fig {
  margin: 0;
  display: block;
  line-height: 0;
}
.case-articles-fig .case-img-wrap {
  position: static;
  width: 100%;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  display: block;
  margin: 0;
  padding: 0;
}
.case-articles-fig .case-img-wrap picture {
  position: static;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}
.case-articles-fig .case-img-wrap img {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}
.case-articles-fig figcaption {
  margin-top: 8px;
  line-height: 1.4;
}

/* ── DJY-more · Barron's IA · single illustrative gif ───────────────
   Capped at the 600px height used across DJY Pro. The gif is shown as
   a fit (object-fit: contain) — whitespace on the sides is fine, the
   full frame must remain visible. The wrap needs an explicit height
   (not just max-height) so the absolutely-positioned img has a sized
   parent for object-fit to engage. */
.case-barrons-fig {
  margin: 28px 0 0;
  display: block;
  line-height: 0;
}
.case-barrons-fig .case-img-wrap {
  position: relative;
  width: 100%;
  height: min(600px, 70vh);
  max-height: min(600px, 70vh);
  aspect-ratio: auto;
  border: 0;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  display: block;
  margin: 0;
  padding: 0;
}
.case-barrons-fig .case-img-wrap img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
}
.case-barrons-fig figcaption {
  margin-top: 8px;
  line-height: 1.4;
}

/* ── DJY-more · MarketWatch · prose + result strip side-by-side ──── */
.case-mw-text-result {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin: 8px 0 0;
}
.case-mw-text-result .case-prose { max-width: none; }
.case-mw-cta { margin-top: 18px; }

/* Sticky wrapper so the result strip follows the prose during scroll.
   Same interaction as the team-reviews panel in the DJY Pro case. */
.case-mw-result-wrap {
  position: sticky;
  top: 24px;
  align-self: start;
}
.case-mw-result-wrap .case-result-strip { margin: 0; }

/* Centered variant — −67% is the headline, everything else supports it. */
.case-result-strip--centered {
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 32px 24px;
}
.case-result-strip--centered .case-result-delta-big {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(64px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--teal);
}
.case-result-strip--centered .case-result-pair {
  justify-content: center;
}
.case-result-strip--centered .case-result-from { font-size: clamp(22px, 2.2vw, 28px); }
.case-result-strip--centered .case-result-to   { font-size: clamp(26px, 2.6vw, 32px); }
.case-result-strip--centered .case-result-arrow { font-size: 18px; }
.case-result-strip--centered .case-result-label {
  max-width: 30ch;
  margin: 0 auto;
}

.link-tertiary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-3);
  padding-bottom: 2px;
  transition: color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.link-tertiary:hover {
  color: var(--teal);
  border-color: var(--teal);
}
.link-tertiary span { transition: transform 200ms ease; display: inline-block; }
.link-tertiary:hover span { transform: translateX(3px); }

@media (max-width: 900px) {
  .case-mw-ba { grid-template-columns: 1fr; gap: 16px; }
  .case-mw-text-result { grid-template-columns: 1fr; gap: 20px; }
  .case-mw-result-wrap { position: static; top: auto; }
  .case-articles-grid { grid-template-columns: 1fr; gap: 24px; }
  .case-articles-prose-wrap { position: static; top: auto; }
  /* Barron's gif keeps its proportional cap on mobile. */
  .case-barrons-fig .case-img-wrap {
    height: min(420px, 60vh);
    max-height: min(420px, 60vh);
  }
}

/* ── DJY-more · result strip (the only teal moment on this page) ───── */
.case-result-strip {
  margin: 24px 0 8px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.case-result-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.case-result-from {
  font-size: clamp(32px, 3.8vw, 44px);
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.case-result-arrow {
  font-size: 22px;
  color: var(--ink-3);
}
.case-result-to {
  font-size: clamp(38px, 4.6vw, 52px);
  color: var(--ink);
}
.case-result-delta {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.01em;
  color: var(--teal);
}
.case-result-label {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* Brief / shorter section variant */
.case-section--brief {
  padding-top: 32px;
  padding-bottom: 32px;
}

@media (max-width: 900px) {
  .case-options { grid-template-columns: 1fr; }
  .case-ab { grid-template-columns: 1fr; }
  .case-ab-results { grid-template-columns: 1fr; }
  .case-typo-grid { grid-template-columns: 1fr; gap: 20px; }
  .case-benchmark-grid { grid-template-columns: 1fr; gap: 20px; }
  .case-scale-grid { grid-template-columns: 1fr; gap: 16px; }
  .case-scale-thumb { max-width: 100%; }
  /* Keep the "tamaños de módulos" image at the same visual size it has in the
     desktop two-column layout, even when the grid stacks. */
  .case-typo-grid .case-fig {
    max-width: 420px;
    margin: 0 auto;
  }
  .case-options--ab { grid-template-columns: 1fr; }
  .case-metrics { grid-template-columns: 1fr 1fr; }
  .case-metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-metric:nth-child(odd) { border-right: 1px solid var(--line); }
  .case-metric:nth-child(3), .case-metric:nth-child(4) { border-bottom: 0; }
  .case-japan-bg { grid-template-columns: repeat(3, 1fr); }
  .case-more-card { padding: 28px; }
  .case-result-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .case-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .case-hero-media picture,
  .case-hero-media img { max-width: 100%; }
  .case-context-grid { grid-template-columns: 1fr; gap: 24px; }
  .case-highlight { position: static; padding: 22px 24px; }
}

/* ── Mobile layout ── */
@media (max-width: 900px) {
  .hero-title { font-size: clamp(44px, 11vw, 72px); }
  .bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bento-card.is-featured { grid-row: auto; min-height: 240px; }
  .bento-card.is-wide { grid-column: span 1; }
  .bento-card { min-height: 200px; }
  /* Stacked layout (≤900px): card grows taller for breathing room, but
     the image sits close to the result line so it still leads the eye
     there — same visual cadence as desktop. */
  .bento-card.is-featured { min-height: 420px; }
  .bento-card.is-featured .preview picture {
    inset: auto 20px 118px auto;
    width: min(40%, 180px);
  }
  .bio { grid-template-columns: 1fr; }
  .bio-photo { max-height: 320px; max-width: 100%; }
  .bio-photo img { max-height: 320px; }
  .profile-grid { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:nth-child(3), .metric:nth-child(4) { border-bottom: 0; }
  .metric:nth-child(odd) { border-right: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .comunidad-grid { grid-template-columns: 1fr 1fr; }
  .app-shell.is-expanded .main-col { padding-right: 0; }

  /* ── Desborde as a bottom sheet on mobile ─────────────────────────── */
  .desborde-col {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: min(72vh, 640px);
    max-height: 86vh;
    border-left: 0;
    border-top: 1px solid oklch(1 0 0 / 0.08);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    box-shadow: 0 -16px 40px -12px oklch(0.16 0.005 80 / 0.45);
    transform: translateY(100%);
    transition: transform 520ms cubic-bezier(.16, 1, .3, 1);
    z-index: 50;
  }
  .app-shell.is-expanded .desborde-col { transform: translateY(0); }
  .app-shell:not(.is-expanded) .desborde-col { transform: translateY(100%); }

  /* Auto-opened (via IntersectionObserver) → discreet peek, max 1/3 of viewport.
     User can expand to full sheet by tapping the tab or any CTA. */
  .app-shell.is-auto-open .desborde-col {
    height: 33vh;
    min-height: 240px;          /* floor so very short viewports still fit content */
    max-height: 40vh;           /* a little headroom on tall screens */
    transition: transform 520ms cubic-bezier(.16, 1, .3, 1),
                height 360ms cubic-bezier(.16, 1, .3, 1);
  }
  /* Tighten paddings + reduce sizes in the small "peek" state */
  .app-shell.is-auto-open .desborde-content {
    padding: 22px 18px 16px;
  }
  .app-shell.is-auto-open .desborde-head {
    margin-bottom: 10px;
  }
  .app-shell.is-auto-open .desborde-review-count {
    margin-bottom: 8px;
  }
  .app-shell.is-auto-open .desborde-review-text {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  .app-shell.is-auto-open .desborde-review-who {
    font-size: 12px;
  }
  .app-shell.is-auto-open .desborde-foot {
    padding-top: 10px;
    margin-top: 10px;
  }
  .app-shell.is-auto-open .desborde-nav-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  /* VSL frame: cap height and let the body scroll if needed */
  .app-shell.is-auto-open .vsl-frame {
    margin-bottom: 0;
    min-height: 120px;
  }
  .app-shell.is-auto-open .vsl-frame .nineteen {
    max-height: none;
    padding: 12px;
  }
  .app-shell.is-auto-open .vsl-title { font-size: 14px; }
  .app-shell.is-auto-open .vsl-meta  { font-size: 12px; line-height: 1.4; }
  .app-shell.is-auto-open .vsl-corner { font-size: 12px; }

  /* drag-handle visual at the top of the sheet */
  .desborde-col::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: oklch(1 0 0 / 0.2);
    pointer-events: none;
    z-index: 2;
  }
  .desborde-content { padding-top: 28px; }

  /* Collapsed tab: horizontal pill at the bottom, not a vertical bar */
  .desborde-tab {
    top: auto;
    right: 16px;
    bottom: 16px;
    writing-mode: horizontal-tb;
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: 0 8px 24px -8px oklch(0.16 0.005 80 / 0.4);
    font-size: 12px;
  }
  .desborde-tab:hover { transform: translateY(-2px); }

  /* VSL frame in the sheet: cap the 9:16 height so it doesn't push CTAs off-screen */
  .vsl-frame .nineteen { max-height: 42vh; }

  .dn-grid { grid-template-columns: 1fr; }
  .dn-frame { width: 60%; margin: 0 auto; }
}

/* Narrow mobile — small image still bottom-right, close to the result
   line so the eye is led there. */
@media (max-width: 500px) {
  .bento-card.is-featured { min-height: 420px; }
  .bento-card.is-featured .preview picture {
    inset: auto 16px 120px auto;
    width: min(38%, 140px);
  }
}
