/* The Deck — CDO Games
   Timber / brass / radio. Art Director plates are the look.
   Timber deep #1A1410 · Timber mid #2B2118 · Brass #C4A35A · Brass dull #8A7344
   Card #E6DCC8 · Ink #1C1612 · Live #6B8F4E · Archive #5C5348 */

@font-face {
  font-family: "Oswald";
  src: url("../fonts/Oswald-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("../fonts/Oswald-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("../fonts/Oswald-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("../fonts/Oswald%5Bwght%5D.ttf") format("truetype");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --timber-deep: #1A1410;
  --timber-mid: #2B2118;
  --brass: #C4A35A;
  --brass-dull: #8A7344;
  --card: #E6DCC8;
  --ink: #1C1612;
  --live: #6B8F4E;
  --archive: #5C5348;
  --display: "Oswald", "Gill Sans", "Trebuchet MS", sans-serif;
}

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

html {
  background-color: var(--timber-deep);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--brass);
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.4;
  background-color: var(--timber-deep);
  background-image: url("../art/board.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.25rem 1.15rem 0.65rem;
}

.wordmark-rail {
  width: min(calc(100% - 1.75rem), 768px);
  height: auto;
  padding: 0.35rem 0.5rem 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.wordmark {
  display: block;
  width: 90%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.callsign {
  margin: 0.7rem 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--brass);
}

.stations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: min(calc(100% - 2rem), 1600px);
  margin: 1.1rem auto 2.5rem;
  padding: 0;
  justify-items: center;
}

.station {
  position: relative;
  display: block;
  width: min(100%, 768px);
  max-width: 1536px;
  aspect-ratio: 1536 / 1024;
  container-type: inline-size;
  text-decoration: none;
  color: var(--ink);
}

.station-face {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1536 / 1024;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/*
  Pip masters are 1536×1024 with a centered lamp (~605px on live).
  Well is 11.7% of station width; size the <img> so that circle fills the well.
  11.7% / (605/1536) ≈ 29.7%
*/
.station-pip {
  position: absolute;
  left: 81.8%;
  top: 21.7%;
  width: 29.7%;
  aspect-ratio: 1536 / 1024;
  transform: translate(-50%, -50%);
  object-fit: contain;
  mix-blend-mode: darken;
  z-index: 2;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.station-card {
  position: absolute;
  left: 11.6%;
  right: 10.7%;
  top: 36.3%;
  bottom: 12.5%;
  padding: 1.8%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28em;
  color: var(--ink);
}

.station-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.1rem, 5.4cqw, 2.15rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.12;
}

.station-line {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(0.82rem, 3.15cqw, 1.18rem);
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.3;
}

.station-launched {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(0.7rem, 2.3cqw, 0.92rem);
  letter-spacing: 0.04em;
  color: var(--brass-dull);
}

.station:focus {
  outline: none;
}

.station:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}

@media (hover: hover) {
  .station:hover {
    outline: 2px solid var(--brass);
    outline-offset: 4px;
  }
}

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

.radio-note {
  margin: 0.4rem 0 0;
  padding: 0.5rem 0.15rem;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  color: var(--brass);
  min-height: 3.5rem;
  display: flex;
  align-items: center;
}

.radio-note::before {
  content: "— ";
  color: var(--brass);
  font-style: normal;
  letter-spacing: 0;
}

@media (min-width: 720px), (orientation: landscape) and (min-width: 600px) {
  .stations {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.85rem;
  }

  .stations:has(.station:only-of-type),
  .stations:has(.radio-note:only-child) {
    grid-template-columns: 1fr;
  }

  .radio-note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 2800px) {
  .wordmark-rail {
    width: min(calc(100% - 3rem), 1536px);
    padding: 2.25rem 2.5rem 1.85rem;
  }

  .stations {
    width: min(calc(100% - 4rem), 3200px);
    gap: 2.25rem 2.5rem;
  }

  .station {
    width: min(100%, 1536px);
  }
}

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