/* ============================================================
   CONCRETE FLOWERS — ONDA · Electronic Garden
   Night Bloom Dark · Warm Amber · Garden Green
   ============================================================ */

:root {
  --ink: #090b08;          /* night bloom dark */
  --ink-2: #10140e;
  --concrete: #23271f;
  --concrete-lt: #3a4034;
  --amber: #e8a13c;        /* warm amber */
  --amber-hi: #ffc46b;
  --green: #5da163;        /* garden green */
  --green-deep: #2e5c3a;
  --bone: #ece7dc;
  --display: "Futura", "Jost", "Century Gothic", "Avenir Next", sans-serif;
  --body: "Avenir Next", "Jost", "Helvetica Neue", system-ui, sans-serif;
}

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

/* Chrome paints a light native button face unless appearance is reset */
button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
}

[hidden] { display: none !important; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- canvas ---------- */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background:
    radial-gradient(120% 90% at 50% 110%, #131a10 0%, transparent 55%),
    linear-gradient(180deg, #0a0c09 0%, #090b08 60%, #0c0f0a 100%);
}

#track {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---------- intro ---------- */

.intro {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vh, 20px);
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  z-index: 10;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, rgba(9, 11, 8, 0.55) 0%, rgba(9, 11, 8, 0.22) 42%, rgba(9, 11, 8, 0.72) 100%);
  opacity: 1;
  transition: opacity 1.1s ease, visibility 1.1s;
}

.intro.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.eyebrow {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(11px, 1.4vmin, 14px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--amber);
  opacity: 0.85;
  animation: rise 1.4s ease both;
}

.title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 8.5vmin, 92px);
  line-height: 1.04;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: var(--bone);
  text-shadow: 0 0 60px rgba(232, 161, 60, 0.18);
  animation: rise 1.4s 0.15s ease both;
}

.lede {
  max-width: 34em;
  font-size: clamp(15px, 2.1vmin, 18px);
  line-height: 1.65;
  font-weight: 400;
  color: rgba(236, 231, 220, 0.92);
  text-shadow: 0 1px 18px rgba(9, 11, 8, 0.7);
  animation: rise 1.4s 0.3s ease both;
}

.hint {
  font-family: var(--display);
  font-size: clamp(10px, 1.3vmin, 12px);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: rgba(236, 231, 220, 0.4);
  animation: rise 1.4s 0.55s ease both;
  margin-top: 4px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- tracklist ---------- */

.tracklist {
  list-style: none;
  width: min(100%, 34em);
  margin: 6px 0 0;
  padding: 8px;
  animation: rise 1.4s 0.4s ease both;
  text-align: left;
  background: rgba(9, 11, 8, 0.42);
  border: 1px solid rgba(236, 231, 220, 0.06);
  border-radius: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.tracklist li + li { margin-top: 2px; }

.track {
  width: 100%;
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr) auto 2.6em;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--bone);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.track:hover,
.track:focus-visible {
  background: rgba(232, 161, 60, 0.1);
  transform: translateX(2px);
}

.track:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 2px;
}

.track[data-visual="true"] {
  background: linear-gradient(90deg, rgba(93, 161, 99, 0.14), rgba(232, 161, 60, 0.05));
}

.track[data-visual="true"]:hover,
.track[data-visual="true"]:focus-visible {
  background: linear-gradient(90deg, rgba(93, 161, 99, 0.22), rgba(232, 161, 60, 0.1));
}

.track-num {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(236, 231, 220, 0.38);
}

.track-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.track-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(14px, 1.9vmin, 16px);
  letter-spacing: 0.06em;
}

.track-note {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.85;
}

.track-dur {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(236, 231, 220, 0.42);
  font-variant-numeric: tabular-nums;
}

.track-play {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(232, 161, 60, 0.45);
  color: var(--amber);
  overflow: hidden;
  flex: none;
}

.track-play svg {
  display: block;
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  max-width: 12px;
  max-height: 12px;
  margin-left: 1px;
}

.track[data-visual="true"] .track-play {
  border-color: rgba(93, 161, 99, 0.55);
  color: var(--green);
}

/* ---------- next-up countdown ---------- */

.next-up {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: min(92vw, 22em);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 24px 24px;
  text-align: center;
  background: rgba(9, 11, 8, 0.82);
  border: 1px solid rgba(232, 161, 60, 0.28);
  border-radius: 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 80px rgba(93, 161, 99, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.55);
}

.next-up-kicker {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--amber);
}

.next-up-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 3.6vmin, 28px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone);
  line-height: 1.3;
}

.next-up-note {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  min-height: 1.2em;
}

.next-up-ring {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  margin: 4px 0;
}

.next-up-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.next-up-track {
  fill: none;
  stroke: rgba(236, 231, 220, 0.12);
  stroke-width: 2;
}

.next-up-progress {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px rgba(232, 161, 60, 0.55));
  transition: stroke-dashoffset 0.9s linear;
}

.next-up-secs {
  position: relative;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.06em;
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

.next-up-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.next-up-btn {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-indent: 0.14em;
  text-transform: uppercase;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(236, 231, 220, 0.22);
  background: transparent;
  color: rgba(236, 231, 220, 0.75);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.next-up-btn:hover,
.next-up-btn:focus-visible {
  color: var(--bone);
  border-color: rgba(236, 231, 220, 0.45);
}

.next-up-btn:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 3px;
}

.next-up-btn-primary {
  border-color: rgba(232, 161, 60, 0.55);
  background: rgba(232, 161, 60, 0.12);
  color: var(--amber-hi);
}

.next-up-btn-primary:hover,
.next-up-btn-primary:focus-visible {
  background: rgba(232, 161, 60, 0.22);
  color: var(--amber-hi);
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px) calc(14px + env(safe-area-inset-bottom, 0px));
  opacity: 0.95;
  transition: opacity 0.6s ease;
  background: linear-gradient(180deg, transparent, rgba(9, 11, 8, 0.72));
}

.hud.idle { opacity: 0; }
.hud.idle:hover, .hud.idle:focus-within { opacity: 0.95; }

.hud-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 161, 60, 0.45);
  border-radius: 50%;
  background: rgba(9, 11, 8, 0.55);
  color: var(--amber);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.hud-btn:focus-visible {
  outline: 2px solid var(--amber-hi);
  outline-offset: 3px;
}

.hud-btn svg { width: 20px; height: 20px; }
.hud-btn .hud-play { display: none; }
body.paused #hud-toggle .hud-play { display: block; }
body.paused #hud-toggle .hud-pause { display: none; }

.hud-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hud-labels {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.hud-artist {
  flex: none;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
}

.hud-track {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 231, 220, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seek {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

.seek::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg,
    var(--amber) 0%,
    var(--amber) calc(var(--p, 0) * 1%),
    rgba(236, 231, 220, 0.18) calc(var(--p, 0) * 1%));
  border-radius: 2px;
}

.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--amber-hi);
  box-shadow: 0 0 8px rgba(232, 161, 60, 0.8);
}

.seek::-moz-range-track {
  height: 2px;
  background: rgba(236, 231, 220, 0.18);
  border-radius: 2px;
}

.seek::-moz-range-progress {
  height: 2px;
  background: var(--amber);
  border-radius: 2px;
}

.seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--amber-hi);
  box-shadow: 0 0 8px rgba(232, 161, 60, 0.8);
}

.seek:focus-visible { outline: 2px solid var(--amber-hi); outline-offset: 4px; border-radius: 4px; }

.clock {
  flex: none;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(236, 231, 220, 0.6);
  font-variant-numeric: tabular-nums;
}

/* ---------- calm / reduced-motion scene ---------- */

.calm-scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background:
    radial-gradient(100% 70% at 50% 115%, rgba(46, 92, 58, 0.35) 0%, transparent 62%),
    radial-gradient(80% 50% at 50% -15%, rgba(232, 161, 60, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0a0c09, #090b08);
}

.calm-glow {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 60vmin;
  height: 60vmin;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(232, 161, 60, 0.14) 0%, transparent 65%);
  border-radius: 50%;
}

.calm-flower {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: clamp(140px, 26vmin, 240px);
  transform: translateX(-50%);
  opacity: 0.9;
}

.calm-lyric {
  position: absolute;
  left: 50%;
  top: 30%;
  width: min(86vw, 22em);
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 4.6vmin, 44px);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
  color: var(--bone);
  opacity: 0;
  transition: opacity 1.1s ease;
}

.calm-lyric.on { opacity: 0.92; }
.calm-lyric.amber { color: var(--amber); }
.calm-lyric.green { color: var(--green); }

/* ---------- audio-only listen scene ---------- */

.listen-scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 24px 100px;
  text-align: center;
  background:
    radial-gradient(100% 70% at 50% 115%, rgba(46, 92, 58, 0.32) 0%, transparent 62%),
    radial-gradient(80% 50% at 50% -15%, rgba(232, 161, 60, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #0a0c09, #090b08);
}

.listen-glow {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 55vmin;
  height: 55vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232, 161, 60, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.listen-artist {
  position: relative;
  font-family: var(--display);
  font-size: clamp(12px, 1.8vmin, 14px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: var(--amber);
}

.listen-title {
  position: relative;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 4.8vmin, 42px);
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
  max-width: 16em;
  line-height: 1.35;
}

.listen-meta {
  position: relative;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
  color: rgba(236, 231, 220, 0.55);
}

body.mode-listen #scene { visibility: hidden; }

/* ---------- noscript ---------- */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  background: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

.noscript strong {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.2em;
}

/* ---------- responsive compositions ---------- */

/* vertical / portrait: tighter title, stacked rhythm */
@media (orientation: portrait) {
  .title { font-size: clamp(34px, 11vw, 72px); }
  .lede { max-width: 26em; font-size: clamp(15px, 3.8vw, 17px); }
  .calm-lyric { top: 26%; }
  .tracklist { width: min(100%, 28em); }
}

/* very wide 16:9+ screens: let the title breathe */
@media (min-aspect-ratio: 16/9) {
  .title { letter-spacing: 0.2em; text-indent: 0.2em; }
}

/* short landscape phones */
@media (orientation: landscape) and (max-height: 480px) {
  .intro { gap: 6px; justify-content: flex-start; padding-top: 12px; }
  .lede { display: none; }
  .title { font-size: clamp(28px, 8vh, 48px); }
  .track { padding: 7px 10px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .title, .lede, .hint, .tracklist { animation: none; }
  .intro { transition: opacity 0.9s ease, visibility 0.9s; }
  .track:hover, .track:focus-visible { transform: none; }
  .next-up-progress { transition: none; }
}
