@font-face {
  font-family: 'Broadway';
  src: url('fonts/Broadway-Regular.woff2') format('woff2');
  font-display: swap;
}

:root {
  --black: #0d0d0d;
  --charcoal: #1a1a1a;
  --mid: #2e2e2e;
  --grey: #4a4a4a;        /* lines, dots, surfaces — never text */
  --text-3: #8a8a8a;      /* tertiary text, 5.6:1 on black (min 4.5:1) */
  --text-2: #a8a8a8;      /* secondary text, 8.2:1 */
  --light: #c8c8c8;
  --off-white: #e8e8e8;
  --accent: #5b7fa6;
  --font-brand: 'Broadway', Georgia, serif;
  --font-serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif', Georgia, 'Times New Roman', serif;
  --fade: 900ms;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  transition: filter 4s ease;
}

body.night { filter: brightness(0.92); }

/* ── top ─────────────────────────────────────────────────────────────── */
.top {
  display: flex;
  justify-content: center;
  padding: 36px 24px 0;
}
.purpose {
  margin: 0;
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--off-white);
  text-align: center;
}

/* ── stage ───────────────────────────────────────────────────────────── */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 24px;
  text-align: center;
  opacity: 0;
  transition: opacity var(--fade) ease;
  will-change: opacity;
}
.stage.in { opacity: 1; }

.cover {
  margin: 0 0 30px;
  width: min(62vw, 46vh, 520px);
  aspect-ratio: 1 / 1;
  position: relative;
  background: var(--charcoal);
  overflow: hidden;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.title {
  font-weight: 400;
  font-size: clamp(22px, 3.2vw, 34px);
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--off-white);
}
.title.accent { color: var(--accent); }

.release {
  margin: 0 0 18px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

.clock {
  margin: 0 0 30px;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── player ──────────────────────────────────────────────────────────── */
.player {
  width: min(92vw, 520px);
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--charcoal);
  margin-bottom: 28px;
}
.player iframe { display: block; border: 0; width: 100%; height: 80px; }

/* ── actions ─────────────────────────────────────────────────────────── */
.actions {
  display: flex;
  gap: 28px;
}
.link {
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--text-2);
  background: none;
  border: 0;
  padding: 12px 6px;   /* ≥ 44 px touch target */
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 300ms ease, border-color 300ms ease;
}
.link:hover, .link:focus-visible {
  color: var(--off-white);
  border-bottom-color: var(--text-3);
  outline: none;
}

/* ── bottom ──────────────────────────────────────────────────────────── */
.bottom {
  padding: 8px 24px 30px;
  text-align: center;
}
.wordmark {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--light);
  text-decoration: none;
  padding: 10px 8px;     /* touch target */
  transition: color 300ms ease;
}
.wordmark span { display: inline-block; width: 0.9em; }
.wordmark:hover, .wordmark:focus-visible { color: var(--off-white); outline: none; }

/* ── silence ─────────────────────────────────────────────────────────── */
.silence {
  position: fixed;
  inset: 0;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 6s ease;
  z-index: 10;
}
.silence.on { opacity: 1; pointer-events: auto; }
.dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--mid);
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 200ms !important; animation: none !important; }
}

@media (max-width: 480px) {
  .top { padding-top: 26px; }
  .purpose { font-size: 19px; }
  .wordmark { font-size: 18px; }
  .cover { width: min(72vw, 40vh); margin-bottom: 24px; }
  .actions { gap: 20px; }
}
