/* ============================================================
   Reset moderno
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

ul, ol { list-style: none; }

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

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

/* ============================================================
   Tipografía editorial
   ============================================================ */
.serif { font-family: var(--font-serif); }
.script { font-family: var(--font-script); }
.mono { font-family: var(--font-mono); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
h5 { font-size: var(--fs-md); letter-spacing: 0; }

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow--orange { color: var(--orange); }
.eyebrow--muted { color: var(--ink-muted); }

.lede {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: var(--fw-light);
  line-height: 1.4;
  color: var(--ink-2);
  font-style: italic;
}

.display {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: var(--fw-light);
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.display em {
  font-style: italic;
  font-weight: var(--fw-regular);
  color: var(--orange);
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

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

.section {
  padding-block: var(--space-9);
  position: relative;
}

.section--tight { padding-block: var(--space-7); }
.section--loose { padding-block: var(--space-10); }

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin-block: var(--space-6);
}

.rule--thick { height: 2px; background: var(--ink); }
.rule--green { background: var(--green); }

/* ============================================================
   Utilidades
   ============================================================ */
.muted { color: var(--ink-muted); }
.center { text-align: center; }
.uppercase { text-transform: uppercase; letter-spacing: 0.1em; }

.section-number {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  letter-spacing: 0.1em;
}

/* Capitular */
.dropcap::first-letter {
  font-family: var(--font-serif);
  font-size: 5.5em;
  float: left;
  line-height: 0.85;
  margin: 0.1em 0.1em 0 -0.05em;
  color: var(--green);
  font-weight: var(--fw-regular);
}

/* Animaciones */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideX {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.fade-up { animation: fadeUp var(--t-slow) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
