:root {
  --parchment: #e9dab4;
  --parchment-light: #f3e8c9;
  --parchment-shadow: #cbb384;
  --ink: #2b1a0d;
  --ink-soft: #5a4326;
  --wood: #4a2f1a;
  --wood-dark: #2a1a0d;
  --wood-light: #6b452a;
  --ember: #a5301f;
  --ember-bright: #d94f2f;
  --gold: #a97728;
  --gold-bright: #d9a84e;

  --font-display: 'Cinzel', 'Trajan Pro', serif;
  --font-body: 'EB Garamond', 'Iowan Old Style', serif;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;

  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 20% 15%, rgba(217, 168, 78, 0.16), transparent 42%),
    radial-gradient(ellipse at 82% 20%, rgba(165, 48, 31, 0.12), transparent 46%),
    radial-gradient(ellipse at 50% 105%, rgba(74, 47, 26, 0.22), transparent 55%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(42, 26, 13, 0.28) 100%);
}

/* subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

/* drifting embers */
.embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.embers span {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bright) 0%, var(--ember) 70%, transparent 100%);
  box-shadow: 0 0 6px 1px rgba(217, 168, 78, 0.7);
  animation: drift 9s linear infinite;
  opacity: 0;
}

.embers span:nth-child(1) { left: 8%;  animation-delay: 0.2s;  animation-duration: 10s; }
.embers span:nth-child(2) { left: 22%; animation-delay: 2.4s;  animation-duration: 8s; }
.embers span:nth-child(3) { left: 38%; animation-delay: 4.8s;  animation-duration: 11s; }
.embers span:nth-child(4) { left: 55%; animation-delay: 1.1s;  animation-duration: 9s; }
.embers span:nth-child(5) { left: 69%; animation-delay: 3.6s;  animation-duration: 10s; }
.embers span:nth-child(6) { left: 83%; animation-delay: 5.9s;  animation-duration: 8.5s; }
.embers span:nth-child(7) { left: 93%; animation-delay: 0.8s;  animation-duration: 9.5s; }

@keyframes drift {
  0%   { transform: translateY(0) translateX(0) scale(0.6); opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { transform: translateY(-48vh) translateX(12px) scale(1); }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-92vh) translateX(-8px) scale(0.4); opacity: 0; }
}

.stage {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 32px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 640px;
  padding: 52px 44px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;

  background: linear-gradient(180deg, var(--parchment-light), var(--parchment));
  border: 2px solid var(--wood);
  border-radius: 4px;
  box-shadow:
    0 0 0 6px var(--parchment),
    0 0 0 8px var(--wood-light),
    0 20px 50px rgba(42, 26, 13, 0.35),
    inset 0 0 60px rgba(107, 69, 42, 0.12);
}

.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: '';
  position: absolute;
  background: var(--gold);
}

.corner::before { width: 100%; height: 2px; top: 0; left: 0; }
.corner::after  { width: 2px; height: 100%; top: 0; left: 0; }

.corner-tl { top: -12px; left: -12px; }
.corner-tr { top: -12px; right: -12px; transform: scaleX(-1); }
.corner-bl { bottom: -12px; left: -12px; transform: scaleY(-1); }
.corner-br { bottom: -12px; right: -12px; transform: scale(-1, -1); }

.logo-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.logo {
  height: auto;
  width: 100%;
  min-width: 0;
  max-width: 300px;
  filter: drop-shadow(0 8px 14px rgba(42, 26, 13, 0.3));
}

.frame > * {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--gold);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.6vw, 2.7rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--wood-dark);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.accent {
  color: var(--ember);
  font-style: italic;
}

.rule {
  width: 100%;
  max-width: 260px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  opacity: 0.85;
}

.rule::before,
.rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.rule span {
  font-size: 0.9rem;
  color: var(--ember);
}

.lead {
  margin: 0 auto;
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1.7;
  font-style: italic;
}

.countdown {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.seal {
  position: relative;
  background: radial-gradient(circle at 30% 25%, var(--wood-light), var(--wood) 60%, var(--wood-dark) 100%);
  border-radius: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 14px rgba(42, 26, 13, 0.45),
    inset 0 2px 3px rgba(217, 168, 78, 0.25),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    0 0 0 3px var(--parchment),
    0 0 0 4px var(--gold);
}

.seal-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.seal-label {
  margin-top: 2px;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--parchment-shadow);
}

.footer {
  color: var(--ink-soft);
  font-size: 0.78rem;
  opacity: 0.75;
}

.footer p {
  margin: 0;
}

/* staggered reveal on load */
.reveal {
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0) * 0.09s);
}

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

@media (max-width: 480px) {
  .frame {
    padding: 40px 22px 32px;
    gap: 16px;
  }

  .seal {
    width: 68px;
    height: 68px;
  }

  .seal-number {
    font-size: 1.15rem;
  }

  .lead {
    font-size: 1rem;
  }
}
