/* Cloudstudio · web 2027. Un cuaderno de ingeniería: papel cuadriculado, margen rojo, Instrument Serif,
   fosforito de Toni, boli rojo de Claude y los cursores con nombre de quien está trabajando en la página. */

/* ---------- fuentes (locales, latin) y sustitutas con las mismas medidas, para que nada salte ---------- */
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-grotesque.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif Fallback'; src: local('Georgia'); size-adjust: 76.15%; ascent-override: 130%; descent-override: 40.71%; line-gap-override: 0%; }
@font-face { font-family: 'Instrument Serif Fallback'; font-style: italic; src: local('Georgia Italic'), local('Georgia-Italic'); size-adjust: 79.78%; ascent-override: 124.1%; descent-override: 38.86%; line-gap-override: 0%; }
@font-face { font-family: 'Geist Fallback'; src: local('Arial'), local('ArialMT'); size-adjust: 103.83%; ascent-override: 96.8%; descent-override: 28.41%; line-gap-override: 0%; }

:root {
  --paper: #f5f1e8;
  --paper-1: #fffdf8;
  --paper-2: #ece6d8;
  --paper-3: #ddd5c3;
  --ink: #16203a;
  --ink-2: #4f5672;
  --night: #121a30;
  --bluepen: #2448c8;
  --redpen: #c4301a;
  --claude: #f28c66;
  --hl-1: #b9f36b;
  --hl-2: #ffe24a;
  --hl-3: #ffa3d6;
  --hl-4: #ffb05c;
  --hl-5: #8fd8ff;
  --sky: #8fd8ff;
  --mint: #7fe0b8;
  --serif: 'Instrument Serif', 'Instrument Serif Fallback', ui-serif, Georgia, serif;
  --sans: 'Geist', 'Geist Fallback', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --brand: 'Bricolage Grotesque', 'Geist', sans-serif;
  --grid: 28px;
  --gutter: clamp(56px, 10vw, 160px);
  --margin-x: clamp(28px, 6vw, 96px);
  --rule: color-mix(in oklab, var(--bluepen) 9%, transparent);
  --margin-line: color-mix(in oklab, var(--redpen) 45%, transparent);
  /* alias que usa el enjambre (swarm.js, de la academia) */
  --hue-sky: #6cc4ff; --hue-violet: #b9a2ff; --hue-mint: #5fe0a8; --hue-aqua: #49d8cf;
  --color-ink: var(--ink); --color-hl-1: var(--hl-1); --color-hl-2: var(--hl-2); --color-hl-3: var(--hl-3); --color-hl-4: var(--hl-4);
  --font-sans: var(--sans); --font-mono: var(--mono);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { overflow-x: clip; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; color: var(--ink); font: 400 18px/1.6 var(--sans);
  background-color: var(--paper);
  background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px), linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  -webkit-font-smoothing: antialiased; overflow-x: clip; position: relative;
}
p { text-wrap: pretty; }
:is(.pending b, .case-quote, .hand, .faq summary, .courses b, .badge-foot, .badge h3, .sh-head h1, .sh-block h3, .sh-problem h2, .sh-end h2, .sh-nav b, .contact-copy > p, .statement-sub, .service h3) { text-wrap: balance; }
/* margen rojo del cuaderno */
body::before { content: ""; position: fixed; top: 0; bottom: 0; left: var(--margin-x); width: 2px; background: var(--margin-line); pointer-events: none; z-index: 0; }
::selection { background: var(--hl-2); }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--bluepen); outline-offset: 3px; }
/* sobre la tinta, el foco en amarillo para que se vea (13:1) */
.live :focus-visible, .contact :focus-visible, .sh-under :focus-visible, .nav.on-dark :focus-visible { outline-color: var(--hl-2); }
main:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
main, .nav, .foot { position: relative; z-index: 1; }
section { padding: clamp(72px, 10vw, 140px) var(--gutter); position: relative; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper-1); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
.nowrap { white-space: nowrap; }

.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 22px; }
.h2 { font: 400 clamp(36px, 4.6vw, 64px)/1.02 var(--serif); letter-spacing: -.02em; margin: 0 0 22px; text-wrap: balance; }
.h2.big { font-size: clamp(44px, 6vw, 92px); max-width: 16ch; }
.huge { font: 400 clamp(64px, 11vw, 200px)/.9 var(--serif); letter-spacing: -.04em; margin: 0; text-wrap: balance; }
.serif-italic { font-style: italic; }
.muted { color: var(--ink-2); font-size: 15px; }

/* papel rayado con su margen, para las secciones claras: el cuaderno no se corta nunca */
.ruled {
  background-color: var(--paper-1);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, color-mix(in oklab, var(--bluepen) 11%, transparent) 27px 28px);
  border-block: 1px solid var(--paper-3);
}
.ruled::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--margin-x); width: 2px; background: var(--margin-line); }

/* ---------- menú ---------- */
.nav {
  position: sticky; top: 0; display: flex; align-items: center; gap: 24px;
  padding: 16px var(--gutter);
  background: color-mix(in oklab, var(--paper) 96%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-3); z-index: 40; transition: background-color .3s, color .3s, border-color .3s;
}
.brand { font: 700 22px/1 var(--brand); letter-spacing: -.03em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--redpen); }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { white-space: nowrap; }
.motion-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1.5px solid currentColor; border-radius: 50%; background: transparent; color: var(--ink-2); font: 600 10px/1 var(--mono); letter-spacing: -.1em; cursor: pointer; }
.motion-toggle .mt-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.motion-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper-1); border-color: var(--ink); }
.motion-toggle[aria-pressed="true"] .mt-icon::before { content: "▶"; letter-spacing: 0; }
.motion-toggle[aria-pressed="true"] .mt-icon { font-size: 0; }
.motion-toggle[aria-pressed="true"] .mt-icon::before { font-size: 10px; }
.nav.on-dark .motion-toggle { color: color-mix(in oklab, var(--paper-1) 75%, transparent); }
/* todo quieto: sin cursores, sin animaciones, todo hecho */
.calm .cursors { display: none; }
.calm *, .calm *::before, .calm *::after { animation: none !important; transition: none !important; }
.calm .hl { background-size: 100% 100%; }
.calm .pen path { stroke-dashoffset: 0; }
.calm .verdict.on .sign { clip-path: none; }
.calm .verdict.on .stamp { opacity: 1; }
.nav-toggle { display: none; order: 10; margin-left: auto; font: 600 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--paper-1); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 12px 16px; cursor: pointer; }
.presence { display: flex; align-items: center; margin-left: 8px; }
.presence .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid var(--paper); box-shadow: 0 0 0 1.5px var(--ink); display: grid; place-items: center; font: 700 12px/1 var(--sans); color: var(--ink); margin-left: -8px; }
.presence .dot.is-new { animation: dot-in .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes dot-in { from { transform: scale(0); } }
.presence small { font: 500 12px/1 var(--mono); color: var(--ink-2); margin-left: 10px; letter-spacing: .04em; white-space: nowrap; }
.lang { font: 600 12px/1 var(--mono); letter-spacing: .08em; text-decoration: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 9px 11px; }
.lang:hover { background: var(--hl-2); }
/* sobre las secciones de tinta, el menú se pone de noche */
.nav.on-dark { background: color-mix(in oklab, var(--night) 92%, transparent); color: var(--paper-1); border-color: #263257; }
.nav.on-dark .nav-links a { color: color-mix(in oklab, var(--paper-1) 72%, transparent); }
.nav.on-dark .nav-links a:hover { color: var(--paper-1); }
.nav.on-dark .presence small { color: color-mix(in oklab, var(--paper-1) 70%, transparent); }
.nav.on-dark .presence .dot { border-color: var(--night); box-shadow: 0 0 0 1.5px var(--paper-1); }
.nav.on-dark .lang, .nav.on-dark .nav-toggle { border-color: var(--paper-1); color: var(--paper-1); background: transparent; }
.nav.on-dark .lang:hover { color: var(--ink); }
.nav.on-dark .btn-ink { background: var(--paper-1); color: var(--ink); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: 11px 18px; border-radius: 999px; font: 500 15px/1.1 var(--sans); text-decoration: none; transition: transform .15s, box-shadow .15s; border: 0; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 16px 24px; font-size: 16px; }
.btn-ink { background: var(--ink); color: var(--paper-1); box-shadow: 3px 3px 0 var(--redpen); }
.btn-ink:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--redpen); }
.btn-ghost { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.btn-paper { background: var(--paper-1); color: var(--ink); box-shadow: 3px 3px 0 var(--hl-2); }
.btn-claude { background: var(--claude); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-line { background: transparent; color: inherit; border: 1.5px solid currentColor; }
button.btn { font-family: var(--sans); }

/* ---------- portada ---------- */
.hero { min-height: clamp(560px, calc(100svh - 76px), 1100px); display: flex; flex-direction: column; justify-content: center; padding-top: 40px; padding-bottom: 64px; }
.hero-title { font: 400 clamp(54px, 7.7vw, 150px)/.94 var(--serif); letter-spacing: -.035em; margin: 0; max-width: 6.6em; text-wrap: balance; }
.hero-foot { display: grid; grid-template-columns: minmax(0, 29em) auto; justify-content: space-between; align-items: end; gap: 32px 64px; margin-top: 40px; }
.lede { font-size: 20px; color: var(--ink-2); margin: 0 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.pending { display: grid; gap: 6px; max-width: 300px; padding: 16px 18px 16px 20px; background: var(--paper-1); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--mint); text-decoration: none; transform: rotate(1.5deg); transition: transform .2s; }
.pending:hover { transform: rotate(0) translateY(-2px); }
.pending-top { font: 500 12px/1.2 var(--mono); color: var(--ink-2); }
.pending-top i { font-style: normal; color: #1f9d6b; animation: pulse 1.6s ease-in-out infinite; }
.pending b { font: 400 24px/1.1 var(--serif); }
.pending-go { font: 500 13px/1.2 var(--mono); color: var(--redpen); }
@keyframes pulse { 50% { opacity: .3; } }

/* fosforito que se pasa al entrar en pantalla */
.hl {
  background-image: linear-gradient(transparent 22%, color-mix(in oklab, var(--hl) 80%, transparent) 22%, color-mix(in oklab, var(--hl) 80%, transparent) 92%, transparent 92%);
  background-size: 0% 100%; background-repeat: no-repeat; padding: 0 .08em; margin: 0 -.04em; white-space: nowrap;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 1.1s cubic-bezier(.7,0,.2,1);
}
.hl.on { background-size: 100% 100%; }

/* boli rojo: rodea o subraya. Sin non-scaling-stroke: con pathLength, Chromium partía el trazo */
.ring, .under { position: relative; display: inline-block; white-space: nowrap; }
.pen { position: absolute; pointer-events: none; overflow: visible; }
.pen path { fill: none; stroke: var(--redpen); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.2s cubic-bezier(.6,0,.3,1); }
.pen.on path { stroke-dashoffset: 0; }
.ring .pen { left: -6%; top: -2%; width: 113%; height: 112%; }
.pen-under { left: -2%; bottom: -.12em; width: 104%; height: .35em; }
.pen-under path { stroke-width: 2.2; }
.note-arrow path { stroke-width: 2.6; }

/* notas al margen, a mano */
.margin-note { position: absolute; max-width: 260px; font: italic 400 24px/1.15 var(--serif); color: var(--redpen); transform: rotate(-3deg); margin: 0; }
#note-hero { right: clamp(32px, 6vw, 120px); top: 21%; max-width: 10.5em; font-size: 34px; transform: rotate(-4deg); }
.note-arrow { position: static; display: block; width: 120px; height: 90px; margin: 10px 0 0 40px; }
.typed::after { content: "▍"; color: var(--redpen); opacity: 0; }
.typed.typing::after { opacity: 1; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- en directo ---------- */
.live { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: center; background: var(--night); color: var(--paper-1); }
.live .eyebrow { color: color-mix(in oklab, var(--paper-1) 62%, transparent); }
.live .muted { color: color-mix(in oklab, var(--paper-1) 62%, transparent); }
.terminal { position: relative; border-radius: 14px; background: #0b1124; border: 1px solid #263257; box-shadow: 0 30px 80px -30px #000, 8px 8px 0 var(--claude); overflow: hidden; color: #d9def0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid #263257; font: 12px var(--mono); color: #9aa3c4; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #39446d; display: inline-block; }
.term-bar i:first-child { background: var(--redpen); } .term-bar i:nth-child(2) { background: var(--hl-2); } .term-bar i:nth-child(3) { background: var(--hl-1); }
.term-bar span { margin-left: 10px; }
.term { margin: 0; padding: 22px 22px 18px; min-height: 300px; font: clamp(12.5px, 1.05vw, 15px)/1.75 var(--mono); color: #d9def0; white-space: pre-wrap; contain: content; }
.term > span { display: inline-block; padding-left: 2ch; text-indent: -2ch; }
.term .k { color: var(--claude); } .term .ok { color: var(--hl-1); } .term .warn { color: var(--hl-2); } .term .dim { color: #8f99bd; } .term .who { color: var(--sky); }
.approve { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 22px 22px; padding: 14px 16px; border-radius: 12px; background: #16203f; border: 1px dashed var(--claude); animation: rise .35s cubic-bezier(.2,.8,.2,1); }
.approve[hidden] { display: none; }
.approve p { flex: 1 1 100%; margin: 0; font-size: 15px; color: #d9def0; }
.approve b { color: var(--claude); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
/* el premio de aprobar: la firma de Jorge y el sello con lo que costó, en su fila, sin pisar el registro */
.term-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin: 0 22px 22px; min-height: 0; }
.term-foot .term-again { margin: 0; }
.verdict { display: flex; align-items: center; gap: 16px; margin-left: auto; pointer-events: none; }
.verdict .sign { font: italic 400 42px/1 var(--serif); color: #ff8f78; clip-path: inset(0 100% 0 0); }
.verdict .stamp { white-space: nowrap; font: 700 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--hl-1); border: 2.5px solid currentColor; padding: 8px 11px; border-radius: 5px; transform: rotate(-6deg); opacity: 0; background: #0b1124; }
.verdict.is-no .stamp { color: var(--hl-2); }
.verdict.on .sign { animation: sign 1.1s cubic-bezier(.6,0,.3,1) forwards; }
.verdict.on .stamp { animation: stamp .4s .9s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.verdict.is-no .sign { display: none; }
.verdict.is-no.on .stamp { animation-delay: .1s; }
@keyframes sign { to { clip-path: inset(0 0 0 0); } }
@keyframes stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.8); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }

/* ---------- qué hacemos ---------- */
.work .h2.big { max-width: 20ch; }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 56px; }
.service {
  position: relative; display: flex; flex-direction: column; padding: 30px 28px 28px; border-radius: 4px;
  background: var(--paper-1) repeating-linear-gradient(transparent 0 27px, color-mix(in oklab, var(--bluepen) 14%, transparent) 27px 28px);
  border: 1px solid var(--paper-3); border-top: 3px solid var(--redpen); box-shadow: 0 18px 40px -30px rgb(22 32 58 / .45);
}
.service .num { position: relative; align-self: flex-start; font: italic 400 60px/1 var(--serif); color: var(--bluepen); margin: 0 0 18px; padding: 4px 10px; }
.pen-num { left: -8%; top: -6%; width: 116%; height: 112%; }
.pen-num path { stroke-width: 2.4; }
.service h3 { font: 600 22px/1.2 var(--brand); letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance; min-height: 2.4em; }
.service p { margin: 0 0 14px; color: var(--ink-2); font-size: 16px; }
.service ul { list-style: none; padding: 0; margin: 0 0 22px; font: 14px/2 var(--mono); }
.service li::before { content: "→ "; color: var(--redpen); }
.service .when, .service .num { justify-self: start; }
.service .when { margin: auto 0 0; align-self: flex-start; font: 600 12px/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--redpen); border: 2px solid var(--redpen); border-radius: 4px; padding: 7px 10px; transform: rotate(-3deg); background: color-mix(in oklab, var(--paper-1) 80%, transparent); }

/* ---------- cómo ---------- */
.how { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.how-head { position: sticky; top: 120px; }
.how .h2.big { font-size: clamp(40px, 4.6vw, 72px); max-width: 12ch; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; position: relative; }
.steps li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding-bottom: 44px; }
.steps li:last-child { padding-bottom: 0; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 31px; top: 66px; bottom: 6px; border-left: 2px dashed var(--redpen); opacity: .6; }
.step-n { width: 64px; height: 64px; border: 2px solid var(--ink); border-radius: 50% 46% 52% 48%; display: grid; place-items: center; font: italic 400 34px/1 var(--serif); background: var(--paper-1); }
.steps .step-when { font: 500 12px/1.4 var(--mono); max-width: none; letter-spacing: .08em; text-transform: uppercase; color: var(--redpen); margin: 4px 0 6px; }
.steps h3 { font: 600 22px/1.2 var(--brand); margin: 0 0 8px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 17px; max-width: 46ch; }

/* ---------- afirmación ---------- */
.statement { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 64px; align-items: center; padding-block: clamp(96px, 13vw, 200px); }
.statement .huge { font-size: clamp(60px, 7.9vw, 150px); }
.statement-copy { position: relative; } /* gl.js pinta la frase empapándose dentro de este bloque */
.statement-sub { max-width: 44ch; font-size: 20px; color: var(--ink-2); margin: 36px 0 0; }
.report { position: relative; margin: 0; padding: 30px 26px 22px; background: var(--paper-1); border: 1px solid var(--paper-3); box-shadow: 0 30px 60px -36px rgb(22 32 58 / .55); transform: rotate(2deg); font: 14px/1.5 var(--mono); }
.report::before { content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(-3deg); background: color-mix(in oklab, var(--hl-5) 60%, transparent); }
.report-top { margin: 0 0 16px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.report dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0 0 16px; padding-bottom: 16px; border-bottom: 1.5px dashed var(--paper-3); }
.report dt { color: var(--ink-2); }
.report dd { margin: 0; text-align: right; font-weight: 600; }
.report dd.ok { color: #1f8a5c; }
.report-cost { display: flex; justify-content: space-between; align-items: baseline; margin: 0; }
.report-cost span { color: var(--ink-2); }
.report-cost b { white-space: nowrap; font: 400 44px/1 var(--serif); background: linear-gradient(transparent 55%, color-mix(in oklab, var(--hl-2) 80%, transparent) 55%); }

/* ---------- casos ---------- */
.case-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(56px, 7vw, 110px); }
.case-row.flip { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.case-row.flip .photo { order: 2; }
.photo { margin: 0; position: relative; background: var(--paper-1); padding: 12px 12px 48px; border: 1px solid var(--paper-3); box-shadow: 0 24px 50px -28px rgb(22 32 58 / .45); transform: rotate(var(--r, 0deg)); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.photo:hover { transform: rotate(0deg) scale(1.015); }
.photo-link { display: block; cursor: zoom-in; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.photo figcaption { position: absolute; left: 14px; bottom: 14px; font: italic 400 22px/1 var(--serif); color: var(--ink-2); }
.photo::before, .photo::after { content: ""; position: absolute; width: 96px; height: 26px; background: color-mix(in oklab, var(--hl-2) 55%, transparent); top: -12px; transform: rotate(-6deg); z-index: 1; }
.photo::before { left: 18%; } .photo::after { right: 14%; transform: rotate(5deg); background: color-mix(in oklab, var(--hl-3) 50%, transparent); }
.case-tag { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.case-body h3 { font: 400 clamp(48px, 5vw, 76px)/1 var(--serif); margin: 8px 0 14px; letter-spacing: -.02em; }
.case-body > .case-quote { font: italic 400 clamp(24px, 2.2vw, 32px)/1.2 var(--serif); color: var(--bluepen); margin: 0 0 16px; }
.case-body > .case-text { color: var(--ink-2); margin: 0 0 22px; }
.metrics { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 30px; }
.metrics li { font: 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.metrics b { display: block; margin-bottom: 4px; font: 400 clamp(34px, 3.2vw, 46px)/1 var(--serif); letter-spacing: -.01em; text-transform: none; color: var(--ink); background: linear-gradient(transparent 58%, color-mix(in oklab, var(--hl-2) 80%, transparent) 58%); justify-self: start; width: fit-content; }
.case-body > .hand { font: italic 400 26px/1.15 var(--serif); color: var(--redpen); transform: rotate(-2deg); margin: 0 0 24px; }
.also { position: relative; margin-top: clamp(80px, 9vw, 130px); }
.also { padding-top: 24px; }
.also-note { right: 0; top: -72px; max-width: 12em; transform: rotate(3deg); }
.also-note .note-arrow { margin: 6px 0 0 120px; width: 90px; height: 70px; }
.also-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.also-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--paper-1); border: 1px solid var(--paper-3); border-radius: 6px; padding: 10px 10px 18px; transition: transform .2s, box-shadow .2s; }
.also-card:hover { transform: translateY(-3px) rotate(-.5deg); box-shadow: 0 20px 40px -28px rgb(22 32 58 / .5); }
.also-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; margin-bottom: 8px; }
.also-card[data-case="firevalle"] img { object-position: center 70%; }
.also-card b { font: 400 28px/1 var(--serif); padding: 0 6px; }
.also-card span { color: var(--ink-2); font-size: 15px; padding: 0 6px; }

/* ---------- la plantilla ---------- */
.staff-lede { color: var(--ink-2); max-width: 56ch; margin: 0 0 52px; }
.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.badge { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px; padding: 24px 20px 20px; box-shadow: 5px 5px 0 var(--ink); }
.badge::before { content: ""; position: absolute; top: -10px; left: 50%; width: 46px; height: 14px; margin-left: -23px; border-radius: 8px; background: var(--hl); border: 1.5px solid var(--ink); }
.badge-face { position: absolute; top: 18px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in oklab, var(--hl) 45%, var(--paper-1)); border: 1.5px solid var(--ink); display: grid; place-items: center; }
.badge-face svg { width: 18px; height: 18px; transform: translate(1px, 1px); }
.badge-face svg path { fill: var(--hl); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.badge-face i { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-size: 14px; color: var(--claude); animation: spin 3s linear infinite; }
.badge-top { font: 500 11.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 52px 16px 0; white-space: nowrap; }
.badge h3 { font: 400 30px/1.02 var(--serif); margin: 0 0 18px; min-height: 2.04em; text-wrap: balance; }
.badge dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0 0 14px; font: 13px var(--mono); }
.badge dt { color: var(--ink-2); }
.badge dd { margin: 0; text-align: right; font-weight: 600; }
.badge .cost { display: grid; margin: 0 0 16px; padding-top: 14px; border-top: 1.5px dashed var(--paper-3); }
.badge .cost span { font: 500 11.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.badge .cost b { font: 400 52px/1.05 var(--serif); letter-spacing: -.02em; width: fit-content; background: linear-gradient(transparent 58%, color-mix(in oklab, var(--hl) 85%, transparent) 58%); }
.badge-foot { margin: auto 0 0; font: italic 400 19px/1.2 var(--serif); color: var(--bluepen); }
.payroll { margin: 52px 0 0; font: 400 clamp(28px, 3vw, 42px)/1.2 var(--serif); }

/* ---------- academia ---------- */
.academy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.academy .h2.big { font-size: clamp(40px, 4.4vw, 68px); max-width: 15ch; }
.academy-copy p { color: var(--ink-2); max-width: 46ch; margin: 0 0 26px; }
.courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.courses a { display: grid; grid-template-columns: 86px 1fr auto; align-items: baseline; gap: 16px; padding: 18px 20px; background: var(--paper-1); border: 1px solid var(--paper-3); border-radius: 4px; box-shadow: inset 6px 0 0 var(--hl); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.courses a:hover { transform: translateX(6px); box-shadow: inset 6px 0 0 var(--hl), 0 14px 30px -24px rgb(22 32 58 / .6); }
.courses span { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.courses b { font: 400 26px/1.1 var(--serif); }
.courses i { font-style: normal; color: var(--redpen); font-family: var(--mono); }

/* ---------- preguntas ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 64px; align-items: start; padding-block: clamp(72px, 8vw, 110px); }
.faq .h2 { position: sticky; top: 120px; }
.faq details { border-top: 1px solid var(--paper-3); padding: 22px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--paper-3); }
.faq summary { font: 400 30px/1.2 var(--serif); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; padding-block: 4px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--redpen); }
.faq summary::after { content: "+"; flex: none; font: 400 30px/1 var(--mono); color: var(--redpen); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); max-width: 34em; margin: 14px 0 0; }

/* ---------- contacto ---------- */
.contact { background: var(--ink); color: var(--paper-1); }
.contact .huge { color: var(--paper-1); font-size: clamp(56px, 7.4vw, 128px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-copy > p { color: color-mix(in oklab, var(--paper-1) 75%, transparent); margin: 28px 0 32px; }
.mailbox { box-shadow: 0 30px 80px -30px #000, 8px 8px 0 var(--hl-2); }
.mailbox .term { min-height: 0; }
.mailbox .term:empty { min-height: 140px; }
.mailbox .term-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailbox .approve[hidden] { display: none; }
.approve.is-static { animation: none; }
.term-again[hidden] { display: none; }
.contact-copy .contact-mail { margin: 22px 0 0; font: 14px var(--mono); color: color-mix(in oklab, var(--paper-1) 75%, transparent); }
.contact-mail a { color: var(--paper-1); text-decoration-color: var(--hl-2); text-underline-offset: 4px; }
.contact-side { position: relative; padding-top: 36px; }
.polaroid { position: absolute; z-index: 2; right: -12px; top: -40px; width: clamp(190px, 15vw, 210px); pointer-events: none; margin: 0; padding: 10px 10px 42px; background: var(--paper-1); box-shadow: 0 20px 40px -18px rgb(0 0 0 / .6); transform: rotate(5deg); }
.polaroid::before { content: ""; position: absolute; top: -12px; left: 50%; width: 80px; height: 24px; transform: translateX(-50%) rotate(-4deg); background: color-mix(in oklab, var(--hl-3) 65%, transparent); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.polaroid figcaption { position: absolute; left: 12px; right: 8px; bottom: 10px; font: italic 400 18px/1 var(--serif); color: var(--redpen); white-space: nowrap; }
@media (min-width: 981px) { .polaroid { top: 0; } .contact-side { padding-top: 200px; } } /* la polaroid solo pisa la esquina de la nota, nunca un campo */
.note-form {
  position: relative; color: var(--ink); padding: 40px clamp(22px, 3vw, 36px) 32px clamp(48px, 5vw, 64px);
  background-color: var(--paper-1);
  background-image:
    linear-gradient(to right, transparent calc(clamp(48px, 5vw, 64px) - 14px), var(--margin-line) 0, var(--margin-line) calc(clamp(48px, 5vw, 64px) - 12px), transparent 0),
    repeating-linear-gradient(to bottom, transparent 0 31px, color-mix(in oklab, var(--bluepen) 16%, transparent) 31px 32px);
  box-shadow: 0 30px 60px rgb(0 0 0 / .35); transform: rotate(-1deg); border-radius: 3px;
}
.note-form::before { content: ""; position: absolute; top: -14px; left: 30%; width: 120px; height: 28px; transform: translateX(-50%) rotate(2deg); background: color-mix(in oklab, var(--hl-2) 70%, transparent); box-shadow: 0 1px 2px rgb(0 0 0 / .15); }
.note-form-top { font: italic 400 32px/1.1 var(--serif); margin: 0 0 18px; max-width: 60%; }
.note-form label { display: block; font: 500 11.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 18px; }
.note-form input, .note-form select, .note-form textarea { display: block; margin-top: 4px; width: 100%; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: 400 17px/1.4 var(--sans); letter-spacing: 0; text-transform: none; padding: 8px 2px; min-height: 44px; transition: background-color .15s, border-color .15s; }
.note-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.note-form textarea { resize: vertical; min-height: 96px; }
.note-form :is(input, select, textarea):focus { outline: none; border-bottom-color: var(--bluepen); background-color: color-mix(in oklab, var(--hl-5) 28%, transparent); }
.note-form :is(input, select, textarea):focus-visible { outline: 2px solid var(--bluepen); outline-offset: 2px; }
.note-form ::placeholder { color: #6b7190; }
.note-form [hidden] { display: none !important; }
.note-form .hp { position: absolute; left: -5000px; width: 1px; height: 1px; opacity: 0; }
.nf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; align-items: end; }
.note-form .opt { text-transform: none; letter-spacing: 0; color: #6b7190; }
.nf-msg { margin: 0 0 14px; font-size: 15px; }
.nf-msg:empty { margin: 0; }
.nf-msg.err { color: var(--redpen); font-weight: 500; }
.note-form.sent .nf-msg { font: italic 400 30px/1.2 var(--serif); margin: 8px 0 44px; outline: none; }
@media (min-width: 641px) { .note-form.sent .nf-msg { max-width: 60%; } } /* la polaroid de Toni no lo tapa */
.note-form button[disabled] { opacity: .6; cursor: progress; }
.note-form.sent::after { content: attr(data-stamp); position: absolute; right: clamp(18px, 3vw, 32px); bottom: 22px; font: 600 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--redpen); border: 2px solid var(--redpen); padding: 7px 10px; border-radius: 4px; transform: rotate(-8deg); animation: stamp-in .35s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp-in { from { opacity: 0; transform: rotate(-8deg) scale(1.8); } }

/* ---------- pie: el recibo de la visita ---------- */
.foot { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 40px 64px; align-items: end; padding: 72px var(--gutter) 56px; font: 14px/1.6 var(--mono); color: var(--ink-2); }
.foot a { color: var(--ink); }
.foot .mbar { color: var(--paper-1); }
.foot .brand { color: var(--ink); font-size: 26px; }
.foot-info p { margin: 6px 0 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { display: inline-block; padding: 10px 0; }
.receipt { position: relative; background: var(--paper-1); padding: 22px 22px 30px; box-shadow: 0 18px 40px -24px rgb(22 32 58 / .45); font: 13px/1.55 var(--mono); color: var(--ink); --zz: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zz)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zz)) 100%; }
.receipt-top { margin: 0 0 12px; text-align: center; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; color: var(--ink-2); border-bottom: 1.5px dashed var(--paper-3); padding-bottom: 10px; }
.receipt-lines { list-style: none; margin: 0; padding: 0; min-height: 4.6em; }
.receipt-lines li { display: flex; justify-content: space-between; gap: 12px; animation: print .3s ease both; }
.receipt-lines li span:last-child { white-space: nowrap; }
@keyframes print { from { opacity: 0; transform: translateY(-4px); } }
.receipt-total { display: flex; justify-content: space-between; margin: 12px 0 8px; padding-top: 10px; border-top: 1.5px dashed var(--paper-3); font-weight: 700; }
.receipt-foot { margin: 0; font-size: 12px; color: var(--ink-2); }

/* ---------- barra de reserva en móvil ---------- */
.mbar { display: none; }

/* ---------- cursores con nombre ---------- */
.cursors { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: clip; }
.rc.idle .pill { opacity: 0; transform: scale(.85); }
.rc .pill { transition: opacity .25s, transform .25s; }
.rc { position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; gap: 2px; will-change: transform; opacity: 0; transition: opacity .4s; }
.rc.on { opacity: 1; }
.rc svg { width: 22px; height: 22px; flex: none; }
.rc svg path { fill: var(--c); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.rc .pill { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: var(--c); border: 1.5px solid var(--ink); font: 600 12.5px/1 var(--sans); color: var(--ink); white-space: nowrap; box-shadow: 2px 2px 0 var(--ink); }
.rc .pill i { font-style: normal; display: inline-block; animation: spin 2.4s linear infinite; }
.rc .tool { font: 500 11.5px/1 var(--mono); background: var(--paper-1); padding: 3px 6px; border-radius: 999px; }
.rc.click svg { transform: scale(.85); transition: transform .12s; }
/* cerca del borde derecho, la pastilla va a la izquierda de la flecha */
.rc.flip { flex-direction: row-reverse; }
.rc.flip svg { transform: scaleX(-1); }
.rc.flip .pill { margin-right: -6px; }
.rc.is-you { position: fixed; transition: opacity .4s; }
.rc.is-you svg { visibility: hidden; }
.rc.is-you .pill { margin: 18px 0 0 -2px; }
/* la nota al margen no se ve escrita antes de que Claude la escriba */
.js .margin-note .typed:not(.go) { visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hoja del caso ---------- */
body.sheet-open { overflow: hidden; }
.case-sheet { position: fixed; inset: 0; z-index: 60; background-color: var(--paper); background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px), linear-gradient(to bottom, var(--rule) 1px, transparent 1px); background-size: var(--grid) var(--grid); display: flex; flex-direction: column; }
.case-sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--margin-x); width: 2px; background: var(--margin-line); pointer-events: none; z-index: 0; }
.case-sheet[hidden] { display: none; }
.case-sheet.in { animation: sheet-in .72s cubic-bezier(.65, 0, .35, 1); }
.case-sheet.out { animation: sheet-out .35s ease forwards; }
@keyframes sheet-in { from { clip-path: inset(var(--from, 40% 30% 40% 30%) round 18px); } to { clip-path: inset(0 0 0 0 round 0); } }
@keyframes sheet-out { to { opacity: 0; transform: scale(.98); } }
.sheet-tools { display: flex; align-items: center; gap: 12px; }
.sheet-content.fade-in { animation: sheet-fade .3s ease both; }
@keyframes sheet-fade { from { opacity: 0; transform: translateY(8px); } }
.sheet-bar { position: relative; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter); border-bottom: 1px solid var(--paper-3); background: color-mix(in oklab, var(--paper) 94%, transparent); font: 13px var(--mono); }
.sheet-status .sp { font-style: normal; color: var(--redpen); display: inline-block; animation: spin 2.4s linear infinite; }
.case-sheet.built .sheet-status .sp { animation: none; }
#sheet-close { flex: none; white-space: nowrap; }
.sheet-scroll:focus-visible { outline: 3px solid var(--bluepen); outline-offset: -3px; }
.sheet-scroll { position: relative; z-index: 1; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.sheet-content { max-width: none; padding: clamp(40px, 6vw, 90px) var(--gutter) 120px; display: grid; gap: clamp(56px, 7vw, 104px); }
.sheet-content > section { padding: 0; }
.sh-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: end; }
.sh-head .eyebrow { font-size: 12px; margin: 0 0 18px; color: var(--ink-2); }
.sh-head h1 { font: 400 clamp(72px, 11vw, 180px)/.86 var(--serif); letter-spacing: -.04em; margin: 0 0 .2em; }
.sh-lede { font-size: 20px; color: var(--ink-2); margin: 0; max-width: 48ch; }
.sh-facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; padding: 22px; background: var(--paper-1); border: 1px solid var(--paper-3); border-radius: 4px; font: 13.5px/1.5 var(--mono); }
.sh-facts dt { color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; padding-top: 2px; }
.sh-facts dd { margin: 0; }
.sh-hero { margin: 0; background: var(--paper-1); padding: 14px; border: 1px solid var(--paper-3); box-shadow: 0 30px 70px -36px rgb(22 32 58 / .5); }
.sh-hero img { width: 100%; height: auto; display: block; }
.sh-hero img[src$="/agents.webp"] { max-width: 1280px; margin-inline: auto; } /* sin versión 2x todavía */
.sh-problem { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; }
.sh-problem h2 { font: 400 clamp(44px, 5.4vw, 80px)/.98 var(--serif); margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.sh-problem p { font-size: 19px; color: var(--ink-2); margin: 0; }
.sh-blocks { display: grid; gap: clamp(48px, 6vw, 88px); }
.sh-block { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.sh-block:nth-child(even) .sh-shot { order: 2; }
.sh-shot { margin: 0; background: var(--paper-1); padding: 10px; border: 1px solid var(--paper-3); box-shadow: 0 24px 50px -30px rgb(22 32 58 / .5); transform: rotate(var(--r, -.6deg)); }
.sh-block:nth-child(even) .sh-shot { --r: .6deg; }
.sh-shot img { display: block; width: 100%; height: auto; }
.sh-block h3 { font: 400 clamp(32px, 3vw, 44px)/1.05 var(--serif); margin: 0 0 14px; text-wrap: balance; }
.sh-block p { margin: 0; color: var(--ink-2); font-size: 17px; }
.sh-blocks.text-only { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.sh-blocks.text-only .sh-block { display: block; background: var(--paper-1); border: 1px solid var(--paper-3); border-radius: 4px; padding: 28px; }
.sheet-content > section.sh-under { background: var(--night); color: var(--paper-1); border-radius: 6px; padding: clamp(28px, 4vw, 48px); }
.sh-under .eyebrow { color: color-mix(in oklab, var(--paper-1) 62%, transparent); }
.sh-under h2 { font: 400 clamp(36px, 4vw, 56px)/1 var(--serif); margin: 0 0 28px; }
.sh-under-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sh-under-grid h3 { font: 600 17px/1.2 var(--brand); margin: 0 0 8px; color: var(--claude); }
.sh-under-grid p { margin: 0; font-size: 15px; color: color-mix(in oklab, var(--paper-1) 78%, transparent); }
.sh-end { text-align: center; }
.sh-end h2 { font: 400 clamp(56px, 8vw, 120px)/.92 var(--serif); margin: 0 0 28px; letter-spacing: -.03em; text-wrap: balance; }
.sh-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1.5px dashed var(--paper-3); text-align: left; }
.sh-nav a { display: grid; gap: 4px; text-decoration: none; max-width: 48%; }
.sh-nav a:last-child { text-align: right; margin-left: auto; }
.sh-nav small { font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sh-nav b { font: 400 clamp(28px, 3vw, 40px)/1.05 var(--serif); }
.sh-nav a:hover b { text-decoration: underline; text-decoration-color: var(--redpen); text-underline-offset: 6px; }

/* ---------- enjambre (de la academia) ---------- */
.sw-ag .cursor { --c: var(--hue-sky); position: relative; display: inline-flex; align-items: flex-start; font-size: 12px; line-height: 1; pointer-events: none; }
.sw-ag .cursor.is-claude { --c: var(--claude); }
.sw-ag .cursor-arrow { flex: none; width: 2.1em; height: 2.1em; overflow: visible; transform-origin: 12.5% 12.5%; transition: transform 90ms ease; }
.sw-ag .cursor-arrow path { fill: var(--c); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; paint-order: stroke fill; }
.sw-ag .cursor-pill { display: inline-flex; align-items: center; gap: .4em; margin: 1.3em 0 0 -.78em; padding: .34em .7em .36em; border-radius: 999px; background: var(--c); color: var(--ink); font: 600 1em/1 var(--sans); white-space: nowrap; box-shadow: inset 0 0 0 1px rgb(22 32 58 / .25), 0 6px 14px -8px rgb(22 32 58 / .5); }
.sw-ag .cursor-pill .tool { font: 500 .92em/1 var(--mono); opacity: .8; }
.sw-ag .cursor.is-down .cursor-arrow { transform: scale(.82); }
.sw-pending { opacity: 0 !important; }
/* invisibles pero en el árbol de accesibilidad: el lector no encuentra la hoja vacía mientras se construye */
.sw-wait, .sw-later { opacity: 0 !important; pointer-events: none; }
.sw-reach { visibility: visible !important; opacity: 0 !important; }
.sw-on { visibility: visible !important; }
.sw-tk { opacity: 0; }
.sw-tk.on { opacity: 1; animation: sw-tk .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes sw-tk { from { opacity: 0; filter: blur(3px); } }
.sw-layer { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 80; pointer-events: none; overflow-x: clip; }
.sw-ag.is-flip .cursor { flex-direction: row-reverse; }
.sw-ag.is-flip .cursor-arrow { transform: scaleX(-1); }
.sw-ag.is-flip .cursor-pill { margin: 1.3em -.78em 0 0; }
.sw-ag { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity .3s ease; }
.sw-ag .cursor-arrow { animation: sw-pop .5s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.sw-ag .cursor-pill { transition: opacity .25s ease, transform .25s ease; }
.sw-ag .cursor-pill .sp { display: inline-block; width: 1.1em; text-align: center; }
.sw-ag.is-sub .cursor { font-size: 10.5px; }
.sw-ag.is-idle .cursor-pill { opacity: 0; transform: scale(.85); }
.sw-ag.is-idle .tool { visibility: hidden; }
.sw-ag.is-gone { opacity: 0; }
@keyframes sw-pop { from { transform: scale(0); } }
.sw-mq { --mq: color-mix(in oklab, var(--c) 70%, #16203a); position: absolute; box-sizing: border-box; border: 1.5px solid var(--mq); background: color-mix(in oklab, var(--c) 14%, transparent); border-radius: 2px; transition: opacity .35s ease; }
.sw-mq i { position: absolute; width: 7px; height: 7px; box-sizing: border-box; border: 1.5px solid var(--mq); border-radius: 1.5px; background: #fff; }
.sw-mq i:nth-child(1) { left: -4px; top: -4px; } .sw-mq i:nth-child(2) { right: -4px; top: -4px; }
.sw-mq i:nth-child(3) { right: -4px; bottom: -4px; } .sw-mq i:nth-child(4) { left: -4px; bottom: -4px; }
.sw-tb { position: absolute; box-sizing: border-box; border: 1px dashed color-mix(in oklab, var(--c) 70%, #16203a); border-radius: 4px; transition: opacity .45s ease; }
.sw-mq.is-out, .sw-tb.is-out { opacity: 0; }

/* ---------- página de cookies ---------- */
.legal { max-width: 60em; }
.legal .huge { font-size: clamp(56px, 9vw, 140px); }
.legal-lede { font: 400 clamp(24px, 2.4vw, 32px)/1.3 var(--serif); margin: 28px 0 48px; max-width: 30em; }
.legal-blocks { display: grid; gap: 28px; margin-bottom: 40px; }
.legal-block { padding: 0; }
.legal-block h2 { font: 600 20px/1.2 var(--brand); margin: 0 0 8px; }
.legal-block p { margin: 0; color: var(--ink-2); max-width: 40em; }
.legal-block code { font: 14px var(--mono); background: var(--paper-1); border: 1px solid var(--paper-3); padding: 1px 6px; border-radius: 4px; }
.legal-updated { font: 13px var(--mono); color: var(--ink-2); margin: 0 0 28px; }
.legal-foot { grid-template-columns: 1fr; }

/* ---------- anchos ---------- */
@media (max-width: 1180px) {
  .nav { gap: 18px; }
  .presence small { display: none; }
  .nav-links { gap: 16px; font-size: 14.5px; }
  .hero { min-height: auto; padding-top: 48px; }
  .hero-title { font-size: clamp(54px, 8.4vw, 160px); max-width: 7.6em; }
  #note-hero { position: static; order: 3; margin-top: 32px; max-width: 30ch; font-size: 26px; transform: rotate(-2deg); }
  #note-hero .note-arrow { display: none; }
  .hero-foot { margin-top: 36px; }
  .services { grid-template-columns: 1fr; }
  .service { display: grid; grid-template-columns: 120px 1fr; column-gap: 32px; }
  .service > :not(.num) { grid-column: 2; }
  .service .num { grid-row: 1 / span 4; }
  .statement { grid-template-columns: 1fr; }
  .report { max-width: 420px; }
  .badges { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links { display: grid; position: absolute; left: 12px; right: 12px; top: calc(100% + 8px); gap: 0; padding: 12px 20px; background: var(--paper-1); border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 var(--ink); font: 400 28px/1.2 var(--serif); }
  .nav.open .nav-links a { color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--paper-3); }
  .nav.open .nav-links a:last-of-type { border-bottom: 0; }
  .nav.open .motion-toggle { display: flex; gap: 10px; width: auto; height: auto; min-height: 44px; margin-top: 6px; padding: 10px 14px; border-radius: 999px; justify-content: flex-start; font: 500 15px/1 var(--sans); letter-spacing: 0; color: var(--ink); }
  .nav.open .motion-toggle .mt-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav.open .motion-toggle .mt-icon { font: 600 11px/1 var(--mono); }
  .presence { margin-left: auto; }
  .nav-toggle { margin-left: 0; }
  .hero-foot { grid-template-columns: 1fr; }
  .pending { max-width: 360px; }
  .live, .academy, .how, .faq, .contact-grid { grid-template-columns: 1fr; }
  .how-head, .faq .h2 { position: static; }
  .case-row, .case-row.flip, .sh-head, .sh-problem, .sh-block { grid-template-columns: 1fr; }
  .case-row.flip .photo, .sh-block:nth-child(even) .sh-shot { order: 0; }
  .margin-note { position: static; margin-top: 24px; }
  .also-note { display: none; }
  .also-grid { grid-auto-flow: column; grid-auto-columns: minmax(240px, 42%); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .also-card { scroll-snap-align: start; }
  .sh-under-grid, .sh-blocks.text-only { grid-template-columns: 1fr; }
  .contact-side { padding-top: 140px; }
  .polaroid { right: 8px; top: 0; }
  .foot { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 22px; }
  section { padding-left: 44px; padding-right: 22px; }
  .nav { padding: 12px 18px 12px 44px; gap: 12px; }
  .nav-cta { display: none; }
  .presence { margin-left: auto; }
  .nav-toggle { margin-left: 0; padding: 11px 13px; }
  .presence .dot { width: 26px; height: 26px; }
  .hero-title { font-size: clamp(48px, 13.4vw, 72px); }
  .lede { font-size: 17px; }
  .hero-foot { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .pending { max-width: none; transform: none; }
  .term { font-size: 12px; line-height: 1.6; padding: 16px; }
  .approve { margin: 0 14px 14px; }
  .service { display: flex; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; }
  .metrics b { font-size: 30px; }
  .report dl { grid-template-columns: auto 1fr; }
  .report-cost b { font-size: 38px; }
  .badge-top { font-size: 10.5px; letter-spacing: .04em; margin-right: 46px; }
  .service .when { font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
  .courses a { grid-template-columns: 1fr auto; row-gap: 6px; }
  .courses span { grid-column: 1 / -1; }
  .contact-copy > p br { display: none; }
  .receipt { font-size: 12px; }
  .verdict .stamp { font-size: 11px; }
  .sheet-status { font-size: 11.5px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .sw-ag .cursor-pill .tool { display: inline-block; max-width: 10em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .badges { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 4px 18px; }
  .badge { scroll-snap-align: start; }
  .faq summary { font-size: 24px; }
  .nf-row { grid-template-columns: 1fr; }
  .note-form-top { max-width: none; }
  .contact-side { padding-top: 0; }
  .polaroid { position: relative; right: auto; top: auto; margin: 0 0 32px auto; width: 200px; }
  .foot { padding: 56px 22px 110px 44px; }
  .sheet-bar { padding: 10px 16px; }
  .sheet-content { padding-left: 44px; padding-right: 20px; }
  .sh-facts { grid-template-columns: 1fr; row-gap: 2px; }
  .sh-facts dd { margin-bottom: 10px; }
  .sh-nav { flex-direction: column; }
  .sh-nav a { max-width: none; }
  .sh-nav a:last-child { text-align: left; margin-left: 0; }
  /* la reserva siempre a mano */
  html { scroll-padding-bottom: 84px; }
  .mbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; display: flex; gap: .4em; justify-content: center; align-items: center; min-height: 52px; visibility: hidden; border-radius: 999px; background: var(--ink); color: var(--paper-1); font: 600 16px/1 var(--sans); text-decoration: none; box-shadow: 3px 3px 0 var(--redpen), 0 10px 30px -10px rgb(0 0 0 / .5); transform: translateY(140%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .mbar { transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s .3s; }
  .mbar.show { transform: none; visibility: visible; transition-delay: 0s; }
  body.sheet-open .mbar { transform: translateY(140%); }
  .rc .pill { font-size: 11px; padding: 4px 7px; }
  .rc .tool { display: none; }
}
@media (max-width: 480px) {
  .presence { display: none; }
  .lang { margin-left: auto; }
  .nav-toggle { margin-left: 0; }
  .hl { white-space: normal; }
}
@media (pointer: coarse) {
  .rc.is-you { display: none; }
  .lang { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .brand { display: inline-block; padding: 11px 0; margin: -11px 0; }
  .faq summary { padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hl { transition: none; background-size: 100% 100%; }
  .pen path { transition: none; stroke-dashoffset: 0; }
  .cursors { display: none; }
  .verdict.on .sign { animation: none; clip-path: none; }
  .verdict.on .stamp { animation: none; opacity: 1; }
  .note-form.sent::after, .presence .dot.is-new, .receipt-lines li { animation: none; }
  .case-sheet.in, .case-sheet.out { animation: none; }
  .pending-top i, .badge-face i, .sheet-status .sp, .rc .pill i, .approve, .typed.typing::after { animation: none; }
  .btn, .photo, .courses a, .also-card, .pending { transition: none; }
  .btn:hover, .photo:hover, .courses a:hover, .also-card:hover, .pending:hover { transform: none; }
}
