/* Halloween Carnival — greatestjchan.com/Halloweencarnival
   Shared stylesheet for all pages. No build step, no framework. */

:root {
  /* Spacing scale — 8px base, one allowed half-step (4px) for tight
     icon/text gaps. Named by purpose so it can be reused everywhere. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 88px;

  --bg-0: #131019;
  --bg-1: #1c1410;
  --bg-card: #241a15;
  --line: #4a3a2e;
  --fg: #f7f0e6;
  --muted: #c9b8a8;
  --orange: #e8792e;
  --orange-2: #cf5f1f;
  --orange-deep: #7a3712;
  --purple: #7c4fb0;
  --purple-2: #4f2f78;
  --purple-light: #b98fe0;
  --cream: #f1e6d0;
  --cream-line: #8f7a56;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  background: var(--bg-0);
  color: var(--fg);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Luckiest Guy", "Nunito", system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.5px;
  margin: 0;
}

p { margin: 0; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--purple-light); }
a:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 3px; border-radius: 2px; }

img { max-width: 100%; display: block; }

.stroke-white {
  color: var(--orange);
  -webkit-text-stroke: 3px #fbf6ec;
  paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(122, 55, 18, 0.6), 0 10px 24px rgba(0, 0, 0, 0.55);
}

.stroke-white-sm {
  color: var(--orange);
  -webkit-text-stroke: 1.6px #fbf6ec;
  paint-order: stroke fill;
}

.eyebrow {
  display: block;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--purple-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.3px;
  padding: var(--space-3) var(--space-5);
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid var(--purple-light);
  outline-offset: 3px;
}
.btn-primary {
  background: linear-gradient(180deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #180f05;
  box-shadow: 0 8px 0 var(--orange-deep), 0 14px 28px rgba(0, 0, 0, 0.45);
}
.btn-primary:active { box-shadow: 0 4px 0 var(--orange-deep), 0 8px 16px rgba(0, 0, 0, 0.4); }
.btn-primary[disabled] { opacity: 0.7; cursor: default; transform: none; filter: none; }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 2px solid rgba(201, 184, 168, 0.4);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.section-pad { padding: var(--space-9) var(--space-4); }
.page-header-pad {
  padding: var(--space-8) var(--space-4) var(--space-7);
  background: radial-gradient(ellipse 900px 600px at 50% -8%, rgba(124, 79, 176, 0.3), transparent 60%);
}
@media (max-width: 720px) {
  .section-pad { padding: var(--space-7) var(--space-3); }
  .page-header-pad { padding: var(--space-6) var(--space-3) var(--space-5); }
}

.wrap { max-width: 1120px; margin: 0 auto; }
.wrap-narrow { max-width: 780px; margin: 0 auto; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.card-link:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  background: #2c2019;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.card-link--glass:hover {
  background: rgba(124, 79, 176, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--purple-light);
}

.logo-slot {
  background: linear-gradient(165deg, #fbf5e6 0%, var(--cream) 100%);
  border-radius: 20px;
  padding: var(--space-5) var(--space-4);
  box-shadow: 0 8px 0 var(--cream-line), 0 24px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  width: 232px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.logo-slot__frame {
  width: 100%;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-slot__frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-slot span {
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  font-size: 16px;
  color: #26243f;
  text-align: center;
}
.logo-slot-link { display: block; text-decoration: none; transition: transform 0.18s ease; }
.logo-slot-link:hover .logo-slot {
  transform: translateY(-5px);
  box-shadow: 0 8px 0 var(--cream-line), 0 32px 56px rgba(0, 0, 0, 0.45);
}

/* Printing Partner tier: same clean treatment, deliberately a size down */
.logo-slot--sm { width: 190px; padding: var(--space-4) var(--space-3); gap: var(--space-2); }
.logo-slot--sm .logo-slot__frame { height: 80px; }
.logo-slot--sm span { font-size: 14px; }

::selection { background: var(--purple); color: white; }

/* ============ NAV ============ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(19, 16, 25, 0.82);
  border-bottom: 1px solid rgba(201, 184, 168, 0.2);
}
.site-nav__row {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.site-nav__logo { display: flex; align-items: baseline; gap: var(--space-2); font-weight: 800; font-size: 16px; white-space: nowrap; }
.site-nav__logo a { color: var(--fg); }
.site-nav__logo a:hover { color: var(--fg); }
.site-nav__logo .accent { color: var(--orange); }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-nav__links a {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.site-nav__links a:hover, .site-nav__links a[aria-current="page"] { color: var(--orange); }

/* ============ NAV DROPDOWN (Contests) ============ */
.nav-dropdown { position: relative; }
.nav-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.nav-dropdown__trigger:hover,
.nav-dropdown:hover .nav-dropdown__trigger,
.nav-dropdown:focus-within .nav-dropdown__trigger,
.nav-dropdown__trigger.is-current { color: var(--orange); }
.nav-dropdown__chevron { transition: transform 0.18s ease; flex-shrink: 0; }
.nav-dropdown:hover .nav-dropdown__chevron,
.nav-dropdown:focus-within .nav-dropdown__chevron { transform: rotate(180deg); }
.nav-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-2);
  min-width: 190px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(8px);
}
.nav-dropdown__menu a {
  display: block;
  padding: var(--space-2) var(--space-2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.nav-dropdown__menu a:hover, .nav-dropdown__menu a[aria-current="page"] {
  background: rgba(232, 121, 46, 0.14);
  color: var(--orange);
}

.site-nav__cta { display: flex; align-items: center; gap: var(--space-2); }
.site-nav__cta .btn { padding: var(--space-2) var(--space-3); font-size: 14px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(201, 184, 168, 0.4);
  border-radius: 10px;
  color: var(--fg);
  cursor: pointer;
}
.nav-toggle svg { pointer-events: none; }
.nav-toggle:focus-visible { outline: 3px solid var(--purple-light); outline-offset: 2px; }

.site-nav__mobile-panel {
  display: none;
  flex-direction: column;
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-top: 1px solid rgba(201, 184, 168, 0.15);
}
.site-nav__mobile-panel a {
  padding: var(--space-3) var(--space-1);
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 1px solid rgba(201, 184, 168, 0.12);
}
.site-nav__mobile-panel a:focus-visible { outline: 2px solid var(--purple-light); outline-offset: -2px; }
.site-nav__mobile-panel a[aria-current="page"] { color: var(--orange); }
.site-nav__mobile-subhead {
  padding: var(--space-3) var(--space-1) 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav__mobile-panel a.site-nav__mobile-sub {
  padding-left: var(--space-3);
  font-size: 14px;
}

@media (max-width: 1120px) {
  .site-nav__links { display: none; }
  .nav-toggle { display: flex; }
  .site-nav.is-open .site-nav__mobile-panel { display: flex; }
}

/* ============ STAGE AVATAR STACK (Explore/What's Happening feature card) ============ */
.stage-avatars { display: flex; margin-bottom: var(--space-3); }
.stage-avatars__img {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  margin-left: -42px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}
.stage-avatars__img:first-child { margin-left: 0; }

@media (max-width: 560px) {
  .stage-avatars__img {
    width: 96px;
    height: 96px;
    margin-left: -24px;
  }
}

/* ============ GRIDS ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 760px) {
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ============ PENNANT + STRIPES ============ */
.pennant { display: flex; justify-content: center; gap: 6px; margin-bottom: 24px; opacity: 0.9; }
.tent-stripe {
  height: 22px;
  opacity: 0.85;
}
.tent-stripe--a { background: repeating-linear-gradient(45deg, var(--orange) 0px, var(--orange) 26px, var(--purple) 26px, var(--purple) 52px); }
.tent-stripe--b { background: repeating-linear-gradient(45deg, var(--purple) 0px, var(--purple) 26px, var(--orange) 26px, var(--orange) 52px); }

/* ============ FOOTER ============ */
.site-footer { padding: var(--space-7) var(--space-4) var(--space-6); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }

/* ============ COUNTDOWN ============ */
.countdown-tile {
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-3) var(--space-2);
  text-align: center;
}
.countdown-tile .display { font-size: 30px; color: var(--orange); line-height: 1; }
.countdown-tile span:last-child {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
}
.countdown-tile--lg { padding: var(--space-4) var(--space-2); }
.countdown-tile--lg .display { font-size: clamp(34px, 5vw, 52px); }
.countdown-tile--lg span:last-child { font-size: 12px; margin-top: var(--space-2); }

/* ============ PHOTO / PREVIEW PLACEHOLDER TILE ============ */
.photo-slot {
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: var(--bg-0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 96px;
  text-align: center;
  padding: var(--space-3);
}
.photo-slot span { font-size: 12px; font-weight: 700; color: var(--muted); }

/* ============ AVATAR SLOT (guest/boother headshot placeholder, swap in a real <img> later) ============ */
.avatar-slot {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed var(--line);
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-2);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-slot img { width: 100%; height: 100%; object-fit: cover; }
.avatar-slot--photo {
  border-style: solid;
  border-width: 3px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}
.card-link:hover .avatar-slot--photo { border-color: var(--orange); }
.avatar-slot--lg {
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1 / 1;
  border-width: 4px;
  margin-bottom: var(--space-4);
}
.avatar-slot__caption {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-3);
}

/* ============ PREVIEW TILE (guest/booth cards with a real name, no photo yet) ============ */
.preview-tile {
  border-radius: 16px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 128px;
  padding: var(--space-3);
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.preview-tile:hover { transform: translateY(-3px); border-color: var(--orange); }
.preview-tile__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.preview-tile span { font-size: 13px; font-weight: 800; color: var(--fg); line-height: 1.3; }

/* ============ GRAIN TEXTURE (hero) ============ */
.grain-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.05;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}

/* ============ FADE-AND-RISE ENTRANCE (hero, restrained) ============ */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise-in { animation: riseIn 0.5s ease both; }
.rise-in--1 { animation-delay: 0.05s; }
.rise-in--2 { animation-delay: 0.12s; }
.rise-in--3 { animation-delay: 0.2s; }
.rise-in--4 { animation-delay: 0.3s; }
.rise-in--5 { animation-delay: 0.38s; }

/* ============ BENTO GRID (explore section) ============ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: var(--space-4);
}
.bento-grid .bento-feature { grid-column: span 2; grid-row: span 2; }
.bento-grid .bento-wide { grid-column: span 2; }
@media (max-width: 760px) {
  .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-grid .bento-feature, .bento-grid .bento-wide { grid-column: span 2; grid-row: span 1; }
}

/* ============ STICKY MOBILE CTA ============ */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 50;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(19, 16, 25, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.sticky-cta__price { flex: 1; min-width: 0; }
.sticky-cta__price strong { display: block; font-family: "Luckiest Guy"; font-size: 19px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta__price small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta .btn { padding: var(--space-3) var(--space-4); font-size: 15px; white-space: nowrap; flex-shrink: 0; }

@media (max-width: 760px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 74px; }
}

/* ============ MISC ============ */
.stat { text-align: center; }
.stat .display { font-size: 34px; color: var(--orange); }
.stat p:last-child { font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; margin-top: 4px; }

.faq-item { padding: var(--space-4) var(--space-4); }
.faq-item p:first-child { font-weight: 800; font-size: 16px; margin-bottom: 8px; }
.faq-item p:last-child { font-size: 14px; color: var(--muted); line-height: 1.6; font-weight: 600; }

.notify-status {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-light);
  min-height: 18px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--orange);
  color: #180f05;
  padding: var(--space-2) var(--space-3);
  border-radius: 8px;
  font-weight: 800;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}
@keyframes drift {
  0% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(10px) translateY(-8px); }
  100% { transform: translateX(0) translateY(0); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(20deg); }
}
@keyframes swirl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============ HERO MAGIC: bats + sparkles around the logo ============ */
.hero-logo-wrap { position: relative; display: inline-block; margin: 0 auto; }

.hero-glow-ring {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 79, 176, 0.4) 0%, rgba(232, 121, 46, 0.14) 45%, transparent 72%);
  filter: blur(8px);
  animation: swirl 36s linear infinite;
  z-index: 0;
  pointer-events: none;
}

.hero-bat {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}
.hero-bat--a { top: 2%; left: -4%; width: 8%; min-width: 32px; animation: bat-fly-a 13s ease-in-out infinite; }
.hero-bat--b { top: 52%; right: -6%; width: 6%; min-width: 24px; animation: bat-fly-b 16s ease-in-out infinite; }
.hero-bat--c { bottom: 4%; left: 10%; width: 5%; min-width: 20px; animation: bat-fly-a 19s ease-in-out infinite reverse; animation-delay: -4s; }

.hero-sparkle {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  animation: twinkle 2.6s ease-in-out infinite;
}

@keyframes bat-fly-a {
  0%   { transform: translate(0, 0) rotate(-6deg) scale(1); opacity: 0.92; }
  25%  { transform: translate(9vw, -6vw) rotate(10deg) scale(0.9); opacity: 0.75; }
  50%  { transform: translate(16vw, 2vw) rotate(-4deg) scale(1.06); opacity: 0.95; }
  75%  { transform: translate(6vw, 9vw) rotate(10deg) scale(0.94); opacity: 0.8; }
  100% { transform: translate(0, 0) rotate(-6deg) scale(1); opacity: 0.92; }
}
@keyframes bat-fly-b {
  0%   { transform: translate(0, 0) rotate(6deg) scale(1); opacity: 0.85; }
  30%  { transform: translate(-11vw, -5vw) rotate(-10deg) scale(0.88); opacity: 0.7; }
  60%  { transform: translate(-5vw, 6vw) rotate(8deg) scale(1.1); opacity: 0.95; }
  100% { transform: translate(0, 0) rotate(6deg) scale(1); opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}
