/* ============================================================
   WZ4JM Radio Theme — Main Stylesheet
   ============================================================ */

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

:root {
  --ink:             #1a1f2e;
  --ink-muted:       #4a5568;
  --ink-light:       #718096;
  --rule:            #e2e8f0;
  --bg:              #f8f9fc;
  --bg-white:        #ffffff;
  --accent:          #c0392b;
  --accent-hover:    #a93226;
  --accent-dim:      #f9e8e7;
  --navy:            #1a3a5c;
  --navy-light:      #eef3f9;
  --amber:           #f0c040;
  --green-good:      #22c55e;
  --yellow-fair:     #f59e0b;
  --red-poor:        #ef4444;
  --radius:          4px;
  --font-sans:       'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:       'IBM Plex Mono', 'Courier New', monospace;
  --font-serif:      'Merriweather', Georgia, serif;
  --max-w:           1160px;
  --header-h:        64px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.4em; }

/* ── UTILITY ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); }

/* ── TOPBAR ── */
.site-topbar {
  background: var(--navy);
  border-bottom: 2px solid var(--accent);
  padding: 6px 0;
}
.site-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.05em;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-left { display: flex; gap: 16px; flex-wrap: wrap; }
.topbar-left span { color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-freq { color: var(--amber); font-weight: 600; letter-spacing: 0.1em; }
.topbar-signal { display: flex; gap: 3px; align-items: flex-end; }
.topbar-signal i {
  display: inline-block; width: 3px; border-radius: 1px;
  background: rgba(255,255,255,0.2);
}
.topbar-signal i:nth-child(1) { height: 6px;  background: var(--green-good); }
.topbar-signal i:nth-child(2) { height: 10px; background: var(--green-good); }
.topbar-signal i:nth-child(3) { height: 14px; background: var(--green-good); }
.topbar-signal i:nth-child(4) { height: 18px; background: var(--yellow-fair); }
.topbar-signal i:nth-child(5) { height: 22px; }

/* ── HEADER ── */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

/* Brand */
.site-branding { flex-shrink: 0; }
.site-branding a { text-decoration: none; color: inherit; }
.brand-callsign {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.brand-callsign .accent { color: var(--accent); }
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Nav */
.primary-navigation { display: flex; align-items: center; gap: 2px; }
.primary-navigation ul { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 2px; }
.primary-navigation li { position: relative; }
.primary-navigation a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  display: block;
  transition: color .15s, background .15s;
  white-space: nowrap;
  text-decoration: none;
}
.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current-menu-ancestor > a {
  color: var(--navy);
  background: var(--navy-light);
}

/* Dropdown */
.primary-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 300;
  flex-direction: column;
  gap: 2px;
}
.primary-navigation li:hover > .sub-menu { display: flex; }
.primary-navigation .sub-menu a {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: var(--radius);
  color: var(--ink-muted);
  white-space: nowrap;
}
.primary-navigation .sub-menu a:hover { color: var(--navy); background: var(--navy-light); }
.primary-navigation li:hover > a { color: var(--navy); background: var(--navy-light); }

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink-muted);
  margin-left: auto;
}

/* ── HERO ── */
.site-hero {
  background: var(--navy);
  color: #fff;
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero-grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255,255,255,0.025) 59px, rgba(255,255,255,0.025) 60px),
    repeating-linear-gradient(0deg,  transparent, transparent 59px, rgba(255,255,255,0.025) 59px, rgba(255,255,255,0.025) 60px);
}
.hero-wave {
  position: absolute; bottom: 0; left: 0; right: 0;
  pointer-events: none; opacity: 0.08;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 48px;
  align-items: center;
}
.hero-bg-image {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.15;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block; width: 24px; height: 1px;
  background: var(--accent);
}
.hero-content h1 {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 20px;
}
.hero-content h1 em { font-style: normal; color: var(--amber); }
.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero meta card */
.hero-meta {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 24px;
  font-family: var(--font-mono);
  display: flex; flex-direction: column; gap: 16px;
}
.hero-meta-row {}
.hero-meta-label {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin-bottom: 2px;
}
.hero-meta-value { font-size: 14px; font-weight: 500; color: #fff; }
.hero-meta-value.freq { color: var(--amber); }
.hero-meta-value.grid { color: #7dd3fc; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer; border: none;
  transition: all .15s;
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.btn-outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #142f4e; text-decoration: none; color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--rule); }
.btn-ghost:hover { background: var(--navy-light); text-decoration: none; }

/* ── BAND CONDITIONS BAR ── */
.band-bar {
  background: var(--bg-white);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}
.band-bar-inner {
  display: flex; align-items: center; gap: 28px;
  overflow-x: auto; padding-bottom: 2px;
}
.band-bar-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-light); letter-spacing: 0.1em;
  text-transform: uppercase; flex-shrink: 0;
}
.band-item { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.band-name { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); letter-spacing: 0.06em; }
.band-dot { width: 10px; height: 10px; border-radius: 50%; }
.band-dot.good  { background: var(--green-good); }
.band-dot.fair  { background: var(--yellow-fair); }
.band-dot.poor  { background: var(--red-poor); }
.band-legend {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-light);
  display: flex; gap: 12px; align-items: center; white-space: nowrap;
}

/* ── SECTION BASE ── */
.section { padding: 64px 0; }
.section-header { margin-bottom: 36px; }
.section-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.section-title { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.section-rule { width: 40px; height: 2px; background: var(--accent); margin-top: 10px; }

/* ── GRID ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* ── CARDS ── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 24px;
  transition: box-shadow .2s, border-color .2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); border-color: #cbd5e0; }
.card-image { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; background: var(--navy-light); }
.card-icon {
  width: 38px; height: 38px;
  background: var(--navy-light); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 14px;
}
.card-tag {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-light); margin-bottom: 6px;
}
.card-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 8px; line-height: 1.35; }
.card-body { font-size: 14px; color: var(--ink-muted); line-height: 1.65; }
.card-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--accent);
}
.card-link:hover { text-decoration: none; color: var(--accent-hover); }
.card-link::after { content: ' →'; }

/* ── ABOUT STRIP ── */
.about-strip { background: var(--navy); color: #fff; padding: 64px 0; }
.about-strip-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.about-strip-content h2 { font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 16px; line-height: 1.3; }
.about-strip-content h2 em { font-style: normal; color: var(--amber); font-family: var(--font-mono); }
.about-strip-content p { color: rgba(255,255,255,0.72); font-size: 15px; line-height: 1.75; margin-bottom: 14px; }
.about-strip-image { border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); }
.about-strip-image img { width: 100%; height: 100%; object-fit: cover; }
.about-strip-image.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,0.3);
  flex-direction: column; gap: 8px;
}

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.stat-box {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 18px 20px;
}
.stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--amber); }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; letter-spacing: 0.04em; }

/* ── BLOG POSTS ── */
.post-list { display: flex; flex-direction: column; }
.post-row {
  display: flex; gap: 24px; padding: 24px 0;
  border-bottom: 1px solid var(--rule); align-items: flex-start;
}
.post-row:first-child { padding-top: 0; }
.post-row:last-child { border-bottom: none; }
.post-date-block { flex-shrink: 0; width: 54px; text-align: center; font-family: var(--font-mono); }
.post-date-day { font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1; }
.post-date-mon { font-size: 11px; color: var(--ink-light); text-transform: uppercase; letter-spacing: 0.1em; }
.post-content { flex: 1; }
.post-tag {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.post-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 6px; line-height: 1.35; }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--accent); }
.post-excerpt { font-size: 14px; color: var(--ink-muted); line-height: 1.65; margin: 0; }
.post-meta { font-size: 12px; color: var(--ink-light); margin-top: 6px; font-family: var(--font-mono); }

/* ── SINGLE POST / PAGE CONTENT ── */
.entry-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.entry-title { font-size: clamp(24px, 3vw, 36px); margin-bottom: 12px; }
.entry-meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-light); display: flex; gap: 16px; flex-wrap: wrap; }
.entry-category {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin-bottom: 8px;
}

.entry-content {
  font-size: 16px; line-height: 1.8; color: var(--ink);
  max-width: 72ch;
}
.entry-content h2 { font-size: 22px; margin: 2em 0 0.75em; padding-top: 1em; border-top: 1px solid var(--rule); }
.entry-content h3 { font-size: 18px; margin: 1.75em 0 0.6em; }
.entry-content p { margin-bottom: 1.25em; }
.entry-content ul, .entry-content ol { margin-bottom: 1.25em; padding-left: 1.75em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content strong { font-weight: 700; color: var(--ink); }
.entry-content code {
  font-family: var(--font-mono); font-size: 13px;
  background: var(--navy-light); border: 1px solid var(--rule);
  border-radius: 3px; padding: 1px 6px; color: var(--navy);
}
.entry-content pre {
  background: var(--ink); color: #e2e8f0;
  font-family: var(--font-mono); font-size: 13px;
  border-radius: 6px; padding: 20px 24px; overflow-x: auto;
  margin: 1.5em 0; line-height: 1.65;
}
.entry-content pre code { background: none; border: none; padding: 0; color: inherit; }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px; margin: 1.5em 0;
  background: var(--accent-dim); border-radius: 0 4px 4px 0;
  font-style: italic; color: var(--ink-muted);
}
.entry-content a { color: var(--accent); }
.entry-content a:hover { color: var(--accent-hover); }
.entry-content hr { border: none; border-top: 1px solid var(--rule); margin: 2em 0; }

/* Content + sidebar layout */
.content-area { max-width: var(--max-w); margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; }
.content-area.full-width { grid-template-columns: 1fr; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
  background: var(--bg-white); border: 1px solid var(--rule);
  border-radius: 6px; padding: 20px;
}
.widget-title {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-light); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget ul a { color: var(--ink-muted); text-decoration: none; }
.widget ul a:hover { color: var(--accent); }

/* Station info widget */
.station-widget { font-family: var(--font-mono); }
.station-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.station-row:last-child { border-bottom: none; }
.station-key { color: var(--ink-light); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.station-val { color: var(--navy); font-weight: 500; }
.station-val.freq { color: var(--accent); }

/* ── FOOTER ── */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 56px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand-call {
  font-family: var(--font-mono); font-size: 20px;
  font-weight: 600; color: #fff; margin-bottom: 8px;
}
.footer-brand-call .accent { color: var(--accent); }
.footer-brand-sub { font-size: 13px; line-height: 1.7; margin-bottom: 16px; }
.footer-qsl {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 6px 12px;
  color: rgba(255,255,255,0.7);
}
.footer-col-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
  margin-bottom: 14px; font-family: var(--font-mono);
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.6); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-family: var(--font-mono); flex-wrap: wrap; gap: 12px;
}
.footer-bottom-right { display: flex; gap: 20px; }
.footer-bottom-right a { color: rgba(255,255,255,0.35); text-decoration: none; }
.footer-bottom-right a:hover { color: rgba(255,255,255,0.8); }

/* ── 404 PAGE ── */
.error-404 { text-align: center; padding: 80px 24px; }
.error-404 .qrm { font-family: var(--font-mono); font-size: 72px; font-weight: 600; color: var(--accent); line-height: 1; margin-bottom: 16px; }
.error-404 h1 { font-size: 24px; margin-bottom: 12px; }
.error-404 p { color: var(--ink-muted); margin-bottom: 24px; font-family: var(--font-mono); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-meta { display: none; }
  .about-strip-inner { grid-template-columns: 1fr; gap: 40px; }
  .content-area { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .primary-navigation { display: none; }
  .primary-navigation.is-open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-white); border-bottom: 1px solid var(--rule);
    padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 199;
  }
  .primary-navigation.is-open ul { flex-direction: column; width: 100%; }
  .primary-navigation.is-open .sub-menu { position: static; box-shadow: none; border: none; padding-left: 16px; }
  .menu-toggle { display: flex; }
  .site-header { position: relative; }
  .site-header .container { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .band-bar-inner { gap: 16px; }
  .topbar-left { display: none; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

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