@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-deep: #120f0f;
  --bg: #171313;
  --card: #1e1918;
  --raised: #292221;
  --line: rgba(240, 232, 229, 0.08);
  --line-strong: rgba(240, 232, 229, 0.16);
  --text: #f0e8e5;
  --text-2: #b0a29e;
  --muted: #8f817d;
  --accent: #d43a30;
  --accent-hover: #bb2f26;
  --accent-text: #f26a5d;
  --accent-text-hover: #ff8a7e;
  --on-accent: #ffffff;
  --live: #f0574b;
  --band: #c4322a;
  --band-text: #ffffff;
  --band-text-2: #ffffff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page: min(1120px, 100% - 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; width: var(--page); margin: 0 auto; }

h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.0625rem; line-height: 1.35; }
p { margin: 0; }

a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-text-hover); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
img, video, iframe { display: block; max-width: 100%; }

.icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -64px;
  left: 16px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--on-accent); }

/* Botones */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 120ms var(--ease);
}
.button:active { transform: scale(0.98); }
.button-accent { background: var(--accent); color: var(--on-accent); }
.button-accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.button-secondary { border-color: var(--line-strong); background: var(--card); color: var(--text); }
.button-secondary:hover { background: var(--raised); color: var(--text); }
.button-light { background: #fff8f5; color: #2a110d; }
.button-light:hover { background: #ffe6e0; color: #2a110d; }

/* Encabezado */

.site-header { position: relative; z-index: 10; border-bottom: 1px solid var(--line); }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  width: var(--page);
  min-height: 80px;
  margin: 0 auto;
  padding: 12px 0;
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 64px; height: auto; }

.channel-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px 5px;
  border: 1.5px solid currentColor;
  border-radius: 8px;
  line-height: 1;
}
.channel-badge strong { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.channel-badge span { margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

.site-nav a:not(.button) {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.site-nav a:not(.button):hover { background: var(--card); color: var(--text); }
.site-nav a:not(.button)[aria-current="page"] { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.site-nav .button { min-height: 40px; margin-left: 8px; padding: 0 16px; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Cabeza de página */

.page-head { padding: 48px 0 32px; }
.lead { max-width: 40rem; margin-top: 12px; color: var(--text-2); font-size: 1.125rem; line-height: 1.55; }

.section { margin-top: 64px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.section-head { margin-bottom: 20px; }
.section-head p { max-width: 40rem; margin-top: 8px; color: var(--text-2); }

/* Pantalla: señal en vivo y video */

.screen { padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-deep); }
.screen-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #000; }
.screen-frame > div, .screen-frame .jwplayer { width: 100% !important; height: 100% !important; }
.screen-frame-en-vivo { background: #000 url("portada-en-vivo.jpg") center / cover no-repeat; }
.video-respaldo { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* JW Player con la marca. Los colores de controles, barra de tiempo, menús y tooltips van en la opción skin (sitio.js). */

.screen .jwplayer,
.screen .jwplayer .jw-text,
.screen .jwplayer .jw-reset-text,
.screen .jwplayer .jw-text-live { font-family: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.screen .jwplayer .jw-text-elapsed,
.screen .jwplayer .jw-text-duration,
.screen .jwplayer .jw-text-countdown { font-variant-numeric: tabular-nums; }

.screen .jwplayer.jw-state-idle .jw-controls { background: transparent; }

.screen .jwplayer.jw-state-idle .jw-display-icon-display,
.screen .jwplayer.jw-state-paused .jw-display-icon-display,
.screen .jwplayer.jw-state-complete .jw-display-icon-display {
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
  transition: background-color 150ms var(--ease), transform 120ms var(--ease);
}
.screen .jwplayer.jw-state-idle .jw-display-icon-display:hover,
.screen .jwplayer.jw-state-paused .jw-display-icon-display:hover,
.screen .jwplayer.jw-state-complete .jw-display-icon-display:hover { background: var(--accent-hover); }
.screen .jwplayer .jw-display-icon-display:active { transform: scale(0.96); }

/* JW aplica los colores del skin con selectores de ID; !important mantiene el ícono oscuro sobre el disco ámbar. */
.screen .jwplayer.jw-state-idle .jw-display-icon-display .jw-button-color,
.screen .jwplayer.jw-state-paused .jw-display-icon-display .jw-button-color,
.screen .jwplayer.jw-state-complete .jw-display-icon-display .jw-button-color { color: var(--on-accent) !important; }

.screen .jwplayer .jw-text-live { font-size: 13px; font-weight: 600; text-transform: none; }
.screen .jwplayer .jw-text-live::before { background-color: var(--live); }

.screen .jwplayer .jw-settings-menu { border: 1px solid var(--line); border-radius: 12px; }
.screen .jwplayer .jw-settings-menu .jw-settings-content-item { font-size: 14px; }

.screen .jwplayer.jw-state-error,
.screen .jwplayer.jw-state-error .jw-preview { background-color: transparent; }
.screen .jwplayer.jw-state-error .jw-error-msg { border: 1px solid var(--line); border-radius: 12px; background-color: var(--card); color: var(--text); }

.live {
  --live-w: min(100%, max(520px, calc((100vh - 232px) * 16 / 9 + 16px)));
  width: var(--live-w);
  margin: 0 auto;
}
@supports (height: 100svh) {
  .live { --live-w: min(100%, max(520px, calc((100svh - 232px) * 16 / 9 + 16px))); }
}
.live .page-head { padding: 32px 0 24px; }

.live-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 16px 4px 0;
  color: var(--text-2);
  font-size: 15px;
}
.live-meta .link-arrow { margin-left: auto; }

.live-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live-status[data-estado="en-vivo"] .live-dot { background: var(--live); }
.live-status[data-estado="error"] { color: var(--text-2); font-weight: 400; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* Atardecer de marca: bloque de aportes */

.sunset {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  padding: 40px;
  border-radius: 16px;
  background-color: var(--band);
  background-image: linear-gradient(90deg, var(--band) 0%, rgba(196, 50, 42, 0.94) 56%, rgba(196, 50, 42, 0) 86%), url("atardecer-rojo.webp");
  background-position: 0 0, center 35%;
  background-size: auto, cover;
  background-repeat: no-repeat;
  color: var(--band-text);
}
.sunset-copy { max-width: 38rem; }
.sunset h1, .sunset h2 { color: var(--band-text); }
.sunset p { margin-top: 12px; color: var(--band-text-2); font-size: 1.0625rem; }
.sunset a:not(.button) { color: var(--band-text); }
.sunset :focus-visible { outline-color: var(--band-text); }

.sunset-hero { min-height: 280px; margin-top: 32px; padding: 48px; }
.sunset-hero p { font-size: 1.125rem; }

/* Aportes */

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.amount {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 128px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 120ms var(--ease);
}
.amount:hover { border-color: rgba(242, 106, 93, 0.55); background: var(--raised); color: var(--text); }
.amount:active { transform: scale(0.98); }
.amount .icon { position: absolute; top: 20px; right: 20px; color: var(--muted); }
.amount-value { font-size: 28px; font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.amount-note { color: var(--text-2); font-size: 15px; }

.amount-open { grid-column: 1 / -1; }
.amount-open .amount { min-height: 80px; }

.note { margin-top: 16px; color: var(--muted); font-size: 14px; }

/* Programación */

.schedule-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.schedule-head .button { margin-bottom: 32px; }

.schedule { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.schedule a { display: block; border-radius: 8px; }
.schedule img { width: 100%; height: auto; border-radius: 8px; }

/* Cómo vernos */

.video-caption { margin-top: 12px; padding: 0 4px; color: var(--muted); font-size: 14px; }

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}
.steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-content: start;
  column-gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  counter-increment: paso;
}
.steps li::before {
  content: counter(paso);
  grid-row: span 2;
  color: var(--text-2);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.steps p { margin-top: 4px; color: var(--text-2); }

.coverage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 48px; align-items: start; }
.coverage .section-head { margin-bottom: 0; }
.coverage .link-arrow { margin-top: 20px; }
.map { aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* Contacto */

.contact-list {
  max-width: 640px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  list-style: none;
}
.contact-list li + li { border-top: 1px solid var(--line); }

.contact-row {
  display: grid;
  grid-template-columns: 18px 112px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 150ms var(--ease);
}
.contact-row:hover { background: var(--raised); color: var(--text); }
.contact-row .icon { color: var(--text-2); }
.contact-label { font-weight: 500; }
.contact-detail { color: var(--text-2); overflow-wrap: anywhere; }

/* Pie de página */

.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-deep); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 48px;
  width: var(--page);
  margin: 0 auto;
  padding: 32px 0 24px;
}
.footer-name { color: var(--text); font-weight: 600; }
.footer-brand p:not(.footer-name) { margin-top: 4px; color: var(--text-2); font-size: 15px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--text-2); font-size: 15px; text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

.footer-legal { width: var(--page); margin: 0 auto; padding: 16px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Pantallas medianas y celulares */

@media (max-width: 860px) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-deep);
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav a:not(.button) { display: flex; align-items: center; min-height: 48px; font-size: 17px; }
  .js .site-nav .button { min-height: 48px; margin: 12px 0 0; font-size: 16px; }

  .coverage { grid-template-columns: 1fr; }
  .amount-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --page: calc(100% - 32px); }
  .js .site-nav { padding: 8px 16px 20px; }
  .header-inner { min-height: 72px; }
  .brand img { width: 56px; }

  .page-head { padding: 32px 0 24px; }
  .live .page-head { padding: 24px 0 20px; }
  .live-meta .link-arrow { margin-left: 0; }

  .sunset, .sunset-hero { padding: 24px; }
  .sunset { background-image: linear-gradient(180deg, rgba(196, 50, 42, 0.92), rgba(196, 50, 42, 0.85)), url("atardecer-rojo.webp"); }
  .sunset-hero { min-height: 0; margin-top: 24px; }
  .sunset .button { width: 100%; }

  .amount { min-height: 112px; padding: 16px; }
  .amount .icon { top: 16px; right: 16px; }
  .amount-value { font-size: 24px; }

  .schedule-head .button { width: 100%; margin-bottom: 24px; }
  .schedule { padding: 4px; border-radius: 12px; }

  .contact-row { grid-template-columns: 18px minmax(0, 1fr) 18px; row-gap: 0; }
  .contact-label { grid-column: 2; }
  .contact-detail { grid-column: 2; grid-row: 2; }
  .contact-row .icon:last-child { grid-column: 3; grid-row: 1 / span 2; }
  .contact-row .icon:first-child { grid-row: 1 / span 2; }

  .site-footer { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
