/* Fuentes autoalojadas (sin peticiones a terceros). Fraunces: SIL OFL 1.1 · Inter: SIL OFL 1.1 */
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../assets/fonts/fraunces-variable.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/inter-variable.woff2") format("woff2"); }

:root {
  --navy: #0b2a5b;
  --navy-deep: #071c3d;
  --blue: #1f5fbf;
  --blue-soft: #e8eef9;
  --ink: #1a1f2b;
  --ink-soft: #4b5262;
  --muted: #7a8090;
  --line: #dfe4ee;
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --card: #ffffff;
  --gold: #c9a24a;
  --danger: #b4232c;
  --ok: #1d7a46;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 42, 91, 0.08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9edf5;
    --ink-soft: #c2c8d6;
    --muted: #8e95a6;
    --line: #243352;
    --bg: #0d1526;
    --bg-alt: #111c33;
    --card: #15213b;
    --blue-soft: #1b2a4a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --ink: #e9edf5;
  --ink-soft: #c2c8d6;
  --muted: #8e95a6;
  --line: #243352;
  --bg: #0d1526;
  --bg-alt: #111c33;
  --card: #15213b;
  --blue-soft: #1b2a4a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.small { font-size: 0.9rem; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 600; color: var(--blue); margin-bottom: 0.6em; }
.intro { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand em { font-style: italic; font-weight: 400; color: var(--muted); }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: repeating-linear-gradient(90deg, var(--navy) 0 4px, #fff 4px 8px); border: 2px solid var(--navy); }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--ink-soft); padding: 8px 10px; border-radius: 8px; font-size: 0.95rem; }
.site-header nav a:hover { background: var(--blue-soft); color: var(--ink); }
.nav-cta { background: var(--navy); color: #fff !important; }
.nav-cta:hover { background: var(--blue) !important; }
@media (max-width: 640px) { .site-header nav a:not(.nav-cta) { display: none; } }

/* Hero */
.hero { position: relative; background: linear-gradient(160deg, var(--navy-deep), var(--navy) 60%, #16407f); color: #fff; overflow: hidden; }
.hero-stripes { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 48px, transparent 48px 96px); pointer-events: none; }
.hero-inner { position: relative; padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 100px); max-width: 760px; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; font-weight: 600; color: var(--gold); margin-bottom: 1.2em; }
.hero h1 { color: #fff; }
.hero-dates { font-family: var(--serif); font-size: 1.2rem; color: #c9d4ea; margin-bottom: 1.5em; }
.hero-lead { font-size: 1.1rem; color: #e3e9f5; max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.8em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 0.98rem; font-family: var(--sans); transition: transform .12s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #fff; color: var(--navy); }
.btn-primary:hover { background: #eef3fb; }
.section .btn-primary, .form .btn-primary { background: var(--navy); color: #fff; }
.section .btn-primary:hover, .form .btn-primary:hover { background: var(--blue); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Notice */
.notice { background: var(--blue-soft); border-bottom: 1px solid var(--line); }
.notice .wrap { padding: 20px 0; }
.notice p { margin: 0; max-width: 90ch; color: var(--ink-soft); }
.notice strong { color: var(--ink); }

/* Sections */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(180deg, var(--navy-deep), var(--navy)); color: #fff; }
.section-dark .eyebrow { color: var(--gold); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .intro { color: #d6deee; }
.section-dark .muted { color: #a9b6d1; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; gap: 24px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-dark .card { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); box-shadow: none; }
.facts dl { margin: 0; display: grid; gap: 10px; }
.facts dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.facts dl > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--muted); font-size: 0.85rem; }
.facts dd { margin: 0; font-weight: 500; }

/* Table */
.table-title { margin-top: 48px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 640px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg-alt); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tfoot td { font-weight: 600; background: var(--bg-alt); border-bottom: 0; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 32px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding-left: 36px; margin-bottom: 28px; max-width: 70ch; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 3px solid var(--navy); }
.timeline time { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); font-weight: 600; margin-bottom: 4px; }
.timeline h3 { margin-bottom: 0.3em; }
.timeline p { color: var(--ink-soft); margin: 0; }

/* Cards 3 */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
@media (max-width: 820px) { .cards-3 { grid-template-columns: 1fr; } }
.card .big { font-family: var(--serif); font-size: 1.35rem; color: var(--navy); margin-bottom: 0.6em; }
.section-dark .card .big { color: var(--gold); }
.link { font-weight: 600; }

/* Form */
.msg-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .msg-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-size: 0.9rem; font-weight: 600; }
.req { color: var(--gold); }
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08); color: #fff; font: inherit;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.45); }
input:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 140px; }
.counter { text-align: right; font-size: 0.8rem; color: #a9b6d1; margin: 0; }
.radio, .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 0.95rem; }
.radio input, .check input { margin-top: 4px; accent-color: var(--gold); }
.check a { color: var(--gold); }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-estado { margin: 0; font-size: 0.95rem; min-height: 1.4em; }
.form-estado.ok { color: #9be3b4; }
.form-estado.error { color: #ffb3b8; }

/* Wall */
.wall-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.wall-head h3 { margin: 0; }
.wall-head p { margin: 0; }
.muro { display: grid; gap: 12px; max-height: 720px; overflow-y: auto; padding-right: 4px; }
.msg { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 16px 18px; }
.msg p { margin: 0 0 8px; white-space: pre-line; color: #eef2fa; }
.msg footer { font-size: 0.82rem; color: #a9b6d1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.msg footer strong { color: #fff; }
.msg .tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
#muro-mas { margin-top: 12px; }

/* Steps / tips / sources */
.steps { padding-left: 1.2em; display: grid; gap: 10px; }
.tips { padding-left: 1.2em; display: grid; gap: 8px; margin: 0; }
.sources { padding-left: 1.2em; display: grid; gap: 8px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #c9d4ea; padding: 48px 0 32px; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
.footer-line { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--gold); text-align: center; margin: 40px 0 0; }

/* Hero a todo el ancho con fotografía */
.hero-foto { min-height: min(88vh, 860px); display: flex; flex-direction: column; justify-content: flex-end; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero-velo { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,28,61,0.93) 0%, rgba(7,28,61,0.82) 38%, rgba(7,28,61,0.35) 70%, rgba(7,28,61,0.15) 100%),
    linear-gradient(180deg, rgba(7,28,61,0.25) 0%, rgba(7,28,61,0) 35%, rgba(7,28,61,0.75) 100%); }
.hero-foto .hero-inner { position: relative; max-width: 680px; margin-inline: 0; width: auto;
  padding: clamp(140px, 22vw, 220px) 0 clamp(40px, 6vw, 72px); }
.hero-foto .wrap.hero-inner { margin-left: max(16px, calc((100% - 1100px) / 2)); margin-right: 16px; }
.hero-credito { position: relative; margin: 0; padding: 0 16px 14px; text-align: right; font-size: 0.72rem; color: #9fb0d2; }
@media (max-width: 820px) {
  .hero-foto { min-height: 0; }
  .hero-img { position: relative; height: auto; aspect-ratio: 16 / 10; object-position: 50% 22%; }
  .hero-velo { background: linear-gradient(180deg, rgba(7,28,61,0) 40%, rgba(7,28,61,0.7) 62%, var(--navy-deep) 78%); }
  .hero-foto .hero-inner { padding: 20px 0 40px; margin-top: -6vw; }
}

/* Retrato en «Quién era» */
.facts-col { display: grid; gap: 20px; }
.retrato { margin: 0; }
.retrato img { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.retrato figcaption { font-size: 0.72rem; color: var(--muted); text-align: center; margin-top: 8px; }

/* Página en construcción (neutra: no revela el contenido del sitio) */
body.construccion { display: flex; flex-direction: column; min-height: 100vh; }
body.construccion main { flex: 1; display: flex; }
body.construccion .hero { flex: 1; }
.hero-neutra { display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-neutra .hero-inner { max-width: 560px; padding: 48px 0; }
.hero-neutra .hero-lead { margin-inline: auto; }
.brand-mark-grande { display: block; width: 44px; height: 44px; margin: 0 auto 28px; border-width: 3px; }
