/* ===== Tiki Time Bomb — "scary tiki" theme ===== */
:root {
  --ember: #ff4d1c;
  --ember-deep: #c92a0a;
  --gold: #ffb43d;
  --torch: #ff7a18;
  --night: #0c0710;
  --panel: #1a1320;      /* dark card */
  --panel-2: #221829;
  --bone: #f2e7d5;       /* primary light text */
  --muted: #c2b0bd;      /* muted light text */
  --teal: #1fb6a6;
  --teal-dark: #0e7f74;
  --blood: #8c0f22;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  --glow: 0 0 30px rgba(255, 77, 28, 0.55);
  --radius: 18px;
}

* { box-sizing: border-box; }

/* The HTML `hidden` attribute must beat class-based display rules (e.g. .gate) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Quicksand", system-ui, sans-serif;
  color: var(--bone);
  background:
    radial-gradient(circle at 50% -10%, #340f13 0%, transparent 55%),
    radial-gradient(circle at 100% 100%, #10261b 0%, transparent 45%),
    linear-gradient(180deg, #0c0710 0%, #0f1714 55%, #0c0710 100%);
  background-attachment: fixed;
  line-height: 1.6;
}

h1, h2, h3 { line-height: 1.1; margin: 0 0 0.4em; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: "Quicksand", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ember), var(--gold));
  color: #1a0c06;
  box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 42px rgba(255, 122, 24, 0.75); }
.btn-primary:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* Upgraded gate button — full width with a sweeping sheen */
.gate-btn {
  width: 100%;
  margin-top: 4px;
  font-size: 1.12rem;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}
.gate-btn::after {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  animation: sheen 3.4s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -120%; } 55%, 100% { left: 135%; } }

/* ===== Navbar (sticky + hamburger) ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(12, 7, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 77, 28, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}
.nav-brand {
  font-family: "Creepster", "Pacifico", cursive;
  letter-spacing: 1px;
  font-size: 1.5rem;
  color: var(--ember);
  text-decoration: none;
  text-shadow: 0 0 14px rgba(255, 77, 28, 0.6);
}
.nav-toggle {
  width: 46px; height: 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  background: transparent; border: 1px solid rgba(255, 180, 61, 0.4);
  border-radius: 10px; cursor: pointer; padding: 0 10px;
}
.nav-toggle span {
  display: block; height: 3px; border-radius: 3px;
  background: var(--gold);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-menu {
  list-style: none;
  position: absolute;
  top: 100%; right: 12px;
  margin: 8px 0 0; padding: 8px;
  min-width: 200px;
  background: rgba(20, 12, 26, 0.97);
  border: 1px solid rgba(255, 77, 28, 0.4);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform-origin: top right;
  transform: scale(0.92); opacity: 0; pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.nav-menu.open { transform: scale(1); opacity: 1; pointer-events: auto; }
.nav-menu li { margin: 0; }
.nav-menu a {
  display: block;
  padding: 12px 16px;
  color: var(--bone);
  text-decoration: none;
  font-weight: 700;
  border-radius: 10px;
}
.nav-menu a:hover { background: rgba(255, 77, 28, 0.18); color: var(--gold); }

/* ===== Passcode gate ===== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, #5a160c 0%, transparent 50%),
    radial-gradient(circle at 30% 90%, #102a1d 0%, transparent 45%),
    #0a0509;
}
.gate-card {
  background: linear-gradient(160deg, #1f1626, #140d1a);
  border: 1px solid rgba(255, 77, 28, 0.35);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow), var(--glow);
}
.gate-emoji { font-size: 2.6rem; filter: drop-shadow(0 0 12px rgba(255, 77, 28, 0.6)); }
.gate-title { font-family: "Creepster", cursive; color: var(--ember); font-size: 2.8rem; margin: 0.2em 0; letter-spacing: 2px; text-shadow: 0 0 18px rgba(255, 77, 28, 0.7); }
.gate-sub { color: var(--muted); margin-bottom: 1.4em; }
#gate-form { display: flex; flex-direction: column; gap: 12px; }
#gate-input {
  padding: 14px 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 180, 61, 0.35);
  background: #0d0810;
  color: var(--bone);
  font-size: 1.05rem;
  text-align: center;
  font-family: "Quicksand", sans-serif;
}
#gate-input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 14px rgba(255, 77, 28, 0.5); }
.gate-error { color: var(--ember); font-weight: 600; margin-top: 10px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--bone);
  scroll-margin-top: 72px;
  background:
    radial-gradient(circle at 50% 120%, #ff5a1e 0%, #b3122b 18%, transparent 55%),
    radial-gradient(circle at 15% 15%, rgba(31, 182, 166, 0.18), transparent 40%),
    linear-gradient(180deg, #0a0509 0%, #1a0a12 55%, #050306 100%);
  overflow: hidden;
  padding: 60px 20px;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 85%, rgba(255, 122, 24, 0.25), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(255, 77, 28, 0.22), transparent 40%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero-masks { font-size: 2.4rem; filter: drop-shadow(0 0 16px rgba(255, 77, 28, 0.7)); animation: torch-flicker 2.4s infinite; }
.hero-kicker { font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin: 0.4em 0 0; }
.hero-title {
  font-family: "Creepster", cursive;
  font-size: clamp(3.4rem, 13vw, 7rem);
  color: var(--ember);
  letter-spacing: 3px;
  text-shadow: 0 0 22px rgba(255, 77, 28, 0.75), 0 6px 24px rgba(0, 0, 0, 0.6);
  margin: 0.05em 0;
}
.hero-tagline { font-family: "Rye", serif; font-size: clamp(1.1rem, 4vw, 1.6rem); margin: 0 0 0.6em; color: var(--bone); }
.hero-date { font-size: 1.3rem; font-weight: 700; margin: 0 0 0.4em; color: var(--gold); }
.hero-cta { margin-top: 1.2em; }

@keyframes torch-flicker {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 16px rgba(255, 77, 28, 0.7)); }
  45% { opacity: 0.82; filter: drop-shadow(0 0 26px rgba(255, 122, 24, 0.95)); }
  60% { opacity: 0.95; }
}

/* ===== BOMB countdown ===== */
.bomb-zone { margin: 1.6em auto 0.4em; text-align: center; }
.bomb-label {
  font-family: "Creepster", cursive;
  letter-spacing: 2px;
  font-size: 1.35rem;
  color: var(--ember);
  text-shadow: 0 0 14px rgba(255, 77, 28, 0.7);
  margin: 0 0 6px;
}
/* the dynamite bundle */
.dynamite { position: relative; width: 300px; margin: 30px auto 0; }
/* fuse pokes out the top of the bundle */
.fuse {
  position: absolute; top: -36px; left: 50%;
  width: 6px; height: 54px;
  background: linear-gradient(#7a5230, #3a2716);
  border-radius: 4px;
  transform: translateX(-50%) rotate(16deg); transform-origin: bottom center;
  z-index: 4;
}
.spark {
  position: absolute; top: -22px; left: -12px;
  font-size: 1.7rem;
  animation: spark-flicker 0.22s infinite alternate;
  filter: drop-shadow(0 0 10px #ffae00);
}
@keyframes spark-flicker {
  from { transform: scale(1) rotate(-6deg); opacity: 0.85; }
  to   { transform: scale(1.3) rotate(8deg); opacity: 1; }
}
/* the row of dynamite sticks */
.sticks {
  display: flex; gap: 6px; justify-content: center; align-items: flex-end;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.55));
}
.stick {
  position: relative;
  width: 50px; height: 210px;
  border-radius: 9px;
  /* left-to-right shading makes each stick read as a cylinder */
  background: linear-gradient(90deg, #5e0d18 0%, #c12a1c 30%, #ff7553 50%, #c12a1c 70%, #5e0d18 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
/* tan paper-wrap bands near each end of every stick */
.stick::before, .stick::after {
  content: ""; position: absolute; left: -1px; right: -1px; height: 26px;
  background: linear-gradient(90deg, #8a6a3e, #e8c98f 50%, #8a6a3e);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 -1px 2px rgba(0, 0, 0, 0.35);
}
.stick::before { top: 16px; }
.stick::after { bottom: 16px; }
/* center stick rides a little higher so the fuse reads as coming from it */
.stick:nth-child(3) { height: 226px; }

/* the LED timer panel strapped across the bundle */
.tnt-timer {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-2deg);
  width: 268px;
  background: linear-gradient(#1a1410, #0c0907);
  border: 2px solid #000;
  border-radius: 10px;
  padding: 12px 10px 9px;
  z-index: 3;
  animation: tnt-pulse 1s ease-in-out infinite;
}
/* "duct tape" strips holding the panel onto the sticks */
.tnt-timer::before, .tnt-timer::after {
  content: ""; position: absolute; top: -12px; bottom: -12px; width: 24px;
  background: rgba(38, 34, 30, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 0;
}
.tnt-timer::before { left: 22px; transform: rotate(2deg); }
.tnt-timer::after { right: 22px; transform: rotate(2deg); }
@keyframes tnt-pulse {
  0%, 100% { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 77, 28, 0.35); }
  50%      { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 46px rgba(255, 77, 28, 0.8); }
}
.bomb-timer {
  position: relative; z-index: 1;
  font-family: "Share Tech Mono", monospace;
  font-size: 2.2rem;
  color: #ff3b2f;
  text-shadow: 0 0 12px rgba(255, 59, 47, 0.95);
  letter-spacing: 2px;
  line-height: 1;
  text-align: center;
}
.bomb-timer i { font-style: normal; animation: colon-blink 1s steps(1) infinite; }
@keyframes colon-blink { 50% { opacity: 0.2; } }
.bomb-caption {
  position: relative; z-index: 1;
  font-family: "Share Tech Mono", monospace;
  color: var(--torch);
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  margin-top: 7px;
  text-transform: uppercase;
  text-align: center;
}
/* detonated state */
.tnt-timer.boom { animation: none; background: radial-gradient(circle at 50% 50%, #ffd34d, #ff4d1c 45%, #8c0f22 100%); border-color: #ffd34d; }
.tnt-timer.boom .bomb-timer { color: #fff; text-shadow: 0 0 20px #fff; }

/* ===== Sections ===== */
.section { max-width: 1040px; margin: 0 auto; padding: 80px 20px; scroll-margin-top: 72px; }
.section-title {
  font-family: "Creepster", cursive;
  color: var(--ember);
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 0 18px rgba(255, 77, 28, 0.55);
  margin-bottom: 0.2em;
}
.section-sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 2em; }

/* Detail grid */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin-top: 1.6em; }
.detail-card {
  background: linear-gradient(160deg, var(--panel), var(--night));
  border: 1px solid rgba(255, 77, 28, 0.18);
  border-top: 4px solid var(--ember);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.detail-card:hover { transform: translateY(-4px); box-shadow: var(--shadow), 0 0 26px rgba(255, 77, 28, 0.35); }
.detail-card h3 { color: var(--gold); }
.detail-card p { color: var(--muted); }
.detail-icon { font-size: 2rem; margin-bottom: 8px; filter: drop-shadow(0 0 8px rgba(255, 77, 28, 0.4)); }
.detail-link { font-weight: 700; text-decoration: none; color: var(--gold); }

/* Bartender */
.bartender-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
  background: linear-gradient(135deg, var(--panel-2), var(--night));
  border-radius: 26px;
  padding: 36px;
  box-shadow: var(--shadow), 0 0 34px rgba(140, 15, 34, 0.3);
  border: 2px dashed rgba(255, 180, 61, 0.5);
}
.bartender-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 40% 35%, var(--blood), #1a0a12 80%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow);
}
.bartender-photo img { width: 100%; height: 100%; object-fit: cover; }
.bartender-fallback { display: none; font-size: 5rem; filter: drop-shadow(0 0 12px rgba(255, 77, 28, 0.6)); }
.bartender-photo.no-photo .bartender-fallback { display: block; }
.bartender-kicker { color: var(--gold); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin: 0; }
.bartender-name { font-family: "Rye", serif; font-size: 2.2rem; color: var(--bone); text-shadow: 0 0 14px rgba(255, 77, 28, 0.45); }
.bartender-bio { color: var(--muted); }
.bartender-info a { color: var(--gold); }
.cocktail-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.cocktail-tag {
  background: linear-gradient(135deg, var(--ember-deep), var(--blood));
  color: var(--bone);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 0 14px rgba(255, 77, 28, 0.4);
}

/* RSVP form */
.rsvp-form {
  max-width: 560px;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--panel), var(--night));
  border: 1px solid rgba(255, 77, 28, 0.2);
  padding: 34px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label { font-weight: 600; margin-bottom: 6px; color: var(--bone); }
.field input, .field select, .field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid rgba(255, 180, 61, 0.25);
  background: #0d0810;
  color: var(--bone);
  font-size: 1rem;
  font-family: "Quicksand", sans-serif;
}
.field input::placeholder, .field textarea::placeholder { color: #7d6f78; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ember); box-shadow: 0 0 12px rgba(255, 77, 28, 0.4);
}
.field select option { background: #140d1a; }
.rsvp-form .btn { width: 100%; margin-top: 6px; }
.rsvp-status { text-align: center; font-weight: 600; margin-top: 14px; min-height: 1.2em; }
.rsvp-status.ok { color: var(--teal); }
.rsvp-status.err { color: var(--ember); }

/* Footer */
.footer { background: #07040a; color: var(--bone); text-align: center; padding: 48px 20px; border-top: 1px solid rgba(255, 77, 28, 0.25); }
.footer-title { font-family: "Creepster", cursive; font-size: 2rem; color: var(--ember); letter-spacing: 2px; margin: 0; text-shadow: 0 0 16px rgba(255, 77, 28, 0.6); }
.footer-small { opacity: 0.7; font-size: 0.9rem; }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .bartender-card { grid-template-columns: 1fr; text-align: center; }
  .bartender-photo { max-width: 220px; margin: 0 auto; }
  .cocktail-list { justify-content: center; }
}

/* ===== Admin page (kept light for at-a-glance readability) ===== */
.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }
.admin-login { max-width: 380px; margin: 12vh auto; text-align: center; background: linear-gradient(160deg, #1f1626, #140d1a); border: 1px solid rgba(255,77,28,0.35); padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow), var(--glow); }
.admin-login h1 { font-family: "Creepster", cursive; color: var(--ember); letter-spacing: 2px; }
.admin-login p { color: var(--muted); }
.admin-login input { width: 100%; padding: 12px 16px; border-radius: 999px; border: 2px solid rgba(255,180,61,0.3); background: #0d0810; color: var(--bone); text-align: center; margin: 10px 0; font-size: 1rem; }
.admin-login input:focus { outline: none; border-color: var(--ember); }
.stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 20px 0; }
.stat {
  flex: 1; min-width: 130px;
  background: linear-gradient(160deg, var(--panel), var(--night)); border-radius: 14px; padding: 18px; text-align: center;
  box-shadow: var(--shadow); border-top: 4px solid var(--ember);
}
.stat .num { font-size: 2rem; font-weight: 700; color: var(--gold); }
.stat .lbl { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; color: var(--muted); }
table.attendees { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.attendees th, table.attendees td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.95rem; color: var(--bone); }
table.attendees th { background: var(--ember-deep); color: var(--bone); }
table.attendees tr:hover td { background: rgba(255, 77, 28, 0.08); }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; color: #1a0c06; }
.badge.Yes { background: var(--teal); }
.badge.Maybe { background: var(--gold); }
.badge.No { background: #b85; }
.admin-error { color: var(--ember); font-weight: 600; }
