:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --ink: #2b2a26;
  --muted: #7a756b;
  --line: #e9e2d6;
  --sage: #6f8a5e;
  --amber: #d99a2b;
  --blue: #4f7fa8;
  --rose: #c96f6f;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); }
img { max-width: 100%; display: block; }
h1, h2, .big { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
.muted { color: var(--muted); font-size: 0.92rem; }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem; font-weight: 600; color: var(--muted); margin: 0 0 0.4rem; }

/* Hero */
/* La foto siempre se ve entera; los costados se rellenan con la misma foto desenfocada.
   Alto: en celu, justo la proporción 3:2 de la portada (+ lo que tapa la tarjeta); en pantallas grandes, tope 640px. */
.hero { position: relative; height: min(calc(100vw * 2 / 3 + 36px), 78vh, 640px); overflow: hidden; background: #cfd8c5; }
.hero::before { content: ""; position: absolute; inset: -40px; background: var(--hero-bg, url("/cover.jpg")) center / cover; filter: blur(28px) brightness(0.85); }
.hero img { position: relative; width: 100%; height: calc(100% - 36px); object-fit: contain; object-position: center; }
/* Foto del nacimiento (suele ser vertical): más alta para que no quede chiquita */
.hero.has-photo { height: min(78vh, 640px); }
.card h1 { margin: 0 0 6px; font-size: clamp(2rem, 7vw, 2.8rem); line-height: 1.1; }
#main-card { margin-top: 10px; }

/* Layout */
main { max-width: 640px; margin: -36px auto 0; padding: 0 16px; position: relative; z-index: 2; }
.card { background: var(--surface); border-radius: var(--radius); padding: 26px 22px 22px; box-shadow: 0 10px 40px rgba(60,50,30,0.10), 0 1px 0 var(--line); border-top: 5px solid var(--sage); }
.card p { margin: 0.4rem 0; }
.card .big { font-size: clamp(1.5rem, 5.5vw, 1.95rem); line-height: 1.2; margin: 0.25rem 0 0.5rem; }
.card .lead { font-size: 1.08rem; }
.tone-amber { border-top-color: var(--amber); }
.tone-green { border-top-color: var(--sage); }
.tone-blue  { border-top-color: var(--blue); }
.tone-calm  { border-top-color: #b8ad9a; }
.tone-party { border-top-color: var(--rose); }
.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 6px rgba(111,138,94,0.35), 0 10px 40px rgba(60,50,30,0.10); } 100% { box-shadow: 0 10px 40px rgba(60,50,30,0.10); } }

.live { display: flex; align-items: center; justify-content: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #3fa05a; box-shadow: 0 0 0 0 rgba(63,160,90,0.6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(63,160,90,0); } 100% { box-shadow: 0 0 0 0 rgba(63,160,90,0); } }

/* Countdown */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0 16px; }
.cd { background: var(--bg); border-radius: 14px; padding: 14px 4px 10px; text-align: center; }
.cd-n { display: block; font: 600 clamp(1.7rem, 7vw, 2.4rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.cd-l { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 6px; }

/* Stats nacimiento */
.stats { display: flex; justify-content: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.stat { background: var(--bg); border-radius: 14px; padding: 10px 16px; text-align: center; min-width: 88px; }
.stat-v { display: block; font: 600 1.25rem/1.2 var(--serif); }
.stat-l { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* Timeline */
.section-title { font-size: 1.3rem; margin: 40px 4px 12px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.day { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; margin: 22px 4px 8px; }
.day:first-child { margin-top: 0; }
.item { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.item time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.92rem; padding-top: 2px; }
.item-body p { margin: 0 0 4px; }
.item-title { font-weight: 600; }
.item .stats { justify-content: flex-start; }
.item-photo { border-radius: 12px; margin-top: 8px; max-height: 420px; width: auto; }

/* Footer */
.foot { max-width: 640px; margin: 36px auto 0; padding: 0 16px 48px; text-align: center; }
.btn-ghost { font: inherit; font-size: 0.95rem; background: none; border: 1px solid var(--line); color: var(--ink); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.btn-ghost:hover { border-color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .dot, .flash { animation: none; } }
.stats { flex-wrap: nowrap; gap: 8px; }
.stat { flex: 1 1 0; min-width: 0; max-width: 130px; padding: 10px 6px; }
