/* =========================================================================
   Pahrump Trunk or Treat — festive, mobile-first theme
   ========================================================================= */

:root {
  --orange: #f7630c;
  --orange-dark: #d8530a;
  --purple: #5b1d8c;
  --purple-deep: #2a0e44;
  --night: #1a0b2e;
  --candy-pink: #ff5fa2;
  --candy-green: #5fd068;
  --cream: #fff7ef;
  --ink: #2b2230;
  --muted: #6b6275;
  --line: #ece3ef;
  --white: #ffffff;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(42, 14, 68, 0.12);
  --shadow-sm: 0 4px 14px rgba(42, 14, 68, 0.10);
  --maxw: 1160px;

  --font-head: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo, .btn { font-family: var(--font-head); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; margin-bottom: .75rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: .4rem; }

p { margin-bottom: 1rem; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: .95rem; }
.lead { font-size: 1.2rem; color: var(--ink); opacity: .9; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--orange); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--night);
  box-shadow: 0 2px 18px rgba(0,0,0,.25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.25rem; }
.logo { color: #fff; font-size: 1.35rem; font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.logo:hover { text-decoration: none; color: var(--orange); }
.logo-emoji { font-size: 1.5rem; }

.primary-nav ul { display: flex; gap: .35rem; flex-wrap: wrap; }
.primary-nav a {
  color: #f0e9f5; padding: .5rem .7rem; border-radius: 999px; font-weight: 600;
  font-size: .98rem; transition: background .2s, color .2s;
}
.primary-nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.primary-nav a[aria-current="page"] { background: var(--orange); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: #fff; border-radius: 3px; margin: 5px 0; transition: .25s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--night);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .primary-nav.open { max-height: 80vh; }
  .primary-nav ul { flex-direction: column; padding: .5rem 1.25rem 1rem; gap: .2rem; }
  .primary-nav a { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 2px solid transparent; border-radius: 999px;
  padding: .7rem 1.4rem; font-weight: 600; font-size: 1rem; cursor: pointer;
  text-align: center; transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); color: #fff; }
.btn-secondary { background: var(--purple); color: #fff; }
.btn-secondary:hover { background: #4a1773; color: #fff; }
.btn-outline { background: transparent; border-color: var(--orange); color: var(--orange-dark); }
.btn-outline:hover { background: var(--orange); color: #fff; }
.btn-outline-light { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--purple-deep); }
.btn-lg { padding: .9rem 1.8rem; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Home hero ---------- */
.hero-home {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(247,99,12,.35), transparent 60%),
    linear-gradient(160deg, var(--purple) 0%, var(--purple-deep) 55%, var(--night) 100%);
  padding: 3.5rem 0 4rem;
}
.hero-bats {
  position: absolute; inset: 0; font-size: 1.8rem; opacity: .25;
  display: flex; justify-content: space-around; align-items: flex-start;
  padding-top: 1rem; pointer-events: none; letter-spacing: 3rem;
  animation: floaty 8s ease-in-out infinite alternate;
}
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .hero-bats { animation: none; } }

.hero-home-inner { position: relative; z-index: 1; max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-weight: 700; color: var(--candy-green); font-size: .85rem; margin-bottom: .5rem; }
.hero-home h1 { margin-bottom: .8rem; text-shadow: 0 3px 18px rgba(0,0,0,.4); }
.hero-tagline { font-size: 1.2rem; opacity: .95; max-width: 640px; margin: 0 auto 1.5rem; }

.event-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.2rem; margin-bottom: 1.6rem; font-weight: 600; }
.event-facts span { background: rgba(255,255,255,.1); padding: .35rem .85rem; border-radius: 999px; }

.countdown { display: inline-flex; gap: .6rem; margin-bottom: 1.8rem; }
.cd-unit { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-sm); padding: .7rem .4rem; min-width: 72px; }
.cd-num { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: #fff; line-height: 1; }
.cd-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; margin-top: .3rem; }

.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.live-counter { margin-top: 1.6rem; font-size: 1.05rem; background: rgba(95,208,104,.15); display: inline-block; padding: .5rem 1.1rem; border-radius: 999px; }
.live-counter strong { color: var(--candy-green); }

/* ---------- Sections ---------- */
.section { padding: 3.2rem 0; }
.section-tinted { background: linear-gradient(180deg, #fbeede, #fff7ef); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }

.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.2rem; text-align: center; box-shadow: var(--shadow-sm); transition: transform .15s; }
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 2.6rem; margin-bottom: .5rem; }

.involve-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); display: block; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.involve-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.involve-emoji { font-size: 2.4rem; }
.involve-card h3 { margin-top: .5rem; color: var(--purple); }
.involve-link { color: var(--orange-dark); font-weight: 700; }

/* ---------- CTA bands ---------- */
.cta-band { background: linear-gradient(160deg, var(--purple), var(--night)); color: #fff; text-align: center; padding: 3.2rem 1.25rem; }
.cta-band h2 { color: #fff; }
.cta-band p { opacity: .9; }
.cta-band-inset { border-radius: var(--radius); margin: 3rem 0; }

/* ---------- Page header ---------- */
.page-header { background: linear-gradient(160deg, var(--purple), var(--purple-deep)); color: #fff; padding: 2.6rem 0; text-align: center; }
.page-header h1 { color: #fff; }
.page-header .lead { color: #fff; opacity: .92; max-width: 720px; margin: .5rem auto 0; }

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: start; padding: 2.6rem 1.25rem; }
@media (max-width: 820px) { .form-layout { grid-template-columns: 1fr; } }

.form-aside h2 { font-size: 1.4rem; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }

.field { margin-bottom: 1.1rem; }
.field label, .checkbox-group legend { display: block; font-weight: 700; margin-bottom: .35rem; }
.req { color: var(--candy-pink); }
.field input, .field textarea, .field select {
  width: 100%; padding: .7rem .85rem; border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; background: #fdfbff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(247,99,12,.15);
}
.field-help { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }

.checkbox-group { border: 0; }
.checkbox { display: flex; align-items: center; gap: .55rem; font-weight: 400; margin-bottom: .4rem; cursor: pointer; }
.checkbox input { width: auto; }

.cf-turnstile { margin: 1rem 0; }

.form-status { margin-top: .9rem; font-weight: 600; min-height: 1.2rem; }
.form-status.success { color: #1c7c34; }
.form-status.error { color: #c0392b; }
.form-card.is-done .field, .form-card.is-done .cf-turnstile, .form-card.is-done button { display: none; }

/* lists / steps / boxes */
.steps { padding-left: 1.2rem; margin-bottom: 1rem; }
.steps li { list-style: decimal; margin-bottom: .4rem; margin-left: .4rem; }
.detail-list li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.detail-list li:last-child { border-bottom: 0; }

.claimed-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-top: 1.5rem; box-shadow: var(--shadow-sm); }
.claimed-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.claimed-list li { background: #f3eafb; color: var(--purple); padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }

.rsvp-stat { background: linear-gradient(160deg, var(--purple), var(--night)); color: #fff; border-radius: var(--radius); padding: 1.4rem; text-align: center; margin-bottom: 1.4rem; }
.rsvp-num { display: block; font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; color: var(--candy-green); }
.rsvp-label { opacity: .9; }

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: 1rem; max-width: 760px; margin: 0 auto; }
.timeline-item { background: #fff; border-left: 5px solid var(--orange); border-radius: var(--radius-sm); padding: 1rem 1.2rem; box-shadow: var(--shadow-sm); }
.timeline-year { font-family: var(--font-head); font-weight: 700; color: var(--orange-dark); font-size: 1.1rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .7rem; padding: 0 1.1rem; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; padding: 1rem 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--orange); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding: .8rem 0; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-method { display: flex; gap: 1rem; margin-bottom: 1.4rem; }
.contact-icon { font-size: 1.6rem; flex: 0 0 48px; height: 48px; width: 48px; display: flex; align-items: center; justify-content: center; background: #f3eafb; border-radius: 50%; }
.map-container { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

/* ---------- Gallery ---------- */
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.8rem; }
.filter-btn { background: #fff; border: 2px solid var(--line); padding: .45rem 1.1rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-family: var(--font-body); }
.filter-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-item { border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); background: #fff; }
.gallery-trigger { display: block; border: 0; padding: 0; cursor: zoom-in; background: none; width: 100%; }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.06); }
.image-caption { padding: .5rem .7rem; font-size: .88rem; color: var(--muted); }

.gallery-empty { text-align: center; max-width: 560px; margin: 1rem auto; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 2.5rem 1.5rem; }
.gallery-empty-emoji { font-size: 3rem; margin-bottom: .5rem; }

.lightbox { position: fixed; inset: 0; background: rgba(10,4,20,.92); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 1.5rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: .8rem; }
.lightbox-close { position: absolute; top: 1rem; right: 1.4rem; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #e7ddf0; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 3rem 1.25rem 2rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.footer-logo { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: #fff; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: .6rem; }
.site-footer a { color: #e7ddf0; }
.site-footer a:hover { color: var(--orange); }
.footer-links li, .footer-contact li { padding: .25rem 0; }
.footer-social { display: flex; gap: 1rem; margin-top: .6rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1rem 1.25rem; text-align: center; font-size: .9rem; opacity: .8; }
.footer-ics { font-weight: 700; }
