/* ==========================================================================
   TRATOINMO v3 · Mediodía — Núcleo: fuentes, tokens, tipografía,
   cursor, precarga, cabecera, dock, menú, botones y pie revelado.
   ========================================================================== */
@font-face { font-family: 'Anybody'; src: url(../assets/fonts/anybody.woff2) format('woff2-variations'); font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url(../assets/fonts/instrument-sans.woff2) format('woff2-variations'); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 300; src: url(../assets/fonts/newsreader-300-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; src: url(../assets/fonts/newsreader-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 500; src: url(../assets/fonts/newsreader-500-italic.woff2) format('woff2'); font-display: swap; }

:root {
  /* Paleta "Mediodía": travertino, laguna turquesa, mar profundo y latón */
  --marino: #0A1C26;     /* mar profundo: secciones oscuras */
  --hondo: #0F2A37;
  --profundo: #133847;
  --cielo: #B9D6E7;      /* cielo del último fotograma del video */
  --laguna: #0E7C86;
  --turquesa: #6FD3CF;
  --espuma: #BDEDEA;
  --bruma: #F6F2EA;
  --arena: #F3EEE5;
  --laton: #D9A066;
  --laton-2: #EBC08F;
  --tinta: #0D1E27;

  --f-display: 'Anybody', 'Arial Narrow', sans-serif;
  --f-edit: 'Newsreader', Georgia, serif;
  --f-text: 'Instrument Sans', system-ui, sans-serif;

  --g: clamp(16px, 4vw, 64px);
  --maxw: 1400px;
  --r: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--marino); color: var(--bruma);
  font-family: var(--f-text); font-size: clamp(15px, 1.02vw, 17px); line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body.is-loading { overflow: hidden; }
img, svg, canvas, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
em { font-family: var(--f-edit); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--laton); color: var(--tinta); }
:focus-visible { outline: 2px solid var(--laton); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Tonos de sección */
[data-tone="night"]  { --bg: var(--marino);  --fg: var(--bruma); --acc: var(--laton); --mut: #a3bfc3; --ln: rgba(246,242,234,.14); }
[data-tone="indigo"] { --bg: var(--profundo); --fg: var(--bruma); --acc: var(--laton); --mut: #acc7cb; --ln: rgba(246,242,234,.16); }
[data-tone="paper"]  { --bg: var(--arena);  --fg: var(--tinta); --acc: var(--laguna); --mut: #4e6670; --ln: rgba(13,30,39,.12); }
[data-tone="cielo"]  { --bg: var(--cielo); --fg: var(--tinta); --acc: var(--laguna); --mut: #3f5c66; --ln: rgba(13,30,39,.14); }
[data-tone="deep"]   { --bg: var(--hondo); --fg: var(--bruma); --acc: var(--laton); --mut: #a3bfc3; --ln: rgba(246,242,234,.14); }
[data-tone="laton"]  { --bg: var(--laton);  --fg: var(--tinta); --acc: var(--tinta); --mut: #5b3d1c; --ln: rgba(13,30,39,.18); }
[data-tone] { background: var(--bg); color: var(--fg); }

main section { position: relative; padding: clamp(90px, 14vh, 170px) var(--g); }
main section > :not(canvas):not(.velo):not(.marquee):not(.film__stage) { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

/* Tipografía */
.h2 {
  font-family: var(--f-display); font-weight: 820; font-stretch: 112%;
  font-size: clamp(2.4rem, 6.4vw, 6.6rem); line-height: .92; letter-spacing: -.035em; margin: 0 0 .35em;
}
.h2 em { font-weight: 300; letter-spacing: -.04em; color: var(--acc); font-size: 1.03em; }
.lead { font-size: clamp(1.05rem, 1.35vw, 1.3rem); color: var(--mut); max-width: 52ch; margin: 0 0 2rem; }
.lead--light { color: #b9d3d6; }
.fine { font-size: .8rem; color: var(--mut); line-height: 1.45; max-width: 75ch; }
.shead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--mut); margin-bottom: clamp(26px, 5vh, 56px); }
.shead__n { font-family: var(--f-display); font-stretch: 150%; font-weight: 900; color: var(--acc); letter-spacing: 0; font-size: .95rem; }
.badge { margin-left: auto; font-size: .66rem; letter-spacing: .1em; border: 1px solid currentColor; padding: 5px 11px; border-radius: 99px; color: var(--laton); }
.split .line { overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }

/* Botones */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0;
  font-weight: 600; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform .5s var(--ease), background .3s, color .3s, box-shadow .4s;
}
.btn--fill { background: var(--tinta); color: var(--bruma); box-shadow: 0 10px 30px -12px rgba(16,56,71,.6); }
.btn--fill:hover { box-shadow: 0 18px 40px -14px rgba(16,56,71,.8); }
.btn--light { background: var(--bruma); color: var(--tinta); }
.btn--ghost-light { background: transparent; color: var(--bruma); box-shadow: inset 0 0 0 1.5px rgba(246,242,234,.35); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.ripple .rip { position: absolute; border-radius: 50%; transform: scale(0); background: currentColor; opacity: .25; pointer-events: none; animation: rip .7s var(--ease) forwards; z-index: -1; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }
.form-msg { min-height: 1.3em; font-size: .92rem; margin: 6px 0 0; }
.form-msg:empty { display: none; }

/* ---------- Precarga ---------- */
.loader { position: fixed; inset: 0; z-index: 200; background: var(--marino) url(../assets/frames/f0000.webp) center / cover no-repeat; display: grid; place-items: center; transition: clip-path 1.1s var(--ease); clip-path: inset(0 0 0 0); }
.loader.is-done { clip-path: inset(0 0 100% 0); }
.loader::before { content: ''; position: absolute; inset: 0; background: rgba(10,28,38,.72); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.loader__inner { position: relative; }
.loader__inner { width: min(520px, 84vw); }
.loader__k { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: #9ab7bc; margin: 0; }
.loader__k em { text-transform: none; letter-spacing: 0; font-size: 1.15em; color: var(--turquesa); }
.loader__num { font-family: var(--f-display); font-weight: 900; font-stretch: 150%; font-size: clamp(5rem, 18vw, 11rem); line-height: 1; color: var(--bruma); font-variant-numeric: tabular-nums; }
.loader__num small { font-size: .3em; color: var(--laton); }
.loader__bar { height: 2px; background: rgba(246,242,234,.15); }
.loader__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--turquesa), var(--laton)); transform-origin: left; transform: scaleX(0); transition: transform .3s; }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 150; display: none; opacity: 0; transition: opacity .4s; }
body.cursor-on .cursor, body.cursor-on .cursor-dot { opacity: 1; }
@media (pointer: fine) { .cursor, .cursor-dot { display: block; } body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor label { cursor: none; } body.has-cursor input, body.has-cursor textarea { cursor: text; } }
.cursor { width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1.5px solid rgba(246,242,234,.7); mix-blend-mode: difference; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s, border-color .3s; display: grid; place-items: center; }
.cursor.is-big { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--bruma); border-color: transparent; }
.cursor__label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--marino); opacity: 0; transition: opacity .2s; }
.cursor.is-big .cursor__label { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--laton); }

/* ---------- Cabecera ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--g); pointer-events: none; color: var(--bruma); }
.top > * { pointer-events: auto; }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 8px 14px 8px 10px; border-radius: 99px; background: rgba(10,28,38,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: var(--f-display); font-weight: 850; font-stretch: 140%; letter-spacing: .03em; font-size: 1.02rem; }
.logo { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 3; }
.top__cta { text-decoration: none; font-weight: 600; font-size: .9rem; padding: 10px 18px; border-radius: 99px; background: rgba(10,28,38,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1.5px rgba(246,242,234,.4); transition: background .3s, color .3s; }
.top__cta:hover { background: var(--bruma); color: var(--tinta); }

/* ---------- Dock ---------- */
.dock {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border-radius: 999px;
  background: rgba(15,42,55,.62); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 40px -10px rgba(0,0,0,.5), inset 0 0 0 1px rgba(246,242,234,.12); color: var(--bruma);
  transition: transform .6s var(--ease), opacity .4s;
}
body.is-loading .dock { transform: translate(-50%, 140%); }
.dock__ring { width: 34px; height: 34px; transform: rotate(-90deg); }
.dock__ring circle { fill: none; stroke-width: 3; stroke: rgba(246,242,234,.18); }
.dock__ring #dockRing { stroke: var(--laton); stroke-dasharray: 94.25; stroke-dashoffset: 94.25; stroke-linecap: round; }
.dock__num { font-family: var(--f-display); font-stretch: 150%; font-weight: 900; font-size: .9rem; margin-left: -38px; width: 34px; text-align: center; font-size: .66rem; }
.dock__label { font-weight: 600; font-size: .88rem; min-width: 9ch; white-space: nowrap; }
.dock__btn { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--bruma); color: var(--tinta); font-weight: 700; font-size: .85rem; }
@media (max-width: 480px) { .dock__label { min-width: 0; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; } }

/* ---------- Menú ---------- */
.menu { position: fixed; inset: 0; z-index: 55; background: var(--marino); display: grid; grid-template-columns: 1fr 1.1fr; gap: 4vw; padding: 90px var(--g) 110px; overflow-y: auto; clip-path: circle(0% at 50% calc(100% - 40px)); transition: clip-path .9s var(--ease); }
.menu.is-open { clip-path: circle(150% at 50% calc(100% - 40px)); }
.menu__preview { position: sticky; top: 0; align-self: start; border-radius: var(--r); overflow: hidden; aspect-ratio: 16/10; background: var(--hondo); }
.menu__preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .4s; }
.menu__list { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.menu__list a { display: flex; align-items: baseline; gap: 18px; padding: 6px 0; text-decoration: none; font-family: var(--f-display); font-weight: 800; font-stretch: 90%; font-size: clamp(1.6rem, 3.4vw, 3rem); line-height: 1.02; letter-spacing: -.02em; color: rgba(246,242,234,.45); transition: color .3s, font-stretch .6s var(--ease), transform .6s var(--ease); }
.menu__list a span { font-stretch: 150%; font-size: .32em; color: var(--laton); min-width: 2.5em; letter-spacing: 0; }
.menu__list a:hover, .menu__list a:focus-visible, .menu__list a[aria-current="true"] { color: var(--bruma); font-stretch: 130%; transform: translateX(10px); }
.menu__foot { grid-column: 1 / -1; font-size: .8rem; color: #8aa3a8; margin: 0; }
.menu__foot em { color: var(--turquesa); }
@media (max-width: 760px) { .menu { grid-template-columns: 1fr; } .menu__preview { display: none; } }

/* ---------- Pie revelado ---------- */
main { position: relative; z-index: 2; background: var(--marino); }
.reveal-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1; background: linear-gradient(180deg, var(--profundo), var(--marino)); color: var(--bruma); }
.reveal-foot__inner { max-width: var(--maxw); margin: 0 auto; padding: 60px var(--g) 110px; }
.reveal-foot__word { font-family: var(--f-display); font-weight: 900; font-stretch: 150%; font-size: clamp(3rem, 12.4vw, 13rem); line-height: .82; letter-spacing: -.04em; margin: 0 0 30px; }
.reveal-foot__word em { font-weight: 300; color: var(--laton); letter-spacing: -.05em; }
.reveal-foot__nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 20px; font-weight: 600; font-size: .9rem; }
.reveal-foot__nav a { text-decoration: none; opacity: .8; }
.reveal-foot__nav a:hover { opacity: 1; color: var(--laton); }
.reveal-foot .fine { color: #9ab7bc; }

/* Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
