/* Vista "desde la oficina" (#/oficina) — mensaje animado de campaña. Hero con
   escena SVG (oficinista espiando GOLAZO en el celu + reloj de pared) + cuenta
   regresiva + partidos de hoy con CTA al pick. Con prefers-reduced-motion todo
   queda quieto y legible. Reusa los tokens globales (paleta roja). */

.ofi-view {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 56px;
  display: grid;
  gap: 16px;
}

/* --- Hero ------------------------------------------------------------------ */
.ofi-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 20px 26px;
  text-align: center;
}
.ofi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-1);
}
.ofi-eyebrow svg { width: 15px; height: 15px; }
.ofi-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(24px, 6.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
}
.ofi-title__hi {
  display: inline-block;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Escena SVG ------------------------------------------------------------ */
.ofi-scene {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-sm);
}

/* Reloj: segundero gira (la jornada corre); minutero apenas. */
.ofi-sec { transform-box: view-box; transform-origin: 456px 44px; animation: ofi-sweep 6s linear infinite; }
.ofi-hand-m { transform-box: view-box; transform-origin: 456px 44px; animation: ofi-sweep 90s linear infinite; }
@keyframes ofi-sweep { to { transform: rotate(360deg); } }

/* Ojos del oficinista: se disparan de lado (¿viene el jefe?). */
.ofi-pupil { transform-box: fill-box; transform-origin: center; animation: ofi-dart 3.4s ease-in-out infinite; }
@keyframes ofi-dart {
  0%, 38%, 100% { transform: translateX(0); }
  18%           { transform: translate(-3px, 1px); }
  58%           { transform: translate(4px, 0); }
  78%           { transform: translate(0, 2px); }
}

/* Gota de sudor: cae y se reinicia. */
.ofi-sweat { transform-box: fill-box; transform-origin: center top; animation: ofi-sweat 3.6s ease-in infinite; opacity: 0; }
@keyframes ofi-sweat {
  0%, 60% { transform: translateY(0); opacity: 0; }
  66%     { opacity: 0.9; }
  92%     { transform: translateY(20px); opacity: 0.9; }
  100%    { transform: translateY(26px); opacity: 0; }
}

/* Celular: respira y el halo late (te llama). */
.ofi-phone { transform-box: view-box; transform-origin: 380px 196px; animation: ofi-peek 3.2s ease-in-out infinite; }
@keyframes ofi-peek {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-4px) rotate(-1deg); }
}
.ofi-glow { transform-box: view-box; transform-origin: 380px 196px; animation: ofi-glow 2s ease-in-out infinite; }
@keyframes ofi-glow {
  0%, 100% { opacity: 0.18; transform: scale(0.98); }
  50%      { opacity: 0.42; transform: scale(1.04); }
}

/* Punto EN VIVO que pulsa. */
.ofi-livedot { transform-box: fill-box; transform-origin: center; animation: ofi-pulse 1.4s ease-in-out infinite; }
@keyframes ofi-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.45); opacity: 0.55; }
}

/* Marcador que "salta" al gol. */
.ofi-score { transform-box: fill-box; transform-origin: center; animation: ofi-score 4.4s ease-in-out infinite; }
@keyframes ofi-score {
  0%, 70%, 100% { transform: scale(1); }
  76%           { transform: scale(1.18); }
  84%           { transform: scale(0.96); }
}

/* Chispa de gol: aparece sincronizada con el salto del marcador. */
.ofi-spark { transform-box: view-box; transform-origin: 420px 154px; animation: ofi-spark 4.4s ease-in-out infinite; opacity: 0; }
@keyframes ofi-spark {
  0%, 70%, 100% { transform: scale(0.2) rotate(0deg); opacity: 0; }
  78%           { transform: scale(1.1) rotate(40deg); opacity: 1; }
  90%           { transform: scale(0.9) rotate(70deg); opacity: 0; }
}

/* Vapor del café. */
.ofi-steam { transform-box: fill-box; transform-origin: center bottom; animation: ofi-steam 2.6s ease-in-out infinite; opacity: 0; }
.ofi-steam.s2 { animation-delay: 0.9s; }
@keyframes ofi-steam {
  0%   { transform: translateY(4px) scaleY(0.6); opacity: 0; }
  35%  { opacity: 0.7; }
  100% { transform: translateY(-8px) scaleY(1.1); opacity: 0; }
}

/* --- Textos del hero ------------------------------------------------------- */
.ofi-lead {
  margin: 0 auto 10px;
  max-width: 520px;
  font-family: var(--font-display);
  font-size: clamp(17px, 4.6vw, 21px);
  font-weight: 700;
  color: var(--ink);
}
.ofi-body {
  margin: 0 auto 14px;
  max-width: 520px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.ofi-body svg { width: 16px; height: 16px; color: var(--brand-1); vertical-align: -3px; }
.ofi-hook {
  margin: 0 auto 2px;
  max-width: 520px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(16px, 4.4vw, 19px);
  color: var(--ink);
}
.ofi-hooksub {
  margin: 0 auto;
  max-width: 520px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* --- Cuenta regresiva ------------------------------------------------------ */
.ofi-count {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  text-align: center;
}
.ofi-count__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ofi-count__label svg { width: 14px; height: 14px; }
.ofi-count__time {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 8vw, 40px);
  font-variant-numeric: tabular-nums;
  color: var(--brand-1);
  letter-spacing: 0.01em;
}
.ofi-count__sub { font-size: 12.5px; color: var(--ink-3); }

/* --- Partidos de hoy ------------------------------------------------------- */
.ofi-today {
  background: var(--surface);
  border-radius: var(--r-lg);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-brand) border-box;
  border: 1px solid transparent;
  box-shadow: var(--shadow-md);
  padding: 18px 16px 16px;
  display: grid;
  gap: 12px;
}
.ofi-today__title {
  margin: 0;
  font: 800 15px/1.3 var(--font-display);
  color: var(--ink);
}
.ofi-list { display: grid; gap: 8px; }
.ofi-row {
  appearance: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--hairline);
  background: var(--surface-soft);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.ofi-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--brand-2); }
.ofi-row:active { transform: scale(0.99); }
.ofi-row--live { border-color: var(--live); background: var(--live-soft); }
.ofi-row__teams {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font: 700 13.5px/1.2 var(--font-ui);
  color: var(--ink);
}
.ofi-row__teams b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; }
.ofi-row__teams .team-crest { flex: none; }
.ofi-row__vs { color: var(--ink-3); font-weight: 600; }
.ofi-row__meta { display: grid; justify-items: end; gap: 3px; flex: none; }
.ofi-row__time {
  font: 700 13px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.ofi-row__live {
  font: 800 11px/1 var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--live);
}
.ofi-row__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 700 11.5px/1 var(--font-ui);
  color: var(--brand-1);
}
.ofi-row__cta svg { width: 13px; height: 13px; }

/* --- CTA principal / estado vacío ------------------------------------------ */
.ofi-cta {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  min-height: 52px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--shadow-md);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.ofi-cta svg { width: 18px; height: 18px; vertical-align: -4px; }
.ofi-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ofi-cta:active { transform: translateY(0); }

.ofi-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 8px 4px; }
.ofi-empty__title { font: 800 18px/1.2 var(--font-display); color: var(--ink); }
.ofi-empty__body { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

/* --- Entradas escalonadas -------------------------------------------------- */
.ofi-rise { animation: ofi-rise 0.55s var(--ease) var(--d, 0s) both; }
@keyframes ofi-rise {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* --- Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ofi-sec, .ofi-hand-m, .ofi-pupil, .ofi-sweat, .ofi-phone, .ofi-glow,
  .ofi-livedot, .ofi-score, .ofi-spark, .ofi-steam, .ofi-rise {
    animation: none !important;
  }
  .ofi-rise { opacity: 1; transform: none; }
  .ofi-glow { opacity: 0.3; }
  .ofi-spark { opacity: 0.9; }
}
