body { padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 24px); }

/* ---------- Portada ---------- */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--safe-top) + 40px) 20px 90px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 122, 61, 0.22), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 52%, var(--mud-2) 82%, var(--mud-1) 100%);
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.blob.b1 {
  width: 120vw; height: 120vw;
  max-width: 760px; max-height: 760px;
  top: -30%; left: -40%;
  background: radial-gradient(circle, rgba(255, 122, 61, 0.42), transparent 62%);
  animation: float-a 14s ease-in-out infinite alternate;
}

.blob.b2 {
  width: 100vw; height: 100vw;
  max-width: 640px; max-height: 640px;
  top: 10%; right: -45%;
  background: radial-gradient(circle, rgba(255, 77, 109, 0.36), transparent 62%);
  animation: float-b 17s ease-in-out infinite alternate;
}

.blob.b3 {
  width: 90vw; height: 90vw;
  max-width: 560px; max-height: 560px;
  bottom: 0; left: 5%;
  background: radial-gradient(circle, rgba(181, 123, 255, 0.24), transparent 62%);
  animation: float-a 20s ease-in-out infinite alternate-reverse;
}

.hero-rings {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 150vmin;
  height: 150vmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 38px, rgba(255, 220, 190, 0.05) 39px 40px);
  -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 70%);
  mask-image: radial-gradient(circle, #000 20%, transparent 70%);
  animation: rings 6s linear infinite;
}

.hero-inner {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: rise 700ms var(--ease-out) both;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  color: var(--hot);
  background: currentColor;
  animation: pulse-ring 1.6s ease-out infinite;
}

.hero-title {
  margin-top: 26px;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.hero-el {
  display: block;
  font-size: clamp(30px, 9vw, 56px);
  font-weight: 800;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  color: var(--text);
  opacity: 0.9;
  animation: rise 700ms var(--ease-out) 120ms both;
}

.hero-barro {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  font-size: clamp(58px, 20.5vw, 150px);
  filter: drop-shadow(0 10px 40px rgba(255, 90, 50, 0.45));
}

.hero-barro .letter {
  display: inline-block;
  background: linear-gradient(115deg, #FF7A3D, #FFB547, #FF4D6D, #B57BFF, #FF7A3D);
  background-size: 500% 100%;
  background-position: calc(var(--i) * 18%) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform-origin: 50% 100%;
  animation:
    splash 900ms var(--ease-spring) calc(260ms + var(--i) * 90ms) both,
    hue 7s linear calc(var(--i) * -0.4s) infinite;
}

.hero-tagline {
  max-width: 340px;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
  animation: rise 700ms var(--ease-out) 800ms both;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 400px;
  margin: 30px auto 0;
  animation: rise 700ms var(--ease-out) 950ms both;
}

.cd-cell {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 236, 220, 0.1), rgba(255, 236, 220, 0.03));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.cd-cell::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.35);
}

.cd-num {
  font-family: var(--font-display);
  font-size: clamp(24px, 7.4vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.cd-num.tick { animation: flip 420ms var(--ease-out); }

.cd-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown-live {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 18px;
  background: var(--brand-gradient);
  color: var(--on-brand);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  animation: pop 1.2s var(--ease-out) infinite;
}

.hero-date {
  margin-top: 14px;
  color: var(--text-2);
  font-weight: 600;
  animation: rise 700ms var(--ease-out) 1050ms both;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  animation: rise 700ms var(--ease-out) 1150ms both;
}

.drips {
  position: absolute;
  left: 0;
  bottom: -64px;
  width: 100%;
  height: 70px;
  overflow: visible;
  pointer-events: none;
}

.drip {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: drip 3.6s ease-in-out infinite alternate;
}

.drop {
  transform-box: fill-box;
  animation: drop 2.8s ease-in infinite;
}

/* ---------- Cinta de nombres ---------- */

.tapes {
  position: relative;
  z-index: 1;
  height: 150px;
  margin-top: 24px;
  overflow: hidden;
}

.tape {
  position: absolute;
  left: -10%;
  width: 120%;
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
}

.tape-a {
  top: 72px;
  transform: rotate(-4deg);
  background: var(--brand-gradient);
  color: var(--on-brand);
  box-shadow: 0 16px 40px -12px rgba(255, 106, 61, 0.55);
  z-index: 2;
}

.tape-b {
  top: 26px;
  transform: rotate(3deg);
  background: #1F140E;
  border-block: 1px solid var(--border-strong);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 220, 190, 0.5);
}

.tape-track {
  display: inline-flex;
  animation: marquee 22s linear infinite;
}

.tape-b .tape-track { animation-direction: reverse; animation-duration: 28s; }

.tape-track span {
  padding-right: 24px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Revelado ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--d, 0) * 80ms);
}

[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Crew ---------- */

.crew {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 26px;
}

.crew-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  padding: 18px 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 236, 220, 0.08), rgba(255, 236, 220, 0.02));
  text-align: center;
  transition: transform 200ms var(--ease-out), border-color 200ms, opacity 700ms var(--ease-out);
}

.crew-card:active { transform: scale(0.96); }
.crew-card.is-pop .avatar { animation: pop 500ms var(--ease-spring); }

.crew-card .avatar {
  --size: 62px;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(255, 220, 190, 0.2), 0 14px 30px -10px rgba(255, 106, 61, 0.6);
}

.crew-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
}

.crew-nick {
  max-width: 100%;
  margin-top: -6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.floaty {
  position: fixed;
  z-index: 96;
  font-size: 26px;
  pointer-events: none;
  animation: floaty 1100ms var(--ease-out) forwards;
}

/* ---------- Plan ---------- */

.plan-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  padding: 18px;
}

.ring {
  position: relative;
  flex: none;
  width: 92px;
  height: 92px;
}

.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: rgba(255, 220, 190, 0.1); }
.ring-value { transition: stroke-dashoffset 1400ms var(--ease-out); }

.ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.plan-stats { display: grid; gap: 6px; min-width: 0; }
.plan-stats strong { font-size: 17px; }
.plan-stats p { color: var(--text-2); font-size: 14px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.timeline {
  position: relative;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-track,
.timeline-fill {
  position: absolute;
  top: 12px;
  bottom: 24px;
  left: 15px;
  width: 3px;
  border-radius: 3px;
}

.timeline-track { background: rgba(255, 220, 190, 0.1); }

.timeline-fill {
  background: linear-gradient(180deg, #FF7A3D, #FFB547, #FF4D6D);
  box-shadow: 0 0 16px rgba(255, 122, 61, 0.7);
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 33px 1fr;
  gap: 12px;
  padding-bottom: 18px;
}

.stop-marker {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: 14px 0 0 8px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.stop.st-undefined { --st: var(--st-undefined); }
.stop.st-pending { --st: var(--st-pending); }
.stop.st-confirmed { --st: var(--st-confirmed); }
.stop .stop-marker { color: var(--st); }
.stop:not(.st-confirmed) .stop-marker { animation: pulse-ring 1.8s ease-out infinite; }

.stop-card {
  min-width: 0;
  padding: 16px;
  overflow: hidden;
}

.stop-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--st);
  opacity: 0.9;
}

.stop.is-now .stop-card {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 20px 50px -20px rgba(255, 181, 71, 0.6);
}

.stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.stop-time {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stop-title {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.stop-place {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  color: var(--amber);
  font-weight: 700;
}

.stop-place i { margin-top: 2px; }

.stop-desc {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 14px;
  white-space: pre-line;
}

.stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.stop-actions:empty { display: none; }

.vote-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 77, 109, 0.14);
  color: var(--hot);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

.vote-link .live-dot { width: 7px; height: 7px; }

/* ---------- Votaciones ---------- */

.me-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 12px 12px 12px 14px;
}

.me-bar-text { flex: 1; min-width: 0; }
.me-bar-text small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.me-bar-text strong { font-size: 16px; }

.polls { display: grid; gap: 14px; margin-top: 14px; }

.poll { padding: 18px; scroll-margin-top: calc(var(--safe-top) + 16px); }
.poll.is-highlight { animation: highlight 1.6s var(--ease-out); }

.poll-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.poll-question {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.poll-desc { margin-top: 6px; color: var(--text-2); font-size: 14px; white-space: pre-line; }

.options { display: grid; gap: 8px; margin-top: 16px; }

.option {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.25);
  text-align: left;
  transition: transform 150ms var(--ease-out), border-color 200ms;
}

.option:active { transform: scale(0.98); }
.option:disabled { cursor: default; }
.option:disabled:active { transform: none; }

.option-bar {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(255, 122, 61, 0.28), rgba(255, 77, 109, 0.2));
  transform-origin: left;
  transform: scaleX(var(--pct, 0));
  transition: transform 900ms var(--ease-out);
}

.option > :not(.option-bar) { position: relative; z-index: 1; }

.option[aria-pressed="true"] { border-color: var(--amber); }
.option[aria-pressed="true"] .option-bar { background: linear-gradient(90deg, rgba(255, 181, 71, 0.42), rgba(255, 122, 61, 0.3)); }

.option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.option-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  font-size: 13px;
  color: transparent;
  transition: background-color 200ms, border-color 200ms;
}

.poll.is-multi .option-check { border-radius: 7px; }

.option[aria-pressed="true"] .option-check {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--on-brand);
  animation: pop 400ms var(--ease-spring);
}

.option-count {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}

.option-count small { color: var(--muted); font-family: var(--font-body); font-size: 12px; margin-left: 4px; }
.option-voters { grid-column: 1 / -1; min-height: 0; padding-left: 30px; }
.option-voters:empty { display: none; }

.option.is-winner { border-color: var(--st-confirmed); }
.option.is-winner .option-bar { background: linear-gradient(90deg, rgba(124, 242, 154, 0.3), rgba(124, 242, 154, 0.12)); }

.poll-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.poll-turnout { min-width: 0; font-size: 13px; color: var(--text-2); }
.poll-turnout strong { color: var(--text); }
.poll-missing { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

/* ---------- Centro de mandos (teaser) ---------- */

.vault {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 30px 22px 24px;
  overflow: hidden;
  text-align: center;
}

.vault::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 122, 61, 0.35) 85%, transparent 100%);
  animation: spin 6s linear infinite;
  z-index: -1;
}

.vault::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-lg) - 1px);
  background: var(--surface-solid);
  z-index: -1;
}

.vault { isolation: isolate; }

.vault-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background: var(--brand-gradient);
  color: var(--on-brand);
  font-size: 30px;
  box-shadow: 0 16px 40px -12px rgba(255, 106, 61, 0.7);
}

.vault h3 { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.vault p { max-width: 320px; color: var(--text-2); font-size: 14px; }
.vault .btn { margin-top: 6px; }

.site-foot {
  padding: 36px 20px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-foot strong { font-family: var(--font-display); color: var(--text-2); }

/* ---------- Barra inferior ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 6px 8px var(--safe-bottom);
  border-top: 1px solid var(--border);
  background: rgba(13, 8, 6, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}

.tabbar-inner {
  display: flex;
  width: 100%;
  max-width: 560px;
}

.tab {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 2px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: color 200ms;
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 30px;
  border-radius: 999px;
  font-size: 18px;
  transition: background-color 250ms, color 250ms;
}

.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"] .tab-icon { background: rgba(255, 122, 61, 0.2); color: var(--amber); }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Identidad ---------- */

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.who {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 4px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  font-weight: 800;
  transition: transform 150ms var(--ease-out), border-color 200ms;
}

.who .avatar { --size: 52px; }
.who:active { transform: scale(0.95); }
.who[aria-pressed="true"] { border-color: var(--amber); background: rgba(255, 181, 71, 0.12); }

/* ---------- Animaciones ---------- */

@keyframes float-a { to { transform: translate(18%, 12%) scale(1.15); } }
@keyframes float-b { to { transform: translate(-22%, 18%) scale(0.9); } }
@keyframes rings { to { transform: translate(-50%, -50%) scale(1.08); } }
@keyframes splash {
  0% { opacity: 0; transform: translateY(70%) scaleY(1.5) scaleX(0.6); }
  60% { opacity: 1; transform: translateY(-6%) scaleY(0.9) scaleX(1.08); }
  100% { opacity: 1; transform: none; }
}
@keyframes hue { to { background-position: calc(var(--i) * 18% + 100%) 0; } }
@keyframes flip { 0% { transform: translateY(-40%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes drip { from { transform: scaleY(0.82); } to { transform: scaleY(1.12); } }
@keyframes drop {
  0%, 55% { transform: translateY(0) scale(0); opacity: 0; }
  60% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(60px) scale(0.7); opacity: 0; }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes floaty { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -150%) scale(1.5) rotate(12deg); } }
@keyframes highlight { 0%, 40% { box-shadow: 0 0 0 2px var(--amber), 0 0 50px -10px var(--amber); } 100% { box-shadow: none; } }

@media (min-width: 640px) {
  .section { padding-top: 96px; }
  .crew { gap: 14px; }
}
