:root {
  --bg: #f4ecd8;
  --surface: #fffaf0;
  --surface-2: #f3e9d4;
  --ink: #17283a;
  --muted: #566a7c;
  --line: #e3d6bb;
  --lake: #0d6fa8;
  --lake-deep: #0a3f63;
  --sun: #f2a31b;
  --coral: #e8664b;
  --sand: #fbe6bf;
  --good: #1f8a5b;
  --bad: #b3372b;
  --focus: #f2a31b;
  --shadow: 0 1px 2px rgba(70, 50, 20, 0.07), 0 6px 18px rgba(70, 50, 20, 0.08);
  --radius: 14px;
  --arcade: #8a3fd1;
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* The site starts dark: boot.js sets data-theme="dark" unless the visitor picked light with the toggle.
   Without JavaScript it follows the device setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1820;
    --surface: #142430;
    --surface-2: #1a2e3c;
    --ink: #e5eef4;
    --muted: #9db1c0;
    --line: #26404f;
    --lake: #4fb3ea;
    --lake-deep: #0a2a40;
    --sand: #2a2a22;
    --good: #4cc08a;
    --bad: #f0806f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
    --arcade: #c792ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1820;
  --surface: #142430;
  --surface-2: #1a2e3c;
  --ink: #e5eef4;
  --muted: #9db1c0;
  --line: #26404f;
  --lake: #4fb3ea;
  --lake-deep: #0a2a40;
  --sand: #2a2a22;
  --good: #4cc08a;
  --bad: #f0806f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
  --arcade: #c792ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 120px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lake); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.4em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 0.8em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header and tabs */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.header-actions {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-top: 6px;
}
.pass-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--arcade);
  text-decoration: none;
  white-space: nowrap;
}
.pass-time:hover { text-decoration: underline; }
.theme-toggle {
  flex: none;
  appearance: none;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font: 600 0.88rem var(--font-body);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--lake); }
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 4px;
  text-decoration: none;
  color: inherit;
}
.brand img {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sun);
}
.brand strong { font-family: var(--font-display); font-size: 1.35rem; white-space: nowrap; }
.brand span { color: var(--muted); font-size: 0.9rem; }

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 0.95rem var(--font-body);
  padding: 10px 12px 12px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--lake); border-bottom-color: var(--lake); }
/* Group Itinerary: a coral pill so it stands out from the other tabs */
.tab.standout {
  align-self: center;
  margin: 2px 0 6px 6px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
}
.tab.standout:hover { color: #fff; filter: brightness(1.08); }
.tab.standout[aria-selected="true"] { color: #fff; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--coral); }

main { padding: 28px 0 56px; }
.panel[hidden] { display: none; }
.panel > header { margin-bottom: 20px; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 62ch; }

/* Banner (the FamJam 27 image is the main page) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.banner {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #cfe3f2;
}
.banner img { display: block; width: 100%; height: auto; }
.hotspot {
  position: absolute;
  border-radius: 24px;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.hotspot:hover, .hotspot:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 6px 18px rgba(0, 0, 0, 0.25);
}
.hs-volleyball { left: 3%; top: 58%; width: 13.5%; height: 27%; }
.hs-jetski { left: 17.3%; top: 61%; width: 15.7%; height: 26%; }
.hs-bike { left: 33.5%; top: 60%; width: 14.7%; height: 28%; }
.hs-adventure { left: 49.2%; top: 59%; width: 12.8%; height: 30%; }
.hs-eats { left: 62.2%; top: 60%; width: 14.5%; height: 27%; }
.hs-lodging { left: 78.5%; top: 60%; width: 18.5%; height: 29%; }

.hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-bar p { margin: 0; }
.hero-bar .when { font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 600; }
.hero-bar .where { color: var(--muted); }
.hero-bar .countdown {
  font-weight: 700;
  color: var(--coral);
  background: color-mix(in srgb, var(--coral) 12%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font: 600 0.98rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  background: var(--lake);
  color: #fff;
}
.btn:hover { filter: brightness(1.08); }
.btn.coral { background: var(--coral); }
.btn.small { padding: 7px 13px; font-size: 0.9rem; }
.btn.outline { background: transparent; color: var(--lake); border: 1.5px solid var(--lake); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Sections and grids */
.section { margin-top: 36px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card .kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 4px;
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink); }
.card .muted, .muted { color: var(--muted); }
.card .list { margin: 0 0 12px; padding-left: 20px; }
.card .list li { margin: 3px 0; }
.card .facts { list-style: none; margin: 4px 0 12px; padding: 0; font-size: 0.93rem; }
.card .facts li { padding: 3px 0; display: grid; grid-template-columns: 82px 1fr; gap: 8px; }
.card .facts b { color: var(--muted); font-weight: 600; }
.card .note {
  font-size: 0.88rem;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 0 12px;
}
.card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.badge.warn { background: color-mix(in srgb, var(--sun) 22%, transparent); color: var(--ink); }

.day h3 { color: var(--lake); }
.day ul { margin: 0; padding-left: 18px; }
.day li { margin: 4px 0; }
.day .time { font-weight: 600; color: var(--muted); }

.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--sand);
  border: 1px solid color-mix(in srgb, var(--sun) 40%, var(--line));
  border-radius: var(--radius);
  padding: 16px 18px;
}
.callout .icon { font-size: 1.6rem; line-height: 1; }
.callout p:last-child { margin-bottom: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 0; }
.timeline .date { font-weight: 700; color: var(--lake); }
.timeline .key .date { color: var(--coral); }

/* Text-us box */
.text-us { border-left: 5px solid var(--coral); }
.text-us h2 { margin-bottom: 8px; }
.checklist { margin: 0; padding-left: 22px; }
.checklist li { margin: 6px 0; }
.callout h3 { margin-bottom: 6px; }

/* Food filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip {
  appearance: none;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 13px;
  font: 600 0.9rem var(--font-body);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--lake); border-color: var(--lake); color: #fff; }

/* Pops Arcade photo link */
.promo {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.promo img { display: block; width: 100%; height: auto; }
.promo:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2); }

/* Group Itinerary placeholder */
.coming-soon { align-items: center; text-align: center; padding: 48px 18px; }
.coming-soon .icon { font-size: 2.6rem; line-height: 1; margin-bottom: 10px; }
.coming-soon .big { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3rem); font-weight: 600; color: var(--coral); margin-bottom: 6px; }

/* Splash: a small heads-up card over the blurred site */
html.splash-open .site-header,
html.splash-open main,
html.splash-open .site-footer { filter: blur(6px); }
.splash {
  width: min(400px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  border: 0;
  border-radius: 20px;
  padding: 0 22px 22px;
  background: #fffdf7;
  color: #073954;
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.splash::backdrop { background: rgba(5, 15, 25, 0.35); }
.splash-stripe {
  height: 10px;
  margin: 0 -22px 14px;
  background: linear-gradient(90deg, #067e98 0 36%, #ffb50b 36% 68%, #f45531 68%);
}
.splash-close {
  position: absolute;
  top: 18px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #073954;
  color: #fff;
  font: 700 1.7rem/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.splash-close:hover { background: #eb6030; }
.splash-close:focus-visible, .splash-go:focus-visible { outline: 3px solid #ffad0d; outline-offset: 2px; }
.splash-logo { display: block; width: min(250px, 72%); height: auto; margin: 0 auto 6px; }
.splash-tagline { font-size: 11px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; color: #087e94; margin: 0 0 14px; }
.splash-eyebrow { font-size: 12px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: #d14d19; margin: 0 0 4px; }
.splash-title { font-family: inherit; font-size: 1.55rem; font-weight: 900; letter-spacing: -0.03em; margin: 0 0 8px; }
.splash-title span { color: #eb6030; }
.splash-message { font-size: 0.95rem; line-height: 1.5; color: #315268; margin: 0 0 10px; }
.splash-when { font-size: 0.85rem; font-weight: 800; color: #057c91; margin: 0 0 14px; }
.splash-go {
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  background: #eb6030;
  color: #fff;
  font: 800 1rem system-ui, sans-serif;
  cursor: pointer;
}
.splash-go:hover { filter: brightness(1.08); }

/* Forward the invite */
.forward {
  width: min(540px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.forward::backdrop { background: rgba(10, 20, 30, 0.5); }
.forward h2 { font-size: 1.5rem; padding-right: 32px; }
.forward .close {
  position: absolute;
  top: 10px;
  right: 12px;
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.invite-preview {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  font-size: 0.92rem;
  max-height: 40vh;
  overflow-y: auto;
}
.invite-preview .subject { font-weight: 700; }
.invite-preview .body { white-space: pre-line; margin: 0; }
.forward .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.forward .status { margin: 10px 0 0; color: var(--good); font-weight: 600; font-size: 0.92rem; overflow-wrap: anywhere; }
.forward .status:empty { display: none; }

.footer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.site-footer { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 560px) {
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .brand span { display: none; }
}
@media (max-width: 400px) {
  .theme-toggle .wide { display: none; }
}
@media (max-width: 760px) {
  .pass-time .wide { display: none; }
}
