/* Landing page. Reuses the app's paper/ink/brass tokens; adds the lit-glass
   colours for the "studio" hero. The tuner is the one showpiece, everything
   else stays quiet. */

.landing {
  --ink-deep: #1a140e;
  --glass: #14100b;
  --brass-lit: #e8b866;
  --lamp: #e5533f;
  --on-dark: #f6f1e7;
  --on-dark-soft: rgba(246, 241, 231, 0.74);
  --line-dark: rgba(232, 184, 102, 0.28);
  --line-paper: #d8cfbb;
  outline: none;
}
.landing .wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.landing h1,
.landing h2,
.landing h3 { font-family: var(--font-display); color: inherit; }
.landing h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  font-weight: 700;
}
.landing section { padding-block: clamp(3.5rem, 9vw, 7rem); }

/* ---------- studio (hero) ---------- */

.landing .studio {
  position: relative;
  background: var(--ink-deep);
  color: var(--on-dark);
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}
/* A lit-room glow behind the headline's right shoulder, so the empty side of the
   hero reads as light, not leftover space. */
.studio::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 38rem 24rem at 82% 22%, rgba(232, 184, 102, 0.2), transparent 70%),
    radial-gradient(ellipse 22rem 14rem at 92% 8%, rgba(229, 83, 63, 0.1), transparent 70%);
  pointer-events: none;
}
.studio .wrap { position: relative; }
.studio h1 {
  font-size: clamp(2.9rem, 9.5vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 1.25rem;
  max-width: 11ch;
}
.studio-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  color: var(--on-dark-soft);
  max-width: 34rem;
  margin: 0;
}
.studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.75rem; }
.landing .cta {
  margin: 0;
  padding: 0.85rem 1.9rem;
  font-size: 1.05rem;
  background: var(--brass-lit);
  color: var(--ink-deep);
  box-shadow: 0 0 0 0 rgba(232, 184, 102, 0);
  transition: box-shadow 0.25s, transform 0.15s;
}
.landing .cta:hover { filter: none; box-shadow: 0 0 28px rgba(232, 184, 102, 0.45); }
.landing .cta:active { transform: translateY(1px); }
.link-quiet { color: var(--on-dark-soft); text-underline-offset: 4px; }
.link-quiet:hover { color: var(--on-dark); }
.studio-fine { margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--on-dark-soft); }

.landing a:focus-visible,
.landing button:focus-visible { outline: 3px solid var(--brass-lit); outline-offset: 3px; border-radius: 4px; }

/* today: goal + streak, signed-in only */
.today {
  display: grid;
  gap: 0.9rem 2.5rem;
  grid-template-columns: minmax(0, 20rem) 1fr;
  align-items: center;
  margin-top: 2rem;
  max-width: 44rem;
}
@media (max-width: 640px) { .today { grid-template-columns: 1fr; } }
.today p { margin: 0 0 0.45rem; color: var(--on-dark-soft); }
.today strong { color: var(--on-dark); }
.today-streak { margin: 0; }
.today-streak b { color: var(--on-dark); font-variant-numeric: tabular-nums; }
.today-streak.safe { color: #86c9a3; }
.today-streak.risk { color: var(--on-dark); }
.studio .goal-bar { height: 0.5rem; border-radius: 999px; background: rgba(246, 241, 231, 0.14); overflow: hidden; }
.studio .goal-bar > i { display: block; height: 100%; background: var(--brass-lit); border-radius: inherit; transition: width 0.4s ease; }
.today.met .goal-bar > i { background: #86c9a3; }
.today.met strong { color: #86c9a3; }

.lamp {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #4a2d27;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
  margin-right: 0.55rem;
  vertical-align: baseline;
  transition: background 0.5s, box-shadow 0.5s;
}
.lamp.on {
  background: var(--lamp);
  box-shadow: 0 0 10px 2px rgba(229, 83, 63, 0.65);
}
.urgent .lamp.on { animation: lamp-pulse 2.4s ease-in-out infinite; }
@keyframes lamp-pulse { 50% { box-shadow: 0 0 16px 5px rgba(229, 83, 63, 0.85); } }

/* ---------- the tuner ---------- */

.tuner-wrap { margin-top: clamp(2rem, 5vw, 3.25rem); }
.tuner {
  position: relative;
  height: clamp(8.5rem, 19vw, 12rem);
  border-radius: 16px;
  border: 1px solid var(--line-dark);
  background: linear-gradient(180deg, #2a2014 0%, var(--glass) 100%);
  box-shadow: inset 0 0 48px rgba(232, 184, 102, 0.1), 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.tuner-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(232, 184, 102, 0.42), rgba(232, 184, 102, 0.08) 55%, transparent 75%);
  opacity: 1;
}
.tuner.warming .tuner-glow { animation: warm 2.6s ease-out both; }
@keyframes warm { from { opacity: 0.05; } to { opacity: 1; } }

.tuner-scale { position: absolute; inset: 0; pointer-events: none; }
/* minor ticks along the top edge */
.tuner-scale::before {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: 10%;
  height: 14%;
  background: repeating-linear-gradient(90deg, rgba(232, 184, 102, 0.5) 0 1px, transparent 1px 1.4%);
}
.tuner-scale span {
  position: absolute;
  bottom: 9%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.8rem, 1.6vw, 1.05rem);
  color: var(--brass-lit);
  opacity: 0.85;
}

.tuner-ticks { position: absolute; inset: 0; }
.tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(1.6rem, 3.4vw, 2.2rem);
  transform: translateX(-50%);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 30%;
  height: 40%;
  width: 2px;
  margin-left: -1px;
  background: var(--brass-lit);
  opacity: 0.55;
  transition: opacity 0.2s, top 0.2s, height 0.2s;
}
.tick:hover::before,
.tick[aria-pressed="true"]::before { opacity: 1; top: 24%; height: 50%; }

.tuner-needle {
  position: absolute;
  top: 5%;
  bottom: 24%; /* stops above the numerals so it never runs through one */
  width: 2px;
  margin-left: -1px;
  background: var(--lamp);
  box-shadow: 0 0 14px 2px rgba(229, 83, 63, 0.75);
  pointer-events: none;
  transition: left 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}
.tuner-needle::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lamp);
}

.tuner-read { display: flex; align-items: center; gap: 1rem; margin-top: 1.1rem; }
.tuner-now { flex: 1; margin: 0; min-width: 0; line-height: 1.25; }
.tuner-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  margin-right: 0.75rem;
}
.tuner-meta { color: var(--on-dark-soft); font-size: 0.95rem; }
.tuner-step {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  background: transparent;
  color: var(--brass-lit);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.tuner-step:hover { background: rgba(232, 184, 102, 0.14); }

/* ---------- how a lesson works ---------- */

.how { background: var(--paper); }
.how-grid { display: grid; gap: 2.5rem 4rem; grid-template-columns: 5fr 7fr; align-items: start; }
@media (max-width: 860px) { .how-grid { grid-template-columns: 1fr; } }
.how-head p { color: var(--ink-soft); line-height: 1.6; max-width: 30rem; margin: 0; font-size: 1.05rem; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  gap: 0 1rem;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-paper);
}
.steps li:last-child { border-bottom: 1px solid var(--line-paper); }
@media (max-width: 520px) {
  .steps li { grid-template-columns: 2.5rem 1fr; }
  .steps li > :nth-child(3) { grid-column: 2; margin-top: 0.75rem; }
}
.step-n { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--brass); }
.steps h3 { margin: 0 0 0.25rem; font-size: 1.35rem; }
.steps p { margin: 0; color: var(--ink-soft); line-height: 1.5; max-width: 24rem; }

.wave { display: inline-flex; align-items: center; gap: 3px; height: 2.25rem; }
.wave i { display: block; width: 3px; border-radius: 2px; background: var(--ink); height: 30%; }
.wave i:nth-child(1) { height: 25%; } .wave i:nth-child(2) { height: 55%; } .wave i:nth-child(3) { height: 85%; }
.wave i:nth-child(4) { height: 45%; } .wave i:nth-child(5) { height: 100%; } .wave i:nth-child(6) { height: 70%; }
.wave i:nth-child(7) { height: 90%; } .wave i:nth-child(8) { height: 40%; } .wave i:nth-child(9) { height: 65%; }
.wave i:nth-child(10) { height: 30%; } .wave i:nth-child(11) { height: 20%; }
.meter { display: inline-block; width: 6rem; height: 0.55rem; border-radius: 999px; background: var(--paper-dim); overflow: hidden; }
.meter i { display: block; width: 62%; height: 100%; background: var(--signal-green); border-radius: inherit; }
.mini-words { display: inline-flex; gap: 0.6rem; font-weight: 400; }
.mini-words b { font-weight: 400; border-bottom: 4px solid; padding-bottom: 0.1rem; }
.mini-words .g { border-color: var(--signal-green); }
.mini-words .y { border-color: var(--brass); }
.mini-words .r { border-color: var(--tube-red); }

/* ---------- example result ---------- */

.result { background: var(--paper-dim); }
.result-grid { display: grid; gap: 2.5rem 4rem; grid-template-columns: 5fr 6fr; align-items: center; }
@media (max-width: 860px) { .result-grid { grid-template-columns: 1fr; } }
.result-copy p { color: var(--ink-soft); line-height: 1.6; max-width: 30rem; margin: 0; font-size: 1.05rem; }
.take {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #fffdf8;
  border: 1px solid var(--line-paper);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(43, 36, 28, 0.12);
}
.take-top { display: flex; align-items: center; gap: 0.9rem; }
.take-who { display: flex; flex-direction: column; line-height: 1.25; }
.take-who span { color: var(--ink-soft); font-size: 0.9rem; }
.take .dial .needle { transition: transform 1.1s cubic-bezier(0.3, 1.4, 0.5, 1); }
.take-line { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.6; margin: 1.1rem 0 0.9rem; }
.take figcaption { margin-top: 1.1rem; font-size: 0.85rem; color: var(--static-gray); }

/* ---------- the broadcasts ---------- */

.stations { background: var(--paper); }
.stations-sub { margin: 0 0 2rem; color: var(--ink-soft); font-size: 1.05rem; }
.station-list { list-style: none; margin: 0; padding: 0; columns: 2 22rem; column-gap: 4rem; }
.station-list li { break-inside: avoid; }
.station-list a {
  display: grid;
  grid-template-columns: 1fr auto 4.5rem;
  gap: 0 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line-paper);
  color: var(--ink);
  text-decoration: none;
}
.station-list a:hover .st-title { color: var(--brass); }
.st-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; transition: color 0.15s; }
.st-year, .st-lines { color: var(--ink-soft); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.st-lines { text-align: right; }
.landing .stations a:focus-visible { outline-color: var(--brass); }

/* ---------- closing ---------- */

.closer { background: var(--ink-deep); color: var(--on-dark); }
.closer h2 { max-width: 16ch; }
.closer p { color: var(--on-dark-soft); max-width: 32rem; margin: 0; line-height: 1.55; font-size: 1.1rem; }
.closer .cta { margin-top: 1.75rem; }
.closer .closer-more { margin-top: 2.25rem; font-size: 0.95rem; }
.closer a:not(.cta) { color: var(--on-dark); text-underline-offset: 3px; }
.closer a:not(.cta):hover { color: var(--brass-lit); }

@media (prefers-reduced-motion: reduce) {
  .tuner.warming .tuner-glow { animation: none; }
  .tuner-needle { transition: none; }
  .urgent .lamp.on { animation: none; }
  .take .dial .needle { transition: none; }
}
