/* Dark is the house style; light follows the visitor's system. Contrast is in AGENTS.md. */
:root {
  --bg: #0b0d08;
  --glow: #1d2312;
  --text: #f3ead2;
  --muted: #c2b48f;
  --gold: #d9b25a;
  --gold-hi: #fbeec1;
  --gold-lo: #b08a3a;
  --line: #8f7333;
  --jewel: #2fae6b;
  --jewel-edge: #0f5b34;
  --card: #10130c;
  --card-hi: #1a1f12;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8f3e6;
    --glow: #fffdf6;
    --text: #2a2114;
    --muted: #5e4c2c;
    --gold: #8a6420;
    --gold-hi: #9c7426;
    --gold-lo: #6b4c12;
    --line: #9a7a36;
    --jewel: #1f8a52;
    --jewel-edge: #0f5b34;
    --card: #fffaf0;
    --card-hi: #fffdf8;
  }
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, var(--glow), transparent 70%),
    var(--bg);
  font: 1.0625rem/1.6 "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
}
.card {
  position: relative;
  width: 100%;
  max-width: 30rem;
  padding: 3rem 2rem 4rem;
  background: linear-gradient(160deg, var(--card-hi), var(--card) 60%);
  box-shadow: 0 2rem 4rem -1.5rem rgb(0 0 0 / 0.6);
  text-align: center;
  border: 1px solid var(--line);
  outline: 1px solid var(--line);
  outline-offset: 6px;
}
/* Small gold corners on the inner frame. */
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--gold);
}
.card::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.card::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.crown {
  width: 6rem;
  height: 6rem;
  filter: drop-shadow(0 0.5rem 1.25rem rgb(217 178 90 / 0.25));
}
.jewel { fill: var(--jewel); stroke: var(--jewel-edge); stroke-width: 0.8; }
.gem { fill: #fff8e0; }
.eyebrow {
  margin: 0.75rem 0 0.25rem;
  font: 600 0.75rem/1 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
}
h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(3rem, 12vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--gold);
  background: linear-gradient(100deg, var(--gold-lo) 0%, var(--gold-hi) 25%, var(--gold) 50%, var(--gold-hi) 75%, var(--gold-lo) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem auto 1.5rem;
  max-width: 14rem;
  font-size: 0.625rem;
  color: var(--gold);
}
.rule span { flex: 1; height: 1px; background: var(--line); }
p { margin: 0; color: var(--muted); }
.lede {
  margin-bottom: 0.5rem;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text);
}
footer {
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  font: 0.75rem/1 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
footer p { color: var(--muted); }
/* The invitation's details. */
.serial {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font: 0.75rem/1 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.guest {
  margin: 2rem auto 1.75rem;
  max-width: 20rem;
}
.guest-line {
  display: block;
  padding-bottom: 0.35rem;
  border-bottom: 1px dotted var(--line);
  font-style: italic;
  color: var(--muted);
}
.guest-label {
  display: block;
  margin-top: 0.5rem;
  font: 600 0.6875rem/1 system-ui, "Segoe UI", sans-serif;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
}
.soon { font-size: 0.9375rem; }
.seal {
  position: absolute;
  left: 50%;
  bottom: -2.5rem;
  width: 5rem;
  height: 5rem;
  translate: -50% 0;
  rotate: -8deg;
  filter: drop-shadow(0 0.4rem 0.6rem rgb(0 0 0 / 0.45));
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
main { padding-bottom: 5rem; }
/* A glimpse of the network behind the card: blurred, so it shows what it is,
   not what anyone says. Decoration only (aria-hidden). */
.peek {
  position: fixed;
  inset: -2rem;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(14rem, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  overflow: hidden;
  filter: blur(4px);
  opacity: 0.8;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 45%, transparent 18%, #000 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 45%, transparent 18%, #000 75%);
}
.col { display: flex; flex-direction: column; gap: 1.25rem; }
.col:nth-child(2) { margin-top: 6rem; }
.col:nth-child(3) { margin-top: -3rem; }
.col:nth-child(4) { margin-top: 9rem; }
.post {
  padding: 1rem;
  border-radius: 0.9rem;
  background: var(--card-hi);
  border: 1px solid var(--line);
  font: 0.9rem/1.45 system-ui, "Segoe UI", sans-serif;
  color: var(--text);
}
.post p { margin: 0.6rem 0; color: var(--text); }
.who { display: flex; align-items: center; gap: 0.5rem; }
.who small { margin-left: auto; color: var(--muted); }
.av {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
}
.av0 { background: linear-gradient(135deg, #d9b25a, #8a6420); }
.av1 { background: linear-gradient(135deg, #2fae6b, #0f5b34); }
.av2 { background: linear-gradient(135deg, #b0567a, #5a1f3a); }
.av3 { background: linear-gradient(135deg, #5a7bd0, #23366e); }
.av4 { background: linear-gradient(135deg, #e0864a, #8a3f14); }
.ph { height: 8rem; border-radius: 0.6rem; }
.p1 { background: linear-gradient(160deg, #f2c46d, #b0567a 60%, #2b1a3a); }
.p2 { background: linear-gradient(180deg, #9fd3e8, #2f7fa8 55%, #0f3550); }
.p3 { background: linear-gradient(170deg, #e8d9b8, #8f7a5a 60%, #2a2418); }
.p4 { background: linear-gradient(165deg, #f0a6a0, #7a4a8a 55%, #1d1838); }
.acts { display: flex; gap: 1.25rem; margin-top: 0.6rem; color: var(--muted); }
.bubble {
  width: fit-content;
  margin-top: 0.6rem;
  padding: 0.45rem 0.75rem;
  border-radius: 1rem;
  background: var(--glow);
  border: 1px solid var(--line);
}
.bubble.me { margin-left: auto; background: var(--gold); color: var(--bg); border-color: var(--gold); }
main, footer { position: relative; z-index: 1; }
@media (max-width: 720px) {
  .peek { grid-template-columns: repeat(2, minmax(12rem, 1fr)); }
  .col:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .seal { animation: press 900ms 400ms cubic-bezier(0.2, 0.8, 0.3, 1.2) both; }
  @keyframes press {
    from { opacity: 0; scale: 1.6; }
    to { opacity: 1; scale: 1; }
  }
  h1 { animation: shimmer 9s ease-in-out infinite alternate; }
  .crown { animation: rise 1.2s ease-out both; }
  @keyframes shimmer {
    from { background-position: 0% 0; }
    to { background-position: 100% 0; }
  }
  @keyframes rise {
    from { opacity: 0; translate: 0 8px; }
    to { opacity: 1; translate: 0 0; }
  }
}
