/* ============================================================================
   GONZALO RUIZ ALARCÓN · Portfolio
   Arquetipo: Editorial Light Gallery — papel claro, dos respiros oscuros.
   HTML/CSS/JS plano. Sin build, sin frameworks.
   ========================================================================== */

/* ---------------------------------------------------------------- TOKENS */
:root {
  --paper:        #F5F2EC;
  --paper-raised: #FFFDF8;
  --ink:          #14161A;
  --line:         #DED8CB;
  --muted:        #6B6459;
  --atlantic:     #12414F;
  --brass:        #C08A3E;
  /* Latón oscurecido para TEXTO PEQUEÑO sobre papel: el #C08A3E solo da
     2,71:1 de contraste y no llega al mínimo AA (4,5:1). Sobre fondo
     tinta se sigue usando el latón normal, que ahí contrasta de sobra. */
  --brass-ink:    #8A5F22;
  --green:        #2E7D5B;

  --ink-08: rgba(20, 22, 26, .08);
  --ink-14: rgba(20, 22, 26, .14);
  --ink-55: rgba(20, 22, 26, .55);
  --paper-14: rgba(245, 242, 236, .14);
  --paper-55: rgba(245, 242, 236, .55);

  --display: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1320px;
  --gut: clamp(20px, 5vw, 64px);
  --nav-h: 74px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --r-s: 6px;
  --r-m: 12px;
  --r-l: 20px;
}

/* ----------------------------------------------------------------- RESET */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(15.5px, .55vw + 14px, 17.5px);
  line-height: 1.62;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -.015em; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--atlantic); color: var(--paper-raised); }

:focus-visible {
  outline: 2px solid var(--atlantic);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* Texto solo para lectores de pantalla y buscadores */
.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;
}

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: var(--r-s);
  font-family: var(--mono); font-size: 12px;
  transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip:focus { transform: none; }

/* -------------------------------------------------- TEXTURA Y AMBIENTE */
/* El grano va POR ENCIMA de las secciones (que van a z-index 2), si no
   no se ve nunca y el papel queda plano. Por debajo de splash y paneles. */
.paper-grain {
  position: fixed; inset: 0; z-index: 140;
  pointer-events: none;
  opacity: .38;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

.paper-glow {
  position: fixed; inset: -25%; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 18% 22%, rgba(192, 138, 62, .10), transparent 70%),
    radial-gradient(46% 40% at 84% 68%, rgba(18, 65, 79, .09), transparent 72%);
  animation: drift 34s var(--ease) infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2.5%, -3%, 0) scale(1.08); }
}

/* --------------------------------------------------------------- SPLASH */
.splash {
  position: fixed; inset: 0; z-index: 300;
  background: var(--ink);
  display: grid; place-items: center;
  animation: splashFailsafe 4.5s forwards;
}
.splash-inner { text-align: center; padding: 0 24px; }

.splash-name {
  display: flex; justify-content: center; gap: clamp(1px, .5vw, 5px);
  font-family: var(--display);
  font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-size: clamp(38px, 9vw, 104px);
  line-height: 1;
  color: var(--paper);
}
.splash-name span {
  display: block;
  opacity: 0;
  transform: translateY(.42em);
  animation: splashLetter .62s var(--ease-out) forwards;
}
.splash-name span:nth-child(1) { animation-delay: .04s; }
.splash-name span:nth-child(2) { animation-delay: .10s; }
.splash-name span:nth-child(3) { animation-delay: .16s; }
.splash-name span:nth-child(4) { animation-delay: .22s; }
.splash-name span:nth-child(5) { animation-delay: .28s; }
.splash-name span:nth-child(6) { animation-delay: .34s; }
.splash-name span:nth-child(7) { animation-delay: .40s; }

@keyframes splashLetter { to { opacity: 1; transform: none; } }

.splash-sub {
  margin-top: 14px;
  font-family: var(--mono); font-size: clamp(9px, 1.7vw, 12px);
  letter-spacing: .48em; text-indent: .48em;
  color: var(--paper-55);
  opacity: 0; animation: splashLetter .6s var(--ease-out) .44s forwards;
}
.splash-bar {
  width: min(180px, 44vw); height: 1px; margin: 30px auto 0;
  background: rgba(245, 242, 236, .18); overflow: hidden;
}
.splash-bar i {
  display: block; height: 100%; width: 100%;
  background: var(--brass);
  transform: scaleX(0); transform-origin: left;
  animation: splashBar 1.05s var(--ease) .05s forwards;
}
@keyframes splashBar { to { transform: scaleX(1); } }

/* Red de seguridad nº2 (CSS puro): a los 4,5 s se va, pase lo que pase */
@keyframes splashFailsafe {
  0%, 92%  { opacity: 1; visibility: visible; }
  100%     { opacity: 0; visibility: hidden; pointer-events: none; }
}
.splash.is-done,
.splash-gone .splash {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .55s var(--ease), visibility 0s .55s;
  animation: none;
}
/* Sin JS no hay splash en absoluto: nunca puede tapar el contenido */
html:not(.js) .splash { display: none; }

/* --------------------------------------------------------------- CURSOR */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block; position: fixed; top: 0; left: 0; z-index: 290;
    pointer-events: none;
    transform: translate3d(-100px, -100px, 0);
    will-change: transform;
  }
  .cursor-ring {
    width: 30px; height: 30px; margin: -15px 0 0 -15px;
    border: 1px solid var(--ink-14);
    border-radius: 50%;
    transition: width .3s var(--ease), height .3s var(--ease),
                margin .3s var(--ease), border-color .3s var(--ease),
                background-color .3s var(--ease);
  }
  .cursor-label {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
    text-transform: uppercase; color: var(--paper);
    opacity: 0; transition: opacity .22s var(--ease);
    white-space: nowrap;
  }
  .cursor.is-active .cursor-ring {
    width: 76px; height: 76px; margin: -38px 0 0 -38px;
    background: var(--ink); border-color: var(--ink);
  }
  .cursor.is-active .cursor-label { opacity: 1; }
  .cursor.on-dark .cursor-ring { border-color: var(--paper-14); }
  .cursor.on-dark.is-active .cursor-ring { background: var(--paper); border-color: var(--paper); }
  .cursor.on-dark .cursor-label { color: var(--ink); }
  html.cursor-on, html.cursor-on * { cursor: none !important; }
  /* …salvo donde escribir: ahí el cursor del sistema hace falta de verdad */
  html.cursor-on input, html.cursor-on textarea, html.cursor-on select { cursor: auto !important; }
}

/* ---------------------------------------------------------- MARCA LATERAL */
.edge-badge {
  position: fixed; right: 0; top: 50%; z-index: 60;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 9px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  opacity: 0; transition: opacity .5s var(--ease);
}
.edge-badge.is-on { opacity: 1; }
.edge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 125, 91, .55);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(46, 125, 91, .5); }
  70%  { box-shadow: 0 0 0 9px rgba(46, 125, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 91, 0); }
}
@media (max-width: 1180px) { .edge-badge { display: none; } }

/* ------------------------------------------------------------------ NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease),
              backdrop-filter .4s var(--ease);
}
.nav-inner {
  max-width: var(--wrap); margin-inline: auto;
  padding: 0 var(--gut);
  height: var(--nav-h);
  display: flex; align-items: center; gap: 24px;
  transition: height .35s var(--ease);
}

.brandmark { display: flex; align-items: baseline; gap: 12px; margin-right: auto; }
.brandmark-gra {
  font-family: var(--display);
  font-variation-settings: 'opsz' 40, 'WONK' 1;
  font-size: 25px; letter-spacing: .03em; line-height: 1;
  color: var(--paper);
  transition: color .4s var(--ease);
}
.brandmark-full {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--paper-55);
  transition: color .4s var(--ease), opacity .3s var(--ease);
}

.nav-links { display: flex; align-items: center; gap: clamp(14px, 1.9vw, 30px); }
.nav-links a {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 13.5px; font-weight: 500; letter-spacing: .005em;
  color: var(--paper-55);
  transition: color .3s var(--ease);
  position: relative;
}
.nav-links a i {
  font-family: var(--mono); font-size: 9px; font-style: normal;
  opacity: .55; letter-spacing: .06em;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .38s var(--ease);
}
.nav-links a:hover, .nav-links a.is-current { color: var(--paper); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }

.nav-side { display: flex; align-items: center; gap: 12px; }

/* --------------------------------------------------------- selector idioma
   Dos botones con bandera, como en Silver Barbería y Sotogrande Car Group,
   pero vestidos con la paleta del portfolio: la cápsula y la tipografía son
   de aquí (latón sobre papel, mono, radio 100px) y la bandera solo se ve a
   todo color cuando ese idioma está activo. La inactiva se dessatura para
   que el nav no se llene de rojo y azul compitiendo con el latón.        */
.lang {
  display: flex; align-items: center; gap: 2px;
  padding: 3px;
  border: 1px solid var(--paper-14); border-radius: 100px;
  transition: border-color .3s var(--ease);
}
.lang:hover { border-color: var(--paper-55); }

.lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border: 0; border-radius: 100px; background: transparent;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: var(--paper-55);
  cursor: pointer;
  transition: background-color .28s var(--ease), color .28s var(--ease);
}
.lang-btn em { font-style: normal; line-height: 1; }

.lang-flag {
  width: 15px; height: 10px; display: block; border-radius: 1.5px;
  /* Sombra finísima para que la bandera no flote sobre el fondo oscuro */
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .28);
  filter: saturate(.15) opacity(.5);
  transition: filter .28s var(--ease);
}

.lang-btn:hover { color: var(--paper); }
.lang-btn:hover .lang-flag { filter: saturate(.6) opacity(.85); }

/* Idioma activo: cápsula de latón translúcido + bandera a todo color */
.lang-btn.is-on {
  background: rgba(192, 138, 62, .22);
  color: var(--paper);
}
.lang-btn.is-on .lang-flag { filter: none; }

/* Sobre fondo claro (nav pegado arriba y páginas legales) el texto va en
   tinta, si no el papel sobre papel desaparece. */
.nav.is-stuck .lang-btn,
.legal-page .lang-btn { color: var(--muted); }
.nav.is-stuck .lang-btn:hover,
.legal-page .lang-btn:hover { color: var(--ink); }
.nav.is-stuck .lang-btn.is-on,
.legal-page .lang-btn.is-on {
  background: rgba(192, 138, 62, .16);
  color: var(--brass-ink);
}

/* Con el menú móvil abierto el fondo vuelve a ser oscuro */
body.nav-open .lang-btn { color: var(--paper-55); }
body.nav-open .lang-btn.is-on { color: var(--paper); background: rgba(192, 138, 62, .22); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 20px; border-radius: 100px;
  background: var(--paper); color: var(--ink);
  font-size: 13.5px; font-weight: 600; letter-spacing: .005em;
  transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); background: var(--brass); color: var(--ink); }
.nav-cta-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: ping 2.4s var(--ease) infinite;
}

.burger { display: none; width: 40px; height: 40px; position: relative; }
.burger i {
  position: absolute; left: 9px; right: 9px; height: 1.5px;
  background: var(--paper); border-radius: 2px;
  transition: transform .38s var(--ease), opacity .25s var(--ease), background-color .4s var(--ease);
}
.burger i:nth-child(1) { top: 16px; }
.burger i:nth-child(2) { top: 23px; }

/* nav compactada al hacer scroll → cambia a tinta sobre papel */
.nav.is-stuck {
  background: rgba(245, 242, 236, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line), 0 12px 34px -28px rgba(20, 22, 26, .5);
}
.nav.is-stuck .nav-inner { height: 62px; }
.nav.is-stuck .brandmark-gra { color: var(--ink); }
.nav.is-stuck .brandmark-full { color: var(--muted); opacity: 0; }
.nav.is-stuck .nav-links a { color: var(--muted); }
.nav.is-stuck .nav-links a:hover, .nav.is-stuck .nav-links a.is-current { color: var(--ink); }
.nav.is-stuck .lang { border-color: var(--line); }
.nav.is-stuck .lang:hover { border-color: var(--ink); }
.nav.is-stuck .burger i { background: var(--ink); }
.nav.is-stuck .nav-cta { background: var(--ink); color: var(--paper); }
.nav.is-stuck .nav-cta:hover { background: var(--atlantic); }

/* ----------------------------------------------------------------- BOTONES */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 100px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .005em;
  border: 1px solid transparent;
  transition: transform .32s var(--ease), background-color .32s var(--ease),
              color .32s var(--ease), border-color .32s var(--ease),
              box-shadow .32s var(--ease);
  text-align: center;
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .34s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { background: var(--brass); box-shadow: 0 16px 40px -22px rgba(192, 138, 62, .9); }

.btn-quiet { color: var(--paper-55); border-color: var(--paper-14); }
.btn-quiet:hover { color: var(--paper); border-color: var(--paper-55); transform: none; }

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--atlantic); box-shadow: 0 18px 44px -24px rgba(18, 65, 79, .85); }

.btn-line { border-color: var(--ink-14); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--brass); }
.btn-lightline { border-color: var(--paper-14); color: var(--paper-55); }
.btn-lightline:hover { border-color: var(--paper); color: var(--paper); transform: none; }

.btn-block { width: 100%; }

/* ------------------------------------------------------------------ HERO */
.hero {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 40px) 0 90px;
  color: var(--paper);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(78% 58% at 22% 12%, rgba(18, 65, 79, .42), transparent 62%),
    radial-gradient(52% 46% at 88% 22%, rgba(192, 138, 62, .16), transparent 66%),
    linear-gradient(180deg, #101216 0%, #14161A 58%, #16181C 78%, var(--paper) 100%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 72%, rgba(245, 242, 236, .55) 88%, var(--paper) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(24px, 3.2vw, 56px);
  align-items: center;
}

.hero-kicker {
  font-family: var(--mono); font-size: clamp(9px, .92vw, 11px);
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--paper-55);
  margin-bottom: clamp(16px, 2.6vh, 28px);
}

.hero-title {
  font-family: var(--display);
  font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300;
  font-size: clamp(58px, 9.6vw, 136px);
  line-height: .92;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}
.hero-mono { display: block; }
.hero-name {
  font-family: var(--mono); font-size: clamp(10px, 1.05vw, 12.5px);
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--paper-55);
  margin-bottom: clamp(18px, 2.6vh, 30px);
  padding-left: .28em;
}

.hero-tagline {
  font-family: var(--display);
  font-variation-settings: 'opsz' 36;
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.32; letter-spacing: -.01em;
  color: var(--paper);
  max-width: 22ch;
  margin-bottom: 20px;
}
.hero-cred {
  font-family: var(--mono); font-size: clamp(9.5px, .92vw, 11.5px);
  letter-spacing: .09em; color: var(--paper-55);
  padding-top: 15px; border-top: 1px solid var(--paper-14);
  display: inline-block;
  margin-bottom: clamp(22px, 3.4vh, 36px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .3em;
  text-transform: uppercase; color: rgba(20, 22, 26, .42);
  z-index: 3;
}
.hero-scroll i {
  display: block; width: 1px; height: 32px;
  background: linear-gradient(180deg, rgba(20, 22, 26, .38), transparent);
  animation: scrollHint 2.2s var(--ease) infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .3; }
  50%      { transform: scaleY(1);  transform-origin: top; opacity: 1; }
}
@media (max-width: 900px) { .hero-scroll { display: none; } }

/* ----------------------------------------------- MARCOS DE DISPOSITIVO */
.screen {
  position: relative; overflow: hidden; background: #E9E5DC;
}
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; position: relative; z-index: 1; }
.screen img.is-broken { opacity: 0; }

/* Placeholder de retícula: se ve mientras carga o si la imagen falla */
.ph {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 12px;
  background:
    linear-gradient(rgba(20, 22, 26, .05) 1px, transparent 1px) 0 0 / 100% 22px,
    linear-gradient(90deg, rgba(20, 22, 26, .05) 1px, transparent 1px) 0 0 / 22px 100%,
    #EDE8DE;
}
.ph b {
  font-family: var(--display); font-variation-settings: 'opsz' 24;
  font-size: clamp(11px, 1.3vw, 16px); font-weight: 400; color: var(--ink-55);
}
.ph i {
  font-family: var(--mono); font-style: normal;
  font-size: clamp(7px, .8vw, 10px); letter-spacing: .1em; color: rgba(20, 22, 26, .35);
}

.browser {
  border-radius: 10px; overflow: hidden;
  background: #F2EEE5;
  border: 1px solid rgba(20, 22, 26, .1);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px; height: 30px;
  background: #E7E2D7; border-bottom: 1px solid rgba(20, 22, 26, .08);
}
.browser-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(20, 22, 26, .18); flex: none; }
.browser-url {
  margin-left: 10px; flex: 1;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
  color: rgba(20, 22, 26, .45);
  background: rgba(255, 253, 248, .8);
  border-radius: 100px; padding: 3px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser .screen { aspect-ratio: 1600 / 1000; }

.laptop { position: relative; }
.laptop-lid {
  background: #1D2025; padding: 9px 9px 9px;
  border-radius: 14px 14px 4px 4px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .07) inset;
}
.laptop-base {
  height: 12px; margin: 0 -7%;
  background: linear-gradient(180deg, #24272D, #15171B);
  border-radius: 0 0 12px 12px;
  display: flex; align-items: flex-start; justify-content: center;
  box-shadow: 0 18px 32px -22px rgba(0, 0, 0, .9);
}
.laptop-base span {
  width: 16%; height: 4px; border-radius: 0 0 5px 5px;
  background: rgba(255, 255, 255, .09);
}

.phone {
  position: relative;
  background: #1D2025; padding: 7px;
  border-radius: 26px;
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .07) inset;
}
.phone .screen { border-radius: 20px; aspect-ratio: 600 / 1298; }
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 5px; border-radius: 100px;
  background: rgba(0, 0, 0, .55); z-index: 3;
}

/* --------------------------------------------------------- HERO COLLAGE */
/* Portátil centrado, dos móviles a los lados y ligeramente rotados.
   Los tres se anclan al centro vertical y se desplazan desde ahí. */
.collage { position: relative; height: clamp(280px, 34vw, 430px); }
.collage-item { position: absolute; will-change: transform; }
.collage-laptop {
  width: 72%; left: 14%; top: 50%; z-index: 2;
  transform: translateY(-50%);
}
.collage-phone { width: 20.5%; top: 50%; z-index: 3; }
.collage-phone--left  { left: -1%;  transform: translateY(-58%) rotate(-8deg); }
.collage-phone--right { right: -1%; transform: translateY(-40%) rotate(7deg); }

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .collage { height: clamp(240px, 46vw, 360px); order: 2; margin-top: 4px; }
  .collage-laptop { width: 68%; left: 16%; }
  .collage-phone { width: 20%; }
}
@media (max-width: 560px) {
  /* El hero entero tiene que caber en una pantalla de móvil: es lo primero
     que ve el dueño del bar y no puede quedarse el collage cortado. */
  .hero { padding: calc(var(--nav-h) + 22px) 0 34px; }
  .hero-inner { gap: 14px; }
  .hero-title { font-size: clamp(64px, 17.5vw, 88px); margin-bottom: 14px; }
  .hero-tagline { font-size: 19px; margin-bottom: 14px; }
  .hero-cred { padding-top: 12px; margin-bottom: 18px; letter-spacing: .06em; }
  .hero-actions { gap: 9px; }
  .hero-actions .btn { padding: 13px 22px; }

  /* La altura del contenedor tiene que cubrir el alto real del portátil
     (captura 16:10 + barra + base), si no se desborda por abajo. */
  .collage { height: 218px; margin-top: 0; }
  .collage-laptop { width: 64%; left: 18%; }
  .collage-phone { width: 20%; }
  .collage-phone--left  { transform: translateY(-56%) rotate(-8deg); }
  .collage-phone--right { transform: translateY(-42%) rotate(7deg); }
}

/* -------------------------------------------------------------- MARQUEE */
.marquee { overflow: hidden; position: relative; z-index: 3; }
.marquee--seam {
  background: var(--paper);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.marquee--stack {
  border-top: 1px solid var(--line);
  padding: 13px 0;
  background: var(--paper);
  margin-top: clamp(20px, 3vw, 34px);
}
.marquee-track {
  display: flex; width: max-content;
  animation: slide 46s linear infinite;
}
.marquee-track--rev { animation-duration: 58s; animation-direction: reverse; }
.marquee-track--slow { animation-duration: 72s; }
.marquee-track > span {
  padding-right: 44px;
  font-family: var(--mono); font-size: clamp(10px, 1.1vw, 12.5px);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.marquee--stack .marquee-track > span { color: rgba(20, 22, 26, .38); font-size: 10.5px; }
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }

/* ------------------------------------------------------ CHROME DE SECCIÓN */
.section {
  position: relative; z-index: 2;
  padding: clamp(76px, 11vw, 152px) 0;
}
.section + .section { border-top: 1px solid var(--line); }

.watermark {
  position: absolute; top: clamp(18px, 3vw, 42px); right: clamp(10px, 4vw, 60px);
  font-family: var(--display); font-variation-settings: 'opsz' 144;
  font-size: clamp(140px, 24vw, 380px); line-height: .72; font-weight: 300;
  color: rgba(20, 22, 26, .035);
  pointer-events: none; user-select: none; z-index: 0;
  letter-spacing: -.05em;
}
.watermark--works { top: clamp(10px, 2vw, 30px); }

.s-head { max-width: 900px; margin-bottom: clamp(44px, 6vw, 78px); position: relative; z-index: 1; }

.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: clamp(18px, 2.4vw, 26px);
}
.kicker i {
  font-style: normal; color: var(--brass-ink); letter-spacing: .1em;
  padding-right: 12px; border-right: 1px solid var(--line);
}
.kicker--light { color: var(--paper-55); }
.kicker--light i { color: var(--brass); border-color: var(--paper-14); }

.s-title {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300;
  font-size: clamp(31px, 4.6vw, 62px);
  line-height: 1.03; letter-spacing: -.028em;
  margin-bottom: clamp(18px, 2.4vw, 28px);
}
.s-title em {
  font-style: italic; font-variation-settings: 'opsz' 144, 'WONK' 1;
  color: var(--atlantic);
}
.s-title--tight { font-size: clamp(28px, 3.6vw, 48px); }

.s-lead {
  font-size: clamp(16px, 1.35vw, 19px); line-height: 1.62;
  color: var(--muted); max-width: 62ch;
}
.s-lead strong { color: var(--ink); font-weight: 600; }
.s-lead--tight { font-size: clamp(15px, 1.1vw, 17px); }

/* ------------------------------------------------------ 01 · EL MERCADO */
.market-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(28px, 4vw, 64px); align-items: start;
  position: relative; z-index: 1;
}

/* Los cuatro frentes del análisis previo */
.checks {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden;
}
.check {
  background: var(--paper-raised);
  padding: clamp(24px, 2.8vw, 36px) clamp(20px, 2.4vw, 32px);
  display: flex; flex-direction: column; gap: 9px;
  transition: background-color .4s var(--ease);
}
.check:hover { background: #FFF; }
.check-n {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--paper-raised); background: var(--atlantic);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 4px;
}
.check-title {
  font-family: var(--display); font-variation-settings: 'opsz' 60, 'WONK' 1;
  font-weight: 400; font-size: clamp(19px, 1.9vw, 25px);
  line-height: 1.15; letter-spacing: -.022em; color: var(--ink);
}
.check-text { font-size: 14.5px; line-height: 1.6; color: var(--muted); }

.market-aside {
  border-left: 1px solid var(--line);
  padding: 4px 0 4px clamp(20px, 2.4vw, 32px);
}
.market-aside-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: var(--brass-ink); margin-bottom: 14px;
}
.market-aside-note { font-size: 14.5px; line-height: 1.66; color: var(--muted); }
.market-aside-method {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; line-height: 1.62;
  color: rgba(20, 22, 26, .45);
}

.pull {
  margin-top: clamp(48px, 6vw, 84px);
  padding-top: clamp(30px, 4vw, 48px);
  border-top: 1px solid var(--line);
  position: relative; z-index: 1;
}
.pull p {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-style: italic; font-weight: 300;
  font-size: clamp(24px, 3.4vw, 46px); line-height: 1.16;
  letter-spacing: -.025em; color: var(--atlantic);
  max-width: 20ch;
}

@media (max-width: 900px) {
  .market-grid { grid-template-columns: 1fr; }
  .market-aside { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .checks { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------- 02 · TRABAJOS */
.works { position: relative; z-index: 2; border-top: 1px solid var(--line); padding-top: clamp(70px, 9vw, 128px); }

.works-head-inner { padding-bottom: clamp(26px, 3vw, 40px); }

.works-pinbar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 242, 236, .72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 13px 0;
  margin-bottom: clamp(22px, 3vw, 40px);
}
.works-ctrl { display: flex; align-items: center; gap: 18px; }
.works-bar { flex: 1; max-width: 340px; height: 1px; background: var(--line); overflow: hidden; }
.works-bar i {
  display: block; height: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.works-arrows { display: flex; gap: 8px; }
.works-arrows button {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.works-arrows button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.works-arrows button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.works-arrows button[disabled] { opacity: .3; pointer-events: none; }

.works-pin { position: relative; }

.works-viewport {
  overflow-x: auto;
  /* Explícito: con overflow-x:auto el eje Y también recorta, y se comían
     las sombras de las tarjetas. El padding les da aire. */
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: 14px 22px;
}
.works-viewport::-webkit-scrollbar { display: none; }

.works-track {
  display: flex; align-items: stretch;
  gap: clamp(18px, 2.4vw, 40px);
  width: max-content;
  padding-inline: max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut)));
}

.work {
  flex: 0 0 auto;
  width: min(1180px, 88vw);
  scroll-snap-align: center;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: clamp(20px, 2.4vw, 42px);
  position: relative; overflow: hidden;
  box-shadow: 0 40px 80px -60px rgba(20, 22, 26, .5);
}
.work::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent, var(--atlantic)); opacity: .9;
}

.work-inner {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(22px, 3vw, 52px); align-items: center; height: 100%;
}

.work-media { position: relative; }
.frame--mobile { display: none; }

.lineart {
  position: absolute; right: -14px; bottom: -18px;
  width: clamp(96px, 12vw, 156px); height: auto;
  color: var(--accent, var(--atlantic));
  opacity: .17; pointer-events: none; z-index: 2;
}
.lineart circle { fill: none; stroke: currentColor; stroke-width: 2; }

/* trazado con stroke-dasharray — solo se oculta si el JS está vivo */
html.js .lineart path, html.js .lineart circle {
  stroke-dasharray: var(--len, 900);
  stroke-dashoffset: var(--len, 900);
}
html.js .lineart.is-in path, html.js .lineart.is-in circle {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.5s var(--ease-out) var(--d, 0s);
}
html.reveal-all .lineart path, html.reveal-all .lineart circle { stroke-dashoffset: 0 !important; }

.work-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.work-eyebrow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.work-eyebrow em { font-style: normal; color: var(--line); }
.work-n {
  color: var(--paper-raised); background: var(--accent, var(--atlantic));
  padding: 3px 8px; border-radius: 4px; letter-spacing: .1em;
}
.work-name {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300; font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1; letter-spacing: -.03em;
}
.work-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted); margin-top: -6px;
}
.work-meta em { font-style: normal; color: var(--line); }

.work-block h4 {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--brass-ink); margin-bottom: 7px;
}
.work-block p { font-size: 15.5px; line-height: 1.55; }
.work-list { display: flex; flex-direction: column; gap: 5px; }
.work-list li {
  position: relative; padding-left: 17px;
  font-size: 14px; line-height: 1.5; color: var(--muted);
}
.work-list li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 7px; height: 1px; background: var(--accent, var(--atlantic));
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-family: var(--mono); font-size: 10px; letter-spacing: .06em;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--muted); background: var(--paper);
}

.work-metric {
  display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.work-metric b {
  font-family: var(--display); font-variation-settings: 'opsz' 90;
  font-weight: 400; font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1; letter-spacing: -.03em; color: var(--accent, var(--atlantic));
}
.work-metric span { font-size: 13.5px; color: var(--muted); }

.work-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.work-cta .btn { padding: 13px 22px; font-size: 13.5px; }

/* tarjeta de cierre */
.work-outro {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  width: min(760px, 84vw);
}
.work-outro::before { background: var(--brass); }
.work-outro-inner { text-align: center; max-width: 46ch; padding: clamp(20px, 4vw, 46px) 0; }
.work-outro-inner h3 {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300; font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.02; letter-spacing: -.03em; margin-bottom: 16px;
}
.work-outro-sub { color: var(--paper-55); font-size: 16px; margin-bottom: 28px; }
.work-outro-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.works-hint {
  text-align: center; margin: 20px auto 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em;
  text-transform: uppercase; color: rgba(20, 22, 26, .35);
}

/* modo pineado (solo desktop, solo si GSAP está vivo) */
body.works-pinned .works-pin {
  height: 100svh; display: flex; flex-direction: column;
  /* Fondo propio: al fijarse tapa la cabecera de la sección, que si no
     se transparentaría por detrás de las tarjetas. El z-index lo pone por
     encima de la marca lateral, que si no se lee sobre las capturas. */
  background: var(--paper);
  position: relative; z-index: 70;
}
body.works-pinned .works-viewport {
  overflow-x: hidden; overflow-y: visible; scroll-snap-type: none;
  flex: 1 1 auto; display: flex; align-items: center;
}
body.works-pinned .works-hint { display: none; }
body.works-pinned .marquee--stack { margin-top: auto; }
body.works-pinned .works-arrows { display: flex; }
body.works-pinned .work { height: min(72svh, 640px); }
body.works-pinned .work-outro { height: min(72svh, 640px); }
body.works-pinned .work-body { overflow: auto; scrollbar-width: none; }
body.works-pinned .work-body::-webkit-scrollbar { display: none; }

@media (max-width: 1080px) {
  .work-inner { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .work { width: min(560px, 86vw); }
  .works-head-inner { grid-template-columns: 1fr; align-items: start; }
  .works-ctrl { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .frame--desktop { display: none; }
  .frame--mobile { display: block; }
  .work-media { display: flex; justify-content: center; }
  /* La captura vertical tiene que leerse sin zoom, pero dejando sitio para
     el nombre y el reto: si ocupa toda la pantalla, la tarjeta no se cuenta. */
  .frame--mobile .phone { width: min(196px, 47vw); }
  .lineart { right: 2px; bottom: -6px; width: 84px; }
  .work { padding: 18px; width: min(400px, 84vw); }
  .work-outro { width: min(400px, 84vw); }
  .work-name { font-size: clamp(27px, 7.5vw, 34px); }
  .work-block p { font-size: 15px; }
  .work-list li { font-size: 13.5px; }
}

/* ------------------------------------------------------ 03 · SERVICIOS */
.packs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
  position: relative; z-index: 1;
}
.pack {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--r-l);
  padding: clamp(24px, 2.6vw, 38px);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.pack:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 22, 26, .2);
  box-shadow: 0 40px 70px -50px rgba(20, 22, 26, .55);
}
.pack--featured {
  border-color: var(--ink);
  box-shadow: 0 30px 60px -50px rgba(20, 22, 26, .6);
}
.pack-flag {
  position: absolute; top: -11px; left: clamp(24px, 2.6vw, 38px);
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 100px;
}
.pack-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pack-icon { width: 46px; height: 46px; color: var(--atlantic); }
.pack--featured .pack-icon { color: var(--brass-ink); }
.pack-price {
  font-family: var(--mono); font-size: clamp(19px, 2vw, 26px);
  letter-spacing: .06em; color: var(--ink); font-weight: 500;
}
.pack-name {
  font-family: var(--display); font-variation-settings: 'opsz' 90, 'WONK' 1;
  font-weight: 400; font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.05; letter-spacing: -.025em;
}
.pack-claim { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.pack-time {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brass-ink);
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.pack-list { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.pack-list li {
  position: relative; padding-left: 20px;
  font-size: 14.5px; line-height: 1.5;
}
.pack-list li::before {
  content: ''; position: absolute; left: 0; top: .55em;
  width: 9px; height: 9px; border: 1px solid var(--line); border-radius: 2px;
}
.pack--featured .pack-list li::before { border-color: var(--brass-ink); }

.pack-cta {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink);
  padding-top: 16px; border-top: 1px solid var(--line);
  transition: color .3s var(--ease), gap .3s var(--ease);
}
.pack-cta svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pack-cta:hover { color: var(--atlantic); gap: 14px; }

.price-note {
  margin-top: clamp(20px, 2.4vw, 30px);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: var(--muted); text-align: center;
}

.maint {
  margin-top: clamp(34px, 4vw, 52px);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: clamp(18px, 2.2vw, 26px) clamp(20px, 2.4vw, 32px);
  border: 1px dashed var(--line); border-radius: var(--r-m);
  background: rgba(255, 253, 248, .5);
}
.maint-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brass-ink); flex: none;
}
.maint p { font-size: 14.5px; color: var(--muted); }

.included { margin-top: clamp(40px, 5vw, 66px); }
.included-title {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 22px;
}
.included-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px clamp(24px, 4vw, 60px);
}
.included-list li {
  position: relative; padding-left: 24px;
  font-size: 15px; line-height: 1.5;
}
.included-list li::before {
  content: ''; position: absolute; left: 0; top: .5em;
  width: 11px; height: 6px; border-left: 1.5px solid var(--green);
  border-bottom: 1.5px solid var(--green); transform: rotate(-45deg);
}

.trust {
  margin-top: clamp(34px, 4vw, 52px);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: clamp(20px, 2.4vw, 30px) clamp(22px, 2.6vw, 34px);
  background: var(--ink); color: var(--paper); border-radius: var(--r-m);
  font-family: var(--display); font-variation-settings: 'opsz' 40;
  font-size: clamp(17px, 1.7vw, 22px); line-height: 1.35; letter-spacing: -.01em;
}
.trust-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brass); flex: none;
}

@media (max-width: 980px) {
  .packs { grid-template-columns: 1fr; }
  .included-list { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------- 04 · PROCESO */
.steps {
  --rail: clamp(58px, 6vw, 92px);
  position: relative; padding-left: var(--rail); z-index: 1;
}
/* left = centro del círculo (40/2) menos medio grosor de línea (4/2) */
.steps-line { position: absolute; left: 18px; top: 10px; bottom: 10px; width: 4px; height: auto; }
.steps-line-bg { color: var(--line); }
.steps-line-fg { color: var(--atlantic); }
html.js .steps-line-fg { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
html.reveal-all .steps-line-fg { stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--ease); }

.steps-list { display: flex; flex-direction: column; gap: clamp(30px, 4.4vw, 62px); }
.step { position: relative; }
.step-n {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  color: var(--paper-raised); background: var(--ink);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  position: absolute; left: calc(-1 * var(--rail)); top: -1px; z-index: 2;
  box-shadow: 0 0 0 8px var(--paper);
}
.step-body h3 {
  font-family: var(--display); font-variation-settings: 'opsz' 90, 'WONK' 1;
  font-weight: 400; font-size: clamp(23px, 2.5vw, 34px);
  line-height: 1.1; letter-spacing: -.025em; margin-bottom: 4px;
}
.step-time {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--brass-ink); margin-bottom: 10px;
}
.step-body p:last-child { font-size: 15.5px; color: var(--muted); max-width: 60ch; line-height: 1.6; }

@media (max-width: 700px) {
  .steps { --rail: 50px; }
  .steps-line { left: 16px; }
  .step-n { width: 36px; height: 36px; font-size: 11px; box-shadow: 0 0 0 6px var(--paper); }
  .step-body { padding-top: 1px; }
}

/* ------------------------------------------------------ 05 · QUIÉN SOY */
.about-top {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  gap: clamp(30px, 4.5vw, 76px); align-items: start;
  position: relative; z-index: 1;
  margin-bottom: clamp(50px, 7vw, 96px);
}

.statement {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300;
  font-size: clamp(23px, 2.9vw, 40px);
  line-height: 1.22; letter-spacing: -.024em;
}
.statement strong { font-weight: 400; color: var(--ink); }
.statement em { font-style: italic; color: var(--atlantic); }

/* Con foto: la sección pasa a tres columnas (declaración · retrato · ficha)
   y el mapa se queda debajo, que ya es su sitio en el DOM. Sin estas reglas
   el retrato entraría como tercer hijo de un grid de dos y descuadraría todo. */
body.has-portrait .about-top {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .58fr) minmax(0, .62fr);
  align-items: start;
}
body.has-portrait .statement { font-size: clamp(21px, 2.4vw, 33px); }
body.has-portrait .mapfig { margin-top: clamp(8px, 1.5vw, 20px); }
@media (max-width: 1080px) {
  body.has-portrait .about-top { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); }
  body.has-portrait .statement { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body.has-portrait .about-top { grid-template-columns: 1fr; }
  body.has-portrait .statement { grid-column: auto; }
  body.has-portrait .portrait-slot { max-width: 320px; }
}

.portrait-slot { position: relative; }
/* Proporción fija: la foto no descuadra la retícula aunque venga en 4:3 o 3:4 */
.portrait-slot figure { aspect-ratio: 4 / 5; }
.portrait-slot img { height: 100%; object-fit: cover; }
.portrait-slot figure { margin: 0; position: relative; border-radius: var(--r-m); overflow: hidden; }
.portrait-slot img { width: 100%; filter: grayscale(1) contrast(1.06); }
.portrait-slot figure::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(18, 65, 79, .42), rgba(192, 138, 62, .18));
  mix-blend-mode: color;
}
.portrait-slot figure::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  opacity: .45; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23p)' opacity='.4'/%3E%3C/svg%3E");
}

.ficha { border-top: 1px solid var(--line); }
.ficha > div {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line);
}
.ficha dt {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em;
  color: var(--muted); padding-top: 3px;
}
.ficha dd { margin: 0; font-size: 14.5px; line-height: 1.45; }

/* --- Mapa line-art de la costa (sustituye al retrato) ------------------ */
.mapfig {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, .34fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 60px); align-items: center;
  padding: clamp(26px, 3.4vw, 48px);
  background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--r-l);
  margin-bottom: clamp(44px, 6vw, 76px);
}
.map-head { max-width: 42ch; }
.map-label {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em;
  color: var(--brass-ink); margin-bottom: 12px;
}
.map-title {
  font-family: var(--display); font-variation-settings: 'opsz' 90, 'WONK' 1;
  font-weight: 300; font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.06; letter-spacing: -.028em; margin-bottom: 12px;
}
.map-note { font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* aspect-ratio explícito: sin él, el grid comprime el SVG en vertical y
   el dibujo se encoge dejando bandas vacías a los lados. */
.map { width: 100%; height: auto; aspect-ratio: 1180 / 520; overflow: visible; }
.map-coast { color: var(--ink); opacity: .8; stroke-width: 3.4; }
html.js .map-coast { stroke-dasharray: 2400; stroke-dashoffset: 2400; }
html.js .map-coast.is-in { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease-out); }
html.reveal-all .map-coast { stroke-dashoffset: 0 !important; }

/* El viewBox (1180 de ancho) se escala a ~0,7 en escritorio: los tamaños
   de aquí van sobredimensionados a propósito para que se lean. */
.map-pin circle { fill: var(--paper-raised); stroke: var(--ink); stroke-width: 2.2; r: 5.5; }
.map-pin text {
  font-family: var(--mono); font-size: 16px; letter-spacing: .1em;
  fill: var(--muted);
}
.map-pin--edge circle { stroke: var(--line); }
.map-pin--edge text { fill: rgba(20, 22, 26, .32); }
html.js .map-pins > g { opacity: 0; transition: opacity .5s var(--ease); }
html.js .map-pins.is-in > g { opacity: 1; }
html.js .map-pins.is-in > g:nth-child(1) { transition-delay: .95s; }
html.js .map-pins.is-in > g:nth-child(2) { transition-delay: 1.05s; }
html.js .map-pins.is-in > g:nth-child(3) { transition-delay: 1.15s; }
html.js .map-pins.is-in > g:nth-child(4) { transition-delay: 1.25s; }
html.js .map-pins.is-in > g:nth-child(5) { transition-delay: 1.35s; }
html.js .map-pins.is-in > g:nth-child(6) { transition-delay: 1.45s; }
html.js .map-pins.is-in > g:nth-child(7) { transition-delay: 1.55s; }
html.js .map-pins.is-in > g:nth-child(8) { transition-delay: 1.65s; }
html.js .map-pins.is-in > g:nth-child(9) { transition-delay: 1.75s; }
html.js .map-pins.is-in > g:nth-child(10) { transition-delay: 1.85s; }
html.js .map-pins.is-in > g:nth-child(11) { transition-delay: 1.95s; }
html.reveal-all .map-pins > g { opacity: 1 !important; }

/* Sevilla: a 200 km, marcada como próxima apertura */
.map-link { color: var(--brass-ink); opacity: .5; }
html.js .map-link { opacity: 0; transition: opacity .9s var(--ease); }
html.js .map-link.is-in { opacity: .45; }
html.reveal-all .map-link { opacity: .45 !important; }
.map-soon-ring { fill: none; stroke: var(--brass-ink); stroke-width: 2; opacity: .55; r: 12; }
.map-soon-dot { fill: var(--brass-ink); r: 5.5; }
.map-soon-name {
  font-family: var(--mono); font-size: 19px; font-weight: 500;
  letter-spacing: .1em; fill: var(--brass-ink);
}
.map-soon-tag {
  font-family: var(--mono); font-size: 14px; letter-spacing: .14em;
  fill: rgba(20, 22, 26, .38);
}
.map-link { stroke-width: 2.2; }

.map-here-dot { fill: var(--green); stroke: var(--paper-raised); stroke-width: 2.2; r: 6; }
.map-here-pulse { r: 9; }
.map-here-pulse { fill: var(--green); opacity: .28; transform-origin: 896px 167px; animation: mapPing 2.6s var(--ease) infinite; }
@keyframes mapPing {
  0%   { transform: scale(.7); opacity: .34; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.map-here text {
  font-family: var(--mono); font-size: 17px; font-weight: 500;
  letter-spacing: .1em; fill: var(--green);
}
.map-sea {
  font-family: var(--mono); font-size: 15px; letter-spacing: .3em;
  fill: rgba(20, 22, 26, .22);
}

.about-bottom {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: clamp(30px, 4vw, 66px); align-items: start;
  position: relative; z-index: 1;
}
.areas-title {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.areas-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px clamp(20px, 3vw, 40px);
}
.areas-list li {
  font-family: var(--display); font-variation-settings: 'opsz' 40;
  font-size: clamp(16px, 1.5vw, 20px); line-height: 1.35;
  color: var(--ink); padding-bottom: 6px;
  border-bottom: 1px solid rgba(222, 216, 203, .55);
}

.handoff { display: grid; gap: 12px; }
.handoff-btn {
  display: flex; align-items: center; gap: 16px; text-align: left; width: 100%;
  padding: 18px 22px;
  background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--r-m);
  transition: transform .34s var(--ease), border-color .34s var(--ease),
              background-color .34s var(--ease), box-shadow .34s var(--ease);
}
.handoff-btn:hover {
  transform: translateY(-2px); border-color: var(--ink);
  box-shadow: 0 24px 44px -34px rgba(20, 22, 26, .6);
}
.handoff-btn svg { width: 26px; height: 26px; flex: none; color: var(--atlantic); }
.handoff-btn span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.handoff-btn b { font-size: 15.5px; font-weight: 600; }
.handoff-btn i {
  font-style: normal; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .04em; color: var(--muted); line-height: 1.4;
}

@media (max-width: 980px) {
  .about-top, .about-bottom, .mapfig { grid-template-columns: 1fr; }
  .mapfig { gap: 26px; }
}
@media (max-width: 720px) {
  /* El mapa se escala unas 2,5 veces hacia abajo: si no se agrandan trazo,
     puntos y etiquetas dentro del viewBox, en el móvil no se lee nada. */
  /* En móvil el mapa se reduce a ~0,3: todo hay que agrandarlo otra vez */
  .map-pin--full { display: none; }
  .map-pin text, .map-here text { font-size: 36px; letter-spacing: .05em; }
  .map-soon-name { font-size: 40px; }
  .map-soon-tag { font-size: 28px; }
  .map-sea { font-size: 30px; letter-spacing: .12em; }
  .map-coast { stroke-width: 7; }
  .map-link { stroke-width: 4.5; }
  .map-pin circle { r: 11; stroke-width: 4.5; }
  .map-soon-ring { r: 22; stroke-width: 4.5; }
  .map-soon-dot { r: 11; }
  .map-here-dot { r: 12; stroke-width: 4.5; }
  .map-here-pulse { r: 17; }
  /* Con la letra grande estas dos se pisaban con las de al lado. Se ocultan:
     "desde septiembre" ya está en la nota y el estrecho es decorativo. */
  .map-soon-tag, .map-sea { display: none; }
  /* El mapa gana el ancho completo de la tarjeta */
  .mapfig { padding-inline: 0; padding-bottom: 20px; }
  .map-head { padding-inline: clamp(18px, 5vw, 28px); }
  .areas-list { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------- 06 · CONTACTO */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(26px, 4vw, 64px); align-items: start;
  position: relative; z-index: 1;
}

.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field-label {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.field label i, .field-label i { font-style: normal; color: var(--brass-ink); }
.field input {
  width: 100%; padding: 14px 2px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  font-size: 17px; color: var(--ink);
  transition: border-color .3s var(--ease);
  border-radius: 0;
}
.field input::placeholder { color: rgba(20, 22, 26, .3); }
.field input:focus { outline: none; border-bottom-color: var(--ink); }
.field input:focus-visible { outline: none; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span {
  display: inline-block; padding: 11px 18px;
  border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); cursor: pointer;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.choice:hover span { border-color: var(--ink); color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--atlantic); outline-offset: 3px; }

.form-error {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  color: #A3382C;
}
.form-alt {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
  color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.form-alt:hover { color: var(--ink); border-color: var(--ink); }
.form-fallback {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--muted); line-height: 1.6;
}
.form-fallback a { color: var(--ink); border-bottom: 1px solid var(--line); }

.cpanel {
  background: var(--paper-raised);
  border: 1px solid var(--line); border-radius: var(--r-l);
  padding: clamp(24px, 2.8vw, 38px);
  display: flex; flex-direction: column; gap: 24px;
}
.cpanel-list { display: flex; flex-direction: column; }
.cpanel-list li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cpanel-list li:first-child { padding-top: 0; }
.cpanel-k {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.cpanel-v {
  font-family: var(--display); font-variation-settings: 'opsz' 40;
  font-size: clamp(17px, 1.7vw, 22px); letter-spacing: -.01em;
  transition: color .3s var(--ease);
  word-break: break-word;
}
a.cpanel-v:hover { color: var(--atlantic); }
.cpanel-v--plain { font-family: var(--sans); font-size: 14px; color: var(--muted); line-height: 1.5; }

.promise {
  font-family: var(--display); font-variation-settings: 'opsz' 40;
  font-size: clamp(15.5px, 1.5vw, 18px); line-height: 1.45;
  color: var(--atlantic); letter-spacing: -.008em;
  padding: 18px 20px; background: rgba(18, 65, 79, .05);
  border-left: 2px solid var(--atlantic); border-radius: 0 var(--r-s) var(--r-s) 0;
}

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- FOOTER */
.footer {
  position: relative; z-index: 2;
  background: var(--ink); color: var(--paper);
  padding-top: clamp(50px, 7vw, 90px);
  overflow: hidden;
}
.footer-display { overflow: hidden; padding-bottom: clamp(30px, 4vw, 56px); }
.footer-display .marquee-track > span {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300; font-size: clamp(52px, 11vw, 150px);
  line-height: .95; letter-spacing: -.035em;
  color: rgba(245, 242, 236, .1); text-transform: none;
  padding-right: 30px; white-space: nowrap;
}

.footer-inner {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr);
  gap: clamp(30px, 4vw, 70px);
  padding-bottom: clamp(38px, 5vw, 66px);
}
.footer-mono {
  font-family: var(--display); font-variation-settings: 'opsz' 90, 'WONK' 1;
  font-size: 38px; line-height: 1; margin-bottom: 14px;
}
.footer-tag {
  font-family: var(--display); font-variation-settings: 'opsz' 36;
  font-size: 17px; line-height: 1.4; color: var(--paper-55); max-width: 26ch;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.footer-col h4 {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .24em;
  text-transform: uppercase; color: rgba(245, 242, 236, .38);
  padding-bottom: 12px; border-bottom: 1px solid var(--paper-14); margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: 14.5px; color: var(--paper-55);
  transition: color .3s var(--ease); word-break: break-word;
}
.footer-col a:hover { color: var(--paper); }

.footer-legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; padding-block: 22px 30px;
  border-top: 1px solid var(--paper-14);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  color: rgba(245, 242, 236, .4);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { transition: color .3s var(--ease); }
.footer-links a:hover { color: var(--paper); }
.footer-top { color: var(--brass) !important; }

@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 26px; }
}

/* --------------------------------------------------------------- PANELES */
.panel { position: fixed; inset: 0; z-index: 260; }
.panel[hidden] { display: none; }
.panel-scrim {
  position: absolute; inset: 0; background: rgba(20, 22, 26, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .4s var(--ease);
}
.panel.is-open .panel-scrim { opacity: 1; }

.panel-sheet {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(620px, 100%);
  background: var(--paper); color: var(--ink);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .55s var(--ease-out);
  box-shadow: -30px 0 80px -40px rgba(20, 22, 26, .8);
}
.panel.is-open .panel-sheet { transform: none; }

.panel-close {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper-raised);
  display: grid; place-items: center;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.panel-close svg { width: 17px; height: 17px; }
.panel-close:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.panel-body { padding: clamp(56px, 6vw, 76px) clamp(24px, 4vw, 56px) clamp(40px, 5vw, 64px); }
.panel-kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--brass-ink); margin-bottom: 14px;
}
.panel-body h3 {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300; font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02; letter-spacing: -.03em; margin-bottom: 8px;
}
.panel-meta {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.panel-shot {
  border-radius: var(--r-m); overflow: hidden; margin-bottom: 26px;
  border: 1px solid var(--line);
}
.panel-h {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--brass-ink);
  margin: 26px 0 10px;
}
.panel-body p + p { margin-top: 14px; }
.panel-body p { font-size: 16px; line-height: 1.66; color: var(--muted); }
.panel-body .panel-lead { color: var(--ink); font-size: 17px; }
.panel-body .chips { margin-top: 10px; }
.panel-body .btn { margin-top: 30px; }

/* panel del QR */
.panel--qr { display: grid; place-items: center; padding: 20px; }
.qr-card {
  position: relative; z-index: 2;
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: clamp(28px, 4vw, 44px);
  width: min(400px, 100%); text-align: center;
  transform: scale(.94); opacity: 0;
  transition: transform .45s var(--ease-out), opacity .35s var(--ease);
  box-shadow: 0 50px 90px -50px rgba(20, 22, 26, .8);
}
.panel.is-open .qr-card { transform: none; opacity: 1; }
.qr-card h3 {
  font-family: var(--display); font-variation-settings: 'opsz' 60, 'WONK' 1;
  font-weight: 400; font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.15; letter-spacing: -.02em; margin-bottom: 20px;
}
.qr-img {
  width: min(260px, 70vw); height: auto; margin: 0 auto 20px;
  border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px;
  background: #FFF;
}
.qr-note { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }
.qr-tel {
  font-family: var(--mono); font-size: 14px; letter-spacing: .06em;
  color: var(--ink); border-bottom: 1px solid var(--line);
}

body.panel-open { overflow: hidden; }

/* ------------------------------------------------------------- REVEALS */
/* Solo se ocultan si el JS está vivo. Sin JS, todo se ve. */
html.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* Red de seguridad: a los 6 s nada puede seguir invisible */
html.reveal-all .reveal { opacity: 1 !important; transform: none !important; }

/* Regla defensiva pedida por la skill */
.reveal[data-split] { opacity: 1; transform: none; }
html.js .reveal[data-split] { opacity: 1; transform: none; }
html.js .reveal[data-split] .ch {
  display: inline-block;
  opacity: 0; transform: translateY(.5em) rotate(2deg);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
html.js .reveal[data-split].is-in .ch { opacity: 1; transform: none; }
html.reveal-all .reveal[data-split] .ch { opacity: 1 !important; transform: none !important; }

/* ------------------------------------------------------- NAV EN MÓVIL */
@media (max-width: 1080px) {
  .brandmark-full { display: none; }
  .nav-links { gap: 18px; }
  .nav-links a i { display: none; }
}
@media (max-width: 900px) {
  .burger { display: block; }
  .nav-links {
    position: fixed; inset: 0 0 auto; top: 0;
    height: 100svh;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 6px;
    padding: 90px var(--gut) 40px;
    background: var(--ink);
    transform: translateY(-101%);
    transition: transform .6s var(--ease-out);
    z-index: -1;
  }
  .nav-links a {
    font-family: var(--display); font-variation-settings: 'opsz' 90, 'WONK' 1;
    font-size: clamp(30px, 8vw, 46px); font-weight: 300; letter-spacing: -.03em;
    color: var(--paper-55); padding: 8px 0;
  }
  .nav-links a i { display: block; font-size: 11px; opacity: .5; color: var(--brass); }
  .nav-links a::after { display: none; }
  body.nav-open .nav-links { transform: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .burger i { background: var(--paper); }
  body.nav-open .burger i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
  body.nav-open .burger i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
  body.nav-open .brandmark-gra { color: var(--paper); }
  body.nav-open .lang { border-color: var(--paper-14); }

  /* El CTA de WhatsApp NUNCA desaparece en móvil */
  .nav-cta { padding: 9px 15px; font-size: 12.5px; }
  .nav-cta span:last-child { display: none; }
  .nav-cta::after { content: 'WhatsApp'; }
}
@media (max-width: 400px) {
  .lang-btn { padding: 4px 7px; gap: 4px; }
  .nav-cta { padding: 8px 12px; }
}

/* Móviles estrechos (iPhone SE y Android pequeños, 320-360px): con los
   tamaños normales la nav se salía 23px y el botón del menú quedaba
   cortado — es decir, no se podía abrir el menú. */
@media (max-width: 360px) {
  :root { --gut: 16px; }
  .nav-inner { gap: 8px; }
  .nav-side { gap: 6px; }
  .brandmark-gra { font-size: 21px; }
  /* "ES EN" con texto no cabe: se quedan solo las dos banderas, que se
     entienden igual y ahorran ~26px. La activa sigue marcada por el latón. */
  .lang { padding: 2px; gap: 0; }
  .lang-btn { padding: 5px 7px; gap: 0; }
  .lang-btn em { display: none; }
  .nav-cta { padding: 7px 11px; font-size: 11.5px; gap: 6px; }
  .burger { width: 34px; }
  .burger i { left: 7px; right: 7px; }
}

/* -------------------------------------------------------- PÁGINAS LEGALES */
/* En estas páginas no hay hero oscuro: la nav va clara desde el principio */
.legal-page .nav {
  background: rgba(245, 242, 236, .86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line);
}
.legal-page .brandmark-gra { color: var(--ink); }
.legal-page .brandmark-full { color: var(--muted); }
.legal-page .lang { border-color: var(--line); }
.legal-page .lang:hover { border-color: var(--ink); }
.legal-page .nav-cta { background: var(--ink); color: var(--paper); }
.legal-page .nav-cta:hover { background: var(--atlantic); }
.legal-page .footer { margin-top: 40px; padding-top: 0; }

.legal { padding: calc(var(--nav-h) + 60px) 0 90px; position: relative; z-index: 2; }

/* Página 404 (la sirve Cloudflare Pages para cualquier ruta que no exista) */
.nf { min-height: calc(100svh - 200px); display: flex; flex-direction: column; justify-content: center; }
.nf-code {
  font-family: var(--display); font-variation-settings: 'opsz' 144;
  font-weight: 300; font-size: clamp(96px, 20vw, 240px); line-height: .8;
  letter-spacing: -.05em; color: rgba(20, 22, 26, .07);
  margin-bottom: clamp(-30px, -3vw, -10px);
}
.nf h1 { margin-bottom: 16px; }
.nf-text { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 52ch; margin-bottom: 30px; }
.nf .btn { align-self: flex-start; }
.legal-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 34px;
  transition: color .3s var(--ease);
}
.legal-back:hover { color: var(--ink); }
.legal h1 {
  font-family: var(--display); font-variation-settings: 'opsz' 144, 'WONK' 1;
  font-weight: 300; font-size: clamp(34px, 5vw, 62px);
  line-height: 1.03; letter-spacing: -.03em; margin-bottom: 12px;
}
.legal-date {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 26px; border-bottom: 1px solid var(--line); margin-bottom: 34px;
}
.legal-body { max-width: 74ch; }
.legal-body h2 {
  font-family: var(--display); font-variation-settings: 'opsz' 60, 'WONK' 1;
  font-weight: 400; font-size: clamp(21px, 2.2vw, 28px);
  letter-spacing: -.02em; margin: 40px 0 12px;
}
.legal-body p, .legal-body li { color: var(--muted); font-size: 16px; line-height: 1.68; }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.legal-body li { position: relative; padding-left: 18px; }
.legal-body li::before {
  content: ''; position: absolute; left: 0; top: .72em;
  width: 8px; height: 1px; background: var(--brass-ink);
}
.legal-body a { color: var(--atlantic); border-bottom: 1px solid var(--line); }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body dl { margin-top: 14px; border-top: 1px solid var(--line); }
.legal-body dl > div {
  display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1fr);
  gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.legal-body dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.legal-body dd { margin: 0; font-size: 15px; }
@media (max-width: 620px) { .legal-body dl > div { grid-template-columns: 1fr; gap: 4px; } }

/* --------------------------------------------------------------- PRINT */
@media print {
  .splash, .cursor, .nav, .edge-badge, .paper-grain, .paper-glow,
  .marquee, .hero-scroll, .panel { display: none !important; }
  body { background: #FFF; }
  .work { break-inside: avoid; page-break-inside: avoid; }
  .works-viewport { overflow: visible; }
  .works-track { flex-wrap: wrap; width: auto; }
}
