/* 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?v=98b677a") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../assets/fonts/inter-variable.woff2?v=98b677a") format("woff2"); }

/* Paleta: blanco, azul del CD Tenerife y dorado como acento puntual */
:root {
  --azul: #0b3d91;
  --azul-oscuro: #06224f;
  --azul-claro: #e9eef9;
  --navy: var(--azul);
  --navy-deep: var(--azul-oscuro);
  --blue: var(--azul);
  --blue-soft: var(--azul-claro);
  --oro: #c9a24a;
  --gold: var(--oro);
  --ink: #15192a;
  --ink-soft: #4a5166;
  --muted: #7c8295;
  --line: #e1e6f0;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --card: #ffffff;
  --danger: #b4232c;
  --ok: #1d7a46;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(11, 61, 145, 0.08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
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(--azul); }
img { max-width: 100%; }
.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(--oro); 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(--azul); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Cabecera: solo el botón del menú, flotante sobre el contenido */
.site-header { position: fixed; top: 0; right: 0; z-index: 50; height: var(--header-h); display: flex; align-items: center; padding: 0 12px; }
.menu-btn { appearance: none; border: 0; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #fff; background: rgba(6,34,79,0.45); backdrop-filter: blur(6px); transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.site-header.solida .menu-btn, body.pagina .menu-btn { background: #fff; color: var(--azul); box-shadow: 0 2px 12px rgba(11,61,145,0.18); }
.menu-btn:hover { filter: brightness(1.08); }
.menu-btn:focus { outline: none; }
.menu-btn:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s ease; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; transition: transform .2s ease, top .2s ease; }
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }
body.menu-abierto .menu-btn { color: #fff; background: rgba(255,255,255,0.12); box-shadow: none; }
body.menu-abierto .menu-btn span { background: transparent; }
body.menu-abierto .menu-btn span::before { top: 0; transform: rotate(45deg); }
body.menu-abierto .menu-btn span::after { top: 0; transform: rotate(-45deg); }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; background: repeating-linear-gradient(90deg, var(--azul) 0 4px, #fff 4px 8px); border: 2px solid var(--azul); flex: none; }

.menu { position: fixed; inset: 0; z-index: 40; background: var(--azul-oscuro); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
body.menu-abierto .menu { opacity: 1; visibility: visible; }
body.menu-abierto { overflow: hidden; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: center; }
.menu a { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 3rem); color: #fff; text-decoration: none; padding: 10px 24px; border-radius: 10px; }
.menu a:hover, .menu a:focus { background: rgba(255,255,255,0.08); }
.menu small { display: block; font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--oro); margin-top: 4px; }
.menu-pie { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; color: #b7c3de; font-size: 0.85rem; }

/* Portada a pantalla completa */
.portada { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; color: #fff; background: var(--azul-oscuro); overflow: hidden; }
.portada-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 22%; }
.portada-velo { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,34,79,0.35) 0%, rgba(6,34,79,0) 30%, rgba(6,34,79,0) 55%, rgba(6,34,79,0.85) 100%); }
.portada-texto { position: relative; width: min(1100px, 100% - 32px); margin: 0 auto; padding: 0 0 clamp(48px, 8vh, 96px); }
.portada-texto .eyebrow { color: var(--oro); }
.portada-texto h1 { color: #fff; margin-bottom: 0.2em; }
.portada-fechas { font-family: var(--serif); font-size: clamp(1rem, 2vw, 1.3rem); color: #d7e0f3; margin: 0 0 1.4em; }
.portada-acciones { display: flex; gap: 12px; flex-wrap: wrap; }
.portada-credito { position: absolute; right: 16px; bottom: 12px; font-size: 0.7rem; color: #a9b8d8; }
.portada-flecha { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); color: #fff; opacity: 0.7; font-size: 1.4rem; text-decoration: none; }
@media (max-width: 640px) {
  .portada-img { object-position: 60% 20%; }
  .portada-velo { background: linear-gradient(180deg, rgba(6,34,79,0.35) 0%, rgba(6,34,79,0) 25%, rgba(6,34,79,0) 45%, rgba(6,34,79,0.9) 100%); }
  .portada-credito { display: none; }
}

/* Botones */
.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(--azul); }
.btn-primary:hover { background: var(--azul-claro); }
.section .btn-primary, .form .btn-primary { background: var(--azul); color: #fff; }
.section .btn-primary:hover, .form .btn-primary:hover { background: var(--azul-oscuro); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* Aviso de la familia */
.notice { background: var(--azul-claro); border-top: 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); }

/* Secciones */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(180deg, var(--azul-oscuro), var(--azul)); color: #fff; }
.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; }

/* Galería */
.galeria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
@media (max-width: 640px) { .galeria { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.galeria a { display: block; position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--bg-alt); }
.galeria img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.galeria a:hover img, .galeria a:focus img { transform: scale(1.04); }
.galeria a:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; }
.galeria-credito { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }

.visor { position: fixed; inset: 0; z-index: 60; background: rgba(6,34,79,0.96); display: none; align-items: center; justify-content: center; padding: 56px 16px 24px; }
.visor.abierto { display: flex; }
.visor img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.visor-cerrar, .visor-ant, .visor-sig { position: absolute; appearance: none; background: rgba(255,255,255,0.1); border: 0; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; display: grid; place-items: center; }
.visor-cerrar:hover, .visor-ant:hover, .visor-sig:hover { background: rgba(255,255,255,0.22); }
.visor-cerrar { top: 12px; right: 12px; }
.visor-ant { left: 12px; top: 50%; transform: translateY(-50%); }
.visor-sig { right: 12px; top: 50%; transform: translateY(-50%); }
.visor-pie { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: #b7c3de; font-size: 0.8rem; }

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

/* Cronología */
.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(--azul); }
.timeline time { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--azul); font-weight: 600; margin-bottom: 4px; }
.timeline h3 { margin-bottom: 0.3em; }
.timeline p { color: var(--ink-soft); margin: 0; }

/* Tarjetas */
.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(--azul); margin-bottom: 0.6em; }
.section-dark .card .big { color: var(--oro); }
.link { font-weight: 600; }

/* Formulario */
.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(--oro); }
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(--oro); 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; line-height: 1.45; }
.radio input, .check input { margin: 3px 0 0; flex: none; accent-color: var(--oro); }
.check > span { flex: 1 1 auto; display: inline; }
.check a { color: var(--oro); }
.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; }

/* Muro */
.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; overflow-wrap: anywhere; }
.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(--oro); }
#muro-mas { margin-top: 12px; }

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

/* Página interior */
body.pagina main { padding-top: 0; }
.cabecera-pagina { background: var(--azul-oscuro); color: #fff; padding: calc(var(--header-h) + 24px) 0 clamp(48px, 8vw, 88px); }
body.pagina .menu-btn { background: rgba(255,255,255,0.14); color: #fff; box-shadow: none; }
body.pagina .site-header.solida .menu-btn { background: #fff; color: var(--azul); box-shadow: 0 2px 12px rgba(11,61,145,0.18); }
.cabecera-pagina h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); }
.cabecera-pagina p { color: #d7e0f3; max-width: 60ch; margin: 0; }
.volver { display: inline-block; margin-top: 18px; color: var(--oro); font-weight: 600; text-decoration: none; }

/* Pie */
.site-footer { background: var(--azul-oscuro); 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(--oro); text-align: center; margin: 40px 0 0; }

/* Página en construcción (neutra) */
.hero { position: relative; background: linear-gradient(160deg, var(--azul-oscuro), var(--azul) 70%, #16509f); 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; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; font-weight: 600; color: var(--oro); margin-bottom: 1.2em; }
.hero h1 { color: #fff; }
.hero-lead { font-size: 1.1rem; color: #e3e9f5; max-width: 60ch; }
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; background: repeating-linear-gradient(90deg, #fff 0 4px, transparent 4px 8px); border-color: #fff; }

/* Enlaces en forma de botón (configurar cookies) */
.enlace { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.site-footer .enlace { color: #fff; }
.legal-enlaces a { white-space: nowrap; }

/* Aviso de cookies */
.cookies { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; padding: 12px; pointer-events: none; }
.cookies-caja { pointer-events: auto; width: min(760px, 100%); margin: 0 auto; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(6,34,79,0.25); padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cookies-caja p { margin: 0; flex: 1 1 320px; font-size: 0.92rem; }
.cookies-botones { display: flex; gap: 8px; flex: none; }
.cookies-botones .btn { padding: 10px 16px; font-size: 0.92rem; }
.cookies-botones .btn-primary { background: var(--azul); color: #fff; }
.cookies-botones .btn-ghost { color: var(--azul); }
.cookies-botones .btn-ghost:hover { background: var(--azul-claro); }

/* Página legal */
.legal h3 { margin-top: 1.8em; font-size: 1.1rem; }
.legal p, .legal li { max-width: 78ch; }
.legal ul { padding-left: 1.2em; }
.legal-indice { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.legal-indice a { color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; }
.legal-indice a:hover { background: rgba(255,255,255,0.1); }
.legal-tabla { min-width: 0; font-size: 0.92rem; margin: 12px 0 8px; }
.legal-tabla th, .legal-tabla td { vertical-align: top; }
.legal-tabla code { font-size: 0.85rem; }
.completar { background: #fff3cd; color: #5c4400; padding: 0 4px; border-radius: 4px; font-weight: 600; }
@media (max-width: 720px) { .legal-tabla { display: block; overflow-x: auto; } }
