/* amble.channel — shared tokens + homepage
   Aesthetic: field notes on warm paper (the platform) that tune into
   late-night broadcast (the channels). Fraunces + IBM Plex Mono. */

:root {
  /* paper world (homepage) */
  --paper: #f2e8d5;
  --paper-deep: #e9dcc3;
  --ink: #241a10;
  --ink-soft: #5a4a37;
  --rule: #cdbc9e;

  /* broadcast world (channel pages + dark band) */
  --night: #120e08;
  --night-2: #1b1610;
  --cream: #efe3cb;
  --cream-dim: #a99878;

  /* signals */
  --amber: #e19b3c;      /* dial light */
  --amber-hot: #f0b45a;
  --onair: #d8442e;      /* the lamp */
  --operator: #9dc06a;   /* you're home */

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--amber); color: var(--night); }

a { color: inherit; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- masthead ---------- */

.masthead {
  padding: calc(var(--gutter) * 0.75) var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
}

.masthead .wordmark {
  font-weight: 640;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.masthead .wordmark .tld { color: var(--amber); font-style: italic; }

.masthead nav { display: flex; gap: 1.6rem; }
.masthead nav a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 160ms ease;
}
.masthead nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(3.5rem, 9vh, 7rem) var(--gutter) clamp(2.5rem, 6vh, 4.5rem);
  max-width: 72rem;
  margin: 0 auto;
}

.hero .kicker {
  color: var(--ink-soft);
  display: block;
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5.6rem);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -0.022em;
  max-width: 18ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-weight: 420;
  color: var(--amber);
  filter: saturate(1.1) brightness(0.82);
}

.hero .dek {
  margin-top: 1.8rem;
  max-width: 46ch;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* frequency ruler under the hero — the dial */
.dial {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  overflow: hidden;
  border-block: 1px solid var(--rule);
  padding-block: 0.55rem;
  user-select: none;
}
.dial-track {
  display: flex;
  gap: 3.2rem;
  white-space: nowrap;
  width: max-content;
  animation: dial-drift 46s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dial-track .live { color: var(--onair); }
@keyframes dial-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .dial-track { animation: none; }
}

/* ---------- signal sections ---------- */

.signals {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) var(--gutter);
  display: grid;
  gap: clamp(2.5rem, 6vh, 4.5rem);
}

.signal {
  display: grid;
  grid-template-columns: minmax(7.5rem, 12rem) 1fr;
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: start;
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.5rem, 3vh, 2.25rem);
}
@media (max-width: 40rem) {
  .signal { grid-template-columns: 1fr; gap: 0.9rem; }
}

.signal > .mono { color: var(--amber); filter: brightness(0.7) saturate(1.2); }

.signal h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem);
  font-weight: 560;
  letter-spacing: -0.015em;
  line-height: 1.12;
  max-width: 24ch;
  text-wrap: balance;
}

.signal p {
  margin-top: 0.9rem;
  max-width: var(--measure);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.signal p strong { color: var(--ink); font-weight: 600; }

.signal .aside {
  margin-top: 1.1rem;
  font-size: 0.9em;
  font-style: italic;
}

/* plays — the shareable unit, shown as index cards */
.plays {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.9rem;
}
.play-card {
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.95rem 1rem 1.05rem;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.play-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(36, 26, 16, 0.45);
}
.play-card .mono { color: var(--ink-soft); display: block; margin-bottom: 0.45rem; }
.play-card b { font-weight: 620; font-size: 1.02rem; letter-spacing: -0.01em; }
.play-card p { margin-top: 0.35rem; font-size: 0.86rem; line-height: 1.45; color: var(--ink-soft); }

/* ---------- the dark band: claim your channel ---------- */

.band {
  background: var(--night);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.band::after {
  /* faint scanlines */
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.22) 2px 3px
  );
  opacity: 0.35;
}

.band-inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter);
}

.band .mono { color: var(--amber); }

.band h2 {
  margin-top: 1.2rem;
  font-size: clamp(2rem, 1.3rem + 3.4vw, 4rem);
  font-weight: 540;
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 20ch;
  text-wrap: balance;
}
.band h2 em { font-style: italic; color: var(--amber-hot); }

.band p {
  margin-top: 1.4rem;
  max-width: 52ch;
  color: var(--cream-dim);
  text-wrap: pretty;
}

.claim {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
.claim .url {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.9rem + 1vw, 1.5rem);
  background: var(--night-2);
  border: 1px solid #362c1e;
  border-radius: 4px;
  padding: 0.75rem 1.1rem;
  color: var(--cream-dim);
  display: inline-flex;
  align-items: baseline;
}
.claim .url .you {
  color: var(--amber-hot);
  border-bottom: 1px dashed var(--amber);
  animation: tuner 3.2s steps(1) infinite;
}
@keyframes tuner {
  0%   { content: ""; }
}
.claim .note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.claim .note b { color: var(--operator); font-weight: 500; }

/* channel directory — one channel so far */
.directory {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  border-top: 1px solid #2b2317;
  padding-top: 1.6rem;
}
.directory .mono { color: var(--cream-dim); }

.channel-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  padding: 1.05rem 1.2rem;
  background: var(--night-2);
  border: 1px solid #362c1e;
  border-radius: 4px;
  max-width: 34rem;
  transition: border-color 180ms ease, transform 180ms ease;
}
.channel-row:hover { border-color: var(--amber); transform: translateX(4px); }
.channel-row .num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--amber);
  white-space: nowrap;
}
.channel-row .name {
  font-weight: 560;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.channel-row .status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.channel-row .status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4a4030;
}
.channel-row.on-air .status { color: var(--onair); }
.channel-row.on-air .status::before {
  background: var(--onair);
  box-shadow: 0 0 8px 1px rgba(216, 68, 46, 0.7);
  animation: lamp 1.6s ease-in-out infinite;
}
@keyframes lamp { 50% { opacity: 0.55; } }

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

footer {
  border-top: 1px solid var(--rule);
  padding: 2rem var(--gutter) 2.6rem;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  justify-content: space-between;
  align-items: baseline;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
footer .credo { font-style: italic; max-width: 44ch; }
footer .mono a { text-decoration: none; }
footer .mono a:hover { color: var(--ink); }

/* ---------- load reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(0.2, 0.65, 0.25, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}
