:root {
  color-scheme: dark;
  --white: #f5f5f5;
  --soft-white: #c9c9c9;
  --muted: #858585;
  --line: rgba(255,255,255,.32);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  background: #050505;
  color: var(--white);
  font-family: Georgia, 'Times New Roman', serif;
  user-select: none;
}
body[data-theme="paper"] { background: #f2f2f2; }

#portrait {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s ease;
  cursor: crosshair;
}
body.is-revealed #portrait { opacity: 1; pointer-events: auto; }

#welcome {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px 20px;
  text-align: center;
  isolation: isolate;
  background: #050505;
  transition: opacity .9s ease, transform .9s ease, filter .9s ease;
}
#welcome[hidden], #toast[hidden] { display: none; }
#welcome.is-leaving { opacity: 0; transform: scale(1.025); filter: blur(7px); pointer-events: none; }

/* Quiet monochrome atmosphere: no coloured gradients or decorative clutter. */
#welcome::before, #welcome::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(76vw, 690px);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.045);
  border-radius: 50%;
}
#welcome::after { width: min(94vw, 850px); border-color: rgba(255,255,255,.025); }

.intro-card { width: min(100%, 680px); position: relative; z-index: 1; padding: 28px 16px; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 auto 30px; color: #eee; }
.ornament span { width: 66px; height: 1px; background: var(--line); }
.ornament b { font: 28px/1 Georgia, serif; font-weight: 400; }
.eyebrow { margin-bottom: 22px; color: var(--muted); font: 10px/1.4 Arial, sans-serif; letter-spacing: .32em; }
#welcome h1 {
  color: var(--white);
  font: 400 clamp(34px, 5.8vw, 58px)/1.22 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -.035em;
}
#welcome h1 em { color: #d8d8d8; font-weight: 400; }
.intro-note { margin-top: 18px; color: #a5a5a5; font: 13px/1.6 Arial, sans-serif; letter-spacing: .035em; }
.reveal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  margin-top: 38px;
  padding: 0 30px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  color: #f5f5f5;
  background: rgba(255,255,255,.025);
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
  font: 400 14px/1.2 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: .025em;
  cursor: pointer;
  transition: transform .28s ease, background .28s ease, box-shadow .28s ease, border-color .28s ease;
  animation: button-breathe 3.8s ease-in-out infinite;
}
.reveal-button:disabled { opacity: .55; cursor: wait; animation: none; }
.reveal-button:hover:not(:disabled) {
  transform: translateY(-3px);
  background: rgba(255,255,255,.09);
  border-color: #fff;
  box-shadow: 0 0 28px rgba(255,255,255,.10);
}
.reveal-button:active { transform: translateY(0) scale(.98); }
.reveal-button:focus-visible { outline: 1px solid #fff; outline-offset: 6px; }
.button-heart { color: #fff; font: 400 19px/1 'Playfair Display', Georgia, serif; }
.tiny-note { margin-top: 20px; color: #777; font: 10px/1.5 Arial, sans-serif; letter-spacing: .12em; }
.ornament-bottom { margin-top: 54px; margin-bottom: 0; opacity: .8; }
.ornament-bottom b { font-size: 21px; }
.star-field { position: absolute; inset: 0; pointer-events: none; color: rgba(255,255,255,.36); }
.star-field span { position: absolute; font: 12px Georgia, serif; animation: twinkle 5s ease-in-out infinite; }
.star-field span:nth-child(1) { top: 18%; left: 14%; font-size: 17px; }
.star-field span:nth-child(2) { top: 31%; left: 25%; }
.star-field span:nth-child(3) { top: 16%; right: 20%; }
.star-field span:nth-child(4) { top: 63%; right: 17%; }
.star-field span:nth-child(5) { bottom: 17%; left: 22%; }
.star-field span:nth-child(6) { bottom: 28%; left: 12%; }
.star-field span:nth-child(7) { bottom: 20%; right: 28%; }
.star-field span:nth-child(8) { top: 48%; right: 10%; }
.star-field span:nth-child(9) { top: 12%; left: 48%; }
.star-field span:nth-child(10) { bottom: 12%; right: 12%; }

#toast {
  position: fixed; z-index: 8; left: 50%; bottom: 24px; transform: translateX(-50%);
  max-width: min(640px, 92vw); padding: 12px 18px; border: 1px solid #555; border-radius: 8px;
  background: rgba(10,10,10,.94); color: #eee; font: 13px/1.5 ui-monospace, Menlo, monospace;
}
#toast pre { margin-top: 8px; padding: 8px; background: #000; border-radius: 6px; white-space: pre-wrap; user-select: text; }

@keyframes button-breathe {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
  50% { box-shadow: 0 0 0 6px rgba(255,255,255,.035), 0 0 24px rgba(255,255,255,.045); }
}
@keyframes twinkle { 0%,100% { opacity: .22; } 50% { opacity: .8; } }
@media (max-width: 560px) {
  .intro-card { padding: 18px 8px; }
  .ornament { margin-bottom: 25px; }
  .ornament span { width: 48px; }
  .eyebrow { font-size: 9px; }
  .intro-note { font-size: 12px; }
  .reveal-button { margin-top: 30px; min-height: 50px; padding: 0 23px; }
  .ornament-bottom { margin-top: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  #portrait, #welcome { transition-duration: .01ms; }
}
