/* DESSMO — pizarra a contraluz, logo en metal blanco */
:root {
  --slate: #141517;
  --chalk: #ECE8E1;     /* texto principal: tiza */
  --steel: #9A9FA6;     /* texto secundario */
  --dust:  rgba(236,232,225,.16);   /* líneas guía */
  --metal: #DDE2E7;

  --pad: clamp(20px, 4vw, 56px);
  --max: 1280px;
  --f: "Archivo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--slate);
  color: var(--chalk);
  font-family: var(--f);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--metal); outline-offset: 4px; border-radius: 2px; }

/* fondo fijo */
#slate { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.dim { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: #0c0d0e; opacity: 0; }
.top, main, .foot { position: relative; z-index: 1; }

.skip { position: absolute; left: -9999px; z-index: 10; }
.skip:focus { left: var(--pad); top: 12px; background: var(--chalk); color: var(--slate); padding: 8px 14px; }

/* ---------- header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 28px;
  padding: 16px var(--pad);
  transition: background .4s, border-color .4s, opacity .8s, transform .8s;
  border-bottom: 1px solid transparent;
}
.top.scrolled { background: rgba(16,17,19,.72); backdrop-filter: blur(10px); border-bottom-color: rgba(236,232,225,.08); }
.intro .top { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; color: var(--chalk);
         opacity: 0; transition: opacity .5s; }
.top.docked .brand { opacity: 1; }
.brand-icon { height: 34px; width: auto; }
.brand-word { height: 16px; width: auto; }

.top nav { display: flex; gap: 28px; }
.top nav a { text-decoration: none; font-size: 15px; color: var(--steel); transition: color .2s; }
.top nav a:hover { color: var(--chalk); }
.lang {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  background: none; border: 1px solid rgba(236,232,225,.35); color: var(--chalk);
  border-radius: 99px; padding: 5px 12px; cursor: pointer;
}
.lang:hover { background: var(--chalk); color: var(--slate); }
/* sonido: abajo a la izquierda, como en Igloo; las barras laten cuando suena */
.snd { position: fixed; left: var(--pad); bottom: 22px; z-index: 6; display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px 0; cursor: pointer; font: inherit; font-size: 12px; gap: 6px; letter-spacing: .02em; color: var(--steel); transition: color .2s, opacity .8s; }
.snd:hover { color: var(--chalk); }
.snd-i { display: inline-flex; align-items: center; gap: 1.5px; height: 10px; margin-left: 2px; }
.snd-i i { width: 1.5px; height: 2px; background: currentColor; border-radius: 1px; transition: height .3s; }
.snd.playing .snd-i i { animation: snd 1.1s ease-in-out infinite; }
.snd.playing .snd-i i:nth-child(2) { animation-delay: -.3s; }
.snd.playing .snd-i i:nth-child(3) { animation-delay: -.6s; }
.snd.playing .snd-i i:nth-child(4) { animation-delay: -.85s; }
@keyframes snd { 0%, 100% { height: 2px; } 50% { height: 9px; } }
.snd-s { color: var(--chalk); }
.js:not(.ready) .snd { visibility: hidden; }
.snd:focus-visible, .lang:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }

/* ---------- ritmo ---------- */
main > section { position: relative; isolation: isolate; max-width: var(--max); margin: 0 auto; padding: clamp(88px, 12vw, 160px) var(--pad); }
h2 {
  font-weight: 800; font-variation-settings: "wdth" 112;
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -.015em;
  margin-bottom: clamp(36px, 5vw, 64px);
}

/* ---------- hero: el logo se dibuja con el scroll ---------- */
.hero { padding: 0 !important; max-width: none !important; }
.hero-pin { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 72px var(--pad) 110px; }

/* indicador: vástago de válvula */
.cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
       display: flex; flex-direction: column; align-items: center; gap: 10px;
       text-decoration: none; color: var(--steel); font-size: 12px; letter-spacing: .06em;
       opacity: 0; transition: color .2s, opacity 1s ease 2.3s; }
.lit .cue { opacity: 1; }
.cue-stem { position: relative; width: 1px; height: 46px; background: linear-gradient(rgba(236,232,225,0), rgba(236,232,225,.55)); }
.cue-bead { position: absolute; left: 50%; top: 0; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
            background: radial-gradient(circle at 35% 30%, #fff, #A4AAB1 45%, #4E5359);
            box-shadow: 0 0 10px rgba(220,230,240,.35);
            animation: valve 2.2s cubic-bezier(.65,0,.35,1) infinite; }
@keyframes valve { 0%, 15% { transform: translateY(0); } 55%, 70% { transform: translateY(37px); } 100% { transform: translateY(0); } }
.cue:hover { color: var(--chalk); }

.lockup { display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo { height: min(46vh, 460px); width: auto; overflow: visible;
        transform: translateY(var(--intro-dy, 0px)); transition: transform 1.3s cubic-bezier(.65,0,.25,1); }
.lit .logo { transform: none; }
.guides line, .guides circle { fill: none; stroke: var(--chalk); stroke-width: 1.1; opacity: .22; transition: opacity 1.6s ease; }
.chalk path { stroke: var(--chalk); transition: opacity 1.6s ease .2s; }
.metal { opacity: 0; transition: opacity 1.4s ease;
         filter: drop-shadow(0 0 1px rgba(255,255,255,.5)) drop-shadow(0 0 22px rgba(220,230,240,.28)); }
.metal path { stroke: url(#chrome); }
.metal { display: none; }
.lit .guides line, .lit .guides circle { opacity: 0; }
.dsm { color: var(--chalk); }
.dsm .ltr-s { stroke: #E2412B; }   /* las dos levas del desmodrómico */
.ltr-f { fill: currentColor; fill-opacity: 0; stroke-width: .9; transition: fill-opacity .45s ease; }
.ltr-f.done { fill-opacity: 1; }
.word, .tagline, .lede, .ctas { opacity: 0; transform: translateY(8px); transition: opacity 1.1s ease, transform 1.1s ease; }
.lit .word { opacity: .92; transform: none; transition-delay: .9s; }
.lit .tagline { opacity: 1; transform: none; transition-delay: 1.4s; }
.lit .lede { opacity: 1; transform: none; transition-delay: 1.7s; }
.lit .ctas { opacity: 1; transform: none; transition-delay: 2s; }

@media (prefers-reduced-motion: reduce) {
  .cue-bead { animation: none; top: 37px; }
}

.word { height: clamp(20px, 2.8vh, 30px); width: auto; margin-top: clamp(20px, 3vh, 34px); color: var(--chalk); }
.tagline {
  font-weight: 300; font-variation-settings: "wdth" 118;
  font-size: clamp(20px, 2vw, 28px); letter-spacing: 0; line-height: 1.15;
  margin-top: clamp(26px, 4vh, 44px);
}
.lede { color: var(--steel); max-width: 44ch; margin-top: 14px; font-size: clamp(16px, 1.3vw, 18px); }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: 99px;
  background: linear-gradient(180deg, #F4F5F6, #C9CED4); color: #15171A;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 6px 20px rgba(0,0,0,.35);
}
.btn:hover { background: linear-gradient(180deg, #FFFFFF, #D8DCE0); }
.btn-ghost { background: rgba(20,21,23,.35); color: var(--chalk); border-color: rgba(236,232,225,.35); box-shadow: none; }
.btn-ghost:hover { background: rgba(236,232,225,.1); }

/* ---------- estudio ---------- */
.estudio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.def { border-left: 1px solid rgba(236,232,225,.4); padding-left: 24px; }
.def-word { font-size: clamp(30px, 3.6vw, 48px); font-variation-settings: "wdth" 100; font-weight: 600; letter-spacing: -.01em; margin-bottom: 10px; }
.def-gram { font-style: italic; color: var(--steel); margin-bottom: 14px; }
.def-text { font-size: 19px; max-width: 40ch; }
.story-big { font-weight: 700; font-variation-settings: "wdth" 112; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.16; letter-spacing: -.01em; margin-bottom: 28px; max-width: 22ch; }
.story p:not(.story-big) { max-width: 52ch; color: var(--steel); font-size: 18px; }

/* ---------- servicios ---------- */
.serv-list { border-top: 1px solid rgba(236,232,225,.45); }
.serv-list > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(16px, 6vw, 96px); padding: 26px 0; border-bottom: 1px solid var(--dust); }
.serv-list dt { font-weight: 700; font-variation-settings: "wdth" 108; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; }
.serv-list dd { color: var(--steel); max-width: 48ch; align-self: center; }

.red {
  margin-top: clamp(48px, 7vw, 96px);
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid rgba(236,232,225,.14); border-radius: 6px;
  background: rgba(10,11,12,.45); backdrop-filter: blur(3px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 6vw, 96px);
}
.red h3 { font-weight: 800; font-variation-settings: "wdth" 112; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1; margin-bottom: 14px; }
.red p { color: var(--steel); max-width: 40ch; }
.red-tags { display: flex; flex-wrap: wrap; gap: 10px; align-content: center; }
.red-tags li { border: 1px solid rgba(236,232,225,.22); border-radius: 99px; padding: 8px 16px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.red-tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #8E949B); flex: none; }

/* ---------- trabajos ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.work h3 { font-weight: 700; font-variation-settings: "wdth" 108; font-size: 21px; margin: 16px 0 4px; }
.work p { color: var(--steel); font-size: 16px; max-width: 44ch; }
.work img, .ph { width: 100%; display: block; border-radius: 4px; object-fit: cover; }
.ph {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 calc(30% - 1px), var(--dust) calc(30% - 1px) 30%, transparent 30%),
    linear-gradient(var(--dust), var(--dust)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--dust), var(--dust)) 0 50% / 100% 1px no-repeat,
    rgba(10,11,12,.4);
  border: 1px solid rgba(236,232,225,.12);
}
.w-a { grid-column: 1 / span 7; } .w-a .ph, .w-a img { aspect-ratio: 4 / 3; }
.w-b { grid-column: 8 / span 5; align-self: end; } .w-b .ph, .w-b img { aspect-ratio: 16 / 12; }
.w-web { grid-column: 1 / -1; margin-top: 24px; }
.w-web h3 { margin-top: 0; }
.work .client { color: var(--chalk); opacity: .6; font-size: 14px; margin: 0 0 6px; }
.clips { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: clamp(16px, 2vw, 28px); margin-top: 20px; }
.clips figure { margin: 0; }
.clips .ph { aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.clips video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.clips video.ok { opacity: 1; }
.clips figcaption { color: var(--steel); font-size: 14px; margin-top: 10px; }

/* ---------- proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; border-top: 1px solid rgba(236,232,225,.4); }
.steps li { position: relative; padding-top: 44px; }
.node { position: absolute; top: 0; left: 0; width: 19px; height: 19px; border-radius: 50%;
        background: radial-gradient(circle at 35% 30%, #fff, #A4AAB1 45%, #4E5359); box-shadow: 0 0 14px rgba(220,230,240,.25); }
.steps h3 { font-weight: 800; font-variation-settings: "wdth" 112; font-size: clamp(20px, 1.8vw, 24px); margin-bottom: 8px; }
.steps p { color: var(--steel); font-size: 16px; max-width: 24ch; }

/* ---------- contacto ---------- */
.contacto h2 { font-size: clamp(40px, 6.4vw, 96px); font-variation-settings: "wdth" 125; font-weight: 900; letter-spacing: -.03em; line-height: .95; margin-bottom: 24px; max-width: 14ch; }
.c-lede { font-size: 19px; color: var(--steel); margin-bottom: 48px; }
.c-links { display: grid; grid-template-columns: repeat(3, max-content); gap: 20px clamp(28px, 4vw, 64px); }
.c-links a { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.c-ico {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.22), rgba(255,255,255,.04) 60%);
  border: 1px solid rgba(236,232,225,.28);
  box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset, 0 8px 24px rgba(0,0,0,.35);
  transition: border-color .25s, box-shadow .25s;
}
.c-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--chalk); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.c-ico svg .dot { fill: var(--chalk); stroke: none; }
.c-txt { display: flex; flex-direction: column; line-height: 1.2; }
.c-lab { font-size: 13px; color: var(--steel); margin-bottom: 4px; }
.c-val { font-weight: 700; font-variation-settings: "wdth" 108; font-size: clamp(18px, 1.7vw, 24px); }
.c-links a:hover .c-ico { border-color: rgba(236,232,225,.7); box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset, 0 0 22px rgba(220,230,240,.25); }
@media (max-width: 960px) { .c-links { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
        padding: 28px var(--pad) 40px; border-top: 1px solid var(--dust); font-size: 14px; color: var(--steel); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .top nav { display: none; }
  .estudio, .red { grid-template-columns: 1fr; }
  .serv-list > div { grid-template-columns: 1fr; gap: 6px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .w-a, .w-web { grid-column: 1 / -1; }
  .w-b { grid-column: auto; margin-top: 0; align-self: start; }
  .w-a .ph, .w-a img { aspect-ratio: 4 / 3; }
  .clips { grid-template-columns: 1fr 1fr; } .clips figure:first-child { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { top: 0; bottom: 0; left: 9px; right: auto; border-top: 0; border-left: 1px solid rgba(236,232,225,.4); }
  .steps li { padding: 0 0 32px 48px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo { height: 40vh; }
  .grid { grid-template-columns: 1fr; }
  .w-b .ph { aspect-ratio: 4 / 3; }
  .clips { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .metal, .chalk path, .guides line, .guides circle, .word, .tagline, .lede, .ctas, .top { transition: none !important; }
}

body { overflow-x: clip; }

/* antes de que el JS prepare la intro no se muestra el logo ni el menú (evita un fotograma del estado final) */
.js:not(.ready) .logo, .js:not(.ready) .top, .js:not(.ready) .cue { visibility: hidden; }

/* intro: scroll bloqueado hasta que aparecen los textos */
html.lock, html.lock body { overflow: hidden; }
html { scrollbar-gutter: stable; }
/* al terminar la intro el dibujo a lápiz cede su lugar al logo de partículas (WebGL) */
.pl-on .logo .chalk, .pl-on .logo .dsm { opacity: 0; transition: none; }
.logo-fx { position: fixed; left: 0; top: 0; z-index: 1; pointer-events: none; display: none; }

/* pantalla de entrada (solo con sonido): sobre la vista desde arriba de la malla */
.gate { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  opacity: 0; transition: opacity .6s ease; }
.gate.on { opacity: 1; }
.gate-in { font: inherit; font-size: 15px; letter-spacing: .06em; color: var(--chalk); background: rgba(12,13,14,.35); backdrop-filter: blur(2px);
  border: 1px solid rgba(236,232,225,.45); border-radius: 99px; padding: 12px 34px; cursor: pointer; transition: background .25s, color .25s; }
.gate-in:hover, .gate-in:focus-visible { background: var(--chalk); color: var(--slate); outline: none; }
.gate-mute { font: inherit; font-size: 12px; color: var(--steel); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.gate-mute:hover { color: var(--chalk); }
.gate-lang { position: absolute; top: 18px; right: var(--pad); }

/* ---------- trabajos: cama apilable en 3D (fija mientras se scrollea) ---------- */
.showcase { position: relative; width: 100vw; margin-left: calc(50% - 50vw); height: 460vh; margin-bottom: clamp(48px, 8vw, 120px); }
.sc-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; cursor: grab; touch-action: pan-y; }
.sc-stage.grab { cursor: grabbing; }
.sc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sc-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.sc-lines line { stroke: var(--chalk); stroke-width: 1; }
.sc-lines circle { fill: var(--chalk); }
.sc-labels { position: absolute; inset: 0; pointer-events: none; }
.sc-label { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 13px; letter-spacing: .02em; color: var(--chalk); opacity: 0; will-change: transform, opacity; }
.sc-copy { position: absolute; left: var(--pad); bottom: clamp(56px, 9vh, 96px); max-width: 34ch; pointer-events: none; }
/* título arriba a la izquierda, información abajo: equilibra la pieza centrada */
.sc-head { position: absolute; left: var(--pad); top: clamp(96px, 13vh, 132px); pointer-events: none; }
.sc-head h3 { font-weight: 700; font-variation-settings: "wdth" 108; font-size: clamp(28px, 3vw, 42px); margin: 2px 0 0; line-height: 1.05; }
.sc-head .client { color: var(--chalk); opacity: .6; font-size: 14px; margin: 0; }
.sc-copy p { color: var(--steel); font-size: 16px; }
.sc-step { color: var(--chalk) !important; margin-top: 14px; font-size: 15px !important; min-height: 1.4em; }
.sc-step.in { animation: scstep .6s ease both; }
@keyframes scstep { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sc-hint { font-size: 12px !important; opacity: .7; margin-top: 6px; }
@media (max-width: 760px) {
  .showcase { height: 400vh; }
  .sc-head { top: 84px; }
  .sc-copy { bottom: 64px; right: var(--pad); max-width: none; }
  .sc-copy p:not(.sc-step):not(.sc-hint) { display: none; }
  .sc-label { font-size: 11px; }
}

