/* GOTAR: componentes del repo gotar-lp (css/styles.css). Los tokens viven en gotar.css.
   Cambios frente al repo, todos por contraste u objetivo táctil: ver DESIGN-SYSTEM.md. */
@font-face { font-family: "Anton"; src: url("fonts/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  font-family: var(--sans); background: var(--paper); color: var(--ink);
  font-size: 17px; line-height: 1.6; font-weight: 400; overflow-x: hidden;
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(0,0,0,0.035), transparent 60%),
    radial-gradient(100% 60% at 50% 110%, rgba(0,0,0,0.03), transparent 55%);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.hero :focus-visible, .iceberg :focus-visible, .footer :focus-visible, .nav:not(.is-scrolled) :focus-visible { outline-color: var(--on-night); }

/* Grano */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%; pointer-events: none; z-index: 9999; opacity: 0.05;
  background-image: url("grain.svg");
  mix-blend-mode: multiply; animation: grainShift 7s steps(6) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); } 80% { transform: translate(3%, 2%); } 100% { transform: translate(0, 0); }
}

/* Estructura */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; border-top: 1px solid var(--hairline); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: clamp(2rem, 6vw, 7rem); align-items: start; }

/* Tipos */
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.005em; }
.kicker { display: inline-block; font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
.label { font-size: 0.9rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; color: var(--ink); }
.label--light { color: var(--on-night); }
.num { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 0.9; color: var(--ink); display: block; }
.section__index { display: flex; flex-direction: column; gap: 0.6rem; position: sticky; top: 120px; }
.section__body { max-width: 60ch; }
.section__body p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.section__body p.lede, .lede { font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.4; color: var(--ink); font-weight: 400; }
.section__title { font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 1.6rem; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 2rem;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; border-radius: 2px;
  transition: background var(--ease) 280ms, color var(--ease) 280ms, border-color var(--ease) 280ms, transform var(--ease) 280ms;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--navy); transform: translateY(-2px); }
.btn--ghost { border: 1px solid var(--hairline); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--small { min-height: 44px; padding: 0 1.25rem; font-size: 0.74rem; }
.btn:active { transform: translateY(0); }

/* Barra */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.4rem var(--gutter); border-bottom: 1px solid transparent;
  transition: background var(--ease) 400ms, padding var(--ease) 400ms, border-color var(--ease) 400ms;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--hairline); padding-block: 1rem;
}
.nav__wordmark { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; font-weight: 700; font-size: 1.15rem; color: var(--on-night); transition: color var(--ease) 300ms; }
.nav__wordmark span { letter-spacing: 0.34em; padding-left: 0.06em; }
.nav__mark { width: 1.22rem; height: 1.45rem; color: currentColor; flex: none; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a:not(.btn) { position: relative; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-night); padding-block: 0.8rem; transition: color var(--ease) 240ms; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; bottom: 6px; width: 0; height: 1px; background: currentColor; transition: width var(--ease) 320ms; }
.nav__links a:not(.btn):hover::after { width: 100%; }
.nav .btn { background: var(--paper); color: var(--ink); }
.nav .btn:hover { background: #fff; }
.nav.is-scrolled .nav__wordmark { color: var(--ink); }
.nav.is-scrolled .nav__links a:not(.btn) { color: var(--ink); }
.nav.is-scrolled .btn { background: var(--ink); color: var(--paper); }
.nav.is-scrolled .btn:hover { background: var(--navy); }

/* Hero */
.hero {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 7rem var(--gutter) 9rem; position: relative; color: var(--on-night); overflow: hidden;
  background-image:
    linear-gradient(to bottom, rgba(6,11,28,0.62) 0, rgba(6,11,28,0) 9rem),
    radial-gradient(ellipse 100% 78% at 50% 48%, rgba(6,11,28,0.74) 0%, rgba(7,12,30,0.46) 58%, rgba(7,12,30,0.24) 100%),
    url("hero-bg.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: min(22%, 8rem); pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--paper) 78%, transparent));
}
.hero__inner { position: relative; z-index: 2; max-width: 1000px; }
.hero__mark { width: clamp(2.8rem, 4.4vw, 3.8rem); height: auto; color: var(--on-night); margin: 0 auto 1.8rem; display: block; opacity: 0.96; }
.hero .kicker { margin-bottom: 1.8rem; color: var(--on-night); }
.hero__title { font-size: clamp(3rem, 8vw, 6.25rem); line-height: 0.96; text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 1.8rem; color: var(--on-night); }
.hero__title .word { display: block; }
.hero__sub { font-size: clamp(1rem, 2vw, 1.35rem); color: var(--on-night); max-width: 46ch; margin: 0 auto 2.2rem; line-height: 1.5; }
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero .btn--solid { background: var(--paper); color: var(--ink); }
.hero .btn--solid:hover { background: #fff; }
.hero .btn--ghost { border-color: rgba(236,233,224,0.35); color: var(--on-night); }
.hero .btn--ghost:hover { border-color: var(--on-night); }

/* Listas con línea */
.attrs { display: flex; flex-wrap: wrap; gap: 0.6rem 0; margin-top: 2.5rem; border-top: 1px solid var(--hairline); }
.attrs li { flex: 1 1 46%; padding: 1rem 0; border-bottom: 1px solid var(--hairline); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }

/* Bloque azul */
.iceberg {
  color: var(--on-night); overflow: hidden; border-top: 0;
  background:
    radial-gradient(135% 80% at 80% 4%, rgba(120,158,235,0.42) 0%, rgba(70,110,200,0.18) 28%, transparent 56%),
    linear-gradient(176deg, #3366CC 0%, #2952A8 24%, #213F80 48%, #14264F 72%, #0A1530 100%);
}
.iceberg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("dither.svg");
}
.iceberg > * { position: relative; z-index: 2; }
.iceberg .num { color: var(--on-night); }

/* Cierre y bloque de papel 2 */
.section--peak { background: var(--paper-2); }
.peak__title { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 0.96; text-transform: uppercase; margin: 1.6rem 0 1.4rem; color: var(--navy); }
.closing { padding-block: clamp(7rem, 18vh, 14rem); text-align: center; }
.closing__line { font-size: clamp(1.6rem, 4vw, 3.4rem); line-height: 1.15; text-transform: uppercase; max-width: 24ch; margin: 0 auto 2.2rem; color: var(--ink); }

/* Pie */
.footer { background: var(--night); color: var(--on-night); padding-top: clamp(4rem, 10vh, 7rem); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr auto; gap: 2.5rem; padding-bottom: clamp(3rem, 8vh, 5rem); border-bottom: 1px solid var(--hairline-dk); }
.footer__brand { display: flex; flex-direction: column; gap: 0.8rem; }
.footer__wordmark { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.9; letter-spacing: 0.02em; }
.footer__tag { color: var(--on-night-soft); font-size: 0.9rem; letter-spacing: 0.04em; }
.footer__col { display: flex; flex-direction: column; gap: 0.1rem; }
.footer__heading { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--on-night-soft); margin-bottom: 0.4rem; }
.footer__col a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-night); font-size: 0.95rem; opacity: 0.85; transition: opacity var(--ease) 240ms; }
.footer__col a:hover { opacity: 1; }
.footer__emblem { color: var(--on-night); }
.footer__emblem .star { width: 50px; height: 64px; opacity: 0.7; transform-origin: 50% 39%; animation: spinStar 30s linear infinite; }
@keyframes spinStar { to { transform: rotate(360deg); } }
.footer__base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.8rem; font-size: 0.75rem; letter-spacing: 0.06em; color: var(--on-night-soft); }

/* Responsive */
@media (max-width: 820px) {
  .section__index { position: static; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) { .nav__links a:not(.btn) { display: none; } }
@media (max-width: 640px) {
  .hero {
    background-image:
      linear-gradient(to bottom, rgba(6,11,28,0.62) 0, rgba(6,11,28,0) 9rem),
      radial-gradient(ellipse 130% 64% at 50% 46%, rgba(6,11,28,0.8) 0%, rgba(7,12,30,0.6) 60%, rgba(7,12,30,0.36) 100%),
      url("hero-bg-mobile.jpg");
  }
  .hero__title { font-size: clamp(2rem, 9vw, 3.6rem); line-height: 1.05; letter-spacing: -0.015em; }
  .hero__title .word { display: inline; }
  .hero__sub { font-size: 1.02rem; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1 1 100%; }
  .grid-2 { gap: 2.2rem; }
  .section__body p.lede, .lede { font-size: 1.35rem; }
  .peak__title { font-size: clamp(2.2rem, 11vw, 3.4rem); }
  .closing__line { font-size: clamp(1.5rem, 8vw, 2.4rem); }
  .closing .btn { width: 100%; }
}

/* Aparición lenta. Solo con JS: sin él, todo se ve. */
.js .reveal {
  opacity: 0; transform: translateY(28px); filter: blur(10px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease), filter var(--slow) var(--ease);
  will-change: opacity, transform, filter;
}
.js .reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .footer__emblem .star { animation: none; }
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .btn:hover, .btn--solid:hover, .btn--ghost:hover { transform: none; }
}
