/* RGM News San Diego Weather — Studio Theme */

:root {
  --bg: #07090d;
  --bg-2: #0d1219;
  --panel: #11161f;
  --panel-2: #161d29;
  --line: #1f2937;
  --line-hot: #2a3548;
  --text: #e8edf4;
  --text-dim: #8a96a8;
  --text-faint: #5a6473;
  --red: #ff2b3d;
  --red-soft: #ff4d5e;
  --cyan: #00e1ff;
  --cyan-dim: #2bb9d4;
  --amber: #ffb627;
  --green: #2af598;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-1: 0 1px 0 rgba(255,255,255,.04), 0 6px 16px rgba(0,0,0,.5);
  --shadow-glow: 0 0 0 1px rgba(0,225,255,.12), 0 0 30px rgba(0,225,255,.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(0,225,255,.05), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255,43,61,.04), transparent 60%),
    linear-gradient(to bottom, #07090d, #05070a 60%, #04060a);
  min-height: 100vh;
  background-attachment: fixed;
}

/* hairline grid overlay for the studio feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--cyan-dim); text-decoration: none; }
a:hover { color: var(--cyan); }

/* ============== MASTHEAD ============== */
.masthead {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: linear-gradient(180deg, #0c1118 0%, #080b11 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  height: 56px;
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.6));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2.5px;
  background: linear-gradient(180deg, #fff, #c7d4e6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--cyan-dim);
  margin-top: 4px;
}

.clock-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow-glow);
}
.clock {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 12px rgba(0,225,255,.4);
}
.clock-date {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-top: 2px;
}

.on-air {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  background: linear-gradient(180deg, #2a070b, #1a0307);
  border: 1px solid var(--red);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #ffd0d4;
  box-shadow: 0 0 0 1px rgba(255,43,61,.2), 0 0 20px rgba(255,43,61,.25);
}
.on-air-dot {
  width: 10px; height: 10px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--red);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.85); }
}

/* ============== TICKER ============== */
.ticker-rail {
  position: relative; z-index: 4;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg, #11050a, #0a0307);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.ticker-label {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0 18px;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  border-right: 2px solid #1a0307;
}
.ticker-track {
  flex: 1; overflow: hidden;
  position: relative;
  padding: 10px 0;
}
.ticker-content {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 1px;
  color: #e8edf4;
  padding-left: 100%;
  animation: ticker-scroll 80s linear infinite;
}
.ticker-content .city { color: var(--cyan); font-weight: 700; }
.ticker-content .temp { color: #fff; }
.ticker-content .sep { color: var(--text-faint); margin: 0 14px; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ============== ALERTS ============== */
.alerts-banner {
  position: relative; z-index: 4;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px;
  background: linear-gradient(90deg, #3a0a12, #1f0509);
  border-bottom: 1px solid var(--red);
  animation: alerts-flash 2s ease-in-out infinite;
}
.alerts-banner.hidden { display: none; }
.alerts-icon {
  font-size: 24px;
  color: var(--red);
  text-shadow: 0 0 12px var(--red);
}
.alerts-content {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 600;
}
@keyframes alerts-flash {
  0%, 100% { border-bottom-color: var(--red); }
  50% { border-bottom-color: #ff8080; }
}

/* ============== DASHBOARD GRID ============== */
.dashboard {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.1fr;
  gap: 16px;
  padding: 16px 20px;
  max-width: 1800px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .dashboard { grid-template-columns: 1fr; }
}

.zone-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
}
.zone-panel.zone-coast { border-top: 3px solid var(--cyan); }
.zone-panel.zone-inland { border-top: 3px solid var(--amber); }

.zone-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 0 10px 0;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.zone-header.center { justify-content: center; gap: 16px; }
.zone-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #fff;
}
.zone-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.city-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
}
@media (max-width: 520px) {
  .city-grid { grid-template-columns: 1fr; }
}

.city-card {
  background: linear-gradient(180deg, var(--panel-2), #0e131c);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px 12px 11px;
  position: relative;
  transition: border-color .2s, transform .2s;
}
.city-card:hover { border-color: var(--line-hot); transform: translateY(-1px); }

.city-card.skeleton {
  min-height: 96px;
  background: linear-gradient(110deg, var(--panel-2) 8%, #1a2230 18%, var(--panel-2) 33%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.cc-name {
  font-size: 12px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}
.cc-elev {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-faint);
  margin-top: 2px;
}
.cc-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 6px;
  gap: 6px;
}
.cc-temp {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 14px rgba(0,225,255,.18);
  line-height: 1;
}
.cc-temp .unit { font-size: 14px; color: var(--text-dim); margin-left: 2px; }
.cc-cond {
  font-size: 11px;
  text-align: right;
  color: var(--text);
  max-width: 50%;
}
.cc-cond .icon { font-size: 22px; display: block; line-height: 1; margin-bottom: 2px; }
.cc-cond .desc { display: block; color: var(--text-dim); font-size: 10px; letter-spacing: .5px; }

.cc-foot {
  display: flex; gap: 10px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.cc-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cc-foot .hi { color: var(--red-soft); }
.cc-foot .lo { color: var(--cyan); }

/* ============== RADAR ============== */
.radar-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 6px;
  padding: 14px;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
}
.radar-frame {
  position: relative;
  flex: 1;
  min-height: 380px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.radar-frame iframe {
  width: 100%; height: 100%;
  min-height: 380px;
  border: 0; display: block;
}
.radar-legend {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}
.rl-item { display: inline-flex; align-items: center; gap: 5px; }
.rl-sw { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.rl-light { background: #4ad15a; }
.rl-mod { background: #f9d342; }
.rl-heavy { background: #ff7b1a; }
.rl-storm { background: #e02d2d; }

/* ============== ANCHOR ============== */
.anchor-section {
  position: relative; z-index: 3;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: stretch;
  max-width: 1800px;
  margin: 8px auto 0;
  padding: 18px 20px;
  background: linear-gradient(180deg, #0a0f17, #07090d);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) {
  .anchor-section { grid-template-columns: 1fr; }
}

.anchor-portrait {
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.tally-light {
  position: absolute; top: 8px; left: 8px;
  width: 12px; height: 12px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--red), 0 0 0 2px #0a0f17, 0 0 0 3px rgba(255,255,255,.1);
  animation: pulse 1.2s ease-in-out infinite;
  z-index: 4;
}
.anchor-frame {
  position: relative;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,225,255,.15), transparent 50%),
    linear-gradient(180deg, #0c1422, #060912);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex; align-items: flex-end; justify-content: center;
}
.anchor-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.7));
  animation: anchor-breath 5s ease-in-out infinite;
}
@keyframes anchor-breath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1.5px) scale(1.005); }
}
.anchor-overlay-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,225,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,225,255,.06) 1px, transparent 1px);
  background-size: 18px 18px;
  mix-blend-mode: screen;
  pointer-events: none;
}
.anchor-nameplate {
  background: linear-gradient(90deg, #ff2b3d, #b1101e);
  padding: 8px 12px;
  border-radius: 3px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,43,61,.3);
}
.anchor-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
}
.anchor-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  opacity: .9;
  margin-top: 1px;
}

.anchor-content { display: flex; flex-direction: column; gap: 12px; }
.anchor-header { display: flex; flex-direction: column; gap: 4px; }
.seg-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--red-soft);
  font-weight: 800;
}
.anchor-headline {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
}
.anchor-sub {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 1px;
  min-height: 18px;
}

.anchor-video-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.anchor-video {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.video-overlay-top {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  background: rgba(0,0,0,.7);
  border: 1px solid var(--red);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #fff;
}
.video-live-dot {
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--red);
  animation: pulse 1.2s ease-in-out infinite;
}
.unmute-btn {
  position: absolute; bottom: 10px; right: 10px;
  padding: 8px 14px;
  background: rgba(0,0,0,.75);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.unmute-btn:hover { background: rgba(0,225,255,.2); transform: translateY(-1px); }
.unmute-btn.hidden { display: none; }

/* ============== DATA STRIP ============== */
.data-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 900px) {
  .data-strip { grid-template-columns: repeat(2, 1fr); }
}
.ds-cell {
  background: var(--panel);
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.ds-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
}
.ds-val {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

/* ============== SPONSOR ============== */
.sponsor-slot {
  max-width: 1800px;
  margin: 16px auto;
  padding: 18px 28px;
  background: linear-gradient(135deg, #0b1019, #0e1620);
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: center;
}
.sponsor-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-faint);
}
.sponsor-content {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-dim);
}

/* ============== FOOTER ============== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  background: #04060a;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { height: 40px; width: auto; opacity: .9; }
.footer-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
}
.footer-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
}
.footer-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.7;
}
.footer-legal { color: var(--text-faint); }
