/* The original Halloween artwork, in a fluid document rather than demo screens. */
:root {
  color-scheme: dark;
  --orange: #fc7f30;
  --orange-light: #ffc08f;
  --ink: #2a1307;
  --white: #f5f5f7;
  --muted: #d2c5bf;
  --canvas: #08090c;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--canvas); color: var(--white); font-size: 1rem; line-height: 1.6; margin: 0; }
main { min-width: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
p, h1, h2, figure, fieldset, dl, dd { margin: 0; }
a { color: var(--orange-light); text-underline-offset: 0.25em; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--orange); color: var(--ink); }
* { scrollbar-color: #754029 var(--canvas); scrollbar-width: thin; }
::-webkit-scrollbar { width: 0.75rem; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: #754029; border: 3px solid var(--canvas); border-radius: 1rem; }
:focus-visible { outline: 3px solid var(--orange-light); outline-offset: 5px; }

.sprite { height: 0; overflow: hidden; position: absolute; width: 0; }
.visually-hidden { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.skip-link { background: var(--orange); color: var(--ink); left: 1rem; padding: 0.8rem 1rem; position: fixed; top: -8rem; z-index: 5; }
.skip-link:focus { top: 1rem; }

.haunted-section {
  align-content: center;
  background: var(--canvas);
  display: grid;
  isolation: isolate;
  min-height: 42rem;
  padding: 5rem max(1.25rem, env(safe-area-inset-right)) 5rem max(1.25rem, env(safe-area-inset-left));
  position: relative;
  scroll-margin-top: 1rem;
}

.haunted-section::before,
.haunted-section::after { content: ""; inset: 0; pointer-events: none; position: absolute; z-index: -1; }
.haunted-section::before { background-image: var(--scene); background-position: center; background-repeat: no-repeat; background-size: cover; }
.haunted-section::after { background: linear-gradient(180deg, var(--canvas), rgb(8 9 12 / 45%) 15%, rgb(8 9 12 / 74%) 65%, var(--canvas)); }
.section-content { margin-inline: auto; max-width: 38rem; min-width: 0; text-align: center; width: 100%; }
.section-content > * { overflow-wrap: anywhere; }

.haunted-hero { --scene: url("img/bg-1.jpg"); min-height: 58rem; padding-bottom: 4rem; padding-top: 9rem; }
.haunted-hero::before { background-position: center 45%; }
.haunted-hero::after { background: linear-gradient(180deg, rgb(8 9 12 / 12%), rgb(8 9 12 / 18%) 35%, rgb(8 9 12 / 84%) 77%, var(--canvas)); }
.haunted-expect { --scene: url("img/bg-2.jpg"); }
.haunted-where { --scene: url("img/bg-3.jpg"); }
.haunted-rsvp { --scene: url("img/bg-4.jpg"); min-height: 46rem; }
.haunted-done { --scene: url("img/bg-5.jpg"); min-height: calc(100svh - 5rem); padding-bottom: 7rem; padding-top: 7rem; }

.haunted-nav {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  left: max(1.25rem, env(safe-area-inset-left));
  margin-inline: auto;
  max-width: 70rem;
  position: absolute;
  right: max(1.25rem, env(safe-area-inset-right));
  top: max(1rem, env(safe-area-inset-top));
}

.haunted-wordmark { background: var(--white); border-radius: 0.375rem; flex: none; padding: 0.125rem 0.25rem; width: 6.25rem; }
.haunted-nav div { column-gap: 0.8rem; display: flex; flex-wrap: wrap; justify-content: flex-end; }
.haunted-nav a { align-items: center; display: flex; font-size: 0.9rem; font-weight: 600; justify-content: center; min-height: 2.75rem; min-width: 2.75rem; padding: 0.4rem 0.2rem; text-decoration: none; }
.hero-art { margin-inline: auto; max-width: 32rem; width: 100%; }
.event-title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.3; margin-top: 1rem; text-wrap: balance; }
.guest-greeting { color: var(--muted); margin-top: 0.75rem; }
.hero-tagline { font-size: 0.92rem; font-weight: 600; letter-spacing: 0.12em; line-height: 1.8; margin-top: 1.5rem; text-transform: uppercase; }
.hero-content > .haunted-button { margin-top: 2.5rem; }

.icon { color: var(--orange); flex: none; height: 1.6rem; width: 1.6rem; }
.icon--pin { height: 1.9rem; }
.event-facts { display: grid; gap: 1.5rem; margin: 2.5rem auto; max-width: 28rem; text-align: left; }
.event-fact { align-items: start; display: grid; gap: 1.25rem; grid-template-columns: 1.75rem minmax(0, 1fr); }
.event-fact dt { padding-top: 0.15rem; }
.event-fact dd { font-size: 1.1rem; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.event-fact time { font-variant-numeric: tabular-nums; }
.event-fact__note { color: var(--muted); display: block; font-size: 0.9rem; font-weight: 400; margin-top: 0.25rem; }

.haunted-button {
  align-items: center;
  background: var(--orange);
  border: 1px solid transparent;
  border-radius: 2rem;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 700;
  gap: 0.75rem;
  justify-content: center;
  line-height: 1.4;
  max-width: 100%;
  min-height: 3.5rem;
  padding: 0.9rem 1.5rem;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  width: min(100%, 24rem);
}

.haunted-button .icon { color: currentColor; height: 1.3rem; width: 1.3rem; }
.haunted-button:active { transform: translateY(1px); }
.haunted-button--outline { background: rgb(8 9 12 / 80%); border-color: var(--orange); color: var(--white); }
.haunted-button:disabled { cursor: not-allowed; opacity: 0.6; }
.section-link { align-items: center; display: flex; font-size: 0.9rem; gap: 0.65rem; justify-content: center; margin: 1rem auto 0; min-height: 2.75rem; padding: 0.5rem; width: fit-content; }

.art-heading { margin: 0 auto 2rem; max-width: 24rem; width: 90%; }
.art-heading img { width: 100%; }
.art-heading--rsvp { max-width: 23rem; }
.art-heading--done { max-width: 24rem; }
.section-lead { color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.75; text-wrap: pretty; }
.section-lead strong { color: var(--white); font-weight: 600; }
.event-description { font-size: 1.1rem; line-height: 1.85; margin-bottom: 2.5rem; text-align: left; white-space: pre-wrap; }
.haunted-expect .section-lead { margin-bottom: 2.5rem; }
.haunted-where .event-facts { margin-bottom: 1rem; }
.location-link { align-items: center; display: inline-flex; gap: 0.6rem; justify-content: center; margin-bottom: 1.75rem; min-height: 2.75rem; padding: 0.5rem; }
.location-link .icon { color: currentColor; height: 1.2rem; width: 1.2rem; }
.privacy-note { align-items: center; color: var(--muted); display: flex; font-size: 0.95rem; gap: 1rem; justify-content: center; margin: 0 auto 2rem; text-align: left; }
.privacy-note .icon { color: var(--muted); }

.haunted-form { margin: 2rem auto 0; max-width: 28rem; }
.rsvp-options { border: 0; display: grid; gap: 1rem; min-width: 0; padding: 0; }
.rsvp-option {
  align-items: center;
  background: rgb(8 9 12 / 86%);
  border: 1px solid #735140;
  border-radius: 1rem;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 1rem 1.25rem;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.rsvp-option input { accent-color: var(--orange); flex: none; height: 1.4rem; margin: 0; width: 1.4rem; }
.rsvp-option span { min-width: 0; overflow-wrap: anywhere; }
.rsvp-option .option-art { color: var(--muted); height: 1.9rem; margin-left: auto; width: 1.9rem; }
.rsvp-option:has(input:checked) { background: #352014; border-color: var(--orange); }
.rsvp-option:has(input:checked) .option-art { color: var(--orange); }
.rsvp-option:has(input:focus-visible) { outline: 3px solid var(--orange-light); outline-offset: 5px; }
.haunted-form .haunted-button { margin-top: 1.75rem; width: 100%; }
.response-help { color: var(--muted); font-size: 0.9rem; margin: 1.5rem auto 0; max-width: 28rem; }
.form-error { background: #3d1712; border: 1px solid #dc8d80; border-radius: 0.75rem; color: #ffcec5; margin: 1.5rem auto 0; max-width: 28rem; padding: 0.9rem 1rem; text-align: left; }
.response-note { color: var(--muted); font-size: 0.95rem; margin: 1.5rem auto 0; max-width: 28rem; }
.response-note strong { color: var(--orange-light); }

.haunted-wishlist { --scene: url("img/bg-3.jpg"); }
.haunted-photos { --scene: url("img/bg-2.jpg"); min-height: 0; }
.haunted-photos .photo-gallery { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); list-style: none; margin: 2rem auto 0; max-width: 40rem; padding: 0; }
.haunted-photos .photo-gallery__link { aspect-ratio: 1; border: 1px solid #754029; border-radius: 1rem; display: block; overflow: hidden; }
.haunted-photos .photo-gallery__link img { height: 100%; object-fit: cover; transition: transform 300ms ease; width: 100%; }
.haunted-photos .photo-gallery__link:hover img { transform: scale(1.05); }
.event-program { display: grid; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.event-program__item { display: grid; gap: 0 0.9rem; grid-template-columns: 5rem minmax(0, 1fr); }
.event-program__time { color: var(--orange-light); font-variant-numeric: tabular-nums; }
.event-program__title { grid-column: 2; }
.event-program__note { color: var(--muted); font-size: 0.9rem; font-weight: 400; grid-column: 2; }
.response-deadline { color: var(--orange-light); font-weight: 600; margin-top: 1rem; }
.rsvp-extra { display: grid; gap: 1.25rem; margin-top: 1.5rem; text-align: left; }
.rsvp-extra__field { display: grid; gap: 0.45rem; }
.rsvp-extra__label { font-weight: 600; }
.rsvp-extra__optional, .rsvp-extra__help { color: var(--muted); font-weight: 400; }
.rsvp-extra__help { font-size: 0.88rem; }
.rsvp-extra__input { background: rgb(8 9 12 / 86%); border: 1px solid #735140; border-radius: 1rem; color: var(--white); font-size: 1rem; min-height: 3.5rem; padding: 0.75rem 1rem; }
.rsvp-extra__input:focus-visible { border-color: var(--orange); }
.rsvp-extra__number { font-variant-numeric: tabular-nums; width: 7rem; }
.rsvp-extra__textarea { min-height: 6rem; resize: vertical; width: 100%; }
/* Name fields on the event's open link. */
.rsvp-extra__text { width: 100%; }
.haunted-done .haunted-button + .haunted-button { margin-top: 1rem; }
.haunted-title { color: var(--white); font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 1rem; text-wrap: balance; }
.haunted-wishlist .wishlist { margin: 2.25rem auto 0; max-width: 32rem; text-align: left; }
.haunted-wishlist .wishlist-items { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.haunted-wishlist .wishlist-item { background: rgb(8 9 12 / 82%); border: 1px solid #754029; border-radius: 1rem; display: grid; gap: 1.1rem; padding: 1.25rem; scroll-margin-top: 1rem; }
.haunted-wishlist .wishlist-item--mine { background: #352014; border-color: var(--orange); }
.haunted-wishlist .wishlist-item__title { font-size: 1.15rem; font-weight: 650; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.haunted-wishlist .wishlist-item--taken .wishlist-item__title { color: var(--muted); }
.haunted-wishlist .wishlist-item__description { color: var(--muted); margin-top: 0.35rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.haunted-wishlist .wishlist-item__status { color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; margin-top: 0.5rem; }
.haunted-wishlist .wishlist-item__status strong { color: var(--orange-light); font-weight: 650; }
.haunted-wishlist .wishlist-item__actions { display: grid; gap: 0.75rem; }
.haunted-wishlist .wishlist-item__form { align-items: end; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.haunted-wishlist .wishlist-item__quantity { color: var(--muted); display: grid; font-size: 0.85rem; gap: 0.35rem; }
.haunted-wishlist .wishlist-item__quantity input { background: var(--canvas); border: 1px solid #754029; border-radius: 0.75rem; color: var(--white); font-variant-numeric: tabular-nums; min-height: 3.5rem; padding: 0.5rem 0.75rem; width: 6rem; }
.haunted-wishlist .wishlist-item__quantity input:focus-visible { border-color: var(--orange); }
.haunted-wishlist .haunted-button { flex: 1 1 12rem; min-height: 3.25rem; width: auto; }
.haunted-wishlist .wishlist-item__cancel .haunted-button { width: 100%; }
.haunted-wishlist .wishlist-notice { background: #1d2a17; border: 1px solid #7fb069; border-radius: 0.75rem; color: #d6f0c8; margin-bottom: 1rem; padding: 0.9rem 1rem; }
.haunted-wishlist .wishlist-error { background: #3d1712; border: 1px solid #dc8d80; border-radius: 0.75rem; color: #ffcec5; margin-bottom: 1rem; padding: 0.9rem 1rem; }
.haunted-wishlist .wishlist-help { color: var(--muted); font-size: 0.9rem; margin-top: 1.25rem; text-align: center; }
.confirmation-title { font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 1.5rem; text-wrap: balance; }
.confirmation-icon { color: var(--orange); height: 4rem; margin: 0 auto 1.75rem; width: 4rem; }
.haunted-footer { align-items: center; color: var(--muted); display: flex; font-size: 0.8rem; gap: 1rem; justify-content: space-between; margin: auto; max-width: 70rem; padding: 1.5rem max(1.25rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left)); }
.version { color: #b8aaa4; font-size: 0.75rem; }

@media (hover: hover) {
  .haunted-button:hover { background: var(--orange-light); }
  .haunted-button--outline:hover { background: #352014; color: var(--white); }
  .rsvp-option:hover { border-color: var(--orange); }
  .haunted-nav a:hover, .section-link:hover, .location-link:hover { color: var(--white); }
}

@media (min-width: 48rem) {
  .haunted-section { min-height: 48rem; padding-bottom: 7rem; padding-top: 7rem; }
  .haunted-section::before { left: max(0px, calc((100% - 72rem) / 2)); right: max(0px, calc((100% - 72rem) / 2)); }
  .haunted-section::after { background: linear-gradient(180deg, var(--canvas), rgb(8 9 12 / 30%) 20%, rgb(8 9 12 / 72%) 70%, var(--canvas)), linear-gradient(90deg, var(--canvas), transparent 25%, transparent 75%, var(--canvas)); }
  .haunted-hero { min-height: 64rem; padding-top: 10rem; }
  .haunted-hero::after { background: linear-gradient(180deg, rgb(8 9 12 / 10%), rgb(8 9 12 / 20%) 35%, rgb(8 9 12 / 86%) 85%, var(--canvas)), linear-gradient(90deg, var(--canvas), transparent 30%, transparent 70%, var(--canvas)); }
  .haunted-nav { left: 2.5rem; right: 2.5rem; top: 1.5rem; }
  .haunted-rsvp { min-height: 50rem; }
  .haunted-done { min-height: calc(100svh - 5rem); }
  .hero-art { max-width: 34rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* The cover's main button sits at the bottom: the music button goes under the logo instead. */
:root { --jh-music-top: calc(4.75rem + env(safe-area-inset-top)); --jh-music-bottom: auto; }
