/* ============ BASE ============ */
:root {
  --bg: #0a0e14;
  --bg-soft: #11161f;
  --card: #151b26;
  --card-border: #232c3b;
  --text: #e6e9ef;
  --text-dim: #8a93a5;
  --accent: #3ddc84;
  --accent-soft: rgba(61, 220, 132, 0.12);
  --danger: #ff5c5c;
  --warning: #ffb454;
  --line: #2a3445;
  --mono: "JetBrains Mono", monospace;
  --sans: "Inter", system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}

.mono {
  font-family: var(--mono);
}

.accent {
  color: var(--accent);
}

code {
  font-family: var(--mono);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  font-size: 0.9em;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  position: relative;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(61, 220, 132, 0.08), transparent),
    var(--bg);
}

.brand {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.hero-terminal {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
  color: var(--text-dim);
}

.prompt {
  color: var(--accent);
  font-weight: 700;
}

.output {
  color: var(--text);
}

.cursor {
  animation: blink 1s steps(1) infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-title {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 900;
  max-width: 60rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  color: var(--text-dim);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 44rem;
  margin-bottom: 3rem;
}

/* ============ CONTADOR ============ */
.counter-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2.5rem 3rem;
  box-shadow:
    0 0 0 1px rgba(61, 220, 132, 0.05),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(61, 220, 132, 0.06);
  margin-bottom: 3rem;
  max-width: 100%;
}

.counter-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.counter-days {
  font-size: clamp(4.5rem, 14vw, 9rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 40px rgba(61, 220, 132, 0.35);
  font-variant-numeric: tabular-nums;
}

.counter-word {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.3rem;
}

.counter-detail {
  color: var(--text-dim);
  font-size: 1rem;
  margin-top: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.counter-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line);
  color: var(--text);
  font-weight: 600;
}

.scroll-hint {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.8rem;
  animation: float 2s ease-in-out infinite;
  transition: color 0.2s;
}

.scroll-hint:hover {
  color: var(--accent);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============ SECCIONES ============ */
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.section-title .mono {
  font-size: 0.6em;
  vertical-align: middle;
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  max-width: 40rem;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.timeline-section {
  padding: 6rem 1.5rem;
  max-width: 70rem;
  margin: 0 auto;
}

/* ============ TIMELINE ============ */
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--line) 5%, var(--line) 95%, transparent);
}

.milestone {
  position: relative;
  width: 50%;
  padding: 0 3rem 4rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.milestone.visible {
  opacity: 1;
  transform: translateY(0);
}

.milestone:nth-child(odd) {
  left: 0;
  text-align: right;
}

.milestone:nth-child(even) {
  left: 50%;
  text-align: left;
}

.milestone::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 16px rgba(61, 220, 132, 0.5);
  z-index: 2;
}

.milestone:nth-child(odd)::before {
  right: -8px;
}

.milestone:nth-child(even)::before {
  left: -8px;
}

.milestone.doom::before {
  border-color: var(--danger);
  box-shadow: 0 0 16px rgba(255, 92, 92, 0.5);
}

.milestone-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.milestone.doom .milestone-date {
  color: var(--danger);
}

.milestone-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: left;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.milestone-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.milestone.doom .milestone-card:hover {
  border-color: var(--danger);
}

.milestone-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.milestone-author {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.milestone-quote {
  border-left: 3px solid var(--danger);
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  font-style: italic;
  color: var(--text);
  background: rgba(255, 92, 92, 0.06);
  border-radius: 0 8px 8px 0;
}

.milestone-quote.neutral {
  border-left-color: var(--warning);
  background: rgba(255, 180, 84, 0.06);
}

.milestone-reality {
  font-size: 0.92rem;
  color: var(--text-dim);
}

.milestone-reality strong {
  color: var(--accent);
}

.milestone-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.milestone-source {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  transition: color 0.2s, border-color 0.2s;
}

.milestone-source:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.milestone-verdict {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(61, 220, 132, 0.3);
}

.milestone-verdict.failed {
  background: rgba(255, 92, 92, 0.1);
  color: var(--danger);
  border-color: rgba(255, 92, 92, 0.3);
}

.milestone-verdict.pending {
  background: rgba(255, 180, 84, 0.1);
  color: var(--warning);
  border-color: rgba(255, 180, 84, 0.3);
}

/* ============ REALIDAD ============ */
.reality {
  padding: 6rem 1.5rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.reality .section-title {
  margin-bottom: 3rem;
}

.reality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 70rem;
  margin: 0 auto;
}

.reality-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.reality-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.reality-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.reality-card p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 5rem 1.5rem;
}

.footer .mono {
  display: inline-block;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.footer-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  max-width: 36rem;
  margin: 0 auto;
}

.footer-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.footer-note a:hover {
  text-decoration: underline;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 760px) {
  .timeline::before {
    left: 12px;
  }

  .milestone,
  .milestone:nth-child(odd),
  .milestone:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 0 0 3rem 2.8rem;
  }

  .milestone:nth-child(odd)::before,
  .milestone:nth-child(even)::before {
    left: 4px;
    right: auto;
  }

  .counter-card {
    padding: 2rem 1.5rem;
  }
}
