/* Echorie: the coming-soon page shown before launch. */

:root {
  --bg: #140e11;
  --cream: #fff1e3;
  --muted: #c4b1ab;
  --red: #ff4a3d;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

/* The overscroll (rubber-band) area matches the page. */
html { background: #140e11; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font);
  overflow-x: hidden;
}

/* The moving audio background: echo rings, spectrum bars, rising bubbles and typed phrases (drawn by construction.js). */
.waves {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  animation: fade-in 2s ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stage {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* More room below than above, so the centered content sits a little higher on the page. */
  padding: 32px 16px clamp(56px, 12vh, 140px);
  isolation: isolate;
  overflow: clip;
}

/* A slow, breathing wash of the brand colors behind everything. */
.glow {
  position: absolute;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(30% 35% at 30% 45%, rgba(255, 148, 64, 0.32), transparent 70%),
    radial-gradient(32% 38% at 70% 50%, rgba(236, 59, 79, 0.34), transparent 70%),
    radial-gradient(28% 32% at 55% 70%, rgba(146, 72, 216, 0.3), transparent 70%);
  filter: blur(20px);
  animation: breathe 12s ease-in-out infinite alternate;
}

@keyframes breathe {
  0% { transform: scale(1) rotate(0deg); opacity: 0.55; }
  50% { transform: scale(1.08) rotate(4deg); opacity: 0.75; }
  100% { transform: scale(0.96) rotate(-3deg); opacity: 0.6; }
}

.title { margin: 0; width: min(92vw, 820px); }
.title img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 60px rgba(236, 59, 79, 0.45));
  animation: arrive 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both, hover 7s ease-in-out 1.4s infinite;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tagline, .status, .footer p { text-shadow: 0 1px 3px rgba(20, 14, 17, 0.9), 0 0 18px rgba(20, 14, 17, 0.85); }

.tagline {
  margin: clamp(72px, 14vh, 140px) 0 36px;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  color: var(--muted);
  animation: fade-up 1s ease 0.6s both;
}

/* The progress indicator: Echorie's own hardware-style time display and stereo meter. */
.recorder {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 232, 220, 0.12);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9);
  animation: fade-up 1s ease 0.9s both;
}

.display, .meter {
  background: #2b2b2b;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.display {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 18px;
  min-width: 200px;
}

.rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--red);
  opacity: 0.85;
}
.rec i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.clock {
  font-size: 2rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--red);
  text-shadow: 0 0 10px rgba(255, 74, 61, 0.55);
  letter-spacing: 0.02em;
}

.meter {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  width: 200px;
}

.channel { display: flex; align-items: center; gap: 4px; }

.bar {
  flex: 1;
  height: 6px;
  border-radius: 6px;
  background: #474747;
  position: relative;
  overflow: hidden;
}
.bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #5ccc66 0%, #5ccc66 62%, #f5dc4d 82%, #fa9e38 100%);
  clip-path: inset(0 calc(100% - var(--level, 0%)) 0 0);
  transition: clip-path 0.09s linear;
}

.clip { width: 8px; height: 6px; border-radius: 2px; background: rgba(255, 74, 61, 0.25); transition: background-color 0.2s ease; }
.clip.on { background: var(--red); box-shadow: 0 0 6px var(--red); }

.status {
  margin: 30px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 1rem;
  animation: fade-up 1s ease 1.2s both;
}

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

.footer { position: relative; z-index: 1; text-align: center; padding: 18px 16px 28px; color: var(--muted); font-size: 0.85rem; }
.footer p { margin: 0; }
.footer a { color: var(--cream); text-underline-offset: 3px; }
.footer a:hover { color: #ffd2ae; }
.footer a:focus-visible { outline: 3px solid #ff9440; outline-offset: 3px; border-radius: 4px; }

@media (max-width: 520px) {
  .recorder { flex-direction: column; width: min(100%, 320px); }
  .display { min-width: 0; width: 100%; justify-content: center; }
  .meter { width: 100%; }
}

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