:root {
  --snow: #f4f7fb;
  --paper: #ffffff;
  --navy: #1f2f6e;
  --gold: #a9803a;
  --gold-soft: #e9dcc1;
  --red: #a8192e;
  --ink: #1c2233;
  --muted: #5b6375;
  --display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
}
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 56px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-areas:
    "media logo"
    "media content";
  grid-template-rows: auto 1fr;
  column-gap: 48px;
  row-gap: 20px;
  align-items: start;
}
.logo { grid-area: logo; display: block; max-width: 440px; }
.logo img { display: block; width: 100%; height: auto; }
.media { grid-area: media; }
.content { grid-area: content; }

.media { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.invite { margin: 0; width: 100%; max-width: 380px; }
.invite-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
  box-shadow: 0 1px 2px rgba(31,47,110,.08), 0 18px 40px -18px rgba(31,47,110,.45);
}
.invite video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.invite figcaption { margin-top: 8px; text-align: center; font-size: .9rem; color: var(--muted); }
.sound {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--navy);
  font: 700 .98rem var(--body);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.sound:hover { background: #fff; }
.sound .waves { display: none; }
.sound.on .waves { display: inline; }
.sound.on .cross { display: none; }
.sound.on { background: rgba(31,47,110,.9); color: #fff; }
.poster { margin: 0; width: 100%; }
.poster-link { display: none; }
.poster img {
  display: block; width: 100%; height: auto;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(31,47,110,.08), 0 18px 40px -18px rgba(31,47,110,.35);
}

.content { max-width: 600px; }


h1 {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 4.75rem);
  line-height: 1;
  color: var(--navy);
}
.lead {
  margin: 10px 0 28px;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
}

/* Date / time / venue */
.facts {
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  border-top: 1px solid var(--gold-soft);
}
.facts > div { display: contents; }
.facts dt, .facts dd {
  padding: 10px 0;
  border-bottom: 1px solid var(--gold-soft);
  margin: 0;
}
.facts dt { color: var(--muted); padding-right: 24px; }
.facts dd { font-weight: 600; }

.lineup { margin-bottom: 40px; }
.lineup ul { list-style: none; margin: 0; padding: 0; }
.lineup li { padding: 6px 0; }
.lineup li span { display: block; color: var(--muted); font-style: italic; font-size: .95rem; }

/* The ticket: perforated stub edges */
.ticket {
  position: relative;
  background: var(--paper);
  padding: 28px 28px 24px;
  border-radius: 10px;
  border-top: 4px solid var(--navy);
  box-shadow: 0 18px 40px -24px rgba(31,47,110,.45);
}

.row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #eceef3;
}
.row-name { display: block; font-weight: 700; }
.row-age { display: block; color: var(--muted); font-size: .95rem; }
.row-price {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--red);
  min-width: 3ch;
  text-align: right;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6dae4;
  border-radius: 999px;
  overflow: hidden;
}
.stepper button {
  width: 42px; height: 42px;
  border: 0; background: transparent;
  font-size: 1.35rem; line-height: 1;
  color: var(--navy);
  cursor: pointer;
}
.stepper button:hover { background: var(--snow); }
.stepper input {
  width: 40px; height: 42px;
  border: 0; text-align: center;
  font: 700 1.05rem var(--body);
  color: var(--ink);
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 2px dashed var(--gold-soft);
  position: relative;
}
/* stub notches where the dashed line meets the edges */
.total::before, .total::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--snow);
}
.total::before { left: -40px; }
.total::after  { right: -40px; }
.total span { font-weight: 600; color: var(--muted); }
.total output {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.pay {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 15px 20px;
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font: 700 1.05rem var(--body);
  cursor: pointer;
  transition: background-color .15s;
}
.pay:hover:not(:disabled) { background: #8c1426; }
.pay:disabled { background: #c9ccd6; cursor: not-allowed; }

.small { margin: 12px 0 0; font-size: .88rem; color: var(--muted); }

.alert {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 4px solid var(--red);
  background: #fbeef0;
  color: #6f0f1d;
}
.soldout { font-weight: 600; color: var(--red); }

.blessing {
  margin: 32px 0 8px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--muted);
}
.back { margin: 0; font-size: .95rem; }

.note {
  margin: 16px 0 0;
  padding: 10px 14px;
  background: var(--snow);
  border-left: 3px solid var(--gold);
  font-size: .93rem;
  color: var(--ink);
}
.contact {
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}
.contact legend {
  padding: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}
.contact .small { margin: 2px 0 10px; }
.contact label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .95rem; }
.contact input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #c9cfdb;
  border-radius: 6px;
  font: 400 1rem var(--body);
  color: var(--ink);
  background: #fff;
}
.contact input:focus { border-color: var(--navy); outline: 2px solid rgba(31,47,110,.18); outline-offset: 0; }
.terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  font-size: .97rem;
  cursor: pointer;
}
.terms input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }

.rules { margin-top: 48px; }
.rules > p { margin: 0 0 16px; }
.rules ol { margin: 0; padding-left: 1.4em; }
.rules li { margin-bottom: 14px; }
.rules li::marker { font-family: var(--display); font-weight: 700; color: var(--gold); font-size: 1.15rem; }
.rules h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--navy); }
.rules li p { margin: 0 0 6px; color: var(--ink); }
.rules-end { font-style: italic; color: var(--muted); }

/* Confirmation / admin pages */
.narrow { max-width: 640px; margin: 0 auto; padding: 48px 20px; }
.card { background: var(--paper); padding: 28px; border-radius: 10px; border-top: 4px solid var(--navy); box-shadow: 0 18px 40px -24px rgba(31,47,110,.45); }

@media (max-width: 860px) {
  .page { grid-template-columns: 1fr; grid-template-areas: "logo" "media" "content"; grid-template-rows: auto; gap: 20px; padding-top: 16px; }
  .logo { max-width: 340px; justify-self: center; }
  .media { gap: 10px; }
  .invite { max-width: min(62vw, 260px); }
  .poster { display: none; }
  .poster-link { display: inline-block; font-size: .95rem; }
  .content { max-width: none; }
  .ticket { padding: 22px 18px 20px; }
  .row { grid-template-columns: 1fr auto; }
  .row-price { grid-column: 2; grid-row: 1; }
  .stepper { grid-column: 1 / -1; justify-self: start; }
  .total::before { left: -30px; }
  .total::after  { right: -30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.ticket-id {
  margin: 8px 0 24px;
  padding: 18px 12px;
  border: 2px dashed var(--gold-soft);
  border-radius: 8px;
  text-align: center;
}
.ticket-id span { display: block; color: var(--muted); font-size: .95rem; }
.ticket-id strong {
  display: block;
  margin: 4px 0;
  font: 700 2.6rem/1.1 "Courier New", Courier, monospace;
  letter-spacing: .12em;
  color: var(--red);
}
.narrow .back { margin-top: 16px; }

.ticket-list { margin: 8px 0 24px; padding: 16px 18px; border: 2px dashed var(--gold-soft); border-radius: 8px; }
.ticket-list p { margin: 0 0 8px; color: var(--muted); }
.ticket-list ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; }
.ticket-list strong { font: 700 1.35rem "Courier New", Courier, monospace; letter-spacing: .06em; color: var(--red); }
.ticket-list span { color: var(--muted); font-size: .9rem; }

a.pay.download {
  display: block;
  margin: 0 0 24px;
  text-align: center;
  text-decoration: none;
  background: var(--navy);
}
a.pay.download:hover { background: #172457; color: #fff; }

.fee-note { margin: -4px 0 8px; }
.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #eceef3;
  font-weight: 600;
  color: var(--ink);
}
.fee-row[hidden] { display: none; }
