/* ============================================================
   AndesRush — styles
   ============================================================ */

:root {
  /* palette */
  --primary: #174a68;
  --primary-ink: #103750;   /* primary, a step darker: hover/pressed */
  --secondary: #2f7898;
  --sky: #e7f1f4;
  --bg: #ffffff;
  --tint: #f4f8fa;          /* the light blue, much paler: alternate sections */
  --paper: #ffffff;
  --ink: #202923;
  --muted: #64747d;
  --text-muted: var(--muted);
  --line: #e2e6e4;
  --line-strong: #cbd7dc;
  --accent: #e5a04b;        /* only behind photos while they load */
  --accent-ink: #d28b33;    /* accent, a step darker: hover */
  --good: #2f7d5b;
  --good-ink: #23634a;
  --good-bg: rgba(47, 125, 91, 0.1);
  --danger: #b3261e;
  --warn-ink: #8a5513;
  --warn-bg: #fdf3e3;
  --warn-line: #f1d5a8;

  --shadow-sm: 0 1px 2px rgba(23, 74, 104, 0.05), 0 2px 8px rgba(23, 74, 104, 0.04);
  --shadow-md: 0 12px 32px rgba(23, 74, 104, 0.08);
  --shadow-lg: 0 22px 48px rgba(23, 74, 104, 0.13);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-img: 4px;
  --pill: 999px;

  --maxw: 1360px;
  --gutter: 40px;
  --nav-h: 72px;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (max-width: 720px) { :root { --gutter: 20px; } }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--sky); color: var(--ink); }

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

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
  color: inherit;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-img);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ============================================================
   Navbar
   ============================================================ */

#site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--bg);
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
body:not([data-page="home"]) #site-header,
body.scrolled #site-header,
body.nav-open #site-header { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-size: 14px;
  color: var(--muted);
  padding: 12px 0;
  transition: color 0.15s ease;
}
.nav-link:hover,
.nav-link.is-active { color: var(--ink); }

/* ---------- language menu (only on sites with 2+ languages) ---------- */

.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.15s ease;
}
.lang-btn:hover { color: var(--ink); }
.lang-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-img);
  padding: 6px 0;
  min-width: 168px;
  display: none;
}
.lang-menu.open { display: block; }
.lang-option {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s ease;
}
.lang-option:hover,
.lang-option[aria-current="true"] { color: var(--ink); }

/* ---------- manage-booking + cart icons ---------- */

.nav-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: -10px;
}
.booking-btn,
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  transition: color 0.15s ease;
}
.booking-btn:hover,
.booking-btn.is-active,
.cart-btn:hover { color: var(--ink); }
.cart-badge {
  position: absolute;
  top: 6px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--pill);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* ---------- phone menu: a disclosure under the bar ---------- */

.nav-toggle {
  display: none;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle-close,
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    max-height: calc(100svh - var(--nav-h));
    overflow-y: auto;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    border-bottom: 1px solid var(--line);
    /* hidden (and out of the tab order) until the button opens it */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  }
  body.nav-open .nav-links {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s ease;
  }
  .nav-link {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-link:hover,
  .nav-link.is-active { color: var(--secondary); }
  .lang-switch { margin-top: 12px; }
  .lang-menu { left: 0; right: auto; }
  .nav-icons { margin: 4px 0 0 -10px; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .nav-links, body.nav-open .nav-links { transition: none; }
}

/* ============================================================
   Forms (contact, manage booking, checkout, tour booking card)
   Mono labels, 52px controls with small corners, a hairline border that
   turns ink on focus.
   ============================================================ */

.form {
  display: grid;
  gap: 20px;
  max-width: 560px;
}
.field { display: grid; gap: 8px; }
.field label,
.field legend,
.field .field-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px; /* 16px stops iPhones zooming in on focus */
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-img);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364747d' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") right 20px center / 10px 6px no-repeat;
}
.field textarea {
  padding: 15px 22px;
  resize: vertical;
  line-height: 1.5;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--muted); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.field ::placeholder { color: var(--muted); opacity: 0.7; }
.form .btn { justify-self: start; }

/* Phone: country-code select + number input on one row */
.phone-row {
  display: grid;
  grid-template-columns: minmax(112px, min(11rem, 40%)) minmax(0, 1fr);
  gap: 8px;
}
.phone-row select {
  min-width: 0;
  padding: 0 36px 0 18px;
  background-position: right 16px center;
  text-overflow: ellipsis;
}

/* Client / Partner radio group */
.radio-field {
  gap: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.radio-field legend { margin-bottom: 4px; }
.field .radio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}
.radio-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }

/* Honeypot: kept in the layout (some bots skip display:none) but off-screen. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-size: 14px;
  margin: 4px 0 0;
}
.form-status.is-pending { color: var(--muted); }
.form-status.is-success { color: var(--good-ink); }
.form-status.is-error   { color: var(--danger); }

/* ============================================================
   Footer
   ============================================================ */

#site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 28px;
  color: var(--ink);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
}
.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
  max-width: 44ch;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
}
.footer-links a {
  font-size: 14px;
  color: var(--muted);
  padding: 10px 0;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--ink); }
.footer-links .footer-email { font-family: var(--font-mono); font-size: 13px; color: var(--ink); }
.footer-links .footer-email:hover { color: var(--secondary); }
.footer-bottom {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin: 40px auto 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: inherit; transition: color 0.15s ease; }
.footer-legal a:hover { color: var(--ink); }
@media (max-width: 620px) {
  #site-footer { padding: 36px 0 20px; }
  .footer-links { gap: 0 20px; }
  .footer-bottom { margin-top: 24px; }
}

/* ============================================================
   Tour list (/en/tours, /en/tours/<type>)
   The cards are the home page's expedition cards (.g-journeys).
   ============================================================ */

/* type filter: one row of chips, scrolling sideways on small screens */
.tour-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-img);
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.chip-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.is-active .chip-count { color: rgba(255, 255, 255, 0.65); }
@media (max-width: 640px) {
  .tour-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--gutter)) 32px;
    padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .tour-filter::-webkit-scrollbar { display: none; }
}

.tour-list { margin-top: 0; }
.tour-card[hidden] { display: none; }
.g-journey .g-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 14px;
  color: var(--muted);
}
.g-journey .g-facts + .g-price { margin-top: 6px; }
.g-journey .g-per { color: var(--muted); text-transform: none; letter-spacing: 0; }

/* types without tours yet, under the list */
.tour-soon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* ============================================================
   Tour detail (/en/tours/<type>/<id>)
   ============================================================ */

.tour-detail-back { display: inline-block; padding: 12px 0; margin: -12px 0 4px; color: var(--muted); }
.tour-detail-back:hover { color: var(--ink); }
.tour-detail-head .g-page-title { margin-top: 12px; }
.tour-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  color: var(--muted);
}

.tour-detail-layout[hidden] { display: none; }
.tour-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 48px 64px;
  align-items: start;
}
@media (max-width: 960px) { .tour-detail-layout { grid-template-columns: minmax(0, 1fr); } }

.tour-gallery { display: grid; gap: 8px; }
.tour-gallery-main { aspect-ratio: 3 / 2; height: auto; cursor: pointer; }
.tour-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.tour-gallery-thumb { aspect-ratio: 1; height: auto; cursor: pointer; transition: opacity 0.15s ease; }
.tour-gallery-main:hover,
.tour-gallery-thumb:hover { opacity: 0.9; }
/* the last thumbnail when there are more photos: "+N" over a dimmed photo;
   clicks pass through to the photo */
.tour-gallery-more { position: relative; }
.tour-gallery-more .tour-gallery-thumb { display: block; }
.tour-gallery-more-count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-img);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: clamp(18px, 2.4vw, 28px);
  letter-spacing: -0.01em;
  pointer-events: none;
  transition: background 0.15s ease;
}
.tour-gallery-more:hover .tour-gallery-more-count { background: rgba(0, 0, 0, 0.4); }

/* About / safety / included / not included / good to know: a mono label beside
   the text on wide screens, above it on narrow ones */
.tour-detail-block {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px 32px;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.tour-detail-block h2 { font-weight: 400; line-height: 1.6; }
.tour-detail-block .g-text { margin-top: 0; }
@media (max-width: 720px) {
  .tour-detail-block { grid-template-columns: 1fr; margin-top: 48px; }
}

.g-list { list-style: none; margin: 0; padding: 0; }
.g-list li { padding: 12px 0; font-size: 16px; color: var(--ink); }
.g-list li:first-child { padding-top: 0; }
.g-list li + li { border-top: 1px solid var(--line); }
.g-list-muted li { color: var(--muted); }

/* the booking column: no box, just hairlines; when it drops below the
   text, a rule sets it apart */
@media (max-width: 960px) {
  .tour-booking-card { border-top: 1px solid var(--ink); padding-top: 20px; }
}
.tour-booking-card .tour-price {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}
.tour-price .amt {
  font-size: 56px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tour-price .per { color: var(--muted); font-size: 14px; }
.tour-booking-card .field { margin-bottom: 16px; }
.field input.is-invalid { border-color: var(--danger); }
.field-error {
  margin: 0;
  padding-left: 22px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.insurance-addons {
  margin: 28px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.addons-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.addon-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: start;
  padding: 14px 0;
  cursor: pointer;
  font-size: 15px;
}
.addon-row + .addon-row { border-top: 1px solid var(--line); }
.addon-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); }
.addon-note {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.addon-price { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; padding-top: 2px; }

.tour-booking-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 8px 0 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.tour-booking-total .amt { font-family: var(--font-mono); font-size: 18px; color: var(--ink); }

.tour-booking-actions { display: grid; gap: 8px; }
.tour-booking-actions .btn { width: 100%; }
.tour-booking-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.photo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 38, 54, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.photo-modal-overlay[hidden] { display: none; }
.photo-modal {
  position: relative;
  max-width: min(900px, 100%);
  max-height: 100%;
}

/* The photo viewer: a near-black backdrop with the close button, the
   arrows and the counter at the window's edges, clear of the photo. */
.photo-lightbox {
  background: rgba(15, 20, 18, 0.94);
  padding: 72px 96px;
  animation: photo-lightbox-in 0.18s ease;
}
@keyframes photo-lightbox-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .photo-lightbox { animation: none; } }
.photo-lightbox .photo-modal { max-width: min(1360px, 100%); }
.photo-modal-img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 144px);
  border-radius: var(--radius-img);
  object-fit: contain;
}

.photo-modal-btn {
  position: absolute;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}
.photo-modal-btn:hover { border-color: #fff; }
.photo-modal-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.photo-modal-btn svg { width: 20px; height: 20px; }
.photo-modal-btn[hidden] { display: none; }

.photo-modal-close { top: 16px; right: 20px; }
.photo-modal-arrow { top: 50%; transform: translateY(-50%); }
.photo-modal-prev { left: 24px; }
.photo-modal-next { right: 24px; }

.photo-modal-count:empty { display: none; }
.photo-modal-count {
  position: absolute;
  top: 28px;
  left: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* Phones: the photo takes the full width, the arrows sit below it */
@media (max-width: 640px) {
  .photo-lightbox { padding: 72px 0 96px; }
  .photo-modal-img { border-radius: 0; max-height: calc(100vh - 168px); }
  .photo-modal-arrow { top: auto; bottom: 28px; transform: none; }
  .photo-modal-prev { left: calc(50% - 56px); }
  .photo-modal-next { right: calc(50% - 56px); }
}

/* The manage-booking message pop-up (manage-booking.js): a plain white
   sheet on a dimmed page, no shadow; sections are split by hairlines. The
   checkout page (below) uses the same trip summary, actions and booking
   reference. */
#message-modal { background: rgba(16, 55, 80, 0.45); }
.checkout-modal {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  border-radius: var(--radius-img);
  background: var(--bg);
}
.checkout-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.checkout-modal-close:hover { color: var(--ink); }
.checkout-modal-close svg { width: 20px; height: 20px; }

.checkout-form {
  display: grid;
  gap: 20px;
  padding: 40px 40px 36px;
}
.checkout-head { padding-right: 40px; }
.checkout-head h2 {
  font-size: 32px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.checkout-intro {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.checkout-trip {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.checkout-trip-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.checkout-trip-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  font-size: 14px;
}
.checkout-trip-list li {
  display: grid;
  gap: 3px;
}
.checkout-trip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.checkout-trip-row > :last-child {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
}
.checkout-trip-row.checkout-trip-tour {
  margin: 8px 0 2px;
  color: var(--ink);
  font-size: 16px;
}
.checkout-trip-list .checkout-trip-row.checkout-trip-tour { margin-top: 0; }
.checkout-trip-tour > :last-child { color: var(--muted); }
.checkout-trip-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.checkout-trip-total > :last-child { font-family: var(--font-mono); font-size: 15px; }

.checkout-radio-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.checkout-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.checkout-done {
  display: grid;
  gap: 20px;
  padding: 40px 40px 36px;
}
/* display: grid would otherwise override [hidden] */
.checkout-form[hidden],
.checkout-done[hidden] { display: none; }
.checkout-ref {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}
.checkout-ref-code {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  color: var(--ink);
  user-select: all; /* one click selects the whole code for copying */
}
.checkout-ref-note {
  color: var(--muted);
  font-size: 14px;
}
@media (max-width: 600px) {
  #message-modal { padding: 12px; }
  .checkout-modal { max-height: calc(100vh - 24px); }
  .checkout-form,
  .checkout-done { padding: 28px 20px 24px; }
  .checkout-head h2 { font-size: 28px; }
  .checkout-actions { flex-direction: column-reverse; }
  .checkout-actions .btn { width: 100%; }
}

/* ============================================================
   Checkout (/checkout): the form beside the trip summary, which
   stays in view on wide screens and comes first on narrow ones
   ============================================================ */

.checkout-page {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr);
  grid-template-areas: "form summary";
  gap: 40px 64px;
  align-items: start;
}
.checkout-page[hidden] { display: none; }
.checkout-page-form { grid-area: form; }
/* one back link: to the cart or to the tour (.btn would show both) */
.checkout-actions .btn[hidden] { display: none; }
/* the section's hairline is already above it */
.checkout-summary {
  grid-area: summary;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  border-top: 0;
  padding-top: 0;
}
.checkout-summary .checkout-trip-list { margin-top: 16px; }
.checkout-page-done { padding: 0; max-width: 560px; }

/* Card payment (site.yaml card_payments): Kushki puts an iframe in each
   .card-field; the box is ours, drawn like the other inputs, and the
   iframe fills it. Until Kushki is set up the boxes are just empty. */
.checkout-payment {
  display: grid;
  gap: 20px;
  margin: 12px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.checkout-payment-title {
  float: left; /* puts the legend inside the grid instead of on the border */
  width: 100%;
  padding: 0;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card-field {
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-img);
  background: var(--paper);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.card-field:hover { border-color: var(--muted); }
.card-field:focus-within { border-color: var(--ink); }
.card-field iframe { display: block; width: 100%; min-height: 50px; border: 0; }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
.card-extra:empty { display: none; }
.checkout-payment-note { font-size: 13px; color: var(--muted); }
.checkout-page-done .checkout-ref { border-top: 0; padding-top: 0; }
.checkout-page-done .checkout-actions { justify-content: flex-start; }
@media (max-width: 860px) {
  .checkout-page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "summary" "form";
  }
  .checkout-summary { position: static; }
}

/* ============================================================
   Cart (/cart) — also the booking rows on /manage-booking
   ============================================================ */

/* the total and the checkout button, over a hairline */
.cart-summary-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 32px;
}
.cart-summary-bar[hidden] { display: none; }
.cart-summary-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cart-summary-total {
  display: block;
  margin-top: 10px;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cart-checkout-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.cart-summary-bar[hidden] + .cart-checkout-note { display: none; }

.cart-list {
  display: grid;
  margin-top: 48px;
  border-bottom: 1px solid var(--line);
}
.cart-list[hidden] { display: none; }

.cart-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 24px 32px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.cart-item:hover .cart-item-info h3 { color: var(--secondary); }
.cart-item:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 4px;
}

.cart-item-media {
  width: 160px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-img);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}
.cart-item-thumb { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info h3 {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
  transition: color 0.15s ease;
}
.cart-item-info h3 a:hover { color: var(--secondary); }
.cart-item-meta { color: var(--muted); font-size: 14px; }

/* the date (and on /manage-booking the status) above the title */
.tour-date-badge,
.manage-status {
  display: inline-block;
  padding: 0;
  background: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-item-addons {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 4px;
  max-width: 360px;
}
.cart-item-addons li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.cart-item-addons li > span:last-child { font-family: var(--font-mono); font-size: 12px; color: var(--ink); }

.cart-item-price {
  display: grid;
  gap: 12px;
  justify-items: end;
  text-align: right;
}
.cart-item-subtotal {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
}
.cart-item-remove {
  min-height: 44px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}
.cart-item-remove:hover { color: var(--danger); }

.empty-state { font-size: 18px; line-height: 1.5; }
.empty-state a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; transition: color 0.15s ease; }
.empty-state a:hover { color: var(--secondary); }

@media (max-width: 640px) {
  .cart-item { grid-template-columns: 96px minmax(0, 1fr); gap: 16px 20px; }
  .cart-item-media { width: 96px; }
  .cart-item-price {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* ============================================================
   Manage booking (/manage-booking)
   ============================================================ */

.field input.manage-code-input {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.manage-code-input::placeholder { font-family: var(--font-sans); letter-spacing: normal; text-transform: none; }

.manage-help { display: grid; gap: 12px; justify-items: start; }
.manage-help .btn { margin-top: 12px; }

.manage-results { margin-top: var(--section-gap); scroll-margin-top: calc(var(--nav-h) + 24px); }
.manage-results[hidden] { display: none; }
.manage-results-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}
.manage-results-code {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink);
}
.manage-results .cart-list { margin-top: 32px; }

.manage-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 32px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.manage-item-badges { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.manage-status::before { content: "· "; }
.manage-status.is-confirmed,
.manage-status.is-paid { color: var(--good-ink); }
.manage-status.is-cancelled { color: var(--danger); }

.manage-item-side {
  display: grid;
  gap: 16px;
  justify-items: end;
}
.manage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.manage-action {
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.manage-action:hover:not(:disabled) { border-color: var(--ink); }
.manage-action:disabled { opacity: 0.45; cursor: not-allowed; }

/* the tour in the message modal: the date drops below a long title
   instead of widening the modal */
.manage-msg-tour { flex-wrap: wrap; }

@media (max-width: 640px) {
  .manage-item { grid-template-columns: 1fr; }
  .manage-item-side { justify-items: start; }
  .manage-actions { justify-content: flex-start; }
}

/* ============================================================
   Error page
   ============================================================ */

.error-wrap {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.error-wrap h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin-bottom: 14px; }
.error-wrap p { color: var(--muted); margin-bottom: 26px; }

/* ============================================================
   Home — "gallery" layout
   Photography and type carry it: no shadows, gradients or boxes;
   structure comes from whitespace and 1px hairlines. Geist for the
   voice, Geist Mono for facts (numbering, durations, places, prices).
   ============================================================ */

.gallery { --section-gap: 120px; }
@media (max-width: 720px) { .gallery { --section-gap: 72px; } }

.g-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.g-link { color: var(--ink); transition: color 0.15s ease; }
.g-link:hover { color: var(--secondary); }
.g-label { color: var(--muted); }
.g-lede { font-size: 18px; line-height: 1.5; color: var(--ink); max-width: 420px; }
.g-body { font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.g-title { font-size: 20px; font-weight: 400; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.g-index { color: var(--muted); }

/* photos: the accent shows only while a photo loads (or if it can't) */
.g-photo {
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-img);
  background: var(--accent);
}

/* ---------- hero ---------- */

.g-hero { padding-top: calc(var(--nav-h) + 72px); }
.g-display {
  font-size: clamp(56px, 11vw, 168px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin-left: -0.05em; /* optical: big type looks indented without it */
}
@media (max-width: 480px) { .g-display { font-weight: 400; } }
.g-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
  margin-top: 48px;
}
.g-hero-row .g-link { padding: 12px 0; margin-bottom: -12px; }
@media (max-width: 720px) {
  .g-hero { padding-top: calc(var(--nav-h) + 40px); }
  .g-hero-row { margin-top: 32px; }
}

.g-plate { margin: 64px auto 0; }
.g-plate .g-photo { height: 620px; }
@media (max-width: 720px) {
  .g-plate { margin-top: 40px; }
  .g-plate .g-photo { height: 420px; }
}
.g-caption {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 14px;
  color: var(--muted);
}

/* ---------- sections ---------- */

.g-section { margin-top: var(--section-gap); }
.gallery > :last-child { margin-bottom: var(--section-gap); }
.g-head { display: grid; gap: 16px; align-content: start; }
.g-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  flex-wrap: wrap;
}
.g-head .g-lede { margin-top: 8px; }
.g-h2 {
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 18ch;
}
@media (max-width: 720px) { .g-h2 { font-size: 32px; } }

/* a hairline opens every section */
.g-section > :first-child { border-top: 1px solid var(--ink); padding-top: 20px; }

.g-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
  align-items: start;
}
.g-prose { display: grid; gap: 16px; max-width: 560px; }
.g-prose .g-lede { max-width: none; }
.g-prose p:not(.g-lede) { font-size: 16px; line-height: 1.65; color: var(--text-muted); }
@media (max-width: 860px) { .g-split { grid-template-columns: 1fr; } }

/* ---------- expeditions ---------- */

.g-journeys {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 24px;
}
@media (max-width: 1000px) { .g-journeys { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g-journeys { grid-template-columns: 1fr; } }
.g-journey { display: flex; flex-direction: column; }
.g-journey .g-photo { aspect-ratio: 4 / 5; height: auto; }
.g-journey .g-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.g-journey .g-title { margin-top: 14px; transition: color 0.15s ease; }
.g-journey .g-body { margin-top: 6px; }
.g-journey .g-price { margin-top: 14px; color: var(--ink); }
.g-journey:hover .g-title { color: var(--secondary); }
@media (max-width: 720px) { .g-journey .g-photo { aspect-ratio: 4 / 3; } }

/* ---------- numbered points (story, why Ecuador) ---------- */

.g-points {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}
.g-points li { border-top: 1px solid var(--line); padding-top: 16px; }
.g-points .g-title { margin-top: 28px; }
.g-points .g-body { margin-top: 8px; max-width: 40ch; }
@media (max-width: 860px) {
  .g-points { grid-template-columns: 1fr; gap: 32px; margin-top: 48px; }
  .g-points .g-title { margin-top: 12px; }
}

/* ---------- map ---------- */

.g-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); /* text a third, the map two */
  gap: 48px 64px;
  align-items: center; /* the map sits level with the middle of the legend */
}
@media (max-width: 960px) { .g-map { grid-template-columns: 1fr; } }
.g-legend { list-style: none; margin: 40px 0 0; padding: 0; }
.g-legend li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.g-legend li:last-child { border-bottom: 1px solid var(--line); }
.g-legend .g-body { color: var(--ink); }
.g-legend-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
  color: var(--muted);
}
.g-legend-key span { display: inline-flex; align-items: center; gap: 8px; }
.g-legend-key i { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.g-legend-key i.sq { border-radius: 0; background: var(--ink); }

/* 667px keeps the mainland at its original size now the viewBox is wider (646 vs 620) */
.eq-map { display: block; width: 100%; max-width: 667px; height: auto; margin-inline: auto; }
.g-map .eq-map .land { fill: var(--tint); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.g-map .eq-map .inset { fill: none; stroke: var(--muted); stroke-width: 1; opacity: 0.6; stroke-dasharray: 2 4; }
.g-map .eq-map .equator { stroke: var(--muted); stroke-width: 1; opacity: 0.6; stroke-dasharray: 2 4; }
.g-map .eq-map .equator-label,
.g-map .eq-map .city-sub { fill: var(--muted); }
.g-map .eq-map .equator-label,
.g-map .eq-map .city-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
}
.g-map .eq-map .equator-label { letter-spacing: 0.06em; text-transform: uppercase; }
.g-map .eq-map .region { fill: var(--primary); }
.g-map .eq-map .region-num { fill: #fff; text-anchor: middle; font-family: var(--font-mono); font-size: 12px; font-weight: 400; }
.g-map .eq-map .entry { fill: var(--ink); }
.g-map .eq-map .city { fill: var(--ink); font-family: var(--font-sans); font-size: 15px; font-weight: 500; }
/* a halo in the page colour keeps labels readable where they cross the coastline */
.g-map .eq-map .city,
.g-map .eq-map .city-sub,
.g-map .eq-map .equator-label {
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 4px;
  stroke-linejoin: round;
}

/* ---------- closing call to action ---------- */

.g-cta-title {
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
}
@media (max-width: 480px) { .g-cta-title { font-weight: 400; } }
.g-cta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.g-cta-actions { display: flex; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
.g-cta-actions .g-link { padding: 14px 0; }

/* ---------- discover: a thin index of links under the call to action ---------- */

.g-discover { margin-top: 72px; }
@media (max-width: 720px) { .g-discover { margin-top: 48px; } }
.g-discover-rows { margin: 20px 0 0; }
.g-discover-rows > div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px 32px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.g-discover-rows dd { margin: 0; }
.g-discover-rows ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}
.g-discover-rows a { font-size: 15px; line-height: 1.5; }
@media (max-width: 620px) {
  .g-discover-rows > div { grid-template-columns: 1fr; }
  .g-discover-rows ul { gap: 4px 18px; }
}

/* ---------- the Discover page (templates/pages/discover.html) ----------
   A section per group: its name sticks beside a numbered list of links;
   each whole row is the link (its title's ::after covers it). */

.discover-jump { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.discover-jump span { color: var(--muted); margin-left: 4px; }
.discover-section { scroll-margin-top: calc(var(--nav-h) + 24px); }
.discover-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px 64px;
  align-items: start;
}
.discover-group-head { position: sticky; top: calc(var(--nav-h) + 32px); }
.discover-group-head .g-body { max-width: 32ch; }
.discover-list { list-style: none; margin: 0; padding: 0; }
.discover-list li {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 6px 24px;
  align-items: baseline;
  padding: 20px 0;
}
.discover-list li:first-child { padding-top: 4px; }
.discover-list li + li { border-top: 1px solid var(--line); }
.discover-list .g-title a::after { content: ""; position: absolute; inset: 0; }
.discover-list .g-title { transition: color 0.15s ease; }
.discover-list li:hover .g-title { color: var(--secondary); }
.discover-list .g-body { margin-top: 6px; max-width: 56ch; }
.discover-meta { color: var(--muted); white-space: nowrap; }
.discover-arrow { grid-column: 4; color: var(--muted); transition: transform 0.15s ease, color 0.15s ease; }
.discover-list li:hover .discover-arrow { color: var(--secondary); transform: translateX(3px); }
.discover-list a:focus-visible { outline: none; }
.discover-list a:focus-visible::after { outline: 2px solid var(--secondary); outline-offset: 2px; }
@media (max-width: 860px) {
  .discover-group { grid-template-columns: 1fr; }
  .discover-group-head { position: static; }
}
/* phones: the reading time goes under the summary */
@media (max-width: 620px) {
  .discover-list li { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 16px; }
  .discover-meta { grid-column: 2; grid-row: 2; margin-top: 6px; }
  .discover-arrow { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) { .discover-arrow { transition: none; } }

/* ---------- articles (the Discover pages, templates/article.html) ----------
   The home page's voice for long reading: the body in one ~68-character
   column beside a sticky "on this page" list, large titles opened by a
   hairline, photos at the column's width (wide ones at the body's). */

.article-head .g-hero-row { margin-top: 32px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--muted); }
.article-cover .g-photo { height: 560px; }
@media (max-width: 720px) {
  .article-head .g-hero-row { margin-top: 24px; }
  .article-cover .g-photo { height: 380px; }
}
.article-caption { display: block; padding-top: 12px; color: var(--muted); text-transform: none; letter-spacing: 0.02em; }

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px 80px;
  align-items: start;
  margin-top: 96px;
}
.article-layout > .article-body:only-child { grid-column: 1 / -1; }
@media (max-width: 960px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); margin-top: 64px; }
}

/* on this page: sticks below the menu while the body scrolls past */
.article-toc {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}
.article-toc ol { list-style: none; margin: 16px 0 0; padding: 0; }
.article-toc li { border-top: 1px solid var(--line); }
.article-toc li:last-child { border-bottom: 1px solid var(--line); }
.article-toc a { display: grid; grid-template-columns: 32px 1fr; gap: 8px; padding: 11px 0; font-size: 14px; line-height: 1.4; }
.article-toc .g-index { padding-top: 2px; }
@media (max-width: 960px) { .article-toc { position: static; } }

/* the body: text at reading width; figures as wide as the text, or the body */
.article-body > * { max-width: 680px; }
.article-body > .article-figure.is-wide { max-width: none; }
.article-body h2 {
  margin-top: 88px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
  max-width: 680px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin-top: 48px; font-size: 22px; }
.article-body h2 + p,
.article-body h2 + h3 { margin-top: 28px; }
.article-body h3 + p { margin-top: 12px; }
.article-body h2,
.article-body h3 { scroll-margin-top: calc(var(--nav-h) + 24px); }
.article-body p,
.article-body li { font-size: 17px; line-height: 1.7; color: var(--ink); }
.article-body p { margin-top: 20px; }
.article-body p a,
.article-body li a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-body p a:hover,
.article-body li a:hover { color: var(--secondary); }
.article-body ul { list-style: none; margin: 24px 0 0; padding: 0; }
.article-body ul li { position: relative; padding: 10px 0 10px 28px; border-top: 1px solid var(--line); }
.article-body ul li:last-child { border-bottom: 1px solid var(--line); }
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(10px + 0.85em - 3px);
  width: 6px;
  height: 6px;
  background: var(--ink);
}
.article-figure { margin: 48px 0; }
.article-figure .g-photo { height: auto; max-height: 860px; }
.article-photos > div {
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  gap: 12px;
}
.article-photos .g-photo { aspect-ratio: 4 / 5; height: 100%; }
@media (max-width: 720px) {
  .article-body h2 { margin-top: 64px; }
  .article-body h3 { margin-top: 36px; font-size: 20px; }
  .article-body p,
  .article-body li { font-size: 16px; }
  .article-figure { margin: 36px 0; }
  .article-photos > div { gap: 8px; }
}

/* ---------- inner pages (safety, operators, contact, cart, booking) ---------- */

.g-page-head { padding-top: calc(var(--nav-h) + 72px); }
.g-page-title {
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 16px 0 0 -0.04em;
}
@media (max-width: 480px) { .g-page-title { font-weight: 400; } }
.g-page-head .g-lede { margin-top: 32px; max-width: 480px; }
@media (max-width: 720px) {
  .g-page-head { padding-top: calc(var(--nav-h) + 40px); }
  .g-page-head .g-lede { margin-top: 24px; }
}

/* numbered rows: index, title, text (safety tips) */
.g-rows { list-style: none; margin: 0; padding: 0; }
.g-rows li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px 32px;
  align-items: baseline;
  padding: 28px 0;
}
.g-rows li + li { border-top: 1px solid var(--line); }
.g-rows li:first-child { padding-top: 8px; }
.g-head + .g-rows { margin-top: 40px; }
.g-rows .g-body { font-size: 16px; max-width: 56ch; }
@media (max-width: 860px) {
  .g-rows li { grid-template-columns: 48px minmax(0, 1fr); }
  .g-rows .g-body { grid-column: 2; }
}

/* the numbered legend with larger items (operator requirements) */
.g-legend-lg { margin-top: 0; }
.g-legend li { align-items: baseline; }
.g-legend-lg li { padding: 18px 0; }
.g-legend-lg li:first-child { border-top: 0; padding-top: 0; }

.g-text { margin-top: 32px; max-width: 560px; font-size: 16px; line-height: 1.65; color: var(--text-muted); }
.g-text-cta { margin-top: 32px; }

/* the column beside a form: a short note, an email address, a help link */
.g-aside { display: grid; gap: 12px; align-content: start; justify-items: start; }
.g-aside .g-title { overflow-wrap: anywhere; }

