:root {
  color-scheme: light;
  --rmv-red: #d71920;
  --rmv-red-dark: #a91116;
  --ink: #111114;
  --panel: #ffffff;
  --muted: #626674;
  --line: #e5e7eb;
  --soft: #f4f5f7;
  --dark: #27272f;
  --ocean: #0077b6;
  --mayotte: #159947;
  --sun: #f7c948;
  --shadow: 0 18px 48px rgba(17, 17, 20, .12);
  --radius: 8px;
  --max: 1180px;
  --player-h: 82px;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f6f7fb;
  --panel: #17181d;
  --muted: #a8adbb;
  --line: #30323a;
  --soft: #101115;
  --dark: #0d0e12;
  --shadow: 0 18px 48px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  padding-bottom: calc(var(--player-h) + 20px);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 1000;
  background: var(--ink);
  color: var(--panel);
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

[data-theme="dark"] .site-header { background: rgba(23, 24, 29, .9); }

.header-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-logo {
  width: 72px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(17, 17, 20, .14));
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #fff 0 18%, var(--rmv-red) 19% 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0;
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 3px #fff;
}

[data-theme="dark"] .brand-mark { border-color: #fff; box-shadow: 0 0 0 3px #0d0e12; }

.brand-name { font-weight: 900; line-height: 1; }
.brand-name span { display: block; color: var(--rmv-red); font-size: .78rem; margin-top: 3px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  padding: 10px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 750;
  font-size: .92rem;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: rgba(215, 25, 32, .1);
  color: var(--rmv-red);
}

.header-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn,
.menu-toggle,
.play-btn {
  border: 0;
  background: var(--ink);
  color: var(--panel);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .2s ease, background .2s ease;
}

.icon-btn:hover,
.menu-toggle:hover,
.play-btn:hover { transform: translateY(-1px); }

.listen-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--rmv-red);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(215, 25, 32, .22);
}

.btn.secondary {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.menu-toggle { display: none; }

.breaking {
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.breaking-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 42px;
  overflow: hidden;
}

.breaking-label {
  background: var(--rmv-red);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .82rem;
  min-width: max-content;
  font-weight: 900;
  line-height: 1;
}

.breaking-marquee {
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.breaking-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
  color: rgba(255, 255, 255, .9);
  will-change: transform;
}

.breaking-track span {
  display: inline-flex;
  align-items: center;
  padding-right: 48px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.page-shell {
  min-height: 60vh;
}

.hero {
  position: relative;
  min-height: clamp(560px, 78vh, 760px);
  isolation: isolate;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 8, 12, .88), rgba(8, 8, 12, .62) 45%, rgba(8, 8, 12, .16)),
    url("../images/hero-rmv.png") center / cover no-repeat;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  background: linear-gradient(transparent, var(--soft));
  z-index: -1;
}

.hero-content {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0 120px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: inherit;
  font-weight: 800;
  font-size: .86rem;
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(2.55rem, 6vw, 5.7rem);
  line-height: .95;
  letter-spacing: 0;
}

.hero p {
  max-width: 650px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-mini-player {
  margin-top: 34px;
  max-width: 620px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  backdrop-filter: blur(14px);
}

.cover-art {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--rmv-red), var(--ocean));
  display: grid;
  place-items: center;
  font-weight: 900;
}

.now-playing {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.now-playing-cover {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--panel);
}

.now-playing-meta {
  min-width: 0;
}

.now-playing-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.section.alt {
  width: 100%;
  background: var(--panel);
  border-block: 1px solid var(--line);
}

.section.alt > .section-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.2vw, 2.5rem);
  line-height: 1.05;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 720px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(17, 17, 20, .04);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.thumb {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(215,25,32,.86), rgba(0,119,182,.78)),
    radial-gradient(circle at 80% 20%, rgba(247,201,72,.8), transparent 30%);
  position: relative;
  overflow: hidden;
}

.thumb.music { background: linear-gradient(135deg, var(--ocean), var(--mayotte)); }
.thumb.culture { background: linear-gradient(135deg, var(--mayotte), var(--sun)); }
.thumb.sport { background: linear-gradient(135deg, #111, var(--rmv-red)); }

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.card:hover .thumb img { transform: scale(1.035); }

.featured-main.has-photo {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.featured-main.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-main.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.82));
}

.featured-main.has-photo > div {
  position: relative;
  z-index: 1;
}

.brief-list {
  display: grid;
  gap: 10px;
}

.brief-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.brief-item strong { color: var(--rmv-red); }

.card-body { padding: 16px; }

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 750;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(215, 25, 32, .1);
  color: var(--rmv-red);
  font-size: .78rem;
  font-weight: 850;
}

.card h3 {
  margin: 10px 0 8px;
  font-size: 1.1rem;
  line-height: 1.22;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.featured {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
}

.featured-main {
  min-height: 430px;
  display: flex;
  align-items: end;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, .78)),
    linear-gradient(135deg, var(--rmv-red), var(--ocean));
  border-radius: var(--radius);
}

.featured-side { display: grid; gap: 18px; }

.filters,
.search-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filters input,
.filters select,
.search-panel input,
.form input,
.form textarea,
.form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
}

.filters input,
.search-panel input { flex: 1 1 260px; }

.program-row,
.schedule-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.time {
  color: var(--rmv-red);
  font-weight: 900;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.article-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 42px);
}

.article-content p,
.article-content li {
  color: color-mix(in srgb, var(--ink), var(--muted) 22%);
  line-height: 1.78;
  font-size: 1.06rem;
}

.share {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.weather {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, var(--ocean), var(--mayotte));
  color: #fff;
  border-radius: var(--radius);
  padding: 22px;
}

.weather-icon { font-size: 2.8rem; }

.newsletter {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(22px, 5vw, 38px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}

.newsletter p { color: rgba(255, 255, 255, .75); }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input { min-height: 46px; border-radius: 999px; border: 0; padding: 0 14px; min-width: 260px; }

.journal-player {
  display: grid;
  grid-template-columns: 1fr minmax(320px, .85fr);
  gap: 24px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 32px);
  box-shadow: 0 1px 0 rgba(17, 17, 20, .04);
}

.journal-copy h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.journal-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.journal-controls {
  display: grid;
  gap: 12px;
}

.journal-controls audio {
  width: 100%;
}

.journal-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.journal-meta strong {
  color: var(--ink);
}

.form {
  display: grid;
  gap: 12px;
}

.form .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.site-footer {
  background: var(--dark);
  color: #fff;
  margin-top: 40px;
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 28px;
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
}

.site-footer a,
.site-footer p { color: rgba(255, 255, 255, .76); }
.site-footer h3 { margin-top: 0; }
.footer-links { display: grid; gap: 9px; }
.legal { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; width: min(var(--max), calc(100% - 32px)); margin: 0 auto; color: rgba(255,255,255,.65); }

.radio-player {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 80;
  width: min(var(--max), calc(100% - 18px));
  min-height: var(--player-h);
  background: rgba(17, 17, 20, .96);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  backdrop-filter: blur(18px);
}

.player-title { font-weight: 900; }
.player-sub { color: rgba(255,255,255,.7); font-size: .9rem; margin-top: 3px; }
.listener-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: rgba(255,255,255,.84);
  font-size: .84rem;
  font-weight: 800;
}

.listener-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mayotte);
  box-shadow: 0 0 0 4px rgba(21, 153, 71, .16);
}
.volume { display: flex; align-items: center; gap: 8px; }
.volume input { width: 110px; accent-color: var(--rmv-red); }

.toast {
  position: fixed;
  right: 18px;
  bottom: calc(var(--player-h) + 30px);
  background: var(--ink);
  color: var(--panel);
  padding: 12px 14px;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 90;
}

.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .menu-toggle { display: grid; }
  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { border-radius: var(--radius); }
  .listen-btn { display: none; }
  .grid.three, .grid.four, .featured, .article-layout, .footer-inner { grid-template-columns: 1fr; }
  .newsletter { grid-template-columns: 1fr; }
  .journal-player { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --player-h: 108px; }
  .header-inner { min-height: 68px; width: min(100% - 22px, var(--max)); gap: 10px; }
  .brand-name { font-size: .92rem; }
  .brand-logo { width: 58px; height: 42px; }
  .brand-mark { width: 40px; height: 40px; }
  .breaking-inner {
    width: calc(100% - 18px);
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    min-height: 38px;
  }
  .breaking-label {
    max-width: 92px;
    padding: 6px 8px;
    font-size: .72rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .breaking-track {
    animation-duration: 24s;
    font-size: .88rem;
  }
  .breaking-track span { padding-right: 32px; }
  .hero { min-height: 680px; }
  .hero-mini-player,
  .radio-player { grid-template-columns: auto 1fr; }
  .hero-mini-player .tag,
  .volume { grid-column: 1 / -1; }
  .now-playing {
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .now-playing-cover {
    width: 46px;
    height: 46px;
  }
  .volume input { width: 100%; }
  .grid.two { grid-template-columns: 1fr; }
  .program-row,
  .schedule-row { grid-template-columns: 1fr; gap: 6px; }
  .form .split { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .breaking-track {
    animation: none !important;
    transform: none !important;
  }
  .breaking-track span + span { display: none; }
}
