/* Platanus Update 26 — mismo sistema que el deck:
   fondo negro, amarillo solo para destacar, sin bordes redondeados,
   Ubuntu Sans 500 para títulos, JetBrains Mono 500 en mayúsculas para labels. */

:root {
  --bg: #000000;
  --text: #ffffff;
  --accent: #ffec40;
  --muted: #999999;
  --dim: #666666;
  --surface: #1a1a1a;
  --pad: clamp(20px, 4vw, 56px);
}

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

html { background: var(--bg); color-scheme: dark; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Ubuntu Sans', system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.page {
  max-width: 1440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(16px, 2.2vw, 28px) var(--pad);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vw, 28px);
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo { display: block; height: 26px; width: auto; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.status .dot { width: 8px; height: 8px; background: var(--dim); }

.status[data-state='live'] {
  color: #000;
  background: var(--accent);
  padding: 6px 10px;
}
.status[data-state='live'] .dot { background: #000; animation: blink 1.2s steps(2, start) infinite; }

@keyframes blink { to { visibility: hidden; } }

/* Hero */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
  min-height: 0;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 40px;
}

.eyebrow {
  color: var(--accent);
  font-size: clamp(11px, 1vw, 14px);
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(34px, 4.4vw, 60px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 .line { display: inline-block; margin-right: 0.3em; }

h1 mark {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 0 0.14em;
  margin-left: -0.14em;
}

/* Countdown: vive dentro del marco del video hasta la hora de inicio. */
.countdown { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.4cqw, 28px); }

.countdown .label { color: var(--muted); font-size: clamp(11px, 1.7cqw, 20px); }

.units { display: flex; gap: clamp(6px, 1.4cqw, 18px); }

.unit {
  background: #000;
  padding: clamp(10px, 2.2cqw, 28px) clamp(12px, 2.8cqw, 36px) clamp(8px, 1.8cqw, 22px);
  min-width: clamp(72px, 19cqw, 240px);
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.8cqw, 10px);
  text-align: left;
}

.unit .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(36px, 11cqw, 144px);
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.unit .cap { font-size: clamp(10px, 1.4cqw, 16px); color: var(--muted); }

.unit.is-accent .num { color: var(--accent); }

.countdown[data-state='live'] .unit .num { color: var(--dim); }

.playerbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6cqw, 18px);
  padding: clamp(10px, 1.8cqw, 20px) clamp(12px, 2.2cqw, 24px);
  color: var(--dim);
  font-size: clamp(10px, 1.3cqw, 13px);
}
.playerbar svg { flex: none; }
.playerbar .track { flex: 1; height: 2px; background: #ffffff1f; }

/* Player: ocupa el alto que queda, sin pasarse del viewport. */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  background: var(--surface);
  overflow: hidden;
}

.frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: clamp(12px, 1.3vw, 18px);
  /* Grilla tenue, como una carta de ajuste antes de salir al aire. */
  background-image:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
}

/* Footer */
.bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--dim);
}

/* En pantallas anchas todo cabe en un viewport: el player se ajusta al alto libre. */
@media (min-width: 800px) and (min-height: 520px) {
  .page { height: 100dvh; }
  .stage { container-type: size; }
  .frame { width: min(100cqw, 100cqh * 16 / 9); }
}

@media (max-width: 640px) {
  .logo { height: 22px; }
  .bottom { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .status[data-state='live'] .dot { animation: none; }
}
