:root {
  --velvet: #1b0b33;
  --plum: #3a1466;
  --violet: #7a2bd1;
  --gold: #e3b95b;
  --leaf: #f7e3a8;
  --ivory: #fff6e6;
  --ink: #2a1640;
  --gold-grad: linear-gradient(176deg, #fff3c4 0%, #f2cf74 38%, #c8902f 62%, #f7dc8c 100%);
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --text: "Cormorant Garamond", Garamond, Georgia, serif;
  --max: 72rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--velvet);
  color: var(--ivory);
  font-family: var(--text);
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--leaf); }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--ivory); color: var(--ink); padding: .6rem 1rem; border-radius: 6px;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .85rem 2rem;
  font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .06em;
  text-decoration: none; border-radius: 999px; cursor: pointer; border: 0;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn-gold {
  color: #2b1500;
  background: var(--gold-grad);
  box-shadow: 0 0 0 1px #fff3c455 inset, 0 10px 30px -8px #e3b95b99;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #fff3c488 inset, 0 16px 40px -8px #e3b95bcc; }
.btn-ghost {
  color: var(--leaf); background: transparent;
  box-shadow: 0 0 0 1px #e3b95b88 inset;
}
.btn-ghost:hover { background: #e3b95b1a; }
.btn-wide { width: 100%; margin-top: 1.5rem; font-size: 1.1rem; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr; padding: 0 1.25rem;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3;
  opacity: .38; filter: saturate(1.15) blur(1px);
}
.hero-veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 45% at 50% 34%, #7a2bd133 0%, transparent 70%),
    linear-gradient(180deg, #1b0b33cc 0%, #1b0b3366 30%, #1b0b33aa 62%, var(--velvet) 96%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: var(--max); width: 100%; margin: 0 auto; padding: 1.25rem 0;
}
.mark { font-family: var(--display); font-weight: 700; letter-spacing: .12em; color: var(--leaf); text-decoration: none; font-size: .95rem; }
.topbar-cta { font-family: var(--display); font-weight: 700; font-size: .9rem; letter-spacing: .08em; color: var(--ivory); text-decoration: none; padding: .5rem 1.1rem; border-radius: 999px; box-shadow: 0 0 0 1px #fff6e655 inset; }
.topbar-cta:hover { box-shadow: 0 0 0 1px var(--gold) inset; color: var(--leaf); }

.hero-copy {
  align-self: end; justify-self: center; text-align: center;
  max-width: min(66rem, 100%); padding-bottom: clamp(2.5rem, 7vh, 5rem);
  display: grid; justify-items: center; gap: 1rem;
}
.hero-kicker { text-wrap: balance; font-style: italic; font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); color: var(--leaf); }
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, min(1.6rem + 6vw, 10.5vh), 6.6rem); line-height: .98; letter-spacing: .01em;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 28px #00000088);
  text-wrap: balance;
}
.hero-date { font-family: var(--display); font-weight: 500; letter-spacing: .08em; font-size: clamp(1rem, .9rem + .5vw, 1.25rem); }
.hero-place + .btn { margin-top: .75rem; }
.hero-note { font-size: 1.05rem; opacity: .85; }

/* entrance: one orchestrated moment */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
  .hero-copy > :nth-child(1) { animation-delay: 1.0s; }
  .hero-copy > :nth-child(2) { animation-delay: 1.25s; }
  .hero-copy > :nth-child(3) { animation-delay: 1.6s; }
  .hero-copy > :nth-child(4) { animation-delay: 1.7s; }
  .hero-copy > :nth-child(5) { animation-delay: 1.85s; }
  .hero-copy > :nth-child(6) { animation-delay: 2.05s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Portraits ---------- */
.stars { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 10vw, 8rem) 1.25rem 2rem; }
.stars-intro { max-width: 36rem; margin: 0 auto 3.5rem; text-align: center; display: grid; gap: 1rem; }
.script-title {
  font-family: var(--text); font-style: italic; font-weight: 600;
  font-size: clamp(2.6rem, 1.8rem + 3vw, 4.2rem); line-height: 1.05; color: var(--leaf);
}
.portraits {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem);
}
.portrait {
  position: relative; padding: 10px; border-radius: 4px;
  background: var(--gold-grad);
  box-shadow: 0 30px 60px -30px #000, 0 0 0 1px #00000055;
}
.portrait::after { /* inner fillet line, like a gilded frame */
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  box-shadow: 0 0 0 2px #5a3a0a, 0 0 0 4px #f7e3a8aa, inset 0 0 40px #1b0b3399;
}
.portrait img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.portrait:nth-child(3n + 2) { transform: translateY(3rem); }

@media (max-width: 760px) {
  .portraits {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 1.25rem 1.5rem; margin: 0 -1.25rem;
    scrollbar-width: none;
  }
  .portraits::-webkit-scrollbar { display: none; }
  .portrait { scroll-snap-align: center; }
  .portrait:nth-child(3n + 2) { transform: none; }
}

/* ---------- Invitation ---------- */
.invite { padding: clamp(5rem, 12vw, 9rem) 1.25rem clamp(3rem, 8vw, 6rem); }
.invite-card {
  max-width: 40rem; margin: 0 auto; text-align: center;
  background: var(--ivory); color: var(--ink);
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.5rem, 6vw, 3.5rem);
  border-radius: 6px;
  box-shadow: 0 0 0 1px #c8902f, 0 0 0 7px var(--ivory), 0 0 0 8px #c8902f, 0 40px 80px -30px #000;
}
.invite-logo { width: min(18rem, 80%); margin: 0 auto 1.75rem; }
.invite-title { font-family: var(--display); font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); color: #5b1d9b; }
.invite-lede { margin: .75rem auto 2rem; max-width: 30rem; font-size: 1.2rem; }
.invite-details { margin: 0; display: grid; gap: 0; text-align: left; }
.invite-details > div {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: .9rem 0;
  border-top: 1px solid #c8902f66;
}
.invite-details dt { font-family: var(--display); font-weight: 700; color: #8a5a12; font-size: .95rem; padding-top: .15rem; }
.invite-details dd { margin: 0; font-size: 1.2rem; font-weight: 600; }

/* ---------- Steps ---------- */
.steps { max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 1.25rem; text-align: center; }
.section-title { font-family: var(--display); font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); color: var(--leaf); }
.steps-list { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.steps-list li { display: grid; gap: .5rem; justify-items: center; max-width: 20rem; margin: 0 auto; }
.numeral {
  font-family: var(--display); font-weight: 800; font-size: 3.2rem; line-height: 1;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.steps-list h3 { font-family: var(--display); font-size: 1.25rem; }
@media (max-width: 760px) { .steps-list { grid-template-columns: 1fr; } }

/* ---------- Registration ---------- */
.register { padding: 2rem 1.25rem clamp(5rem, 10vw, 8rem); scroll-margin-top: 1rem; }
.register-card {
  position: relative; max-width: 44rem; margin: 0 auto;
  padding: clamp(1.75rem, 5vw, 3.25rem);
  background: linear-gradient(170deg, #3a1466e6, #24103fe6);
  border-radius: 20px;
  box-shadow: 0 0 0 1px #e3b95b66, 0 40px 90px -40px #000, inset 0 1px 0 #fff3c422;
}
.register-lede { margin: .5rem 0 2rem; opacity: .85; }
.form-view { text-align: left; }
.form-view .section-title { text-align: left; }

fieldset { border: 0; margin: 0 0 1.75rem; padding: 0; min-width: 0; }
legend { font-family: var(--display); font-weight: 700; color: var(--leaf); font-size: 1.05rem; letter-spacing: .04em; margin-bottom: .75rem; padding: 0; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-narrow input { max-width: 8rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label, .label { font-weight: 600; font-size: 1.1rem; }
.req { color: var(--gold); }

input:not([type="checkbox"]):not([type="radio"]), textarea {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--ivory);
  background: #12062299; border: 1px solid #f7e3a855; border-radius: 10px;
  padding: .75rem .9rem; min-height: 3rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 6rem; }
input::placeholder, textarea::placeholder { color: #fff6e688; }
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px #e3b95b44; }
.touched input:invalid, .touched textarea:invalid { border-color: #ff8f8f; }

.child { position: relative; padding: 1.25rem; border-radius: 14px; background: #12062266; box-shadow: 0 0 0 1px #e3b95b33; margin-bottom: 1rem; }
.child legend { float: left; width: 100%; margin-bottom: 1rem; padding-right: 5.5rem; }
.child > .field, .child > .field-row { clear: both; }
.remove-child {
  position: absolute; right: 1rem; top: 1.1rem;
  font: inherit; font-size: 1rem; color: var(--leaf); background: none; border: 0; text-decoration: underline; cursor: pointer;
}
.child:only-of-type .remove-child { display: none; }
#add-child { margin: 0 0 2rem; }

.pills { display: flex; gap: .6rem; flex-wrap: wrap; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 3rem; padding: .6rem 1.1rem;
  border-radius: 999px; box-shadow: 0 0 0 1px #f7e3a855 inset; font-weight: 600;
  transition: background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.pill input:checked + span { background: var(--gold-grad); color: #2b1500; box-shadow: none; }
.pill input:focus-visible + span { outline: 3px solid var(--leaf); outline-offset: 3px; }

.checks { display: grid; gap: .9rem; margin: .5rem 0 .5rem; }
.check { display: grid; grid-template-columns: 1.6rem 1fr; gap: .6rem; align-items: start; font-weight: 500; }
.check input { width: 1.35rem; height: 1.35rem; margin-top: .2rem; accent-color: var(--gold); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin-top: 1.25rem; padding: .85rem 1rem; border-radius: 10px; background: #5c1a2a; box-shadow: 0 0 0 1px #ff8f8f88; }

.success-view { position: relative; text-align: center; padding: 3rem 0 1rem; display: grid; gap: 1.25rem; justify-items: center; outline: none; }
.success-msg { max-width: 30rem; font-size: 1.25rem; }
.burst { position: absolute; inset: -3rem; width: calc(100% + 6rem); height: calc(100% + 6rem); pointer-events: none; }

/* ---------- Phones (most registrations happen here) ---------- */
html { -webkit-text-size-adjust: 100%; }
a, button, label, input { -webkit-tap-highlight-color: transparent; }
.check { min-height: 2.75rem; padding: .35rem 0; cursor: pointer; }
.check input { width: 1.6rem; height: 1.6rem; margin-top: .1rem; }
.remove-child { min-height: 2.75rem; padding: .4rem .25rem .4rem .75rem; top: .55rem; }

.mobile-cta { display: none; }
@media (max-width: 760px) {
  .hero { padding: 0 1rem; }
  .hero-copy { padding-bottom: calc(2.5rem + env(safe-area-inset-bottom)); gap: .85rem; }
  .hero-copy .btn { width: min(100%, 22rem); }
  .topbar { padding: calc(.9rem + env(safe-area-inset-top)) 0 .9rem; }

  .stars { padding-left: 1rem; padding-right: 1rem; }
  .invite { padding-left: .75rem; padding-right: .75rem; }
  .register { padding: 1rem .5rem calc(6rem + env(safe-area-inset-bottom)); }
  .register-card { padding: 1.5rem 1.1rem 1.75rem; border-radius: 16px; }
  .child { padding: 1rem .9rem; }
  .pills { display: grid; grid-template-columns: 1fr 1fr; }
  .pill span { justify-content: center; width: 100%; }
  .btn { width: 100%; }
  #add-child { width: 100%; }

  .mobile-cta {
    display: flex; position: fixed; z-index: 40;
    left: 1rem; right: 1rem; width: auto;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    transform: translateY(160%); transition: transform .35s cubic-bezier(.2,.7,.2,1);
    box-shadow: 0 0 0 1px #fff3c455 inset, 0 12px 34px -6px #000c;
  }
  .mobile-cta.show { transform: none; }
}
@media (max-width: 420px) {
  .invite-details > div { grid-template-columns: 1fr; gap: .15rem; }
  .invite-details dd { font-size: 1.15rem; }
  .steps-list { gap: 2rem; }
}
@media (max-width: 340px) {
  .pills { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.6rem; }
}
@media (prefers-reduced-motion: reduce) { .mobile-cta { transition: none; } }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 3rem 1.25rem 4rem; border-top: 1px solid #e3b95b33; opacity: .85; display: grid; gap: .25rem; }
.footer-name { font-family: var(--display); font-weight: 700; color: var(--leaf); letter-spacing: .06em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- 2026 additions ---------- */
.mark-year { font-family: var(--text); font-style: italic; font-weight: 600; letter-spacing: 0; color: var(--ivory); opacity: .8; margin-left: .35rem; }
.hero-place { font-style: italic; font-size: 1.15rem; color: var(--leaf); margin-top: -.5rem; }
.map-link { display: inline-block; margin-top: .35rem; color: #5b1d9b; font-weight: 700; text-underline-offset: 3px; min-height: 2.75rem; padding: .5rem 0; }
@media (max-width: 380px) { .mark-year { display: block; margin-left: 0; } }

/* ---------- CB icon (new logo) ---------- */
.mark { display: inline-flex; align-items: center; gap: .6rem; }
.mark-badge, .footer-badge {
  display: grid; place-items: center; flex: none; border-radius: 50%;
  background: var(--ivory); box-shadow: 0 0 0 1px #e3b95b88, 0 4px 14px -4px #000a;
}
.mark-badge { width: 2.4rem; height: 2.4rem; }
.mark-badge img { width: 64%; height: auto; }
.footer-badge { width: 3.5rem; height: 3.5rem; margin: 0 auto .75rem; }
.footer-badge img { width: 62%; height: auto; }
.invite-logo { width: min(20rem, 86%); }
@media (max-width: 380px) { .mark-text { line-height: 1.15; } }
