/* ---------------------------------------------------------------------------
   TourSearch public site.
   Brand matches the Flutter app: indigo, saffron, Outfit. Light only for now -
   a public marketing surface has less call for a dark mode than the dashboard
   an operator stares at all day.
   --------------------------------------------------------------------------- */

:root {
  --indigo:        #3A29C4;
  --indigo-dark:   #2A1D93;
  --saffron:       #FF8A00;
  --emerald:       #00A07A;
  --rose:          #FF4D6D;

  --page:          #FBFBF9;
  --surface:       #FFFFFF;
  --ink:           #16151D;
  --ink-soft:      #55535F;
  --ink-faint:     #8A8794;
  --line:          rgba(22, 21, 29, 0.10);

  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 1px 2px rgba(22,21,29,.04), 0 10px 30px -18px rgba(22,21,29,.25);
  --font:          "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--indigo); }
a:hover { color: var(--indigo-dark); }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }

.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.block { margin: 44px auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- masthead ------------------------------------------------------------ */

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead__inner {
  display: flex; align-items: center; gap: 24px;
  min-height: 68px; flex-wrap: wrap; padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* The mark is the logo now, not a letter in a coloured tile, so it needs no
   background of its own. Fixed size: an SVG with no intrinsic dimensions
   would otherwise collapse or balloon depending on the flex context. */
.brand__mark { width: 34px; height: 34px; flex-shrink: 0; display: block; }
.brand__name { font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }

.masthead__search { display: flex; gap: 8px; flex: 1 1 320px; }
.masthead__search input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; font: inherit;
  font-size: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--page);
}
.masthead__search input:focus-visible {
  outline: 2px solid var(--indigo); outline-offset: 1px;
}
.masthead__search button {
  height: 44px; padding: 0 20px; font: inherit; font-weight: 600;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--indigo); color: #fff;
}

/* --- hero ---------------------------------------------------------------- */

.hero {
  background: var(--indigo); color: #fff;
  padding: 56px 0 64px; border-radius: 0 0 28px 28px;
}
.hero__eyebrow {
  margin: 0 0 12px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; color: rgba(255,255,255,.72);
}
/* No hard break: let the headline wrap to the space it has, and
   balance the lines when it does rather than orphaning a word. */
.hero h1 { color: #fff; text-wrap: balance; }
.hero h1 span { color: var(--saffron); }
.hero__lede {
  margin: 18px 0 0; max-width: 56ch; font-size: 17px; color: rgba(255,255,255,.86);
}
.block .hero__lede { color: var(--ink-soft); }

/* --- cards --------------------------------------------------------------- */

.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card__link { text-decoration: none; color: inherit; display: block; height: 100%; }
.card__link:hover .card__title { color: var(--indigo); }
.card__cover {
  aspect-ratio: 16 / 9; background: #EFEDFB;
  display: grid; place-items: center; overflow: hidden;
}
.card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__cover-fallback { color: var(--indigo); font-weight: 600; }
.card__body { padding: 16px; }
.card__title { margin: 0 0 4px; }
.card__meta { margin: 0; font-size: 14px; color: var(--ink-soft); }
.card__price { margin: 12px 0 0; display: flex; align-items: baseline; gap: 6px; }
.card__price strong { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.card__price span { font-size: 13px; color: var(--ink-faint); }

/* External referral rows are deliberately not identical to our own stock:
   a traveller should be able to tell at a glance that clicking leaves. */
.card--external { background: #FCFBF7; border-style: dashed; }
.card__source {
  margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--saffron);
}
.card__out { font-weight: 400; }

.facts {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  margin: 10px 0 0; padding: 0;
}
.facts li {
  font-size: 12.5px; color: var(--ink-soft);
  background: rgba(22,21,29,.05); border-radius: 999px; padding: 3px 10px;
}
.facts--large li { font-size: 14px; padding: 5px 12px; }

.pill {
  display: inline-block; margin: 10px 0 0; padding: 3px 10px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600;
}
.pill--low  { background: #FFF2E0; color: #8A4B00; }
.pill--gone { background: #FFE9ED; color: #8A1430; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 16px 0 0; }
.chips a {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-weight: 500;
}
.chips a:hover { border-color: var(--indigo); color: var(--indigo); }
.chips span { font-size: 12.5px; color: var(--ink-faint); }

/* --- tour page ----------------------------------------------------------- */

.breadcrumbs { padding: 18px 0 0; font-size: 14px; color: var(--ink-faint); }
.breadcrumbs a { text-decoration: none; }

.tour__head { margin: 18px 0 28px; }
.tour__lede { margin: 12px 0 0; font-size: 18px; color: var(--ink-soft); max-width: 62ch; }
.tour__grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.tour__main .block:first-child { margin-top: 0; }
.tour__aside { position: sticky; top: 20px; }

.booking {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.booking__price { margin: 0; display: flex; flex-direction: column; }
.booking__price strong { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.booking__price span { font-size: 13px; color: var(--ink-faint); }
.booking__seats { margin: 10px 0 16px; font-size: 14px; color: var(--ink-soft); }
.booking__operator { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }

.btn {
  display: block; text-align: center; padding: 13px 18px; font-weight: 600;
  border-radius: var(--radius-sm); text-decoration: none;
  border: 1px solid var(--line); color: var(--ink); background: var(--surface);
}
.btn--primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-dark); color: #fff; }

.places { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.places li {
  display: inline-flex; gap: 6px; align-items: baseline;
  background: #EFEDFB; border-radius: 999px; padding: 6px 14px; font-size: 14px;
}
.places span { color: var(--ink-faint); font-size: 12.5px; }

.itinerary { margin: 0; padding: 0; list-style: none; }
.itinerary li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.itinerary li:last-child { border-bottom: 0; }
.itinerary p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }

.plain, .ticks, .crosses { margin: 0; padding: 0; list-style: none; }
.plain li, .ticks li, .crosses li { padding: 5px 0 5px 26px; position: relative; }
.ticks li::before   { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }
.crosses li::before { content: "–"; position: absolute; left: 0; color: var(--ink-faint); font-weight: 700; }

/* --- misc ---------------------------------------------------------------- */

.count { margin: 6px 0 20px; color: var(--ink-faint); font-size: 14.5px; }
.empty { padding: 40px 0; color: var(--ink-soft); }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 32px 0; font-size: 15px; }

.footer { margin-top: 64px; padding: 36px 0; background: var(--surface); border-top: 1px solid var(--line); }
.footer__brand { margin: 0; font-weight: 700; }
.footer__inner p { margin: 4px 0; color: var(--ink-soft); font-size: 14.5px; }
.footer__links { display: flex; gap: 18px; margin-top: 14px; font-size: 14.5px; }

@media (max-width: 860px) {
  .tour__grid { grid-template-columns: 1fr; }
  .tour__aside { position: static; }
  .hero { padding: 40px 0 46px; }
}

/* --- header navigation --------------------------------------------------- */

.nav { display: flex; gap: 6px; position: relative; }

.nav__menu > summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-weight: 500; color: var(--ink);
}
.nav__menu > summary::-webkit-details-marker { display: none; }
.nav__menu > summary::after {
  content: "›"; display: inline-block; margin-left: 7px;
  transform: rotate(90deg); color: var(--ink-faint);
}
.nav__menu > summary:hover { background: var(--page); color: var(--indigo); }
.nav__menu > summary:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }
.nav__menu[open] > summary { background: var(--page); color: var(--indigo); }

.nav__panel {
  position: absolute; z-index: 20; margin-top: 6px; min-width: 230px;
  padding: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(22,21,29,.06), 0 18px 40px -22px rgba(22,21,29,.45);
}
.nav__panel ul { list-style: none; margin: 0; padding: 0; }
.nav__panel a {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); font-size: 15px;
}
.nav__panel a:hover { background: var(--page); color: var(--indigo); }
.nav__all {
  margin-top: 6px; padding-top: 10px !important;
  border-top: 1px solid var(--line); font-weight: 600; color: var(--indigo) !important;
}

/* On a phone the panel cannot float over a 320px viewport without going off
   the edge, so it becomes part of the flow and pushes the page down. */
@media (max-width: 620px) {
  .nav { width: 100%; flex-direction: column; gap: 0; }
  .nav__panel { position: static; min-width: 0; box-shadow: none; }
}

/* --- filter bar ---------------------------------------------------------- */

.filters {
  margin: 20px 0 28px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters__row { display: flex; flex-wrap: wrap; gap: 16px; }
.filters__row--groups { margin-top: 6px; gap: 28px; }

.filters__field { flex: 1 1 200px; margin: 0 0 8px; }
.filters__field label {
  display: block; margin-bottom: 5px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.filters__field select {
  width: 100%; height: 42px; padding: 0 10px; font: inherit; font-size: 15px;
  background: var(--page); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}

.filters__group { flex: 1 1 210px; min-width: 0; border: 0; margin: 0; padding: 0; }
.filters__group legend {
  padding: 0; margin-bottom: 7px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.filters__group ul { list-style: none; margin: 0; padding: 0; }
.filters__group li { margin: 0 0 3px; }
.filters__group label {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px; border-radius: var(--radius-sm);
  font-size: 14.5px; cursor: pointer;
}
.filters__group label:hover { background: var(--page); }
.filters__group li.is-empty label { color: var(--ink-faint); cursor: default; }
.filters__group li.is-empty label:hover { background: none; }

.filters__count {
  margin-left: auto; font-size: 12.5px; color: var(--ink-faint);
  background: rgba(22,21,29,.05); border-radius: 999px; padding: 1px 8px;
}

.filters__actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.filters__actions button {
  height: 42px; padding: 0 22px; font: inherit; font-weight: 600;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--indigo); color: #fff;
}
.filters__actions button:hover { background: var(--indigo-dark); }
.filters__clear { font-size: 14.5px; }

/* --- hub pages ----------------------------------------------------------- */

.index__group { margin: 28px 0; }
.index__group h2 { font-size: 18px; color: var(--ink-soft); }
.index__group .chips { margin-top: 10px; }

/* The wordmark reads as two words: "Tour" in ink, "Search" in saffron.
   Solid, "Toursearch" can be misparsed as "Tours-earch". */
.brand__accent { color: var(--saffron); }
