:root {
  color-scheme: dark;
  --bg: #04080f;
  --bg-soft: #0f1e29;
  --bg-highlight: #112c38;
  --gold: #c99b44;
  --teal: #38cfd9;
  --cream: #f6efe7;
  --text: #f2f6f8;
  --muted: rgba(242, 246, 248, 0.65);
  --border: rgba(255, 255, 255, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #102131, #05070b 60%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.hero {
  padding: 2.5rem clamp(1rem, 5vw, 4rem) 4rem;
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(3, 5, 15, 0.9), rgba(18, 34, 46, 0.8)), url('assets/hero-texture.svg') center/cover;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.hero-copy {
  background: rgba(4, 9, 18, 0.65);
  border-radius: 1.8rem;
  border: 1px solid var(--border);
  padding: 2rem;
  backdrop-filter: blur(14px);
}

.hero-kicker,
.section-kicker,
.detalle-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--teal);
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  color: var(--cream);
}

.hero-text {
  max-width: 540px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.cta {
  margin-top: 1rem;
  border: none;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), #f6cb7d);
  color: #1d0c00;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
}

.link-secundario {
  color: var(--teal);
  font-weight: 600;
}

.hero-stats {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.hero-stats li {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(3, 8, 16, 0.6);
}

.hero-stats span {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.hero-stats strong {
  font-size: 1.3rem;
  color: var(--cream);
}

.hero-coin {
  background: rgba(6, 12, 20, 0.7);
  border-radius: 1.8rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.hero-coin img {
  width: 100%;
  max-width: 320px;
}

.coin-data {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
}

.coin-data strong {
  color: var(--cream);
}

.hero-panel {
  padding: 1.5rem;
  border-radius: 1.5rem;
  background: rgba(4, 8, 15, 0.7);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-panel-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-panel-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--cream);
}

.section {
  padding: 4.5rem clamp(1rem, 6vw, 5rem);
}

.timeline {
  background: var(--bg);
}

.section-header {
  max-width: 720px;
}

.timeline-control {
  margin-top: 2rem;
}

.slider-wrapper {
  position: relative;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  height: 6px;
  background: linear-gradient(90deg, var(--gold), #fff1c5);
  border-radius: 999px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0;
  height: 0;
  background: transparent;
}

input[type="range"]::-moz-range-thumb {
  width: 0;
  height: 0;
  border: none;
  background: transparent;
}

.timeline-indicator {
  position: absolute;
  top: -32px;
  left: 0;
  width: 100%;
  pointer-events: none;
  --pos: 0%;
}

.timeline-indicator img {
  position: absolute;
  left: var(--pos);
  transform: translateX(-50%);
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}

.timeline-years {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.timeline-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.timeline-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}

.timeline-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(8, 24, 33, 0.95), rgba(23, 41, 52, 0.9));
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.timeline-card h3 {
  margin: 0;
  font-size: 1.4rem;
}

.timeline-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.highlights {
  background: radial-gradient(circle at top, rgba(17, 34, 44, 0.6), rgba(3, 5, 9, 0.95));
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.highlights article {
  border-radius: 1.4rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: rgba(10, 20, 34, 0.8);
}

.highlights h3 {
  margin-bottom: 0.5rem;
}

.zonas {
  background: var(--bg-soft);
}

.zonas-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.mapa {
  display: grid;
  grid-template-columns: repeat(4, minmax(60px, 1fr));
  gap: 0.75rem;
}

.zona {
  aspect-ratio: 1;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s;
}

.zona:hover,
.zona:focus-visible,
.zona.active {
  border-color: var(--teal);
  transform: translateY(-4px);
  background: rgba(56, 207, 217, 0.08);
}

.detalle {
  border-radius: 1.4rem;
  border: 1px solid var(--border);
  padding: 1.75rem;
  background: var(--bg);
  min-height: 320px;
}

#listaDatos {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.coleccion {
  background: linear-gradient(125deg, #05090f, #101e2b);
}

.carrusel {
  margin-top: 2.5rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}

.moneda-card {
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.moneda-card img {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.articulos {
  background: var(--bg);
}

.articulos-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.articulo-card {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.articulo-card span {
  font-size: 0.85rem;
  color: var(--teal);
}

.footer {
  padding: 2.5rem clamp(1rem, 6vw, 5rem);
  background: #030508;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  font-size: 0.95rem;
}

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--muted);
  margin: 0;
}

.loading {
  color: var(--muted);
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-copy {
    padding: 1.5rem;
  }

  .mapa {
    grid-template-columns: repeat(3, minmax(60px, 1fr));
  }
}

