/* =========================================================
   Montserrat – self-hosted fallback
   ========================================================= */
@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat[wght].woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   Variables
   ========================================================= */
:root {
  --bg: #000;
  --text: #e7d7c3;
  --accent: #f4c28b;
  --timeline-line: #4a4a4a;
  --card-bg: rgba(30, 30, 30, 0.7);
  --card-border: rgba(244, 194, 139, 0.3);
  --source-color: rgba(244, 194, 139, 0.8);
}

/* =========================================================
   Reset and Base
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Futura Now", "Futura Now Text", "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.5;
}

/* Typography */
.h1, h1, .h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.2; margin: 0 0 0.5em 0; }
.h2, h2, .h2 { font-size: clamp(1.25rem, 3vw, 2rem); line-height: 1.3; margin: 0 0 0.5em 0; }
.h3, h3, .h3 { font-size: clamp(1.1rem, 2.5vw, 1.75rem); line-height: 1.3; margin: 0 0 0.5em 0; }
p { font-size: clamp(0.9rem, 1.5vw, 1rem); line-height: 1.6; margin: 0 0 1em 0; }

/* Container */
.container {
  width: min(95vw, 1000px);
  margin: 0 auto;
  padding: clamp(16px, 4vh, 32px) clamp(12px, 3vw, 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 4vh, 24px);
}

/* Logo */
.brand-logo {
  width: min(95vw, 520px);
  height: auto;
  max-width: 100%;
  display: block;
  margin-bottom: clamp(12px, 2vh, 16px);
}

/* Timeline - Mobile-first */
.timeline { width: 100%; position: relative; padding: 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--timeline-line);
}
.timeline-item {
  position: relative;
  width: 100%;
  margin-bottom: clamp(20px, 4vh, 32px);
  padding-left: 50px;
  padding-right: 10px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: clamp(4px, 1vh, 8px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--timeline-line);
  transform: translateY(-50%);
}
.timeline-date {
  font-size: clamp(0.8rem, 1.2vw, 0.875rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
  line-height: 1.3;
}
.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: clamp(12px, 2vh, 16px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.timeline-content:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.timeline-title {
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--text);
  line-height: 1.3;
}
.timeline-description {
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  margin: 0 0 12px 0;
  color: var(--text);
  line-height: 1.5;
}
.timeline-status {
  display: inline-block;
  font-size: clamp(0.75rem, 1vw, 0.8125rem);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(244, 194, 139, 0.15);
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.2;
}
.timeline-sources {
  font-size: clamp(0.8rem, 1.1vw, 0.875rem);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}
.timeline-sources a {
  color: var(--source-color);
  text-decoration: none;
  word-break: break-word;
  display: block;
  margin-bottom: 8px;
  line-height: 1.4;
  transition: color 0.2s ease;
}
.timeline-sources a:hover { text-decoration: underline; color: var(--accent); }

/* Touch targets */
.timeline-content, .timeline-sources a { min-height: 44px; padding: 12px; }
.timeline-sources a { padding: 8px 0; }

/* Tablet (768px+) */
@media (min-width: 768px) {
  .container { padding: clamp(24px, 5vh, 40px) 16px; }
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .timeline-item {
    padding-left: 0;
    padding-right: calc(50% + 40px);
    text-align: right;
  }
  .timeline-item::before { left: 50%; transform: translateX(-50%); }
  .timeline-item:nth-child(even) {
    padding-left: calc(50% + 40px);
    padding-right: 0;
    text-align: left;
  }
  .timeline-date {
    position: absolute;
    top: 0;
    right: calc(50% + 40px);
    width: calc(50% - 40px);
    text-align: right;
    margin-bottom: 16px;
  }
  .timeline-item:nth-child(even) .timeline-date {
    left: calc(50% + 40px);
    right: auto;
    text-align: left;
  }
  .timeline-content { padding: clamp(16px, 2.5vh, 20px); }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .container { max-width: 1000px; padding: 40px 16px; }
  .timeline-item { padding-right: calc(50% + 60px); }
  .timeline-item:nth-child(even) { padding-left: calc(50% + 60px); }
  .timeline-date { right: calc(50% + 60px); width: calc(50% - 60px); margin-bottom: 16px; }
  .timeline-item:nth-child(even) .timeline-date { left: calc(50% + 60px); }
  .timeline-content:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .container { max-width: 1200px; padding: 48px 24px; }
  .brand-logo { width: min(70vw, 600px); }
  .timeline-item { padding-right: calc(50% + 80px); }
  .timeline-item:nth-child(even) { padding-left: calc(50% + 80px); }
  .timeline-date { right: calc(50% + 80px); width: calc(50% - 80px); margin-bottom: 16px; }
  .timeline-item:nth-child(even) .timeline-date { left: calc(50% + 80px); }
}

/* High DPI / Retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .timeline::before { width: 1px; }
  .timeline-item::before { box-shadow: 0 0 0 1.5px var(--timeline-line); }
  .brand-logo { image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; }
}

/* Print */
@media print {
  body { background: white; color: black; }
  .container { max-width: 100%; padding: 0; }
  .timeline::before { background: #ccc; }
  .timeline-item::before { background: #333; border-color: white; box-shadow: 0 0 0 2px #ccc; }
  .timeline-content { background: white; border-color: #ccc; box-shadow: none; }
  .timeline-sources a { color: #0066cc; word-break: break-all; }
}

/* Aviso legal */
.legal-disclaimer {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(244, 194, 139, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    width: 95%;
}
.legal-disclaimer strong {
    color: #f4c28b;
    font-weight: 700;
}
.legal-title {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-bottom: 12px;
    color: #e7d7c3;
}

/* Ajustes para descripciones en cursiva */
.timeline-description {
    font-style: italic;
    color: rgba(231, 215, 195, 0.8) !important;
}

/* Ocultar el estado (ya no es necesario) */
.timeline-status {
    display: none;
}