/* ============================================================
   Trips — public homepage
   Blue default theme, purple selectable. Dark cinematic hero,
   light body sections, navy footer.
   ============================================================ */

:root {
  --navy-950: #081120;
  --navy-900: #0c1a30;
  --navy-800: #122448;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-bright: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --accent-glow: rgba(59, 130, 246, 0.45);
  --cloud: #f5f8fd;
  --card: #ffffff;
  --ink: #0f1b2d;
  --muted: #5a6b85;
  --line: #e3eaf5;
  --radius: 18px;
  --shadow-soft: 0 4px 18px rgba(13, 31, 63, 0.07);
  --shadow-lift: 0 14px 38px rgba(13, 31, 63, 0.14);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

body[data-trip-theme="purple"] {
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-bright: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-glow: rgba(139, 92, 246, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body.trips-home {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cloud);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.trips-home a { color: inherit; }

.trips-home :focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.wrap {
  width: min(1240px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 12px;
  border: 0;
  font: 800 0.98rem/1 var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn:active { transform: translateY(1px); }

.btn:focus-visible,
.type-card:focus-visible,
.ex-card:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 22px var(--accent-glow);
}

.btn--primary:hover { background: var(--accent-strong); transform: translateY(-2px); }

.btn--outline {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
}

.btn--outline:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-2px); }

.btn--quiet {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
}

.btn--quiet:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

.btn--ghost-dark {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.btn--ghost-dark:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Header ---------- */

.home-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  padding: 18px 0;
}

.home-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.home-brand svg { width: 30px; height: 30px; }

.home-nav {
  display: flex;
  gap: 26px;
  margin-inline: auto;
}

.home-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.94rem;
  padding: 6px 2px;
  transition: color 140ms ease;
}

.home-nav a:hover { color: #fff; }

.home-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.theme-switch button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font: 700 0.82rem/1 var(--font-body);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.theme-switch button::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.theme-switch button[data-trip-theme-choice="blue"]::before { background: #3b82f6; }
.theme-switch button[data-trip-theme-choice="purple"]::before { background: #a855f7; }

.theme-switch button.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy-900);
}

.home-signin {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  font: 750 0.92rem/1 var(--font-body);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 140ms ease;
}

.home-signin:hover { background: rgba(255, 255, 255, 0.14); }

/* Mobile menu */

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  position: fixed;
  z-index: 60;
  inset: 0;
  background: rgba(6, 13, 26, 0.96);
  backdrop-filter: blur(10px);
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  transition: opacity 220ms ease;
}

.mobile-menu[hidden] { display: none; }

.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font: 800 1.5rem/1.3 var(--font-body);
  padding: 12px 30px;
  border-radius: 12px;
}

.mobile-menu a:hover { background: rgba(255, 255, 255, 0.08); }

.mobile-menu .mobile-menu__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-menu .theme-switch { margin: 18px auto 0; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  color: #fff;
  isolation: isolate;
  padding-top: 96px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/images/backgroundheader.webp") center 30% / cover no-repeat;
}

.hero__tint {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(100deg, rgba(7, 16, 34, 0.92) 0%, rgba(8, 20, 42, 0.55) 42%, rgba(10, 22, 44, 0.18) 68%, rgba(9, 18, 38, 0.4) 100%),
    linear-gradient(180deg, rgba(7, 15, 32, 0.55) 0%, transparent 26%, transparent 60%, rgba(6, 12, 26, 0.88) 100%);
}

body[data-trip-theme="purple"] .hero__tint {
  background:
    linear-gradient(100deg, rgba(22, 10, 44, 0.92) 0%, rgba(26, 12, 52, 0.55) 42%, rgba(24, 14, 48, 0.18) 68%, rgba(18, 9, 40, 0.4) 100%),
    linear-gradient(180deg, rgba(16, 8, 34, 0.55) 0%, transparent 26%, transparent 60%, rgba(12, 6, 28, 0.88) 100%);
}

.hero__inner {
  flex: 1;
  display: grid;
  align-content: center;
  padding-block: 40px 30px;
}

.hero__copy { max-width: 640px; }

.hero h1 {
  margin: 0 0 18px;
  font: 800 clamp(3rem, 8.5vw, 5.6rem)/1.02 var(--font-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
  animation: heroRise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* The one word that carries the promise gets Playfair's italic voice. */
.hero h1 em {
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
}

.hero__tagline {
  margin: 0 0 30px;
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  animation: heroRise 700ms 120ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: heroRise 700ms 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__primary-action {
  min-height: 58px;
  padding-inline: 32px;
  font-size: 1.05rem;
}

.hero__support {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.94rem;
  font-weight: 600;
  animation: heroRise 700ms 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 38px;
  animation: heroRise 700ms 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* Glass chips: scannable at a glance, and they hold their shape on a phone
   instead of stacking into a tall column of loose icons. */
.hero__benefit {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  background: rgba(14, 27, 52, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero__benefit svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--accent-bright);
}

.hero__benefit strong { display: block; font-size: 0.88rem; }
.hero__benefit small { color: rgba(255, 255, 255, 0.72); font-size: 0.76rem; }

/* Hero preview cards */

.hero__previews {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 40px;
  animation: heroRise 700ms 420ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.preview-card {
  border-radius: 16px;
  background: rgba(16, 30, 56, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 14px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.preview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.38);
}

.preview-card h3 {
  margin: 0;
  font: 800 0.85rem/1 var(--font-body);
  color: rgba(255, 255, 255, 0.95);
}

.preview-card__rows { display: grid; gap: 7px; }

.preview-day {
  display: flex;
  gap: 9px;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 6px 8px;
}

.preview-day span {
  width: 32px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-strong));
  display: grid;
  place-items: center;
  font: 900 0.6rem/1 var(--font-body);
  color: #fff;
}

.preview-day strong { font-size: 0.68rem; display: block; }
.preview-day small { font-size: 0.6rem; color: rgba(255, 255, 255, 0.62); }

.preview-bubble {
  max-width: 92%;
  padding: 6px 10px;
  border-radius: 11px;
  font-size: 0.68rem;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.12);
}

.preview-bubble--own {
  margin-left: auto;
  background: var(--accent);
}

.preview-chat-form {
  margin-top: auto;
  display: flex;
  gap: 6px;
}

.preview-chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.7rem;
  padding: 0 9px;
}

.preview-chat-form input::placeholder { color: rgba(255, 255, 255, 0.5); }

.preview-chat-form button {
  width: 32px;
  min-height: 32px;
  border-radius: 8px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
}

.preview-map {
  flex: 1;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(148, 190, 233, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 190, 233, 0.16) 1px, transparent 1px),
    linear-gradient(150deg, #17304f, #1b3a60 55%, #204368);
  background-size: 22px 22px, 22px 22px, cover;
}

.preview-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.preview-map .pin {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent-bright);
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.preview-vote { display: grid; gap: 8px; }

.preview-vote__row strong {
  display: block;
  font-size: 0.66rem;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.9);
}

.preview-vote__bar {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preview-vote__bar i {
  flex: 1;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  font-style: normal;
}

.preview-vote__bar i::before {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-bright), var(--accent-strong));
  transition: width 900ms 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero__previews.is-inview .preview-vote__bar i::before { width: var(--fill, 60%); }

.preview-vote__bar b { font-size: 0.66rem; min-width: 16px; text-align: right; }

.preview-check { display: grid; gap: 6px; }

.preview-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  transition: opacity 140ms ease;
}

.preview-check input {
  appearance: none;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.preview-check input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.preview-check input:checked::before {
  content: "✓";
  color: #fff;
  font-size: 0.6rem;
  font-weight: 900;
}

.preview-check input:checked + span { text-decoration: line-through; opacity: 0.6; }

/* ---------- Shared section styles ---------- */

.home-section { padding: clamp(64px, 9vw, 96px) 0; }

.home-section--alt { background: #eef3fb; }

.section-eyebrow {
  margin: 0 0 10px;
  text-align: center;
  font: 900 0.78rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0 auto 14px;
  text-align: center;
  font: 800 clamp(1.9rem, 4.6vw, 2.7rem)/1.12 var(--font-display);
  letter-spacing: -0.01em;
  max-width: 640px;
  text-wrap: balance;
}

.section-sub {
  margin: 0 auto clamp(34px, 5vw, 48px);
  text-align: center;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-inview { opacity: 1; transform: none; }

/* ---------- How it works ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 18px;
  position: relative;
}

.step-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 34px 24px 28px;
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.step-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }

.step-card__num {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font: 900 0.85rem/1 var(--font-body);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.step-card__icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.step-card__icon svg { width: 30px; height: 30px; }

.step-card h3 { margin: 0 0 8px; font-size: 1.08rem; font-weight: 800; }

.step-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.step-card::after {
  content: "→";
  position: absolute;
  right: -19px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
  opacity: 0.6;
}

.step-card:last-child::after { content: none; }

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px;
  display: grid;
  gap: 10px;
  align-content: start;
  cursor: default;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.feature-card:hover,
.feature-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--accent-bright);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.feature-card__icon svg { width: 22px; height: 22px; }

.feature-card h3 { margin: 0; font-size: 0.98rem; font-weight: 800; }

.feature-card p { margin: 0; color: var(--muted); font-size: 0.83rem; line-height: 1.5; }

.feature-card__status {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 800 0.68rem/1 var(--font-body);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 11px;
  justify-self: start;
}

.feature-card__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Trip types ---------- */

.types-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.type-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: 750 0.92rem/1.2 var(--font-body);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.type-card svg { width: 21px; height: 21px; color: var(--accent); flex: 0 0 auto; }

.type-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.type-card.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px var(--accent-glow);
}

.type-card.is-selected svg { color: #fff; }

/* ---------- Example trips ---------- */
/* One lead story and four companions, magazine-style. Every card opens the
   trip viewer, which then pages through all five. */

.ex-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 205px;
  gap: 14px;
}

.ex-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: #fff;
  background: var(--navy-800);
  isolation: isolate;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.ex-card--lead { grid-column: span 2; grid-row: span 2; }

.ex-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.ex-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.ex-card:hover img { transform: scale(1.05); }

.ex-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 32, 0.05) 35%, rgba(6, 13, 27, 0.9) 100%);
}

.ex-card__days {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 20, 40, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  font: 800 0.74rem/1 var(--font-body);
}

.ex-card__body {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 5px;
  padding: 18px;
}

.ex-card__body strong { font: 800 1.15rem/1.15 var(--font-display); }

.ex-card--lead .ex-card__body strong { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }

.ex-card__where {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.85);
}

.ex-card__where svg { width: 14px; height: 14px; flex: 0 0 auto; }

.ex-card__blurb {
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  max-width: 420px;
}

.ex-card__open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font: 800 0.82rem/1 var(--font-body);
  color: #fff;
}

.ex-card__open i {
  font-style: normal;
  transition: transform 200ms ease;
}

.ex-card:hover .ex-card__open i { transform: translateX(4px); }

/* ---------- Example trip viewer ---------- */
/* One browsable set: hero image, trip facts, a day-by-day timeline, and
   previous/next travel between all five examples (arrows, keys, dots, swipe). */

.home-modal[data-viewer] {
  width: min(760px, calc(100vw - 32px));
  overflow: hidden;
  display: flex;
}

.tv {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 86svh;
}

.tv__hero {
  position: relative;
  flex: 0 0 auto;
  height: 218px;
  background: var(--navy-800);
  isolation: isolate;
}

.tv__hero img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tv__hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 32, 0.12) 30%, rgba(6, 13, 27, 0.86) 100%);
}

.tv__hero > * { z-index: 1; }

.tv__count {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(10, 20, 40, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  color: #fff;
  font: 800 0.74rem/1 var(--font-body);
}

.tv__head {
  position: absolute;
  inset: auto 20px 16px;
  color: #fff;
}

.tv__where {
  margin: 0 0 4px;
  font: 800 0.76rem/1 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.tv__head h3 { margin: 0; font: 800 clamp(1.5rem, 4vw, 2.1rem)/1.1 var(--font-display); }

.tv__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 8px;
}

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

.tv__stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font: 650 0.8rem/1 var(--font-body);
}

.tv__stats b { font-size: 0.95rem; font-weight: 900; color: var(--accent); }

.tv__blurb { margin: 0 0 18px; color: var(--muted); line-height: 1.6; font-size: 0.95rem; }

.tv__daysTitle {
  margin: 0 0 12px;
  font: 900 0.76rem/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* The itinerary as a rail: day markers joined by a line, so length and order
   read at a glance. */
.tv__timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.tv__timeline li {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 0 0 16px 0;
}

.tv__timeline li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.tv__timeline li:last-child::before { content: none; }

.tv__timeline span {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font: 900 0.72rem/1 var(--font-body);
  box-shadow: 0 3px 10px var(--accent-glow);
}

.tv__timeline p {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
}

.tv__nav {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--cloud);
}

.tv__navbtn {
  border: 0;
  background: none;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 2px;
  min-width: 0;
  transition: background 160ms ease;
}

.tv__navbtn:hover { background: var(--accent-soft); }

.tv__navbtn.is-next { text-align: right; justify-self: end; }

.tv__navbtn small {
  font: 800 0.66rem/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tv__navbtn strong {
  font: 800 0.86rem/1.2 var(--font-body);
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv__dots { display: flex; gap: 7px; }

.tv__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.tv__dots button:hover { background: var(--accent-bright); }

.tv__dots button.is-active { background: var(--accent); transform: scale(1.35); }

.tv__cta {
  flex: 0 0 auto;
  padding: 0 20px 18px;
  background: var(--cloud);
}

.tv__cta .btn { width: 100%; min-height: 48px; }

/* ---------- Why plan together ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.why-item {
  text-align: center;
  padding: 26px 18px;
  border-radius: var(--radius);
  transition: background 200ms ease;
}

.why-item:hover { background: var(--accent-soft); }

.why-item__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.why-item__icon svg { width: 26px; height: 26px; }

.why-item h3 { margin: 0 0 6px; font-size: 1.02rem; font-weight: 800; }

.why-item p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

/* ---------- CTA banner ---------- */

.cta-banner {
  position: relative;
  padding: 110px 0;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.cta-banner__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?auto=format&fit=crop&w=1800&q=80") center 55% / cover no-repeat;
}

.cta-banner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(100deg, rgba(7, 15, 31, 0.88) 0%, rgba(9, 20, 40, 0.55) 55%, rgba(10, 22, 44, 0.3) 100%);
}

.cta-banner h2 {
  margin: 0 0 14px;
  font: 800 clamp(2rem, 5vw, 3rem)/1.1 var(--font-display);
  max-width: 560px;
  text-wrap: balance;
}

.cta-banner p {
  margin: 0 0 28px;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.55;
}

/* ---------- Footer ---------- */

.home-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.78);
  padding: 70px 0 34px;
}

.home-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.6fr;
  gap: 36px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-footer .home-brand { margin-bottom: 14px; }

.home-footer__about p {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 250px;
}

.social-row { display: flex; gap: 10px; }

.social-row button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 150ms ease, border-color 150ms ease;
}

.social-row button:hover { background: var(--accent); border-color: var(--accent); }

.social-row svg { width: 16px; height: 16px; }

.home-footer h4 {
  margin: 6px 0 16px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
}

.home-footer__col { display: grid; gap: 10px; align-content: start; }

.home-footer__col a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 140ms ease;
  justify-self: start;
}

.home-footer__col a:hover { color: #fff; }

.newsletter p { margin: 0 0 14px; font-size: 0.88rem; line-height: 1.55; }

.newsletter form { display: flex; gap: 8px; }

.newsletter input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  padding: 0 14px;
  font-size: 0.9rem;
}

.newsletter input::placeholder { color: rgba(255, 255, 255, 0.45); }

.newsletter button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: 800 0.9rem/1 var(--font-body);
  cursor: pointer;
  transition: background 150ms ease;
}

.newsletter button:hover { background: var(--accent-strong); }

.newsletter__status {
  margin: 10px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 18px;
}

.newsletter__status.is-error { color: #fca5a5; }
.newsletter__status.is-ok { color: #86efac; }

.home-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  padding-top: 26px;
  font-size: 0.8rem;
}

.home-footer__legal span { margin-right: auto; }

.home-footer__legal button,
.home-footer__legal a {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.72);
  font: 600 0.8rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  padding: 4px 0;
}

.home-footer__legal button:hover,
.home-footer__legal a:hover { color: #fff; }

/* ---------- Example / legal modal ---------- */

.home-modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(5, 10, 22, 0.72);
  backdrop-filter: blur(4px);
}

.home-modal {
  position: fixed;
  z-index: 95;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, calc(100vw - 32px));
  max-height: 86svh;
  overflow-y: auto;
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.home-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(8, 16, 32, 0.65);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.home-modal__body { padding: 26px 28px 30px; }

.home-modal__body h3 { margin: 0 0 4px; font: 800 1.6rem/1.15 var(--font-display); }

.home-modal__body > p { color: var(--muted); line-height: 1.6; }

/* ---------- Update toast ---------- */

/* display:flex would otherwise override the browser's built-in
   [hidden] { display: none } and pin the toast on screen permanently. */
.update-toast[hidden] { display: none; }

.update-toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy-900);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px 18px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
}

.update-toast button {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.home-toast {
  position: fixed;
  z-index: 85;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  background: var(--navy-900);
  color: #fff;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.home-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1100px) {
  .hero__previews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .features-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .types-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ex-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 190px; }
  .ex-card--lead { grid-column: span 2; grid-row: span 1; }
  .home-footer__grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 900px) {
  .home-nav { display: none; }
  .home-header .theme-switch { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .home-header__actions { margin-left: 0; }
  .home-signin { display: none; }
  .mobile-menu .home-signin { display: inline-flex; margin-top: 10px; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .step-card::after { content: none; }
  .why-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding-top: 84px; }
  .hero__inner { padding-block: 28px 34px; }
  .hero__tagline { margin-bottom: 24px; }
  .hero__actions { gap: 10px; }
  .hero__actions .btn { width: 100%; }
  .hero__primary-action { min-height: 60px; }
  .hero__support { margin-top: 12px; line-height: 1.45; }
  .hero__benefits,
  .hero__previews { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .types-grid { grid-template-columns: 1fr 1fr; }
  .type-card { min-height: 56px; }

  /* Example cards become a swipeable rail with the next card peeking in. */
  .ex-grid {
    grid-template-columns: repeat(5, 80vw);
    grid-auto-rows: 250px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
  }
  .ex-card { scroll-snap-align: center; }
  .ex-card--lead { grid-column: span 1; grid-row: span 1; }
  .ex-card__blurb { display: none; }
  .ex-card--lead .ex-card__body strong { font-size: 1.15rem; }

  /* Four steps as a compact left-aligned list, not a tall stack of cards. */
  .steps-grid { grid-template-columns: 1fr; gap: 12px; }
  .step-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 2px 16px;
    align-items: center;
    text-align: left;
    padding: 16px 18px;
  }
  .step-card__num {
    position: static;
    transform: none;
    grid-row: 1 / 3;
    width: 46px;
    height: 46px;
    font-size: 1.05rem;
  }
  .step-card__icon { display: none; }
  .step-card h3 { margin: 0; font-size: 1rem; }
  .step-card p { grid-column: 2; font-size: 0.86rem; }

  .why-grid { grid-template-columns: 1fr; }
  .home-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .newsletter form { flex-direction: column; }
  .cta-banner { padding: 80px 0; }
  .cta-banner .btn { width: 100%; }

  /* The trip viewer becomes a full-height sheet: image up top, the day list
     scrolls, and previous/next stay pinned within thumb reach. */
  .home-modal[data-viewer] {
    inset: 0;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: none;
    border-radius: 0;
  }
  .tv { max-height: 100svh; height: 100svh; }
  .tv__hero { height: 190px; }
  .tv__body { padding: 16px 18px 8px; }
  .tv__nav { padding: 10px 14px; }
  .tv__navbtn strong { display: none; }
  .tv__navbtn small { font-size: 0.72rem; }
  .tv__cta { padding: 0 14px calc(14px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   Surprise Me — Smart Trip Generator on the public homepage.
   A premium navy card sits in a light section; the popup is cloned into the
   shared home modal. Logged-out visitors can fill it, then hit a sign-in gate.
   ========================================================================== */

/* Nav highlight so the main feature stands out among the section links. */
.home-nav__spark { color: var(--accent-bright); font-weight: 800; }

/* ---------- Signed-in personal dashboard ---------- */

.member-dashboard-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(8, 17, 32, 0.96), rgba(12, 34, 72, 0.88)),
    url("/images/backgroundheader.webp") center 42% / cover no-repeat;
}

.member-dashboard-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, var(--accent-glow), transparent 34%),
    radial-gradient(circle at 88% 80%, rgba(255, 255, 255, 0.1), transparent 26%);
  pointer-events: none;
}

.member-dashboard {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(13, 35, 72, 0.87), rgba(8, 22, 45, 0.82));
  color: #fff;
  box-shadow: 0 28px 80px rgba(3, 10, 24, 0.42);
  backdrop-filter: blur(16px);
}

.member-dashboard__glow {
  position: absolute;
  top: -190px;
  right: -130px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 68%);
  pointer-events: none;
}

.member-dashboard__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.member-dashboard__head > div:first-child { max-width: 610px; }

.member-dashboard__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #a9c9ff;
  font: 850 0.74rem/1 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-dashboard__eyebrow svg { width: 15px; height: 15px; }

.member-dashboard__head h2 {
  margin: 0 0 10px;
  color: #fff;
  font: 800 clamp(2rem, 4vw, 3.25rem)/1.05 var(--font-display);
}

.member-dashboard__head > div > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.55;
}

.member-dashboard__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.member-dashboard__actions .btn {
  min-height: 46px;
  padding-inline: 18px;
  font-size: 0.88rem;
}

.member-overview {
  position: relative;
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.member-overview__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.member-overview__head .member-dashboard__eyebrow { margin-bottom: 6px; }

.member-overview__head h3,
.member-next-trip h3 {
  margin: 0;
  color: #fff;
  font: 800 clamp(1.25rem, 2.5vw, 1.65rem)/1.15 var(--font-display);
}

.member-overview__head > a {
  color: #dbeafe;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.member-overview__head > a:hover { color: #fff; }

.member-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.member-stat-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 13px;
  row-gap: 2px;
  align-items: center;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  background: rgba(6, 18, 40, 0.5);
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.member-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(147, 197, 253, 0.7);
  background: rgba(21, 58, 118, 0.62);
  box-shadow: 0 12px 28px rgba(3, 10, 24, 0.28);
}

.member-stat-card__icon {
  grid-row: 1 / 3;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: #b9d5ff;
}

.member-stat-card__icon svg { width: 21px; height: 21px; }
.member-stat-card strong { color: #fff; font-size: 1.65rem; line-height: 1; }
.member-stat-card > span:last-child { overflow: hidden; color: rgba(255, 255, 255, 0.72); font-size: 0.82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.member-next-trip {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 20px clamp(20px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(110deg, rgba(37, 99, 235, 0.2), rgba(255, 255, 255, 0.07));
}

.member-next-trip__icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.member-next-trip__icon svg { width: 25px; height: 25px; }
.member-next-trip__body .member-dashboard__eyebrow { margin-bottom: 6px; }
.member-next-trip__body > p:last-child { display: flex; align-items: center; gap: 7px; margin: 7px 0 0; color: rgba(255, 255, 255, 0.76); font-size: 0.9rem; line-height: 1.45; }
.member-next-trip__body > p:last-child svg { width: 15px; height: 15px; flex: none; }
.member-next-trip .btn { min-height: 46px; padding-inline: 20px; }

.member-next-trip--empty {
  grid-template-columns: auto 1fr;
  background: rgba(255, 255, 255, 0.055);
}

@media (max-width: 1020px) {
  .member-dashboard__head { align-items: flex-start; flex-direction: column; }
  .member-dashboard__actions { justify-content: flex-start; }
  .member-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .member-dashboard-section { padding-block: 46px; }
  .member-dashboard-section .wrap { width: min(100% - 24px, 1240px); }
  .member-dashboard { border-radius: 20px; }
  .member-dashboard__actions { display: grid; width: 100%; }
  .member-dashboard__actions .btn { width: 100%; }
  .member-overview__head { align-items: flex-start; flex-direction: column; }
  .member-stat-grid { grid-template-columns: 1fr; gap: 10px; }
  .member-stat-card { padding: 15px; }
  .member-next-trip { grid-template-columns: auto 1fr; padding: 18px; }
  .member-next-trip > .btn { grid-column: 1 / -1; width: 100%; }
}

.smart-section { background: #eef3fb; }

.smart-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(30px, 5vw, 52px);
  background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 58%, var(--accent-strong) 155%);
  color: #fff;
  box-shadow: var(--shadow-lift);
}
.smart-card__glow {
  position: absolute;
  top: -50%;
  right: -6%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
  opacity: 0.8;
  pointer-events: none;
}
.smart-card__body { position: relative; max-width: 680px; }
.smart-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font: 800 0.74rem/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.smart-card__eyebrow svg { width: 16px; height: 16px; }
.smart-card h2 {
  margin: 16px 0 8px;
  font: 800 clamp(1.7rem, 3.6vw, 2.5rem)/1.1 var(--font-display);
  color: #fff;
}
.smart-card__body > p { margin: 0; color: rgba(255, 255, 255, 0.84); font-size: 1.02rem; line-height: 1.55; }
.smart-card__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.smart-card__note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.86rem;
  font-weight: 600;
}
.smart-card__note svg { width: 15px; height: 15px; flex: none; }

@media (max-width: 560px) {
  .smart-card__actions { display: grid; }
  .smart-card__actions .btn { width: 100%; }
}

/* ---------- Surprise Me popup (inside the shared home modal) ---------- */

.surprise-modal { padding: 30px 30px 32px; }
.surprise-modal .home-modal__close {
  background: #eef2f9;
  color: var(--ink);
  backdrop-filter: none;
}
.surprise-modal__head { margin-bottom: 18px; padding-right: 44px; }
.surprise-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--accent);
  font: 800 0.72rem/1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.surprise-eyebrow svg { width: 15px; height: 15px; }
.surprise-modal__head h3 { margin: 0 0 4px; font: 800 1.7rem/1.1 var(--font-display); }
.surprise-intro { margin: 0; color: var(--muted); font-size: 0.92rem; }

#surpriseForm { display: grid; gap: 15px; }
/* An id selector beats the UA [hidden] rule, so the swap to the gate needs this. */
#surpriseForm[hidden] { display: none; }
.surprise-gate[hidden] { display: none; }
.sfield { display: grid; gap: 6px; }
.sfield > span,
.sfield > label > span { font: 800 0.78rem/1.3 var(--font-body); color: var(--muted); }
.sfield > span small,
.sfield > label > span small { font-weight: 600; color: var(--muted); opacity: 0.85; }
.sfield .req { color: var(--accent); font-style: normal; font-weight: 900; }
.sfield input,
.sfield select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  font: 600 0.95rem/1.4 var(--font-body);
  color: var(--ink);
}
.sfield input:focus,
.sfield select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.sfield input[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.sfield-row { display: grid; gap: 15px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sfield-error { color: #dc2626; font-size: 0.8rem; font-weight: 700; min-height: 1em; margin: 0; }
.trip-type-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.trip-type-choice legend { padding: 0; margin-bottom: 9px; font: 800 0.8rem/1.2 var(--font-body); color: var(--muted); }
.trip-type-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.trip-type-card { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 10px; min-height: 84px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; }
.trip-type-card:hover { border-color: #94a3b8; }
.trip-type-card:has(input:checked) { border: 2px solid var(--accent); padding: 12px; box-shadow: 0 0 0 2px var(--accent-soft); }
.trip-type-card input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.trip-type-card input:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; }
.trip-type-card__copy { display: grid; gap: 4px; min-width: 0; }
.trip-type-card__copy strong { color: var(--ink); font-size: 0.9rem; line-height: 1.2; }
.trip-type-card__copy small { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }
.trip-type-card__selected { display: none; grid-column: 2; align-items: center; gap: 4px; color: var(--ink); font-size: 0.7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; }
.trip-type-card__tick { font-size: 1rem; line-height: 0.8; }
.trip-type-card input:checked ~ .trip-type-card__selected { display: inline-flex; }
.trip-type-choice.is-invalid .trip-type-options { outline: 2px solid #dc2626; outline-offset: 3px; border-radius: 13px; }
.trip-type-error { min-height: 18px; margin: 5px 0 0; color: #dc2626; font-size: 0.8rem; font-weight: 800; }
.scheck { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 0.9rem; cursor: pointer; }
.scheck input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Collapsed personalise section (closed by default). */
.smore { border: 1px solid var(--line); border-radius: 12px; background: #f5f8fd; }
.smore > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  font: 800 0.92rem/1 var(--font-body);
  color: var(--ink);
}
.smore > summary::-webkit-details-marker { display: none; }
.smore__label { display: inline-flex; align-items: center; gap: 9px; }
.smore__label svg { width: 16px; height: 16px; color: var(--accent); }
.smore__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}
.smore[open] .smore__label::before { transform: rotate(45deg); }
.smore__hint { font: 800 0.68rem/1 var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.smore[open] > summary { border-bottom: 1px solid var(--line); }
.smore__body { display: grid; gap: 16px; padding: 16px 15px 8px; }
.sfieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 9px; min-width: 0; }
.sfieldset legend { padding: 0; font: 800 0.78rem/1 var(--font-body); color: var(--muted); }

.chip-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font: 700 0.82rem/1 var(--font-body);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip span:hover { border-color: var(--accent); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px var(--accent-glow); }
.chip input:focus-visible + span { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--card);
}
.segmented label { position: relative; display: block; min-width: 0; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented span {
  display: block;
  text-align: center;
  padding: 10px 8px;
  border-left: 1.5px solid var(--line);
  font: 700 0.82rem/1 var(--font-body);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.segmented label:first-child span { border-left: 0; }
.segmented input:checked + span { background: var(--accent-soft); color: var(--accent); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent-bright); outline-offset: -2px; }

.surprise-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.surprise-status { min-height: 20px; margin: 4px 0 0; font-weight: 800; font-size: 0.88rem; }
.surprise-status.is-error { color: #dc2626; }
.surprise-status.is-ok { color: #059669; }
.surprise-status.is-hint { color: var(--muted); font-weight: 700; }

/* Sign-in gate shown to logged-out visitors after a valid submission. */
.surprise-gate { text-align: center; padding: 8px 4px 4px; }
.surprise-gate__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.surprise-gate__icon svg { width: 28px; height: 28px; }
.surprise-gate h3 { margin: 0 0 8px; font: 800 1.5rem/1.15 var(--font-display); }
.surprise-gate > p { margin: 0 auto 20px; max-width: 440px; color: var(--muted); line-height: 1.55; }
.surprise-gate__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.surprise-gate__actions .btn { width: auto; }
.surprise-gate__back {
  margin-top: 16px;
  background: none;
  border: 0;
  color: var(--muted);
  font: 700 0.86rem/1 var(--font-body);
  cursor: pointer;
}
.surprise-gate__back:hover { color: var(--accent); }

@media (max-width: 560px) {
  .surprise-modal { padding: 24px 20px 26px; }
  .sfield-row { grid-template-columns: 1fr; }
  .trip-type-options { grid-template-columns: 1fr; }
  .trip-type-card { min-height: 68px; }
  .surprise-actions { display: grid; }
  .surprise-actions .btn { width: 100%; }
  .surprise-gate__actions { display: grid; }
  .surprise-gate__actions .btn { width: 100%; }
}
