/* ============================================================
   BASE — reset + tipografía editorial
   ============================================================ */

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

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-on-dark);
  background: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-normal) var(--ease-out);
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ---------- Tipografía editorial ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: inherit;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.script {
  font-family: var(--font-script);
  font-weight: 500;
  color: var(--accent);
}

.accent        { color: var(--accent); }
.accent-deep   { color: var(--accent-deep); }

/* Contenedor */
.container {
  width: 100%;
  max-width: var(--container-lg);
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.container--wide { max-width: var(--container-xl); }
.container--narrow { max-width: var(--container-md); }

@media (min-width: 768px) {
  .container { padding-left: var(--space-8); padding-right: var(--space-8); }
}

/* Secciones con modo claro/oscuro alternado */
.sec {
  padding-top: clamp(var(--space-12), 10vw, var(--space-20));
  padding-bottom: clamp(var(--space-12), 10vw, var(--space-20));
  position: relative;
  overflow: hidden;
}

.sec--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.sec--dark-alt {
  background: var(--bg-dark-alt);
  color: var(--text-on-dark);
}

.sec--light {
  background: var(--bg-light);
  color: var(--text-on-light);
}

.sec--light-alt {
  background: var(--bg-light-alt);
  color: var(--text-on-light);
}

/* Invertir color de eyebrow en light */
.sec--light .eyebrow,
.sec--light-alt .eyebrow { color: var(--accent-deep); }
.sec--light .eyebrow::before,
.sec--light-alt .eyebrow::before { background: var(--accent-deep); }

.sec--light .script,
.sec--light-alt .script { color: var(--accent-deep); }

/* Sr only */
.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;
}

/* Reveal base */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}

[data-reveal="up"]    { transform: translate3d(0, 36px, 0); }
[data-reveal="down"]  { transform: translate3d(0, -36px, 0); }
[data-reveal="left"]  { transform: translate3d(-36px, 0, 0); }
[data-reveal="right"] { transform: translate3d(36px, 0, 0); }
[data-reveal="scale"] { transform: scale(0.94); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--navy-950); }
::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--mint-500); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--navy-900);
}

/* Patrón topográfico decorativo (reutilizable) */
.topo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%239DD4DD' stroke-width='1.1' stroke-linecap='round' opacity='0.9'%3E%3Cpath d='M-40 120 C 180 40, 420 220, 680 110 S 920 240, 1040 180'/%3E%3Cpath d='M-40 200 C 200 120, 420 280, 660 200 S 920 300, 1040 260'/%3E%3Cpath d='M-40 280 C 220 200, 440 340, 640 280 S 920 360, 1040 340'/%3E%3Cpath d='M-40 360 C 220 300, 440 420, 640 360 S 920 420, 1040 420'/%3E%3Cpath d='M-40 440 C 220 400, 440 500, 640 440 S 920 480, 1040 500'/%3E%3Cpath d='M-40 520 C 220 500, 440 580, 640 540 S 920 540, 1040 580'/%3E%3Cpath d='M-40 600 C 220 600, 440 660, 640 640 S 920 600, 1040 660'/%3E%3Cpath d='M-40 680 C 220 700, 440 740, 640 740 S 920 660, 1040 740'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 900px 900px;
  background-position: center;
  background-repeat: no-repeat;
}

.topo--tr {
  inset: auto auto auto auto;
  top: -10%;
  right: -15%;
  width: 80vw;
  height: 80vw;
  max-width: 900px;
  max-height: 900px;
  opacity: 0.18;
  background-size: contain;
}

.topo--bl {
  inset: auto auto auto auto;
  bottom: -15%;
  left: -15%;
  width: 70vw;
  height: 70vw;
  max-width: 800px;
  max-height: 800px;
  opacity: 0.14;
  background-size: contain;
  transform: rotate(180deg);
}

.sec--light .topo {
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%230F2A38' stroke-width='1.1' stroke-linecap='round' opacity='0.9'%3E%3Cpath d='M-40 120 C 180 40, 420 220, 680 110 S 920 240, 1040 180'/%3E%3Cpath d='M-40 200 C 200 120, 420 280, 660 200 S 920 300, 1040 260'/%3E%3Cpath d='M-40 280 C 220 200, 440 340, 640 280 S 920 360, 1040 340'/%3E%3Cpath d='M-40 360 C 220 300, 440 420, 640 360 S 920 420, 1040 420'/%3E%3Cpath d='M-40 440 C 220 400, 440 500, 640 440 S 920 480, 1040 500'/%3E%3Cpath d='M-40 520 C 220 500, 440 580, 640 540 S 920 540, 1040 580'/%3E%3Cpath d='M-40 600 C 220 600, 440 660, 640 640 S 920 600, 1040 660'/%3E%3Cpath d='M-40 680 C 220 700, 440 740, 640 740 S 920 660, 1040 740'/%3E%3C/g%3E%3C/svg%3E");
}

/* Número ornamental tipo revista */
.mag-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px currentColor;
  letter-spacing: -0.04em;
  opacity: 0.85;
}
