/* Open Echo -- design tokens (locked from ui-ux-pro-max vintage/serif steer + avatar art sampling)
   bg: #F2DDB4 (sampled off avatar/banner edge)   bg-deep: #E7CE9C (panel field)
   ink: #1C1712 (art's thick outline)   ring: #A99E86 (sampled off the art's grey echo rings)
   accent: #8B5E34 (aged brass, copy/hover state only)
   type: Spectral (serif, hero line + labels) + Fragment Mono (ticker/countdown/CA, exact-case, copy-safe)
   spacing: 8 / 16 / 24 / 40 / 64   radius: 0 (flat like the art; the badge's circle lives in the raster)
   motion: the art's own rings continued outward as a slow looping pulse, one real countdown, one flash at 0
*/

@font-face {
  font-family: 'Spectral';
  src: url('assets/fonts/spectral-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Spectral';
  src: url('assets/fonts/spectral-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fragment Mono';
  src: url('assets/fonts/fragment-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2ddb4;
  --bg-deep: #e7ce9c;
  --ink: #1c1712;
  --ring: #a99e86;
  --accent: #8b5e34;
  --line: rgba(28, 23, 18, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: 'Spectral', Georgia, serif;
  overflow: hidden;
}

.mono {
  font-family: 'Fragment Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.stage {
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2vh, 22px);
  padding: clamp(14px, 3vh, 32px) clamp(16px, 5vw, 40px);
}

.medallion-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: min(58vh, 70vw, 480px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.medallion {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--ring);
  background: transparent;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  z-index: 1;
  animation: echo-pulse 4.4s ease-out infinite;
}
.ring-a { animation-delay: 0s; }
.ring-b { animation-delay: -1.47s; }
.ring-c { animation-delay: -2.93s; }

@keyframes echo-pulse {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.55; }
  70% { opacity: 0.12; }
  100% { transform: translate(-50%, -50%) scale(1.85); opacity: 0; }
}

.medallion-wrap.flash .ring {
  animation-duration: 0.9s;
  animation-timing-function: ease-out;
  animation-iteration-count: 1;
}

.line {
  margin: 0;
  max-width: 46ch;
  text-align: center;
  font-size: clamp(0.92rem, 1.7vw + 0.6rem, 1.15rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
  flex: 0 0 auto;
}

.panel {
  flex: 0 0 auto;
  width: min(100%, 480px);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-label {
  font-family: 'Spectral', Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  opacity: 0.65;
  text-transform: lowercase;
}

.panel-value {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink);
}

.ca-value {
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  text-align: right;
  color: var(--ink);
  transition: color 150ms ease;
}
.ca-value:hover,
.ca-value:focus-visible {
  color: var(--accent);
}

.links-row {
  justify-content: flex-start;
  gap: 20px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.panel-link {
  font-family: 'Spectral', Georgia, serif;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.panel-link:hover,
.panel-link:focus-visible {
  border-bottom-color: var(--accent);
}

@media (max-width: 420px) {
  .panel { padding: 10px 14px; }
  .panel-label, .panel-value, .panel-link { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ring {
    animation: none;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.2;
  }
}
