/* ---------- tokens ---------- */
:root {
  --cream: #f3e8d1;
  --cream-hi: #f9f1de;
  --cream-lo: #e8dbbe;
  --ink: #1a1612;
  --ink-soft: #4a3e33;
  --muted: #7a6a55;
  --gold: #c9a24b;
  --gold-hi: #e6c67a;
  --gold-lo: #8c6f2a;
  --line: rgba(26, 18, 8, 0.14);
  --line-strong: rgba(26, 18, 8, 0.6);
  --paper: var(--cream);
  --accent: var(--gold);
  --accent-ink: var(--ink);
}

:root[data-dark="true"] {
  --cream: #1f1812;
  --cream-hi: #2a201a;
  --cream-lo: #17110c;
  --ink: #f1e4c9;
  --ink-soft: #c9b89a;
  --muted: #9a8a6e;
  --line: rgba(241, 228, 201, 0.14);
  --line-strong: rgba(241, 228, 201, 0.55);
  --paper: var(--cream);
  --accent-ink: var(--cream);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.04 0 0 0 0.12 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}
:root[data-dark="true"] body::before {
  mix-blend-mode: screen;
  opacity: 0.18;
}

#root,
#hydrate-root {
  position: relative;
  z-index: 2;
}

/* ---------- type ---------- */
.t-chunk {
  font-family: "Archivo Black", "Helvetica Neue", sans-serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.92;
  text-transform: uppercase;
}
.t-serif {
  font-family: "DM Serif Display", "Old Standard TT", Georgia, serif;
  font-weight: 400;
  line-height: 1.08;
}
.t-inst {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}
.t-mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.t-label {
  font-family: "Archivo Black", sans-serif;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

em,
i {
  font-style: italic;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 760px) {
  .wrap {
    padding: 0 40px;
  }
}

hr.rule {
  border: 0;
  height: 1px;
  background: var(--line-strong);
  margin: 0;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
  font-size: 12px;
}
.topbar .mono {
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.topbar .toggles {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar .pill {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px;
  background: transparent;
}
.topbar .pill button {
  all: unset;
  padding: 4px 10px;
  font-family: "Archivo Black", sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
}
.topbar .pill button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 32px 0 48px;
}
.hero-inner {
  position: relative;
  min-height: 540px;
}
.hero .kicker {
  font-family: "Archivo Black", sans-serif;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1.cheers {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(64px, 16vw, 148px);
  line-height: 0.86;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
}
.hero h1 .fifty {
  font-family: "Bodoni Moda", serif;
  font-weight: 400;
  font-style: italic;
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
  display: inline-block;
  transform: translateY(0.04em);
  padding: 0 0.02em;
}

.hero .subhead {
  font-family: "DM Serif Display", serif;
  font-size: clamp(22px, 4.2vw, 34px);
  line-height: 1.15;
  margin: 28px 0 0;
  max-width: 20ch;
}
.hero .subhead em {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent);
}
.hero .subhead.subhead-centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 22ch;
}

.hero .ball-a {
  position: absolute;
  right: -40px;
  top: -10px;
  width: clamp(140px, 34vw, 260px);
  pointer-events: none;
  z-index: 0;
}
.hero h1.cheers,
.hero .subhead,
.hero .kicker {
  position: relative;
  z-index: 1;
}

/* ---------- details strip ---------- */
.strip {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .strip > div + div {
    border-left: 1px solid var(--line);
    padding-left: 20px;
  }
}
.strip .t-label {
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.strip .val {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  line-height: 1.15;
}
.strip .sub {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 2px;
  font-family: "Instrument Serif", serif;
}

/* ---------- sections ---------- */
section.block {
  padding: 64px 0;
  position: relative;
}
section.block + section.block {
  border-top: 1px solid var(--line);
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--ink-soft);
}
.section-eyebrow .bar {
  height: 1px;
  background: var(--line-strong);
  flex: 1;
}
.section-eyebrow .num {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 14px;
}
.section-eyebrow .name {
  font-family: "Archivo Black", sans-serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h2.hd {
  font-family: "DM Serif Display", serif;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.02;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
h2.hd em {
  font-style: italic;
}

.lead {
  font-family: "Instrument Serif", serif;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.55;
  color: var(--ink);
  max-width: 52ch;
}

/* the evening list */
.evening-list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.evening-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px dashed var(--line-strong);
}
.evening-list li:last-child {
  border-bottom: 1px dashed var(--line-strong);
}
.evening-list .ico {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
}
.evening-list .what {
  font-family: "DM Serif Display", serif;
  font-size: 20px;
  line-height: 1.25;
}
.evening-list .how {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.ilink {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}
.ilink:hover {
  text-decoration-color: var(--ink);
}

/* venue card */
.venue-card {
  margin-top: 28px;
  border: 1px solid var(--line-strong);
  background: var(--cream-hi);
  padding: 0;
  overflow: hidden;
  border-radius: 2px;
}
.venue-body {
  padding: 22px 22px 24px;
}
.venue-body .name {
  font-family: "DM Serif Display", serif;
  font-size: 26px;
  line-height: 1.1;
  margin: 0 0 4px;
}
.venue-body .addr {
  font-family: "Instrument Serif", serif;
  font-size: 16px;
  color: var(--ink-soft);
}
.venue-body p {
  margin: 14px 0 0;
  font-family: "Instrument Serif", serif;
  font-size: 16px;
  color: var(--ink);
  max-width: 52ch;
}
.venue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.map-wrap {
  border-bottom: 1px solid var(--line-strong);
  background: var(--cream-lo);
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}
.map-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- buttons ---------- */
.btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-family: "Archivo Black", sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  border-radius: 2px;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover {
  background: var(--ink);
  color: var(--cream);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.btn.primary:hover {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.btn.gold {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn.gold:hover {
  filter: brightness(0.92);
}
.btn .arrow {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0;
}

/* ---------- countdown ---------- */
.countdown {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.countdown .cell {
  padding: 14px 8px 10px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--cream-hi);
}
.countdown .num {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: clamp(28px, 7vw, 42px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.countdown .lbl {
  font-family: "Archivo Black", sans-serif;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 6px;
  color: var(--ink-soft);
}

/* ---------- rsvp ---------- */
.rsvp {
  margin-top: 28px;
  border: 1px solid var(--line-strong);
  background: var(--cream-hi);
  padding: 28px 22px;
  border-radius: 2px;
  position: relative;
}
.rsvp .lock {
  text-align: center;
  padding: 20px 8px 12px;
}
.rsvp .lock-spark {
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  font-size: 34px;
  color: var(--accent);
}
.rsvp .lock-title {
  font-family: "DM Serif Display", serif;
  font-size: 22px;
  margin: 10px 0 4px;
}
.rsvp .lock-sub {
  font-family: "Instrument Serif", serif;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 36ch;
  margin: 0 auto 18px;
}
.rsvp .lock-hint {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.code-input {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.code-input input {
  all: unset;
  width: 44px;
  height: 54px;
  text-align: center;
  font-family: "Bodoni Moda", serif;
  font-size: 28px;
  font-style: italic;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  border-radius: 2px;
  caret-color: var(--accent);
  color: var(--ink);
}
.code-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.2);
}
.code-err {
  margin-top: 12px;
  color: #a14848;
  font-family: "Instrument Serif", serif;
  font-size: 14px;
}
:root[data-dark="true"] .code-err {
  color: #e89a9a;
}

/* form */
.field {
  display: block;
  margin-bottom: 18px;
}
.field label.label {
  display: block;
  font-family: "Archivo Black", sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input[type="text"],
.field input[type="email"],
.field textarea {
  all: unset;
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-family: "Instrument Serif", serif;
  font-size: 18px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  box-sizing: border-box;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.2);
}
.field textarea {
  min-height: 80px;
  resize: vertical;
  font-family: "Instrument Serif", serif;
}
.field-error {
  margin-top: 8px;
  color: #a14848;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 14px;
}
:root[data-dark="true"] .field-error {
  color: #e89a9a;
}

.attend-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
}
.attend-toggle button {
  all: unset;
  text-align: center;
  padding: 14px 10px;
  cursor: pointer;
  font-family: "DM Serif Display", serif;
  font-size: 18px;
  background: var(--paper);
  color: var(--ink-soft);
  transition: all 0.15s;
}
.attend-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
}
.attend-toggle button[aria-pressed="true"][data-val="no"] {
  background: var(--ink-soft);
}
.attend-toggle button + button {
  border-left: 1px solid var(--line-strong);
}

.plusone {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.plusone button {
  all: unset;
  text-align: center;
  padding: 14px 10px;
  cursor: pointer;
  font-family: "DM Serif Display", serif;
  font-size: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--paper);
}
.plusone button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.plusone .sub {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
  letter-spacing: 0.04em;
}
.plusone button[aria-pressed="true"] .sub {
  color: var(--cream);
  opacity: 0.75;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.submit-row .hint {
  font-family: "Instrument Serif", serif;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
}

/* confirmation screen */
.confirm {
  text-align: center;
  padding: 36px 12px 20px;
}
.confirm h3 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.05;
  margin: 22px 0 10px;
}
.confirm h3 em {
  font-style: italic;
}
.confirm p {
  font-family: "Instrument Serif", serif;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 auto;
}

/* cheers animation */
.cheers-svg {
  width: 180px;
  height: 180px;
  display: block;
  margin: 0 auto;
}
/* Cheers loop: ~1.6s of motion, then held at rest, then repeat (4s cycle). */
@keyframes tilt-left {
  0%,
  40%,
  100% {
    transform: rotate(0deg) translateX(0);
  }
  16% {
    transform: rotate(22deg) translateX(10px);
  }
  22% {
    transform: rotate(22deg) translateX(10px);
  }
}
@keyframes tilt-right {
  0%,
  40%,
  100% {
    transform: rotate(0deg) translateX(0);
  }
  16% {
    transform: rotate(-22deg) translateX(-10px);
  }
  22% {
    transform: rotate(-22deg) translateX(-10px);
  }
}
@keyframes clink {
  0%,
  16%,
  40%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  22% {
    opacity: 1;
    transform: scale(1.3);
  }
}
.glass-l {
  transform-origin: 85% 100%;
  animation: tilt-left 4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s infinite;
}
.glass-r {
  transform-origin: 15% 100%;
  animation: tilt-right 4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s infinite;
}
.clink {
  /* Match the 0% keyframe so sparks stay hidden during the 0.3s
     animation-delay instead of flashing at full opacity. */
  opacity: 0;
  transform: scale(0.6);
  transform-origin: center;
  animation: clink 4s ease-out 0.3s infinite both;
}

/* ---------- footer ---------- */
footer.foot {
  padding: 60px 0 48px;
  text-align: center;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
footer.foot .rsvp-by {
  font-family: "DM Serif Display", serif;
  font-style: italic;
  font-size: clamp(20px, 3.6vw, 28px);
  color: var(--ink);
  margin: 0 0 8px;
}
footer.foot .sig {
  font-family: "Instrument Serif", serif;
  font-size: 14px;
  letter-spacing: 0.04em;
  margin-top: 12px;
}
footer.foot .url {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 24px;
}

/* ---------- discoball ---------- */
.ball {
  display: block;
  width: 100%;
  height: auto;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .glass-l,
  .glass-r,
  .clink {
    animation: none !important;
  }
  .ball animate {
    display: none;
  }
}

.sep-stars {
  text-align: center;
  margin: 28px 0;
  color: var(--accent);
  font-family: "Bodoni Moda", serif;
  font-style: italic;
  letter-spacing: 0.6em;
}
