:root {
  --bg: #0b0806;
  --ink: #ecd9b4;
  --ink-dim: #a08a68;
  --ink-faint: rgba(160, 138, 104, 0.55);
  --accent: #f0a94f;
  --accent-soft: #ffd9a0;
  --line: rgba(240, 169, 79, 0.28);
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --display: 'Cinzel', 'EB Garamond', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.candle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/></svg>");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 32%, rgba(0, 0, 0, 0.5) 72%, rgba(0, 0, 0, 0.86) 100%);
}

.app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  text-align: center;
}

.app-header {
  position: absolute;
  top: clamp(1.25rem, 4vh, 2.5rem);
  left: 0;
  right: 0;
  width: 100%;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  pointer-events: none;
}

.title {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  color: var(--ink);
  margin: 0;
}

.tagline {
  margin: 1rem 0 0;
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--ink-dim);
}

.tagline-ref {
  font-style: normal;
  font-family: var(--display);
  letter-spacing: 0.14em;
  font-size: 0.78em;
  color: var(--ink-faint);
}

.app-main {
  width: 100%;
  max-width: 64rem;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(4.5rem, 12vh, 7rem) 0;
}

.sealed {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.seal {
  width: clamp(10rem, 26vw, 13rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--accent);
  box-shadow:
    0 0 0 8px rgba(240, 169, 79, 0.05),
    0 0 0 9px rgba(240, 169, 79, 0.16) inset,
    0 0 60px rgba(240, 169, 79, 0.12);
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(240, 169, 79, 0.09), rgba(0, 0, 0, 0) 70%);
}

.seal svg {
  width: 34%;
  height: 34%;
  display: block;
  opacity: 0.85;
}

.seal-caption {
  margin: 1.6rem 0 0;
  font-family: var(--display);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--ink-dim);
}

.seek-btn {
  margin-top: 2.2rem;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  font-size: 0.82rem;
  color: var(--accent-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.95rem 2.6rem;
  cursor: pointer;
  animation: seal-breathe 3.2s ease-in-out infinite;
  transition:
    box-shadow 0.5s,
    background 0.5s,
    border-color 0.5s,
    color 0.5s;
}

.seek-btn:hover {
  box-shadow:
    0 0 24px rgba(240, 169, 79, 0.35),
    inset 0 0 18px rgba(240, 169, 79, 0.12);
  background: rgba(240, 169, 79, 0.06);
  border-color: rgba(240, 169, 79, 0.55);
  color: #fff0d4;
}

.seek-btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.seek-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

@keyframes seal-breathe {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(240, 169, 79, 0.12);
  }
  50% {
    box-shadow: 0 0 26px rgba(240, 169, 79, 0.3);
  }
}

.reveal-label {
  font-family: var(--display);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--ink-dim);
  margin: 0 0 1.8rem;
}

.verse {
  max-width: 46rem;
  margin: 0 auto;
  animation: rise 1.6s ease-out both;
}

.verse-text {
  font-size: clamp(1.35rem, 4.2vw, 2.3rem);
  line-height: 1.55;
  color: var(--accent-soft);
  font-style: italic;
  margin: 0;
}

.verse-text::first-letter {
  font-size: 2.6em;
  float: left;
  line-height: 0.9;
  padding-right: 0.12em;
  color: var(--accent);
  font-style: normal;
}

.verse-ref {
  margin: 1.6rem 0 0;
  font-family: var(--display);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--accent);
  font-size: 0.9rem;
}

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

.app-footer {
  position: absolute;
  bottom: clamp(1.25rem, 4vh, 2.5rem);
  left: 0;
  right: 0;
  width: 100%;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  pointer-events: none;
}

.countdown {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}

.countdown strong {
  color: var(--accent-soft);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.foot-note {
  margin: 0.6rem 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@media (prefers-reduced-motion: reduce) {
  .seek-btn,
  .verse {
    animation: none;
  }
}