/* Back Roads & Back Then — vintage radio
   Fonts load from Google Fonts (see <head>); the stacks below fall back to
   Rockwell/Georgia if the fonts can't load. */

:root {
  --walnut-900: #1d110a;
  --walnut-800: #2a190e;
  --walnut-700: #3b2415;
  --walnut-600: #573621;
  --cream: #f1e6c9;
  --cream-deep: #e3d2a7;
  --ink: #2a1a10;
  --ink-soft: #5b4531;
  --brass: #b98a35;
  --brass-light: #e6c673;
  --amber: #f6b53a;
  --tube-red: #c0391f;
  --ky-blue: #1f4f8f;

  --display: "Alfa Slab One", Rockwell, "Rockwell Extra Bold", "Roboto Slab", Georgia, serif;
  --body: "Crimson Pro", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --wrap: 68rem;

  /* wood grain: stretched horizontal noise, tinted brown */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='360'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008 0.42' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.02 0 0 0 0 0.0 0 0 0 0.9 -0.28'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  /* paper fibre for the cream panels */
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.24 0 0 0 0 0.1 0 0 0 0.35 -0.1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--cream);
  background:
    var(--grain),
    linear-gradient(180deg, var(--walnut-700) 0%, var(--walnut-800) 45%, var(--walnut-900) 100%);
  background-color: var(--walnut-800);
}

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

a { color: inherit; }

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.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;
  left: 1rem; top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 700;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}
.panel :focus-visible,
.form :focus-visible { outline-color: var(--ky-blue); }

/* ---------- header ---------- */

.site-header {
  background:
    var(--grain),
    linear-gradient(180deg, #4a2d19, var(--walnut-800));
  border-bottom: 3px solid var(--brass);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1.5rem;
  padding-block: .8rem;
}

.brand {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: .25rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cream);
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--brass); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--amber); color: var(--amber); }

/* ---------- radio cabinet (home hero) ---------- */

.cabinet-section { padding-block: 2rem 1.5rem; }

.cabinet {
  position: relative;
  padding: clamp(.6rem, 1.6vw, 1.1rem);
  border-radius: 26px 26px 12px 12px;
  background:
    var(--grain),
    linear-gradient(180deg, #5a3820, #3a2313 60%, #2c1a0f);
  box-shadow:
    0 0 0 2px var(--brass),
    0 0 0 5px #2a190e,
    0 0 0 6px rgba(230, 198, 115, .55),
    0 22px 40px rgba(0, 0, 0, .55),
    inset 0 2px 0 rgba(255, 220, 160, .18);
}

.screen {
  margin: 0;
  overflow: hidden;
  border-radius: 16px 16px 4px 4px;
  border: 3px solid #120a05;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .6);
  position: relative;
  background: #120a05;
}
.screen::after { /* glass reflection */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 32%);
}

/* the dial */

.dial {
  margin-top: clamp(.6rem, 1.6vw, 1rem);
  display: grid;
  gap: .75rem;
}

.dial-face {
  position: relative;
  padding: 2.1rem clamp(1.4rem, 5vw, 3.2rem) 1.35rem;
  border-radius: 10px;
  background:
    var(--paper),
    linear-gradient(180deg, #f6ecd0, var(--cream-deep));
  border: 3px solid #120a05;
  box-shadow: inset 0 3px 10px rgba(60, 35, 10, .55), inset 0 -2px 6px rgba(60, 35, 10, .25);
  color: var(--ink);
  overflow: hidden;
}
.dial-face::after { /* glass reflection */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 45%);
}

.dial-track {
  position: relative;
  height: 3.1rem;
}

.dial-labels {
  position: absolute;
  inset: -1.55rem 0 auto 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1;
}
.dial-labels li {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.dial-ticks {
  position: absolute;
  inset: 0;
  border-right: 1px solid var(--ink);
}
.dial-ticks::before { /* every half MHz */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.1rem;
  background: repeating-linear-gradient(to right, var(--ink) 0, var(--ink) 1px, transparent 1px, transparent 2.5%);
}
.dial-ticks::after { /* every 4 MHz */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2.1rem;
  background: repeating-linear-gradient(to right, var(--ink) 0, var(--ink) 2px, transparent 2px, transparent 20%);
}

.dial-needle {
  position: absolute;
  left: 81.5%; /* (104.3 - 88) / (108 - 88) */
  top: -1.9rem;
  bottom: -1.1rem;
  width: 3px;
  margin-left: -1.5px;
  background: linear-gradient(180deg, #ff6a3d, var(--tube-red));
  box-shadow: 0 0 10px 1px rgba(255, 90, 50, .65);
  border-radius: 2px;
  animation: tune 2.4s cubic-bezier(.22, .8, .25, 1) .35s both;
}

@keyframes tune {
  from { left: 3%; }
  to   { left: 81.5%; }
}

.readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1.4rem;
  margin: 0;
  padding: .9rem 1.3rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #170d07, #24140a);
  border: 2px solid var(--brass);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .8), 0 0 0 3px #2a190e;
}
.readout .freq {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 3.1rem);
  line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 14px rgba(246, 181, 58, .75), 0 0 2px rgba(255, 220, 140, .9);
}
.readout .info {
  display: grid;
  gap: .05rem;
  color: var(--cream);
  font-size: 1.3rem;
  line-height: 1.25;
}
.readout .info strong { font-weight: 700; color: var(--brass-light); }

/* ---------- main area ---------- */

main { flex: 1; padding-block: 1.5rem 3.5rem; }

.panel {
  position: relative;
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  color: var(--ink);
  background:
    var(--paper),
    linear-gradient(180deg, #f5ebcf, #ead9b0);
  border-radius: 6px;
  border: 1px solid #b99b5c;
  box-shadow: 0 0 0 4px var(--walnut-800), 0 0 0 5px rgba(230, 198, 115, .5), 0 14px 28px rgba(0, 0, 0, .45);
}

.panel h2,
.page-title {
  margin: 0 0 .6rem;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: .005em;
}
.panel h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 1rem; }

.panel p { margin: 0 0 1rem; max-width: 40rem; }
.panel p:last-child { margin-bottom: 0; }

.panel a { color: var(--ky-blue); text-underline-offset: 3px; }
.panel a:hover { color: #0f3a73; }

.split {
  display: grid;
  gap: 2rem 3rem;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1.15fr 1fr; align-items: start; }
}

/* the "every show" list reads like a station log */
.log {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 3px double var(--ink);
}
.log li {
  padding: .8rem 0;
  border-bottom: 1px dashed rgba(42, 26, 16, .55);
  line-height: 1.35;
}
.log strong { display: block; font-size: 1.25rem; }
.log span { color: var(--ink-soft); font-size: 1.1rem; }

.log-title {
  margin: 0 0 .25rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
}

/* memory call-out sits on the wood, lit like the readout */
.callout {
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: 1rem 2rem;
  align-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #170d07, #26150b);
  border: 2px solid var(--brass);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .75), 0 0 0 4px var(--walnut-800);
}
@media (min-width: 46rem) {
  .callout { grid-template-columns: 1fr auto; }
}
.callout h2 {
  margin: 0 0 .4rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  color: var(--amber);
  text-shadow: 0 0 14px rgba(246, 181, 58, .45);
}
.callout p { margin: 0; max-width: 38rem; }

.button {
  display: inline-block;
  padding: .8rem 1.6rem;
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: linear-gradient(180deg, var(--brass-light), var(--brass));
  border: 2px solid #6e4f17;
  border-radius: 6px;
  box-shadow: 0 3px 0 #6e4f17, 0 6px 12px rgba(0, 0, 0, .4);
  cursor: pointer;
}
.button:hover { background: linear-gradient(180deg, #f0d484, #c8973c); }
.button:active { transform: translateY(2px); box-shadow: 0 1px 0 #6e4f17; }
.panel a.button { color: var(--ink); }

/* ---------- interior pages ---------- */

.page-head { padding-block: 2.25rem .5rem; }
.page-title {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--cream);
  text-shadow: 0 3px 0 rgba(0, 0, 0, .55);
}
.page-lede { margin: 0; max-width: 38rem; font-size: 1.35rem; color: var(--cream-deep); }

.dial-rule { /* tick marks under the page title, a nod to the dial */
  margin-top: 1.1rem;
  height: 1.1rem;
  max-width: 24rem;
  background:
    repeating-linear-gradient(to right, var(--brass) 0, var(--brass) 2px, transparent 2px, transparent 12px) bottom/100% 100% no-repeat;
  border-bottom: 2px solid var(--brass);
}

/* episodes */
/* episodes: a grid of vertical-video cards */
.episode-grid {
  display: grid;
  gap: 2rem 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}
.episode {
  padding-top: .9rem;
  border-top: 3px double var(--ink);
}
.episode h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
}
.episode .video-frame { width: 100%; margin: .9rem 0; }
.episode p { margin: 0; }
.episode .button { padding: .55rem 1.1rem; font-size: 1rem; }

.video-frame { /* vertical video (Facebook reel) */
  margin: 1.25rem 0;
  width: min(100%, 340px);
  aspect-ratio: 9 / 16;
  background: #120a05;
  border: 3px solid #120a05;
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--brass), 0 10px 20px rgba(0, 0, 0, .4);
  overflow: hidden;
}
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

/* about */
.facts {
  margin: 0;
  display: grid;
  gap: .9rem;
}
.facts dt { font-family: var(--display); font-size: 1.15rem; }
.facts dd { margin: .1rem 0 0; color: var(--ink-soft); }

/* contact form */
.form { display: grid; gap: 1.15rem; max-width: 36rem; }
.form label { display: block; margin-bottom: .3rem; font-weight: 700; }
.form .hint { font-weight: 400; color: var(--ink-soft); }
.form input,
.form textarea {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  color: var(--ink);
  background: #fbf5e3;
  border: 2px solid #8a6c3b;
  border-radius: 5px;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--ky-blue); }
.form .button { justify-self: start; font-family: var(--display); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--grain), linear-gradient(180deg, var(--walnut-800), #150b05);
  border-top: 3px solid var(--brass);
  padding-block: 1.6rem;
  font-size: 1.1rem;
  color: var(--cream-deep);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem 2rem;
}
.site-footer p { margin: 0; }
.site-footer strong { font-family: var(--display); font-weight: 400; color: var(--cream); }

/* ---------- small screens ---------- */

@media (max-width: 34rem) {
  body { font-size: 1.15rem; }
  .brand { font-size: 1.25rem; }
  .site-nav ul { gap: .25rem 1rem; }
  .site-nav a { font-size: 1.05rem; }
  .dial-labels { font-size: .85rem; }
  .dial-labels li:nth-child(even) { display: none; } /* 88 / 96 / 104 only on phones */
  .dial-face { padding-top: 1.9rem; }
  .readout { padding: .8rem 1rem; }
  .readout .info { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dial-needle { animation: none; }
}
