/* ==========================================================================
   Guayaquil Bajo Asedio — capa 1 (sitio público)
   Misma identidad que la app (capa 2): cielo de asedio índigo, páginas de
   bitácora en pergamino, lacre ember. Firma del sitio: el río que se dibuja
   al hacer scroll, de Puná a Guayaquil, con un sello por estación.
   ========================================================================== */

:root {
  --ink-night: #0b1220;
  --ink-night-2: #101a2e;
  --parchment: #ede1c8;
  --parchment-dim: #ddcca4;
  --parchment-ink: #2a2013;
  --ember: #c1521c;
  --ember-bright: #e06a2c;
  --river: #2f6e62;
  --river-bright: #3f9484;
  --brass: #b08d3e;
  --brass-bright: #d4ac54;
  --alarm: #7a2c22;

  --font-display: 'Spectral', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background:
    radial-gradient(1px 1px at 12% 6%, rgba(237,225,200,.35) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 3%, rgba(237,225,200,.4) 0, transparent 60%),
    radial-gradient(1px 1px at 81% 9%, rgba(237,225,200,.3) 0, transparent 60%),
    radial-gradient(1px 1px at 93% 22%, rgba(237,225,200,.22) 0, transparent 60%),
    radial-gradient(ellipse at 50% -8%, #16233d 0%, var(--ink-night) 52%, #060a13 100%);
  background-attachment: fixed;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ember); color: var(--parchment); }
:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 3px; border-radius: 3px; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; color: var(--parchment); line-height: 1.15; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
h3 { font-size: 22px; font-weight: 700; }
p { margin: 0; color: rgba(237,225,200,.82); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brass-bright);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 16px; height: 1px; background: currentColor; }

/* ---------- Barra superior ---------- */
.site-top {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(11,18,32,.96) 55%, rgba(11,18,32,.7));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(176,141,62,.22);
}
.site-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.brand b { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a.link {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: rgba(237,225,200,.65);
}
.nav a.link:hover { color: var(--parchment); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 999px; padding: 13px 24px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--ember-bright), var(--ember)); color: #fff5ea; box-shadow: 0 10px 26px -10px rgba(193,82,28,.65); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--parchment); border: 1px solid rgba(237,225,200,.28); }
.btn-ghost:hover { background: rgba(255,255,255,.09); }
.btn-ink { background: var(--parchment-ink); color: var(--parchment); }
.btn-ink:hover { filter: brightness(1.2); }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 {
  font-size: clamp(46px, 8vw, 96px); font-style: italic; font-weight: 700; letter-spacing: -.01em;
  margin-top: 16px;
}
.hero h1 span { display: block; color: var(--ember-bright); font-style: normal; }
.hero .lede { font-size: clamp(18px, 2.2vw, 21px); max-width: 34em; margin-top: 22px; color: rgba(237,225,200,.78); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.log-page {
  position: relative;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.025) 0 2px, transparent 2px 34px),
    linear-gradient(160deg, var(--parchment) 0%, var(--parchment-dim) 100%);
  color: var(--parchment-ink);
  border-radius: 4px;
  padding: 26px 26px 28px;
  border: 1px solid rgba(42,32,19,.15);
  box-shadow: 0 22px 44px -22px rgba(0,0,0,.6);
}
.log-page::before { content: ''; position: absolute; inset: 0; border-radius: 4px; box-shadow: inset 0 0 44px rgba(122,44,34,.07); pointer-events: none; }
.log-page h2, .log-page h3 { color: var(--parchment-ink); }
.log-page p { color: rgba(42,32,19,.84); }
.log-page .eyebrow { color: var(--alarm); }

.hero-entry { transform: rotate(-1.2deg); }
.hero-entry p { margin-top: 14px; font-size: 19px; font-family: var(--font-display); line-height: 1.5; }
.hero-entry .foot { margin-top: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: rgba(42,32,19,.6); }
.hero-seal {
  position: absolute; right: 18px; top: -22px; width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--ember-bright), #a8451a);
  box-shadow: 0 8px 18px -6px rgba(0,0,0,.55), inset 0 0 0 3px rgba(122,44,34,.45);
  display: grid; place-items: center; color: #fff5ea;
}

/* ---------- El viaje (río + estaciones) ---------- */
.voyage { display: grid; grid-template-columns: 128px 1fr; gap: 28px; padding-bottom: 40px; }
.rail { position: sticky; top: 84px; height: calc(100vh - 108px); min-height: 440px; align-self: start; display: flex; flex-direction: column; }
.rail-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; color: rgba(237,225,200,.55); text-align: center; height: 20px; }
.rail-map { position: relative; flex: 1; }
.rail-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.river-base { fill: none; stroke: rgba(47,110,98,.3); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.river-dots { fill: none; stroke: rgba(63,148,132,.55); stroke-width: 1.4; stroke-dasharray: 1 8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.river-lit { fill: none; stroke: var(--river-bright); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.seal {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: rgba(237,225,200,.5);
  background: rgba(16,26,46,.9); border: 1.5px dashed rgba(176,141,62,.5);
  transition: background .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.seal.lit { color: #fff5ea; background: radial-gradient(circle at 35% 30%, var(--ember-bright), #a8451a); border: 1.5px solid #7a2c22; box-shadow: 0 0 0 5px rgba(224,106,44,.16); }
.lantern { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--brass-bright); box-shadow: 0 0 0 4px rgba(212,172,84,.2), 0 0 18px 4px rgba(212,172,84,.5); }

.stations { padding-top: 12px; }
.stations .intro { max-width: 36em; padding: 20px 0 8px; }
.stations .intro h2 { margin-top: 12px; }
.stations .intro p { margin-top: 16px; }

.station { margin-top: 96px; }
.station .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(42,32,19,.35); color: rgba(42,32,19,.78);
}
.station h3 { margin-top: 10px; font-size: clamp(26px, 3.4vw, 34px); }
.station p { margin-top: 14px; font-size: 18px; }
.station .finds { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.station .finds li { font-size: 15px; color: rgba(42,32,19,.8); padding-left: 18px; position: relative; }
.station .finds li::before { content: ''; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--alarm); }
.finds-title { margin-top: 22px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--alarm); }

/* ---------- Secciones generales ---------- */
section.block { padding: 84px 0; }
section.block > .wrap > h2 { margin-top: 12px; max-width: 18em; }
.block-lede { margin-top: 16px; max-width: 40em; font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.step { background: rgba(255,255,255,.04); border: 1px solid rgba(176,141,62,.25); border-radius: 16px; padding: 22px 20px 24px; }
.step .n {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
  font-family: var(--font-mono); font-size: 13px; color: #fff5ea;
  background: radial-gradient(circle at 35% 30%, var(--ember-bright), #a8451a);
}
.step h3 { font-size: 18px; }
.step p { margin-top: 8px; font-size: 15px; }
.offline-note { margin-top: 22px; display: flex; gap: 12px; align-items: flex-start; max-width: 46em; font-size: 15.5px; color: rgba(237,225,200,.7); }
.offline-note .dot { flex: none; width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--river-bright); box-shadow: 0 0 0 4px rgba(63,148,132,.2); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.two .log-page h3 { font-size: 21px; }
.two .log-page ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.two .log-page li { padding-left: 22px; position: relative; font-size: 16px; color: rgba(42,32,19,.84); }
.two .log-page li::before { content: '—'; position: absolute; left: 0; color: var(--alarm); }
.note { margin-top: 20px; max-width: 46em; font-size: 15.5px; color: rgba(237,225,200,.66); }

.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.install-grid ol { margin: 14px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: rgba(42,32,19,.84); font-size: 16px; }
.install-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.copy-status { font-family: var(--font-mono); font-size: 12px; color: var(--river-bright); min-height: 1em; }

.scope-yes li::before { content: '✓'; color: var(--river); }
.scope-no li::before { content: '○'; color: var(--alarm); }

.sources { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 52em; }
.sources li { padding-left: 18px; position: relative; font-size: 15px; color: rgba(237,225,200,.72); }
.sources li::before { content: '—'; position: absolute; left: 0; color: var(--brass-bright); }

.site-foot { border-top: 1px solid rgba(176,141,62,.22); padding: 40px 0 56px; margin-top: 20px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: flex-start; }
.site-foot p { font-size: 14px; color: rgba(237,225,200,.6); max-width: 38em; }
.site-foot .tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-bright); }

/* ---------- Aparición suave (solo con JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero-entry { transform: rotate(-.6deg); }
  .steps { grid-template-columns: 1fr 1fr; }
  .two, .install-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav a.link { display: none; }
  .voyage { grid-template-columns: 58px 1fr; gap: 16px; }
  .rail-label { font-size: 8px; letter-spacing: 0; }
  .seal { width: 32px; height: 32px; margin: -16px 0 0 -16px; font-size: 10.5px; }
  .hero { padding-top: 48px; }
  .station { margin-top: 64px; }
  section.block { padding: 60px 0; }
  .log-page { padding: 22px 20px 24px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .brand b { font-size: 15px; }
}
