/* Alejandro Gallardo · Product Motion — web v5 multipágina (blanco por defecto u oscuro con efecto de pintado, minimalista, al estilo apple.com).
   Sale de styles.css v4.6; las páginas nuevas (menú con hoja, pieza, servicios, about, brief, 404) van al final.
   Marca: tinta #0A0A0A, hueso #F5F3EE, fondo liso (sin halos, degradados ni grano).
   SF Pro (sistema) en todos los rótulos; el logo AR (SVG, `#i-ar`) en el menú, la entrada y el pie. */


:root {
  --ink: #0a0a0a; --bone: #f5f3ee; --bone2: rgba(245, 243, 238, .62); --bone3: rgba(245, 243, 238, .16); --card: #141414; --card2: #1b1b1b;
  --line: rgba(245, 243, 238, .06); --line2: rgba(245, 243, 238, .1); --faint: rgba(245, 243, 238, .14); --navbg: rgba(10, 10, 10, .72);
  --dot: #fff; --dotglow: 0 0 14px 4px rgba(255, 253, 248, .85);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Inter, Arial, sans-serif;
  /* margen lateral: 5 vw en pantallas pequeñas; en las grandes, lo que haga falta para una columna de 1240 px centrada (todo alinea con el menú) */
  --pad: max(clamp(20px, 5vw, 72px), calc((100vw - 1240px) / 2));
  --ease: cubic-bezier(.16, 1, .3, 1);
  --stage: var(--ink);
}
/* tema claro (fondo blanco, estilo apple.com): mismas variables, valores invertidos */
:root[data-theme="light"] {
  --ink: #ffffff; --bone: #1d1d1f; --bone2: rgba(29, 29, 31, .56); --bone3: rgba(29, 29, 31, .16); --card: #f5f5f7; --card2: #ececf0;
  --line: rgba(0, 0, 0, .06); --line2: rgba(0, 0, 0, .1); --faint: rgba(29, 29, 31, .14); --navbg: rgba(255, 255, 255, .72);
  --dot: #1d1d1f; --dotglow: 0 0 0 0 transparent;
  /* en blanco, las piezas (muchas con fondo blanco) se apoyan en un escenario gris claro, como en apple.com */
  --stage: #f5f5f7;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--ink); color: var(--bone); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--bone); color: var(--ink); }
.dim { color: var(--bone2); }

/* ---------- tipografía ---------- */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
h2 { font-size: clamp(42px, 7vw, 120px); }
h2.big { font-size: clamp(60px, 13vw, 220px); }
h3 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.035em; }
/* etiquetas de sección al estilo apple.com: frase normal, seminegrita, sin mayúsculas espaciadas */
.kicker { font-size: clamp(17px, 1.4vw, 21px); font-weight: 600; letter-spacing: -0.015em; color: var(--bone2); margin-bottom: 22px; }
.lead { font-size: clamp(18px, 1.8vw, 24px); color: var(--bone2); letter-spacing: -0.01em; max-width: 34ch; margin-top: 30px; }
.note { color: var(--bone2); margin-top: 22px; max-width: 46ch; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 28px; border-radius: 999px; background: var(--bone); color: var(--ink);
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em; border: 0; font-family: inherit; cursor: pointer; transition: opacity .3s, border-color .3s; }
.btn:hover { opacity: .86; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: transparent; color: var(--bone); border: 1.5px solid var(--bone3); }
.btn-ghost:hover { border-color: var(--bone2); opacity: 1; }
.btn-sm { height: 42px; padding: 0 20px; font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.link { background: none; border: 0; color: var(--bone); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link:hover { color: var(--bone2); }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; border-radius: 6px; }
.skip { position: fixed; z-index: 120; left: var(--pad); top: 12px; padding: 10px 16px; border-radius: 10px; background: var(--bone); color: var(--ink); font-size: 14px; font-weight: 600; transform: translateY(-160%); transition: transform .3s var(--ease); }
.skip:focus-visible { transform: none; outline-offset: 2px; }
.reel-frame:focus-visible { outline-offset: -6px; border-radius: 0; }

/* ---------- navegación ---------- */
#nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad);
  background: var(--navbg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.nav-logo { display: inline-flex; align-items: center; line-height: 1; }
.ar { display: block; fill: currentColor; }
.nav-logo .ar { height: 21px; width: auto; }
/* interruptor de tema: medio círculo que gira al cambiar */
.theme-btn { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--bone3); background: none; color: var(--bone); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: border-color .3s; }
.theme-btn:hover { border-color: var(--bone2); }
.theme-btn svg { width: 16px; height: 16px; transition: transform .6s var(--ease); }
:root[data-theme="light"] .theme-btn svg { transform: rotate(180deg); }
/* efecto de pintado: el tema nuevo se pinta encima a brochazos (View Transitions + máscara SVG animada) */
:root.pintando::view-transition-old(root), :root.pintando::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root.pintando::view-transition-new(root) { -webkit-mask: var(--paint) 0 0 / 100% 100% no-repeat; mask: var(--paint) 0 0 / 100% 100% no-repeat; animation: paint-hold 1.15s linear; }
@keyframes paint-hold { from { opacity: 1; } to { opacity: 1; } }

section { padding: clamp(96px, 14vw, 200px) var(--pad); position: relative; }
.sec-head { margin-bottom: clamp(56px, 8vw, 120px); }
.sec-head h1, .sec-head h2 { max-width: 14ch; }
.sec-head h1 { font-size: clamp(42px, 7vw, 120px); }

/* ---------- 1 · portada cinética ---------- */
#hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 130px; }
.hero-title { font-size: clamp(58px, 12.5vw, 210px); letter-spacing: -0.05em; line-height: .98; }
.hero-title > span { display: block; }
.hl2 { position: relative; display: inline-block !important; }
.hl2 .c, .fw { display: inline-block; }
/* letras que siguen al puntero en la portada y en los títulos (la capa interior .ci; la exterior la usa la entrada) */
.ci { display: inline-block; }
.hero-title .ci { will-change: transform; }
.wd { display: inline-block; white-space: nowrap; }
.hbox { position: absolute; left: -.08em; right: -.06em; top: .06em; bottom: -.04em; border: 3px solid var(--bone); border-radius: 12px; opacity: 0; pointer-events: none; transform-origin: 0 50%; }
.hbox i { position: absolute; width: 14px; height: 14px; background: var(--ink); border: 3px solid var(--bone); border-radius: 3px; }
.hbox i:nth-child(1) { left: -9px; top: -9px; } .hbox i:nth-child(2) { right: -9px; top: -9px; }
.hbox i:nth-child(3) { left: -9px; bottom: -9px; } .hbox i:nth-child(4) { right: -9px; bottom: -9px; }
.scroll-hint { position: absolute; left: var(--pad); bottom: 40px; width: 1px; height: 64px; background: var(--bone3); overflow: hidden; }
.scroll-hint span { position: absolute; left: -2px; top: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--bone); animation: hint 2.2s var(--ease) infinite; }
@keyframes hint { 0% { transform: translateY(-6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(66px); opacity: 0; } }

/* ---------- 2 · showreel ---------- */
#reel { padding: 0; }
.reel-pin { height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel-frame { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--card); cursor: pointer; }
.reel-frame video { width: 100%; height: 100%; object-fit: cover; }
.reel-label { position: absolute; left: 24px; right: 24px; bottom: 22px; display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--bone2); }

/* ---------- 3 · frase que se ilumina ---------- */
#statement { padding-top: clamp(140px, 18vw, 260px); padding-bottom: clamp(140px, 18vw, 260px); }
.big-read { font-size: clamp(34px, 5.4vw, 84px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.08; max-width: 20ch; }
.big-read .rw { display: inline; }

/* ---------- 4 · trabajos: bloques limpios ---------- */
.case { max-width: 1240px; margin: 0 auto clamp(120px, 16vw, 220px); cursor: pointer; }
.case:last-child { margin-bottom: 0; }
.case-media { position: relative; aspect-ratio: 16 / 9; border-radius: clamp(14px, 1.8vw, 28px); overflow: hidden; background: var(--card); }
.case-media video { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.case-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line2); }
.case-copy { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: clamp(24px, 3vw, 40px); }
.case-n { font-size: 14px; color: var(--bone2); letter-spacing: -0.01em; }
.case-copy h2, .case-copy h3 { font-size: clamp(34px, 4vw, 56px); }
.case-d { color: var(--bone2); max-width: 44ch; }
.case .link { justify-self: start; margin-top: 6px; color: var(--bone); }
.case:hover .link span { transform: translateX(4px); }
.link span { display: inline-block; transition: transform .4s var(--ease); }
@media (min-width: 960px) {
  .case-copy { grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: end; }
  .case-n { grid-column: 1 / -1; }
  .case-copy h2, .case-copy h3 { grid-row: 2 / span 2; align-self: start; }
  .case-d, .case .link { grid-column: 2; }
}

/* ---------- 5 y 6 · mosaico (bento) ---------- */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .bento { grid-template-columns: repeat(3, 1fr); } .t-wide { grid-column: span 2; } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 30px; padding: clamp(28px, 3.2vw, 48px); min-height: 280px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; overflow: hidden; }
.t-big { font-size: clamp(46px, 5.6vw, 96px); font-weight: 700; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.t-sub { color: var(--bone2); max-width: 32ch; }
.svc { justify-content: flex-start; min-height: 0; }
.svc-n, .step-n { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--bone2); font-variant-numeric: tabular-nums; }
.svc h3 { margin: 0 0 12px; }
.svc p { color: var(--bone2); max-width: 42ch; }
.svc ul { list-style: none; margin-top: auto; padding-top: 28px; border-top: 1px solid var(--line2); display: grid; gap: 8px; font-size: 15px; }
.svc li::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--bone); margin: 0 12px 3px 0; }

/* ---------- cierre del inicio y pie ---------- */
.cierre { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.cierre h2 .wd { overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.cierre h2.revelado .wd { overflow: visible; }   /* tras la entrada, las letras pueden salirse al pasar el ratón */
.cierre h2 .c { display: inline-block; }
.socials { list-style: none; display: flex; gap: 10px; margin: 0; }
.soc { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; color: var(--bone); border: 1.5px solid var(--bone3);
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease); }
.soc svg { width: 20px; height: 20px; fill: currentColor; }
.soc:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); transform: translateY(-2px); }
footer { padding: 80px var(--pad) 56px; text-align: center; color: var(--bone2); font-size: 14px; }
.foot-ag { display: flex; justify-content: center; color: var(--bone); }
.foot-ag .ar { height: 46px; width: auto; }
.foot-line { position: relative; width: 180px; height: 2px; margin: 14px auto 18px; background: linear-gradient(90deg, transparent, var(--bone2) 20%, var(--bone2) 80%, transparent); }
.foot-line span { position: absolute; left: 75%; top: -3px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--dot); box-shadow: var(--dotglow); }
.foot-social { list-style: none; display: flex; justify-content: center; gap: 6px; margin: 0 0 22px; }
.foot-social .soc { width: 44px; height: 44px; border: 0; color: var(--bone2); }
.foot-social .soc svg { width: 18px; height: 18px; }
.foot-social .soc:hover { background: var(--card); color: var(--bone); transform: none; }

/* ---------- intro ---------- */
#intro { position: fixed; inset: 0; z-index: 100; background: var(--ink); display: none; align-items: center; justify-content: center; flex-direction: column; }
html.js #intro.on { display: flex; }
.intro-ag { color: var(--bone); opacity: 0; }
.intro-ag .ar { height: clamp(64px, 10vw, 128px); width: auto; }
.intro-line { position: relative; width: clamp(160px, 22vw, 300px); height: 2px; margin-top: 30px; background: var(--bone2); transform: scaleX(0); }
.intro-dot { position: absolute; top: -4px; left: 0; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--dot); box-shadow: var(--dotglow); }

/* ---------- visor ---------- */
#lightbox { position: fixed; inset: 0; z-index: 95; background: #0a0a0a; --bone: #f5f3ee; --bone2: rgba(245, 243, 238, .6); --bone3: rgba(245, 243, 238, .18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 72px var(--pad) 28px; color: var(--bone); }
#lightbox[hidden] { display: none; }
.lb-stage { display: flex; align-items: center; justify-content: center; min-height: 0; width: 100%; }
#lightbox video { width: min(100%, 1400px); max-height: 78svh; border-radius: 18px; background: #000; }
#lightbox.vert video { width: auto; height: min(80svh, 1400px); max-width: 100%; aspect-ratio: 9 / 16; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 44px; }
.lb-title { color: var(--bone); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; text-align: center; min-width: 16ch; }
.lb-meta { display: block; margin-top: 2px; color: var(--bone2); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.lb-meta:empty { display: none; }
.lb-close, .lb-nav { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(245, 243, 238, .1); color: var(--bone); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background-color .3s; }
.lb-close:hover, .lb-nav:hover { background: rgba(245, 243, 238, .2); }
.lb-close svg, .lb-nav svg { width: 16px; height: 16px; }
.lb-close { position: absolute; top: 18px; right: var(--pad); }
.lb-nav[hidden] { display: none; }
#lightbox :focus-visible { outline-color: var(--bone); }

/* ---------- estados iniciales (solo con JS y sin movimiento reducido) ---------- */
/* ---------- conceptos en vertical: la cabecera ocupa las celdas que faltan para que 13 piezas llenen filas completas
   (4 columnas: 3 + 13 = 16; 3 columnas: 2 + 13 = 15); carrusel con imán en el móvil ---------- */
.vgrid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(14px, 1.6vw, 22px); row-gap: clamp(40px, 4vw, 56px); }
.vtrack { display: contents; }
.vhead { grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding-right: clamp(0px, 4vw, 64px); }
.vhead h1, .vhead h2 { max-width: 12ch; font-size: clamp(42px, 5.4vw, 84px); }
@media (max-width: 1099px) { .vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .vhead { grid-column: 1 / -1; } }
.vhead .note { margin-top: 0; max-width: 44ch; }
.vhead-foot { display: grid; gap: 28px; }
/* filtros: texto con una línea que se desliza bajo el activo (sin píldoras) */
.filters { position: relative; display: flex; flex-wrap: wrap; gap: 4px 26px; padding-bottom: 10px; border-bottom: 1px solid var(--line2); width: max-content; max-width: 100%; }
.filters button { background: none; border: 0; padding: 6px 0; font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--bone2); cursor: pointer; transition: color .3s; }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--bone); }
.filters button span { font-size: 13px; font-weight: 500; color: var(--bone2); font-variant-numeric: tabular-nums; margin-left: 3px; vertical-align: 1px; }
.filters-bar { position: absolute; left: 0; bottom: -1px; height: 2px; width: 10px; background: var(--bone); transform-origin: 0 50%; transition: transform .6s var(--ease), width .6s var(--ease); }
.vcard { position: relative; min-width: 0; }
.vcard[hidden] { display: none; }
.vcard-media { position: relative; aspect-ratio: 9 / 16; border-radius: clamp(14px, 1.6vw, 22px); overflow: hidden; background: var(--card); isolation: isolate; }
.vcard-media img, .vcard-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .6s ease; }
.vcard-media video { opacity: 0; }
.vcard-media.playing video { opacity: 1; }
.vcard-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line2); z-index: 2; }
.vplay { position: absolute; right: 14px; bottom: 14px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(20, 20, 22, .42); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); transition: background-color .3s, transform .5s var(--ease); }
.vplay svg { width: 14px; height: 14px; margin-left: 1px; }
.vcard-copy { display: grid; gap: 4px; margin-top: 16px; }
.vcard-titulo { font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; letter-spacing: -0.022em; line-height: 1.2; }
.vcard-link, .case-link { display: block; color: inherit; }
.vcard-link:focus-visible, .case-link:focus-visible { outline: none; }
.vcard-link:focus-visible .vcard-media, .case-link:focus-visible .case-media { outline: 2px solid var(--bone); outline-offset: 4px; }
.vcard-meta { font-size: 14px; color: var(--bone2); letter-spacing: -0.01em; }
@media (hover: hover) {
  .vcard:hover .vcard-media img, .vcard:hover .vcard-media video { transform: scale(1.025); }
  .vcard:hover .vplay { background: rgba(20, 20, 22, .62); transform: scale(1.06); }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 639px) {
  .vgrid { display: block; }
  .vhead { padding-right: 0; gap: 28px; margin-bottom: 40px; }
  .vtrack { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 4px; scroll-padding: 0 var(--pad); scrollbar-width: none; }
  .vtrack::-webkit-scrollbar { display: none; }
  .vcard { flex: 0 0 72%; scroll-snap-align: start; }
}
html.js.motion .vcard { opacity: 0; transform: translateY(40px); }

html.js.motion .reveal, html.js.motion .hero-in { opacity: 0; transform: translateY(24px); }
html.js.motion .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
html.js.motion .split .w > span { display: inline-block; transform: translateY(105%); }
html.js.motion .split.revelado .w { overflow: visible; }
html.js.motion .tile, html.js.motion .step { opacity: 0; transform: translateY(40px); }
html.js.motion .case-copy > * { opacity: 0; transform: translateY(24px); }
html.js.motion .fw, html.js.motion .hl2 .c { opacity: 0; }
html.js.motion .big-read .rw { opacity: .14; }

/* ---------- escenario: separa las animaciones del fondo de la página en el tema claro ---------- */
#reel, .escenario { background: var(--stage); }
:root[data-theme="light"] .case-media, :root[data-theme="light"] .vcard-media, :root[data-theme="light"] .reel-frame { background: #fff; }
:root[data-theme="light"] .case-media::after, :root[data-theme="light"] .vcard-media::after { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07); }
:root[data-theme="light"] .vcard-media { box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(0, 0, 0, .22); }
.vhead .note a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* =====================================================================================================
   v5 · web con páginas
   ===================================================================================================== */

/* ---------- menú: enlaces con el marcador de la marca (línea + punto) y hoja a pantalla completa en el móvil ---------- */
#nav { gap: 24px; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); margin-left: auto; font-size: 14px; }
.nav-tools { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.nav-l { position: relative; padding: 6px 0; color: var(--bone2); transition: color .3s; }
.nav-l:hover, .nav-l[aria-current="page"] { color: var(--bone); }
.nav-marca { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; view-transition-name: marca; pointer-events: none; }
.nav-marca::before { content: ""; position: absolute; left: 0; right: 3px; top: 2px; height: 1.5px; background: var(--bone2); }
.nav-marca i { position: absolute; right: 0; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); box-shadow: var(--dotglow); }
.nav-lang { color: var(--bone2); font-weight: 600; transition: color .3s; }
.nav-lang:hover { color: var(--bone); }
.nav-menu, .hoja-cerrar { height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--bone3); background: none; color: var(--bone);
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; cursor: pointer; transition: border-color .3s; }
.nav-menu:hover, .hoja-cerrar:hover { border-color: var(--bone2); }
.nav-menu { display: none; }
@media (max-width: 899px) {
  .nav-links, .nav-tools .theme-btn, .nav-lang { display: none; }
  .nav-menu { display: inline-flex; align-items: center; }
  .nav-tools { margin-left: auto; gap: 10px; }
}
.hoja { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; overflow-y: auto; background: var(--ink); color: var(--bone);
  padding: 14px var(--pad) calc(28px + env(safe-area-inset-bottom)); }
.hoja[hidden] { display: none; }
html.hoja-abierta, html.hoja-abierta body { overflow: hidden; }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; min-height: 42px; }
.hoja-cab .ar { height: 21px; width: auto; }
.hoja-nav { flex: 1; display: flex; align-items: center; padding: 40px 0; }
.hoja-nav ul { list-style: none; display: grid; gap: 4px; }
.hoja-nav a { font-size: clamp(38px, 10vw, 60px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.12; color: var(--bone2); transition: color .3s; }
.hoja-nav a:hover, .hoja-nav a[aria-current="page"] { color: var(--bone); }
.hoja-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding-top: 24px; border-top: 1px solid var(--line2); }
.hoja-lang { font-weight: 600; }
.hoja-redes .soc { width: 44px; height: 44px; }
html.js .hoja:not([hidden]) .hoja-nav li { animation: hoja-in .6s var(--ease) both; }
.hoja-nav li:nth-child(2) { animation-delay: .04s; } .hoja-nav li:nth-child(3) { animation-delay: .08s; }
.hoja-nav li:nth-child(4) { animation-delay: .12s; } .hoja-nav li:nth-child(5) { animation-delay: .16s; }
@keyframes hoja-in { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { html.js .hoja:not([hidden]) .hoja-nav li { animation: none; } }

/* ---------- pie con las páginas ---------- */
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 0 0 18px; }
.foot-nav a { color: var(--bone2); transition: color .3s; }
.foot-nav a:hover { color: var(--bone); }
.foot-lang { margin-bottom: 10px; }
.foot-lang a { color: var(--bone); font-weight: 600; }

/* ---------- transiciones entre páginas (View Transitions entre documentos) ---------- */
@view-transition { navigation: auto; }
#nav { view-transition-name: menu; }
.pieza-marco { view-transition-name: pieza; }
:root.pintando #nav, :root.pintando .nav-marca, :root.pintando .pieza-marco { view-transition-name: none; }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease); }
::view-transition-group(pieza) { animation-duration: .65s; }
:root:not(.pintando)::view-transition-old(root) { animation: vt-fuera .25s ease both; }
:root:not(.pintando)::view-transition-new(root) { animation: vt-dentro .35s var(--ease) both; }
@keyframes vt-fuera { to { opacity: 0; } }
@keyframes vt-dentro { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- páginas interiores ---------- */
.pag { padding-top: clamp(140px, 16vw, 220px); }
.mas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(40px, 5vw, 64px); }
.seleccion .case:last-of-type { margin-bottom: clamp(80px, 10vw, 140px); }
.fila-4 { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(14px, 1.6vw, 22px); row-gap: 40px; }
@media (max-width: 1099px) { .fila-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .fila-4 { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; margin: 0 calc(var(--pad) * -1);
    padding: 0 var(--pad) 4px; scroll-padding: 0 var(--pad); scrollbar-width: none; }
  .fila-4::-webkit-scrollbar { display: none; }
  .fila-4 .vcard { flex: 0 0 72%; scroll-snap-align: start; }
}
.lista-precios { list-style: none; max-width: 1240px; border-top: 1px solid var(--line2); }
.lista-precios a { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line2);
  font-size: clamp(26px, 3.4vw, 46px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.lista-precios span { font-size: clamp(15px, 1.4vw, 19px); font-weight: 600; letter-spacing: -0.01em; color: var(--bone2); white-space: nowrap; transition: color .3s; }
.lista-precios a:hover span { color: var(--bone); }
.trabajos .case:last-child { margin-bottom: 0; }

/* ---------- página de pieza ---------- */
.pieza { padding-top: clamp(104px, 11vw, 140px); }
.pieza-migas { font-size: 14px; color: var(--bone2); margin-bottom: clamp(20px, 2.4vw, 32px); }
.pieza-migas a { transition: color .3s; }
.pieza-migas a:hover { color: var(--bone); }
.pieza-grid { display: grid; gap: clamp(32px, 5vw, 80px); }
.pieza-escena { margin: 0; display: flex; justify-content: center; background: var(--stage); border-radius: clamp(20px, 2.4vw, 32px); padding: clamp(16px, 2.4vw, 32px); }
.pieza-marco { position: relative; overflow: hidden; border-radius: clamp(14px, 1.6vw, 22px); background: var(--card); }
:root[data-theme="light"] .pieza-marco { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(0, 0, 0, .22); }
.pieza-marco::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line2); z-index: 1; }
.pieza--vertical .pieza-marco { width: min(100%, calc(min(78vh, 860px) * 9 / 16)); aspect-ratio: 9 / 16; }
.pieza--ancha .pieza-marco { width: 100%; aspect-ratio: 16 / 9; }
.pieza-video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
@media (min-width: 960px) {
  .pieza--vertical .pieza-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
  .pieza--vertical .pieza-escena { position: sticky; top: 88px; }
  .pieza--vertical .pieza-marco { width: min(100%, calc(min(100vh - 176px, 900px) * 9 / 16)); }
}
.pieza-sonido { position: absolute; right: 14px; bottom: 18px; z-index: 2; height: 44px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: #fff;
  background: rgba(29, 29, 31, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .3s var(--ease), background .3s; }
.pieza-sonido:hover { background: rgba(29, 29, 31, .8); transform: scale(1.04); }
.pieza-sonido svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pieza-sonido .spk { fill: currentColor; stroke: none; }
.pieza-sonido .on { display: none; }
.pieza-sonido[aria-pressed="true"] .on { display: inline; }
.pieza-sonido[aria-pressed="true"] .off { display: none; }
.pieza-barra { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: rgba(0, 0, 0, .08); }
.pieza-barra i { display: block; height: 100%; background: var(--bone); transform-origin: 0 50%; transform: scaleX(0); }
.pieza-cab h1 { font-size: clamp(40px, 5.4vw, 84px); max-width: 12ch; }
.pieza-meta { margin-top: 18px; font-size: 15px; color: var(--bone2); }
.pieza-idea { margin-top: 12px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; max-width: 24ch; }
.pieza-datos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pieza-datos li { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2);
  font-size: 13px; font-weight: 500; color: var(--bone2); font-variant-numeric: tabular-nums; }
.pieza-resumen { margin-top: 22px; color: var(--bone2); max-width: 46ch; }
.pieza-bloque { margin-top: clamp(40px, 5vw, 64px); }
.pieza-bloque h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; color: var(--bone2); margin-bottom: 14px; }
.momentos { list-style: none; border-top: 1px solid var(--line2); }
.momento { position: relative; width: 100%; display: grid; grid-template-columns: 46px 60px 1fr; align-items: center; gap: 16px; padding: 12px 0 12px 14px;
  border: 0; border-bottom: 1px solid var(--line2); background: none; color: var(--bone2); font: inherit; text-align: left; cursor: pointer; transition: color .3s; }
.momento::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--bone); transform: scaleY(0); transition: transform .4s var(--ease); }
.momento:hover, .momento[aria-current="true"] { color: var(--bone); }
.momento[aria-current="true"]::before { transform: scaleY(1); }
.momento-t { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.momento img { width: 60px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--card); }
.pieza--ancha .momento { grid-template-columns: 46px 112px 1fr; }
.pieza--ancha .momento img { width: 112px; aspect-ratio: 16 / 9; }
.momento-txt { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.pieza-paleta { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 22px; }
.muestra { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--bone2); font-variant-numeric: tabular-nums; }
.muestra i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px var(--line2); }
.muestra b { display: block; font-weight: 600; color: var(--bone); }
.pieza-subt { margin-top: 28px; }
.pieza-tipo { font-weight: 600; letter-spacing: -0.01em; }
.pieza-aviso { margin-top: 28px; font-size: 14px; color: var(--bone2); max-width: 52ch; }
.pieza-creditos { margin-top: 8px; font-size: 14px; color: var(--bone2); max-width: 52ch; }
.pieza-creditos a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.pieza-cta { margin-top: clamp(40px, 5vw, 64px); padding-top: 32px; border-top: 1px solid var(--line2); }
.pieza-cta p { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 20px; max-width: 20ch; }
.pieza-cuerpo { display: grid; gap: clamp(32px, 5vw, 80px); margin-top: clamp(32px, 4vw, 56px); }
@media (min-width: 960px) { .pieza-cuerpo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .pieza-cuerpo .pieza-desglose { margin-top: 0; } }
.pieza-vecinas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(64px, 8vw, 110px); padding-top: 28px; border-top: 1px solid var(--line2); }
.pieza-vecinas a { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pieza-vecinas a[rel="next"] { flex-direction: row-reverse; text-align: right; }
.pieza-vecinas img { flex: none; width: 48px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--card); transition: transform .5s var(--ease); }
.pieza--ancha .pieza-vecinas img { width: 96px; aspect-ratio: 16 / 9; }
.pieza-vecinas a:hover img { transform: scale(1.04); }
.pieza-vecinas small { display: block; font-size: 13px; color: var(--bone2); }
.pieza-vecinas strong { display: block; font-size: clamp(17px, 2vw, 24px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }

/* ---------- servicios ---------- */
.servicios { display: grid; gap: 16px; }
@media (min-width: 860px) { .servicios { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.servicio h2 { font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -0.035em; }
.servicio-precio { margin: 10px 0 14px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--bone) !important; }
.servicio .btn { margin-top: 28px; align-self: flex-start; }
.sub-cab { margin: clamp(100px, 12vw, 180px) 0 clamp(36px, 4vw, 56px); }
.sub-cab h2 { font-size: clamp(34px, 4.4vw, 64px); }
.proceso { list-style: none; counter-reset: paso; display: grid; gap: 34px 48px; }
@media (min-width: 860px) { .proceso { grid-template-columns: 1fr 1fr; } }
.proceso li { counter-increment: paso; display: grid; grid-template-columns: 44px 1fr; gap: 6px 14px; padding-top: 22px; border-top: 1px solid var(--line2); }
.proceso li::before { content: counter(paso, decimal-leading-zero); grid-row: span 2; font-size: 15px; font-weight: 600; line-height: 1.9; color: var(--bone2); font-variant-numeric: tabular-nums; }
.proceso h3 { font-size: clamp(24px, 2.4vw, 32px); }
.proceso p { color: var(--bone2); max-width: 40ch; }
.faq { max-width: 860px; border-top: 1px solid var(--line2); }
.faq details { border-bottom: 1px solid var(--line2); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0;
  font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 28px; font-weight: 300; line-height: 1; color: var(--bone2); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 24px; color: var(--bone2); max-width: 60ch; }

/* ---------- about ---------- */
.about-grid { display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (min-width: 960px) { .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.about-ar { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: clamp(20px, 2.4vw, 32px); background: var(--stage); }
.about-ar-lienzo { position: absolute; left: 0; top: 0; width: 1080px; height: 1080px; transform-origin: 0 0; transform: scale(var(--k, .4)); }
.about-texto h1 { font-size: clamp(42px, 6vw, 96px); max-width: 12ch; margin-bottom: 8px; }
.about-texto > p:not(.kicker) { margin-top: 22px; max-width: 34ch; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; letter-spacing: -0.015em; color: var(--bone2); }
.about-texto .cta { align-items: center; }

/* ---------- contacto: brief guiado ---------- */
.contacto .sec-head { margin-bottom: 0; }
.contacto-grid { display: grid; gap: clamp(40px, 6vw, 96px); margin-top: clamp(48px, 6vw, 80px); }
@media (min-width: 960px) { .contacto-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } }
.brief { position: relative; }
.brief-progreso { position: relative; height: 2px; margin-bottom: 18px; background: var(--line2); }
.brief-progreso::after { content: ""; position: absolute; inset: 0; background: var(--bone); transform-origin: 0 50%; transform: scaleX(var(--progreso, 0)); transition: transform .6s var(--ease); }
.brief-punto { position: absolute; z-index: 1; top: -4px; left: calc(var(--progreso, 0) * 100%); width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--dot); box-shadow: var(--dotglow); transition: left .6s var(--ease); }
.brief-cuenta { margin-bottom: 26px; font-size: 14px; color: var(--bone2); font-variant-numeric: tabular-nums; }
.paso { min-width: 0; border: 0; }
.paso legend { margin-bottom: 28px; font-size: clamp(30px, 3.6vw, 52px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; }
.paso legend:focus { outline: none; }
html.js.motion .paso:not([hidden]) { animation: paso-in .5s var(--ease) both; }
@keyframes paso-in { from { opacity: 0; transform: translateY(16px); } }
.opciones { display: flex; flex-wrap: wrap; gap: 10px; }
.opcion { position: relative; display: inline-flex; align-items: center; height: 56px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--bone3);
  font-weight: 600; letter-spacing: -0.01em; cursor: pointer; transition: background-color .3s, color .3s, border-color .3s; }
.opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opcion:hover { border-color: var(--bone2); }
.opcion:has(input:checked) { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.opcion:has(input:focus-visible) { outline: 2px solid var(--bone); outline-offset: 3px; }
.campo { display: grid; gap: 8px; margin-top: 22px; max-width: 540px; }
.campo span { font-size: 14px; color: var(--bone2); }
.campo input, .campo textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--card); color: var(--bone); font: inherit; }
.campo textarea { min-height: 120px; resize: vertical; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--bone2); }
.brief-ref { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; min-height: 40px; padding: 0 6px 0 16px; border-radius: 999px; background: var(--card); font-size: 14px; }
.brief-ref[hidden] { display: none; }
.brief-ref span { font-weight: 600; }
.brief-ref button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--bone2); font-size: 18px; cursor: pointer; }
.brief-ref button:hover { color: var(--bone); }
.brief-resumen { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin-top: 26px; font-size: 15px; }
.brief-resumen dt { color: var(--bone2); }
.brief-resumen dd { font-weight: 600; }
.brief-error { margin-top: 18px; font-size: 15px; font-weight: 600; color: #d70015; }
:root:not([data-theme="light"]) .brief-error { color: #ff6961; }
.brief-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.brief-nav [hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.brief-ok h2 { font-size: clamp(36px, 4.6vw, 64px); }
.brief-ok p { margin: 14px 0 26px; color: var(--bone2); }
.brief-ok:focus { outline: none; }
.brief-fallo { margin-top: 26px; }
.brief-fallo p { margin-bottom: 16px; color: var(--bone2); }
html:not(.js) .brief { display: none; }
.contacto-directo { padding: clamp(24px, 3vw, 36px); border-radius: 30px; background: var(--card); }
.contacto-directo h2 { font-size: 24px; letter-spacing: -0.025em; }
.contacto-directo .note { margin-top: 10px; }
.contacto-directo .btn { margin: 22px 0 20px; max-width: 100%; }

/* ---------- 404 ---------- */
.error { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.error .foot-ag { justify-content: flex-start; }
.error .foot-line { margin-left: 0; }
.error h1 { margin-top: 36px; font-size: clamp(42px, 7vw, 110px); max-width: 13ch; }

/* créditos de licencia bajo la nota de Concepts (pequeños, sin competir con el texto) */
.creditos-nota { margin-top: -14px; font-size: 13px; line-height: 1.5; color: var(--bone2); max-width: 52ch; }
.creditos-nota a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* vídeo ancho en pantallas estrechas: el botón de sonido se queda en el icono (el texto sigue ahí para lectores de pantalla) */
@media (max-width: 639px) {
  .pieza--ancha .pieza-sonido { width: 40px; height: 40px; padding: 0; justify-content: center; right: 10px; bottom: 12px; }
  .pieza--ancha .pieza-sonido .sonido-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* pausa del vídeo de la pieza (WCAG 2.2.2): abajo a la izquierda, mismo cristal que el botón de sonido */
.pieza-pausa { position: absolute; left: 14px; bottom: 18px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  color: #fff; background: rgba(29, 29, 31, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .3s var(--ease), background .3s; }
.pieza-pausa:hover { background: rgba(29, 29, 31, .8); transform: scale(1.04); }
.pieza-pausa svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.pieza-pausa .ico-play { display: none; fill: currentColor; stroke: none; }
.pieza-pausa[aria-pressed="true"] .ico-play { display: inline; }
.pieza-pausa[aria-pressed="true"] .ico-pausa { display: none; }
@media (max-width: 639px) { .pieza--ancha .pieza-pausa { width: 40px; height: 40px; left: 10px; bottom: 12px; } }
