/* ==========================================================================
   ESTILOS
   Los colores y las tipografías están como variables al principio (:root).
   El color de cada proyecto no vive aquí: viene de content.js.
   ========================================================================== */

:root {
  /* Interfaz clara */
  --bg: #F4F4F2;
  --ink: #111111;
  --mute: #5C5C5A;       /* texto secundario con contraste AA */
  --gray: #7A7A78;       /* gris de la marca: solo para elementos decorativos y texto grande */
  --line: #DADAD6;
  --inv-bg: #111111;     /* secciones invertidas (contacto, pie) */
  --inv-fg: #F4F4F2;
  --inv-mute: #A9A9A5;
  --inv-line: #3A3A38;
  --pc: #111111;         /* color del proyecto abierto: lo fija project.js */

  --sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;

  --g: clamp(16px, 2.6vw, 44px);      /* margen lateral */
  --head: 64px;                        /* alto de la cabecera */
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

/* Modo oscuro: el del sistema, salvo que la persona haya elegido uno */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E0E; --ink: #EDEDEA; --mute: #A0A09C; --gray: #7A7A78; --line: #2A2A28;
    --inv-bg: #EDEDEA; --inv-fg: #0E0E0E; --inv-mute: #55554F; --inv-line: #C9C9C4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0E0E; --ink: #EDEDEA; --mute: #A0A09C; --gray: #7A7A78; --line: #2A2A28;
  --inv-bg: #EDEDEA; --inv-fg: #0E0E0E; --inv-mute: #55554F; --inv-line: #C9C9C4;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--head); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; transition: background-color .4s var(--ease), color .4s var(--ease);
}
body.is-loading, body.menu-open { overflow: hidden; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.contact :focus-visible, .foot :focus-visible, .menu :focus-visible { outline-color: var(--inv-fg); }

.wrap { width: 100%; max-width: 2200px; margin-inline: auto; padding-inline: var(--g); }
.mono { font-family: var(--mono); font-size: .75rem; line-height: 1.4; letter-spacing: .04em; text-transform: uppercase; font-weight: 400; }

.skip { position: fixed; left: var(--g); top: -80px; z-index: 300; background: var(--ink); color: var(--bg); padding: 10px 14px; font-family: var(--mono); font-size: .8rem; }
.skip:focus { top: 10px; }
.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; }

/* Cambio de idioma: fundido corto */
html.lang-fade main, html.lang-fade .foot, html.lang-fade .top { opacity: 0; }
main, .foot, .top { transition: opacity .14s linear; }

/* ---------- CABECERA ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 90; height: var(--head); background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background-color .4s var(--ease); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); opacity: 0; transition: opacity .3s; }
.top.scrolled::after { opacity: 1; }
.top.on-inv { background: color-mix(in srgb, var(--inv-bg) 82%, transparent); color: var(--inv-fg); }
.top.on-inv::after { background: color-mix(in srgb, var(--inv-fg) 18%, transparent); }
.top-in { height: 100%; max-width: 2200px; margin-inline: auto; padding-inline: var(--g); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { font-stretch: 125%; font-weight: 800; font-size: .95rem; letter-spacing: -.01em; text-transform: uppercase; justify-self: start; white-space: nowrap; }
.brand-short { display: none; }
.nav { display: flex; gap: clamp(18px, 3vw, 44px); }
.nav a { position: relative; font-size: .95rem; font-weight: 500; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }
.tools { display: flex; align-items: center; gap: 6px; justify-self: end; }
.lang { display: flex; }
.lang button { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; padding: 8px 8px; min-width: 36px; min-height: 36px; color: var(--mute); }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.lang button:hover { color: var(--ink); }
.top.on-inv .lang button { color: color-mix(in srgb, var(--inv-fg) 60%, transparent); }
.top.on-inv .lang button[aria-pressed="true"], .top.on-inv .lang button:hover { color: var(--inv-fg); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:hover { background: var(--line); }
.menu-btn { display: none; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; padding: 0 12px; min-height: 36px; border: 1px solid var(--ink); border-radius: 99px; }

/* ---------- MENÚ DE MÓVIL ---------- */
.menu { position: fixed; inset: 0; z-index: 200; background: var(--inv-bg); color: var(--inv-fg); }
.menu-in { height: 100%; padding: 20px var(--g) 28px; display: flex; flex-direction: column; }
.menu-close { align-self: flex-end; padding: 10px 14px; border: 1px solid var(--inv-fg); border-radius: 99px; min-height: 36px; }
.menu nav { margin-block: auto; display: grid; gap: 4px; }
.menu nav a { font-stretch: 125%; font-weight: 800; font-size: clamp(2.4rem, 13vw, 4.5rem); line-height: 1.02; letter-spacing: -.03em; padding-block: 6px; }
.menu-foot { color: var(--inv-mute); }

/* ---------- PANTALLA DE CARGA ---------- */
.loader { position: fixed; inset: 0; z-index: 400; background: var(--bg); display: flex; flex-direction: column; justify-content: space-between; padding: 22px var(--g) 26px; transition: transform .9s var(--ease), opacity .3s; }
.loader-top { display: flex; justify-content: space-between; color: var(--mute); }
.loader-num { font-stretch: 125%; font-weight: 800; font-size: clamp(5rem, 24vw, 22rem); line-height: .8; letter-spacing: -.05em; font-variant-numeric: tabular-nums; display: flex; align-items: flex-end; }
.loader-num i { font-style: normal; font-size: .28em; margin: 0 0 .4em .12em; letter-spacing: 0; }
.loader-bar { height: 3px; background: var(--line); }
.loader-bar span { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.loader.done { transform: translateY(-101%); pointer-events: none; }
.loader.gone { display: none; }

/* ---------- CORTINA ENTRE PÁGINAS ---------- */
.curtain { position: fixed; inset: 0; z-index: 350; background: var(--curtain, var(--ink)); transform: translateY(101%); pointer-events: none; transition: transform .6s var(--ease); }
.curtain.in { transform: translateY(0); pointer-events: auto; }
.curtain-on .curtain { transform: translateY(0); transition: none; }
.curtain.out { transform: translateY(-101%); }

/* ---------- CURSOR ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 320; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid #fff; border-radius: 50%; mix-blend-mode: difference; pointer-events: none; opacity: 0; transition: opacity .3s, width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background-color .3s; }
.cursor.on { opacity: 1; }
.cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: #fff; }
.cursor.hide { opacity: 0; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- AVISO ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 330; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 99px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- PORTADA FLOTANTE (WebGL) ---------- */
.float { position: fixed; left: 0; top: 0; width: 420px; height: 520px; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .25s; will-change: transform; }
.float.on { opacity: 1; }
.float canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.float.fallback canvas { inset: 70px 58px; width: 304px; height: 380px; border-radius: 3px; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
@media (pointer: coarse) { .float { display: none; } }

/* ---------- PORTADA (HERO) ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding-top: calc(var(--head) + 28px); padding-bottom: 28px; }
.hero-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--mute); padding-block: 10px; border-bottom: 1px solid var(--line); }
.hero-name { margin-block: auto; padding-block: 4vh; font-stretch: 125%; font-weight: 800; letter-spacing: -.045em; line-height: .82; text-transform: uppercase; font-size: 14.5vw; white-space: nowrap; display: block; width: max-content; max-width: 100%; margin-left: -.06em; }
.hero-name .w { display: block; white-space: nowrap; }
.hero-name .l { display: inline-block; will-change: font-stretch; }
.hero-name .sp { display: none; }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: end; border-top: 1px solid var(--line); padding-top: 22px; }
.hero-intro { font-size: clamp(1.15rem, 1.9vw, 1.9rem); line-height: 1.28; font-weight: 500; max-width: 38ch; letter-spacing: -.01em; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; text-align: right; }
.avail { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.avail .dot { width: 10px; height: 10px; border-radius: 50%; background: #23A55A; flex: none; box-shadow: 0 0 0 0 rgba(35, 165, 90, .5); animation: pulse 2.4s infinite; }
.avail.busy .dot { background: var(--gray); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(35, 165, 90, .5); } 70% { box-shadow: 0 0 0 10px rgba(35, 165, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(35, 165, 90, 0); } }
.scroll { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; }
.scroll svg { transition: transform .3s var(--ease); }
.scroll:hover svg { transform: translateY(4px); }

/* ---------- SECCIONES ---------- */
.sec { padding-block: clamp(72px, 11vw, 190px) 0; }
.sec:last-of-type { padding-bottom: clamp(72px, 11vw, 190px); }
.sec-head { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: clamp(32px, 5vw, 80px); }
.kicker { display: flex; gap: 12px; color: var(--mute); }
.kicker span:first-child { color: var(--ink); }
.sec-title { font-stretch: 125%; font-weight: 800; font-size: clamp(1.9rem, 9vw, 11rem); line-height: .88; letter-spacing: -.045em; text-transform: uppercase; }
.sec-lead { max-width: 46ch; color: var(--mute); font-size: 1.15rem; }
.count { color: var(--mute); }

/* ---------- ÍNDICE DE PROYECTOS ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(22px, 3vw, 44px); }
.chip { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: 9px 16px; min-height: 38px; border: 1px solid var(--ink); border-radius: 99px; transition: background-color .25s, color .25s; }
.chip:hover { background: var(--line); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip small { font-size: .65rem; opacity: .7; margin-left: 6px; }

.index-head, .row-link { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) minmax(8rem, 13rem) minmax(8rem, 15rem) 3.6rem; column-gap: clamp(12px, 2vw, 32px); align-items: baseline; }
.index-head { color: var(--mute); padding-block: 10px; border-bottom: 1px solid var(--ink); }
.index-head span:last-child { text-align: right; }
.index { }
.row { border-bottom: 1px solid var(--line); position: relative; }
.row.is-hidden { display: none; }
.row.enter { animation: rowin .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rowin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.row-link { padding-block: clamp(16px, 2.2vw, 36px); transition: opacity .35s var(--ease); }
.row-num { color: var(--mute); }
.row-name { font-stretch: 125%; font-weight: 700; font-size: clamp(1.7rem, 4.6vw, 5.6rem); line-height: .95; letter-spacing: -.04em; text-transform: uppercase; transition: transform .5s var(--ease); overflow-wrap: anywhere; }
.row-client, .row-type { font-size: .95rem; line-height: 1.35; color: var(--mute); }
.row-type { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.row-year { text-align: right; font-family: var(--mono); font-size: .8rem; }
.row-art { display: none; }
@media not all and (pointer: coarse) {
  .index:hover .row-link { opacity: .28; }
  .index:hover .row:hover .row-link, .index:focus-within .row:focus-within .row-link { opacity: 1; }
  .index:focus-within .row:not(:focus-within) .row-link { opacity: .28; }
  .row:hover .row-name, .row:focus-within .row-name { transform: translateX(14px); }
}
.row-link:focus-visible { outline-offset: -3px; }

/* ---------- SERVICIOS ---------- */
.services { border-top: 1px solid var(--ink); counter-reset: s; }
.service { display: grid; grid-template-columns: 3.4rem minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .7fr); gap: clamp(14px, 2.4vw, 40px); padding-block: clamp(22px, 3vw, 44px); border-bottom: 1px solid var(--line); align-items: start; }
.service-n { color: var(--mute); padding-top: .5em; }
.service h3 { font-stretch: 125%; font-weight: 700; font-size: clamp(1.4rem, 2.8vw, 3rem); line-height: 1; letter-spacing: -.035em; text-transform: uppercase; }
.service p { color: var(--mute); max-width: 44ch; }
.service ul { display: flex; flex-direction: column; gap: 4px; }
.service li { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; padding-block: 2px; }
.service li::before { content: '+ '; color: var(--mute); }

/* ---------- SOBRE MÍ ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 280px); gap: clamp(24px, 5vw, 90px); align-items: start; }
.about-lead { font-size: clamp(1.4rem, 3vw, 3.2rem); line-height: 1.14; font-weight: 500; letter-spacing: -.025em; max-width: 24ch; font-stretch: 100%; }
.about-body { margin-top: clamp(24px, 3vw, 48px); display: grid; gap: 16px; max-width: 58ch; color: var(--mute); font-size: 1.1rem; }
.facts { margin-top: clamp(28px, 4vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 28px; border-top: 1px solid var(--ink); }
.facts div { padding-block: 12px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--mute); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { font-weight: 500; }
.seal { justify-self: end; width: 100%; max-width: 260px; }
.seal svg { width: 100%; height: auto; animation: spin 40s linear infinite; }
.seal text { font-family: var(--mono); font-size: 11.4px; letter-spacing: .18em; text-transform: uppercase; fill: var(--ink); }
.seal circle.core { fill: var(--ink); }
.seal text.ini { fill: var(--bg); font-family: var(--sans); font-stretch: 125%; font-weight: 800; font-size: 30px; letter-spacing: 0; text-transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.block { margin-top: clamp(56px, 8vw, 130px); }
.block-title { color: var(--mute); padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-weight: 400; }
.timeline li { display: grid; grid-template-columns: 6rem minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(12px, 2.4vw, 40px); padding-block: 20px; border-bottom: 1px solid var(--line); align-items: baseline; }
.timeline .y { font-family: var(--mono); font-size: .85rem; }
.timeline h4 { margin: 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.timeline p { color: var(--mute); }
.clients { display: flex; flex-wrap: wrap; gap: .1em .5em; padding-top: 28px; font-stretch: 125%; font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 3.6rem); line-height: 1.12; letter-spacing: -.035em; text-transform: uppercase; }
.clients li::after { content: '/'; color: var(--gray); margin-left: .5em; }
.clients li:last-child::after { content: ''; }
.awards li { display: grid; grid-template-columns: 5rem minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(12px, 2vw, 32px); padding-block: 18px; border-bottom: 1px solid var(--line); align-items: baseline; }
.awards .y { font-family: var(--mono); font-size: .85rem; }
.awards .n { font-weight: 600; font-size: 1.1rem; }
.awards .w, .awards .p { color: var(--mute); }
.awards .p { text-align: right; }

/* ---------- CONTACTO Y PIE (invertidos) ---------- */
.contact { margin-top: clamp(72px, 11vw, 190px); background: var(--inv-bg); color: var(--inv-fg); transition: background-color .4s var(--ease), color .4s var(--ease); }
.contact-in { padding-block: clamp(72px, 10vw, 170px) clamp(48px, 6vw, 100px); }
.contact .kicker, .contact .kicker span:first-child { color: var(--inv-fg); }
.contact .kicker span + span { color: var(--inv-mute); }
.mail { display: grid; gap: 14px; margin-bottom: clamp(48px, 7vw, 110px); }
.mail-label { color: var(--inv-mute); }
.mail-big { display: block; width: max-content; max-width: 100%; font-stretch: 125%; font-weight: 800; letter-spacing: -.045em; line-height: .95; font-size: 6vw; white-space: nowrap; border-bottom: 3px solid currentColor; padding-bottom: .06em; transition: opacity .3s; }
.mail-big .w { display: inline-block; }
.mail-big:hover { opacity: .65; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(28px, 6vw, 110px); align-items: start; }
.contact-lead { font-size: clamp(1.15rem, 1.8vw, 1.7rem); line-height: 1.3; max-width: 30ch; font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: 99px; font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; transition: background-color .3s, color .3s, transform .3s var(--ease); justify-self: start; }
.btn-line { border: 1px solid currentColor; }
.btn-line:hover { background: var(--inv-fg); color: var(--inv-bg); }
.btn-solid { background: var(--inv-fg); color: var(--inv-bg); border: 1px solid var(--inv-fg); }
.btn-solid:hover { background: transparent; color: var(--inv-fg); }
.btn[disabled] { opacity: .5; cursor: progress; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 28px; }
.field { display: grid; gap: 8px; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--inv-mute); }
.field input, .field select, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--inv-fg); border-radius: 0; padding: 10px 0 12px; font-size: 1.15rem; color: var(--inv-fg); outline-offset: 4px; }
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 12px) 50%, calc(100% - 6px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 28px; }
.field select option { background: var(--bg); color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--inv-fg); }
.field.invalid input, .field.invalid textarea { border-bottom-width: 3px; }
.err { font-size: .9rem; color: var(--inv-fg); font-family: var(--mono); letter-spacing: .02em; }
.err::before { content: '! '; font-weight: 500; }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-msg { font-size: .95rem; }
.ok { border: 1px solid var(--inv-fg); padding: clamp(24px, 3vw, 44px); display: grid; gap: 14px; justify-items: start; }
.ok-title { font-stretch: 125%; font-weight: 800; font-size: clamp(1.6rem, 3vw, 3rem); letter-spacing: -.035em; text-transform: uppercase; line-height: 1; }
.ok .mono { color: var(--inv-mute); }

.foot { background: var(--inv-bg); color: var(--inv-fg); transition: background-color .4s var(--ease), color .4s var(--ease); }
.foot-in { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr 1.3fr auto; gap: 16px 28px; align-items: center; padding-block: 26px 30px; border-top: 1px solid var(--inv-line); }
.socials { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.socials a { font-weight: 500; padding: 8px 0; border-bottom: 1px solid transparent; display: inline-block; }
.socials a:hover { border-bottom-color: currentColor; }
.foot-time, .foot-copy, .foot-credit { color: var(--inv-mute); white-space: nowrap; }
.foot-time time { color: var(--inv-fg); font-variant-numeric: tabular-nums; }
.foot-credit a { color: inherit; border-bottom: 1px solid currentColor; }
.foot-credit a:hover { color: var(--inv-fg); }
.foot-top { justify-self: end; padding: 8px 0; border-bottom: 1px solid currentColor; }

/* Revelado al entrar en pantalla (lo activa common.js; sin JS todo se ve) */
.js .rv { opacity: 0; transform: translateY(26px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }

/* ---------- PÁGINA DE PROYECTO ---------- */
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 95; background: var(--pc); transform-origin: left; transform: scaleX(0); }
.p-hero { padding-top: calc(var(--head) + 24px); }
.p-bar { display: flex; justify-content: space-between; gap: 16px; color: var(--mute); padding-block: 10px; border-bottom: 1px solid var(--line); }
.p-bar a { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); }
.p-bar a:hover { text-decoration: underline; text-underline-offset: 5px; }
.p-title { margin-block: clamp(20px, 4vw, 60px); font-stretch: 125%; font-weight: 800; letter-spacing: -.045em; line-height: .84; text-transform: uppercase; font-size: 12vw; white-space: nowrap; width: max-content; max-width: 100%; display: block; }
.p-title .w { display: inline-block; white-space: nowrap; }
.p-title .sp { display: inline-block; width: .22em; }
.p-cover { position: relative; overflow: hidden; background: var(--pc); aspect-ratio: 16 / 8.2; clip-path: inset(0 0 0 0); }
.p-cover canvas { width: 100%; height: 100%; object-fit: cover; }
.js .p-cover { clip-path: inset(0 0 100% 0); }
.js .p-cover.in { clip-path: inset(0 0 0 0); transition: clip-path 1.1s var(--ease); }
.p-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 28px; margin-top: 28px; border-top: 1px solid var(--ink); }
.p-facts div { padding-block: 14px; border-bottom: 1px solid var(--line); }
.p-facts dt { color: var(--mute); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.p-facts dd { font-weight: 500; }
.p-facts a { border-bottom: 1px solid currentColor; }
.p-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: clamp(20px, 4vw, 80px); padding-top: clamp(64px, 9vw, 150px); }
.p-block h2 { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 400; color: var(--mute); display: flex; gap: 10px; align-items: baseline; }
.p-block h2::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); flex: none; transform: translateY(1px); }
.p-lead { font-size: clamp(1.4rem, 3vw, 3.2rem); line-height: 1.14; font-weight: 500; letter-spacing: -.025em; max-width: 30ch; }
.p-text { font-size: clamp(1.15rem, 1.8vw, 1.7rem); line-height: 1.35; max-width: 42ch; }
.steps { display: grid; }
.steps li { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(12px, 2.4vw, 40px); padding-block: 22px; border-top: 1px solid var(--line); align-items: baseline; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n { font-family: var(--mono); font-size: .8rem; color: var(--mute); }
.steps h3 { font-stretch: 125%; font-weight: 700; font-size: clamp(1.3rem, 2.3vw, 2.4rem); letter-spacing: -.035em; text-transform: uppercase; line-height: 1; }
.steps p { color: var(--mute); }

.results { margin-top: clamp(64px, 9vw, 150px); background: var(--pc); color: var(--pk, var(--ink)); }
.results-in { padding-block: clamp(48px, 7vw, 120px); display: grid; gap: clamp(28px, 4vw, 60px); }
.results h2 { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 400; }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 56px); }
.fig { border-top: 1px solid currentColor; padding-top: 16px; }
.fig-n { font-stretch: 125%; font-weight: 800; letter-spacing: -.05em; line-height: .9; font-size: clamp(3rem, 8.2vw, 9.5rem); white-space: nowrap; font-variant-numeric: tabular-nums; display: block; }
.fig-n small { font-size: .5em; letter-spacing: -.02em; }
.fig-l { margin-top: 14px; max-width: 26ch; font-size: 1.05rem; line-height: 1.35; }
.quote { padding-top: clamp(64px, 9vw, 150px); }
.quote blockquote { margin: 0; font-stretch: 125%; font-weight: 700; font-size: clamp(1.6rem, 4vw, 4.4rem); line-height: 1.04; letter-spacing: -.04em; max-width: 24ch; text-transform: none; }
.quote cite { display: block; margin-top: 22px; font-style: normal; color: var(--mute); }
.gal-wrap { padding-top: clamp(64px, 9vw, 150px); }
.gal-wrap > h2 { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 400; color: var(--mute); margin-bottom: 18px; display: flex; gap: 10px; align-items: baseline; }
.gal-wrap > h2::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--pc); transform: translateY(1px); }
.gal { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.6vw, 24px); }
.gal figure { position: relative; overflow: hidden; background: var(--line); }
.gal figure canvas, .gal figure img { width: 100%; height: 100%; object-fit: cover; }
.gal .g1 { grid-column: span 12; aspect-ratio: 21 / 9; }
.gal .g2 { grid-column: span 5; aspect-ratio: 4 / 5; }
.gal .g3 { grid-column: span 7; }
.gal .g4, .gal .g5 { grid-column: span 6; aspect-ratio: 1; }

.next { display: block; margin-top: clamp(72px, 10vw, 170px); background: var(--nc, var(--ink)); color: var(--nk, var(--bg)); position: relative; overflow: hidden; }
.next-in { padding-block: clamp(36px, 6vw, 100px); display: grid; gap: 18px; }
.next .mono { display: flex; justify-content: space-between; gap: 16px; }
.next-title { font-stretch: 125%; font-weight: 800; letter-spacing: -.05em; line-height: .84; text-transform: uppercase; font-size: 12vw; white-space: nowrap; width: max-content; max-width: 100%; transition: transform .8s var(--ease); display: block; }
.next-title .w { display: inline-block; white-space: nowrap; }
.next-title .sp { display: inline-block; width: .22em; }
@media not all and (pointer: coarse) { .next:hover .next-title { transform: translateX(2vw); } }
.next-arrow { justify-self: end; width: clamp(40px, 6vw, 90px); }
.nf { padding: calc(var(--head) + 18vh) 0 18vh; display: grid; gap: 24px; justify-items: start; }
.nf h1 { font-stretch: 125%; font-weight: 800; font-size: clamp(2.2rem, 8vw, 8rem); line-height: .9; letter-spacing: -.045em; text-transform: uppercase; }
.nf p { color: var(--mute); max-width: 46ch; }
.nf a { border-bottom: 1px solid currentColor; font-weight: 500; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 1100px) {
  .index-head, .row-link { grid-template-columns: 3rem minmax(0, 1fr) minmax(7rem, 11rem) 3.4rem; }
  .index-head span:nth-child(4), .row-type { display: none; }
  .service { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr); }
  .service ul { grid-column: 2 / -1; flex-direction: row; flex-wrap: wrap; gap: 4px 18px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-top { justify-self: start; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .top-in { grid-template-columns: 1fr auto; }
  .hero-foot { grid-template-columns: 1fr; gap: 22px; }
  .hero-side { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; width: 100%; }
  .about { grid-template-columns: 1fr; }
  .seal { justify-self: start; max-width: 180px; order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .timeline p { grid-column: 2; }
  .awards li { grid-template-columns: 4rem minmax(0, 1fr); }
  .awards .w, .awards .p { grid-column: 2; text-align: left; }
  .p-block { grid-template-columns: 1fr; gap: 20px; }
  .steps li { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .steps p { grid-column: 2; }
  .figs { grid-template-columns: 1fr; }
  .fig-n { font-size: clamp(3.4rem, 18vw, 6rem); }
  .p-cover { aspect-ratio: 4 / 3.6; }
  .gal .g1 { aspect-ratio: 4 / 3; }
  .gal .g2 { grid-column: span 12; aspect-ratio: 4 / 4.4; }
  .gal .g3 { grid-column: span 12; aspect-ratio: 4 / 3; }
  .gal .g4, .gal .g5 { grid-column: span 12; }
}
@media (max-width: 640px) {
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .hero-name { line-height: .84; padding-block: 2vh; }
  .p-title .w, .next-title .w { display: block; }
  .p-title .sp, .next-title .sp { display: none; }
  .form { grid-template-columns: 1fr; }
  .mail-big .w { display: block; }
  .mail-big { white-space: normal; }
  .foot-in { grid-template-columns: 1fr; }
  .foot-top { justify-self: start; }
  .row-link { grid-template-columns: 1fr auto; row-gap: 6px; }
  .index-head { display: none; }
  .row-num { grid-column: 1; grid-row: 1; }
  .row-year { grid-column: 2; grid-row: 1; }
  .row-name { grid-column: 1 / -1; grid-row: 2; font-size: clamp(1.9rem, 9.6vw, 3rem); }
  .row-client { grid-column: 1 / -1; grid-row: 3; }
  .row-type { display: block; grid-column: 1 / -1; grid-row: 4; }
  .service { grid-template-columns: 1fr; }
  .service ul { grid-column: auto; }
  .service-n { padding-top: 0; }
}
/* Pantallas táctiles: portada en línea dentro de cada fila */
@media (pointer: coarse) {
  .row-link { row-gap: 10px; }
  .row-art { display: block; grid-column: 1 / -1; grid-row: 5; margin-top: 8px; overflow: hidden; background: var(--line); aspect-ratio: 16 / 10; }
  .row-art canvas { width: 100%; height: 100%; object-fit: cover; }
}
@media (max-width: 1100px) and (min-width: 641px) and (pointer: coarse) {
  .row-link { grid-template-columns: 3rem minmax(0, 1fr) 3.4rem; }
  .row-client { grid-column: 2; grid-row: 2; }
  .row-art { grid-column: 2 / -1; grid-row: 3; }
  .row-type { display: block; grid-column: 2; grid-row: 4; }
}

/* ---------- MOVIMIENTO REDUCIDO ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .rv { opacity: 1; transform: none; }
  .js .p-cover { clip-path: none; }
  .seal svg { animation: none; }
  .cursor { display: none; }
}

/* Máscara de revelado de los titulares por palabras */
.hero-name .w, .p-title .w, .next-title .w { overflow: hidden; padding: .14em .05em .05em; margin: -.14em -.05em -.05em; vertical-align: top; }
.foot-solo .mail-big { margin-block: clamp(48px, 8vw, 120px) clamp(28px, 4vw, 60px); }
.foot-solo > .wrap:first-child { padding-top: 0; }
.p-title, .next-title { margin-left: -.06em; }
