/* ============================================================
   FARHOLM — farholm.com
   Brand direction: "The horizon."
   Far (distant) + holm (small island) — the mark is a small
   island rising over a horizon line. Sea-ink, fog, and a
   horizon-gold accent. Type: Young Serif + Albert Sans.
   All color pairings verified WCAG 2.1 AA.
   ============================================================ */

/* Self-hosted fonts (latin subset, SIL OFL). Served from our own edge — no
   third-party Google Fonts request (faster + no IP sharing). Albert Sans is a
   variable font covering weights 400–700 in one file. */
@font-face {
  font-family: "Albert Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/albert-sans-var.woff2") format("woff2");
}
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/young-serif.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --ink:   #10393F;   /* deep north-sea — headings, dark sections */
  --ink-2: #0C2E33;   /* darker ink — hero gradient base */
  --sea:   #1F5C5F;   /* links, secondary accents */
  --fog:   #F4F7F5;   /* page background */
  --mist:  #E4EDE9;   /* alternate section background */
  --gold:  #E3A845;   /* horizon gold — primary CTA, the rising sun */
  --gold-2:#D2962F;   /* gold hover */
  --slate: #46605F;   /* muted text, captions */
  --white: #FFFFFF;

  /* Semantic tokens — these flip in dark mode; the brand colors above stay fixed
     so the intentionally-dark sections (hero, footer, ink bands) never change. */
  --bg:           var(--fog);              /* page background */
  --surface:      var(--white);            /* cards, form, faq, chips, map */
  --surface-alt:  var(--mist);             /* alternate sections */
  --text:         var(--ink);              /* body + heading text */
  --nav-bg:       rgba(244, 247, 245, 0.92);
  --input-bg:     var(--fog);
  --input-border: #C6D4D0;
  --border:       rgba(16, 57, 63, 0.10);

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Albert Sans", -apple-system, "Segoe UI", sans-serif;

  --size-hero: clamp(2.4rem, 5.5vw, 4.2rem);
  --size-h1:   clamp(2.1rem, 4.5vw, 3.4rem);
  --size-h2:   clamp(1.6rem, 3vw, 2.25rem);
  --size-h3:   1.3rem;
  --size-body: 1.0625rem;
  --size-small: 0.9rem;

  --space-section: clamp(4rem, 9vw, 7.5rem);
  --width-content: 70rem;
  --width-prose: 44rem;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(16, 57, 63, 0.08);

  /* ---- App design-system scale (Phase 0) -----------------------------------
     A formal spacing / radius / elevation vocabulary for the data app
     (/trip, /admin, /hq) so panels, primitives, and the component gallery share
     one source of truth instead of ad-hoc values. The public marketing site
     keeps its own --space-section rhythm; these are the tighter app steps. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --radius-sm: 8px;            /* inputs, list rows, small cards */
  --radius-md: 10px;           /* == --radius; default panel/card radius */
  --radius-lg: 12px;           /* large admin/hub panels */
  --radius-pill: 999px;        /* chips, status pills, round buttons */
  --shadow-sm: 0 2px 10px rgba(16, 57, 63, 0.08);   /* subtle lift (chips, popovers) */
  --shadow-lg: 0 16px 40px rgba(16, 57, 63, 0.13);  /* hover/elevated cards, dialog */

  /* ---- Semantic state colors (light) ---------------------------------------
     Centralizes the success-green / error-red / warning-gold that were
     hand-coded across admin.html, hq.html, and the trip itinerary. The text
     tokens (--ok/--err/--warn) FLIP in dark mode below; the soft background
     tints do not (they read on both light and dark surfaces).
     WCAG 2.2 AA holds for every use, INCLUDING the worst case — small bold pill
     text drawn in the token color over its own -soft tint composited on the mist
     hub-row (.chip-* in hq) and over the fog page background (trip seg statuses).
     The text values are tuned so that case clears 4.5:1 (mist: ok 4.61, err 4.72,
     warn 4.82; solid-on-white and over-fog are higher). The brand --gold is only
     used on dark, where it clears 4.5:1; the soft tints keep the original brand
     hues as a light wash behind the darker, accessible text. */
  --ok:        #136B45;
  --ok-soft:   rgba(31, 138, 91, 0.15);
  --err:       #A82A1A;
  --err-soft:  rgba(192, 57, 43, 0.15);
  --warn:      #80560E;
  --warn-soft: rgba(227, 168, 69, 0.15);  /* 0.15 (matches ok/err) lifts the dark gold "renew" chip past AA */
}

/* ---- Dark mode ------------------------------------------------
   Applies when the OS prefers dark (unless the visitor forced light via the
   toggle), or whenever dark is explicitly chosen (html.dark). The brand colors
   in :root are untouched, so hero/footer/ink sections look the same in both.
   The two token lists below are intentionally identical. */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    color-scheme: dark;
    --bg:           #0B2C30;
    --surface:      #16454C;
    --surface-alt:  #103940;
    --text:         #EAF1EE;
    --nav-bg:       rgba(11, 44, 48, 0.85);
    --input-bg:     #0E3338;
    --input-border: rgba(244, 247, 245, 0.20);
    --border:       rgba(244, 247, 245, 0.14);
    --sea:          #74C2B3;   /* lighter teal — links/accents on dark */
    --slate:        #9FB6B2;   /* lighter muted text */
    --shadow:       0 10px 30px rgba(0, 0, 0, 0.40);
    --shadow-sm:    0 2px 10px rgba(0, 0, 0, 0.40);
    --shadow-lg:    0 16px 40px rgba(0, 0, 0, 0.50);
    /* State-color text flips (soft tints in :root read on both surfaces). */
    --ok:           #7FD0A8;
    --err:          #F2A39B;
    --warn:         #E3A845;   /* the brand gold clears 4.5:1 on dark */
  }
}
html.dark {
  color-scheme: dark;
  --bg:           #0B2C30;
  --surface:      #16454C;
  --surface-alt:  #103940;
  --text:         #EAF1EE;
  --nav-bg:       rgba(11, 44, 48, 0.85);
  --input-bg:     #0E3338;
  --input-border: rgba(244, 247, 245, 0.20);
  --border:       rgba(244, 247, 245, 0.14);
  --sea:          #74C2B3;
  --slate:        #9FB6B2;
  --shadow:       0 10px 30px rgba(0, 0, 0, 0.40);
  --shadow-sm:    0 2px 10px rgba(0, 0, 0, 0.40);
  --shadow-lg:    0 16px 40px rgba(0, 0, 0, 0.50);
  /* State-color text flips (soft tints in :root read on both surfaces). */
  --ok:           #7FD0A8;
  --err:          #F2A39B;
  --warn:         #E3A845;   /* the brand gold clears 4.5:1 on dark */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* scroll-padding-top keeps anchor jumps AND programmatic focus (skip link,
   in-page links) clear of the sticky nav — A11Y-005 (SC 2.4.11 Focus Not
   Obscured). Matches the :where([id]) scroll-margin-top below. */
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }

p + p { margin-top: 1em; }

a { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

/* Snappier touch: drop the 300ms double-tap delay and the grey tap flash —
   interactive elements supply their own :hover/:active feedback. */
a, button, summary, label, .btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
  /* A11Y-001 (SC 1.4.11 Non-text Contrast): the gold ring clears 3:1 on the
     dark hero/footer/CTA bands (~5.8:1) but only ~1.9:1 on the light page
     background, so on light bands the focus ring was barely visible. The paired
     box-shadow adds a deep-ink edge (contrasts on light) inside a near-white
     ring (contrasts on dark) so a focus indicator meets 3:1 on ANY band; the
     un-clippable gold outline stays the baseline indicator everywhere. */
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px rgba(255, 255, 255, 0.92);
}

.container {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.prose { max-width: var(--width-prose); }
.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.9rem;
}

.section { padding: var(--space-section) 0; }
.section--mist { background: var(--surface-alt); }
.section--ink { background: var(--ink); color: var(--fog); }
.section--ink h2, .section--ink h3 { color: var(--white); }
.section--ink a { color: var(--gold); }
.section--ink a:hover { color: var(--white); }
.section--ink .eyebrow { color: var(--gold); }

/* ---- The signature: horizon divider --------------------- */
.horizon {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin: 0 auto 1.4rem;
  width: 110px;
  height: 16px;
  position: relative;
}
.horizon::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.35;
}
.horizon::after {
  content: "";
  width: 22px;
  height: 11px;
  border-radius: 11px 11px 0 0;
  background: var(--gold);
}
.horizon--left { margin-left: 0; }

/* ---- Buttons --------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-2); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--ink-2); color: var(--white); }
.btn--ghost { background: transparent; color: var(--fog); border-color: rgba(244,247,245,0.5); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---- Navigation ------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}
.nav__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}
.nav__brand svg { width: 30px; height: 30px; }
.nav__wordmark {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
}
.nav__links a:not(.btn) {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav__links a:not(.btn):hover,
.nav__links a[aria-current="page"]:not(.btn) {
  border-bottom-color: var(--gold);
}
.nav__links .btn { padding: 0.55rem 1.25rem; font-size: 0.9rem; }
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}
.nav__toggle svg { width: 26px; height: 26px; }

@media (max-width: 1100px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    position: absolute;
    top: 4.25rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
    box-shadow: var(--shadow);
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { padding: 0 1.5rem; }
  .nav__links a:not(.btn) {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
  }
  .nav__links .btn {
    display: block;
    text-align: center;
    margin-top: 1rem;
    width: 100%;
  }
}

/* ---- Hero (home) ------------------------------------------ */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 46%, #1A4A50 72%, #235B5C 100%);
  color: var(--fog);
  overflow: hidden;
  text-align: center;
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(11rem, 22vw, 15rem);
  max-width: 52rem;
  margin: 0 auto;
}
.hero h1 {
  font-size: var(--size-hero);
  color: var(--white);
  margin-bottom: 1.25rem;
}
.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 38rem;
  margin: 0 auto 2.25rem;
  color: rgba(244, 247, 245, 0.92);
}
.hero__scene {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  width: 100%;
  height: auto;
  z-index: 1;
  pointer-events: none;
}
.hero__sun {
  animation: sunrise 2.4s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  transform-origin: center;
}
@keyframes sunrise {
  from { transform: translateY(46px); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__sun { animation: none; }
}

/* ---- Page hero (interior pages) --------------------------- */
.page-hero {
  background: var(--ink);
  color: var(--fog);
  text-align: center;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  position: relative;
}
.page-hero h1 { color: var(--white); margin-bottom: 0.9rem; }
.page-hero p {
  max-width: 38rem;
  margin: 0 auto;
  font-size: 1.1rem;
  color: rgba(244, 247, 245, 0.9);
}
.page-hero .horizon { color: var(--fog); }

/* ---- Steps (How It Works) --------------------------------- */
.steps {
  display: grid;
  /* Adapts to the number of steps (home has 4, points has 3) so a page never
     leaves an empty trailing column. */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.step__num {
  font-family: var(--font-display);
  font-size: 2rem;
  /* --sea (not --gold): gold on the mist/white step background is only ~1.8:1,
     too faint to read. Sea reads ~6:1; the gold accent still lives in the
     section's horizon motif above the heading. */
  color: var(--sea);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.step h3 { margin-bottom: 0.6rem; font-size: 1.2rem; }
.step p { font-size: 0.97rem; color: var(--slate); }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; gap: 2.25rem; } }

/* ---- Photo gallery — real travel imagery ----------------------
   An editorial strip of photographs (not a feature-card grid): the images
   carry it, with a caption over a dark scrim for legibility. Below 1000px it
   becomes a horizontal scroll-snap strip so any count stays tidy. */
.section-lead { max-width: 42rem; margin: 0.6rem auto 0; color: var(--slate); font-size: 1.02rem; line-height: 1.6; }
.gallery { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.9rem; margin-top: 2.75rem; }
.gallery__item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery__item picture { display: block; }
/* height:auto is required — eleventy-img sets a height attribute (to prevent
   layout shift), and that wins over aspect-ratio unless height is auto. */
.gallery__item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 0.5s ease; }
.gallery__item:hover img, .gallery__item:focus-within img { transform: scale(1.05); }
.gallery__cap { position: absolute; inset: auto 0 0 0; padding: 1.7rem 0.8rem 0.65rem; color: #fff; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; background: linear-gradient(to top, rgba(12, 46, 51, 0.82), rgba(12, 46, 51, 0)); }
.gallery-note { margin-top: 1.5rem; }
@media (max-width: 1000px) {
  .gallery { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 44%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; }
  .gallery__item { scroll-snap-align: start; }
}
@media (max-width: 680px) { .gallery { grid-auto-columns: 64%; } }
@media (prefers-reduced-motion: reduce) { .gallery__item img { transition: none; } .gallery__item:hover img, .gallery__item:focus-within img { transform: none; } }

/* ---- Travel advice (blog) ------------------------------------- */
.page-hero .eyebrow, .page-hero .eyebrow a { color: var(--gold); text-decoration: none; }
.page-hero .eyebrow a:hover { color: var(--white); }
.guide-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.25rem); }
.guide-cta__text { max-width: 40rem; }
.guide-cta__text .eyebrow { color: var(--gold-2); }
.guide-cta h2 { font-size: 1.5rem; margin: 0.35rem 0 0.55rem; }
.guide-cta p { color: var(--slate); margin: 0; }
.guide-cta .btn { white-space: nowrap; }
.advice-list { list-style: none; display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .advice-list { grid-template-columns: repeat(2, 1fr); } }
.advice-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.advice-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.advice-card a { display: block; padding: 1.5rem 1.6rem; color: inherit; text-decoration: none; }
.advice-card__date { color: var(--slate); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.5rem; }
.advice-card h2 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.5rem; }
.advice-card p { color: var(--slate); }
.advice-card__more { display: inline-block; margin-top: 0.9rem; color: var(--sea); font-weight: 600; }

/* Article body — Markdown rendered inside .prose */
.post__meta { color: rgba(244, 247, 245, 0.8); margin-top: 0.7rem; font-size: 0.95rem; }
.post__body { font-size: 1.05rem; line-height: 1.7; }
.post__body > * + * { margin-top: 1.15rem; }
.post__body h2 { font-family: var(--font-display); font-size: 1.55rem; line-height: 1.22; margin-top: 2.25rem; }
.post__body h3 { font-size: 1.18rem; margin-top: 1.75rem; }
.post__body ul, .post__body ol { padding-left: 1.3rem; }
.post__body li { margin-top: 0.4rem; }
.post__body li::marker { color: var(--gold); }
.post__body a { color: var(--sea); text-decoration: underline; text-underline-offset: 2px; }
.post__body a:hover { color: var(--gold); }
.post__body strong { color: var(--ink); }
html.dark .post__body strong { color: var(--text); }
.post__caveat { margin-top: 2rem; padding: 1rem 1.2rem; background: var(--surface-alt); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; font-size: 0.95rem; color: var(--slate); }
.post__back { margin-top: 2.5rem; }
.post__back a { color: var(--sea); font-weight: 600; }

/* ---- Cards ------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 3rem;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(16, 57, 63, 0.13);
}
.card svg { width: 36px; height: 36px; color: var(--sea); margin-bottom: 1.1rem; }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--slate); font-size: 0.97rem; flex: 1; }
.card a {
  margin-top: 1.4rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.card a:hover { text-decoration: underline; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---- Alternating service blocks ---------------------------- */
.service {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: var(--space-section) 0;
}
.service:nth-of-type(even) .service__art { order: 2; }
.service__art {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.service__art picture { display: block; width: 100%; height: 100%; }
.service__art svg, .service__art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* Shift the crop's focal point down for portrait sources whose subject sits low
   (e.g. the resort pool), so the 4:3 slot shows it instead of empty sky. */
.service__art img.op-low { object-position: center 72%; }
.service h2 { margin-bottom: 1.1rem; }
.service ul {
  margin-top: 1.4rem;
  list-style: none;
}
.service li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.55rem;
  font-size: 0.97rem;
}
.service li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 14px;
  height: 2px;
  background: var(--gold);
}
.service .list-label {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sea);
  margin-top: 1.6rem;
}
@media (max-width: 860px) {
  .service { grid-template-columns: 1fr; }
  .service:nth-of-type(even) .service__art { order: 0; }
}

/* ---- Callout box ------------------------------------------- */
.callout {
  background: var(--ink);
  color: var(--fog);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow);
}
.callout h2, .callout h3 { color: var(--white); margin-bottom: 0.9rem; }
.callout a { color: var(--gold); }
.callout--gold-edge { border-left: 6px solid var(--gold); }

/* ---- Pull quote (About — the name) -------------------------- */
.pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-style: italic;
  line-height: 1.5;
  max-width: 40rem;
  margin: 0 auto;
  color: var(--text);
}
.pullquote em { color: var(--sea); font-style: italic; }

/* ---- Feature blocks (What Makes Us Different) ---------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.feature svg { width: 34px; height: 34px; color: var(--gold); margin-bottom: 1rem; }
.feature h3 { margin-bottom: 0.6rem; font-size: 1.15rem; }
.feature p { font-size: 0.96rem; color: var(--slate); }
.section--ink .feature p { color: rgba(244,247,245,0.85); }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

/* ---- Badges ------------------------------------------------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}
.badge {
  border: 2px solid var(--sea);
  border-radius: 8px;
  padding: 0.8rem 1.4rem;
  text-align: center;
  min-width: 140px;
}
.badge strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
}
.badge span { font-size: 0.78rem; color: var(--slate); }
.section--ink .badge { border-color: rgba(244,247,245,0.4); }
.section--ink .badge span { color: rgba(244,247,245,0.75); }

/* ---- Accordion (Why Us) -------------------------------------- */
.faq { max-width: 46rem; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 3.5rem 1.4rem 1.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--sea);
  border-bottom: 2px solid var(--sea);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details[open] summary { border-bottom: 1px solid var(--mist); }
.faq .faq__body { padding: 1.4rem 1.75rem 1.6rem; color: var(--slate); }

/* ---- Contact ------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.form { background: var(--surface); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.75rem); box-shadow: var(--shadow); }
.form__row { margin-bottom: 1.25rem; }
.form label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}
.form label .opt { font-weight: 400; color: var(--slate); }
.form input, .form select, .form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--sea);
}
.form textarea { min-height: 130px; resize: vertical; }
.form .btn { width: 100%; margin-top: 0.25rem; }
.form__note { font-size: var(--size-small); color: var(--slate); margin-top: 1.1rem; }
.form__success {
  display: none;
  background: var(--surface-alt);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  font-weight: 500;
}
.form__success.is-visible { display: block; }

.channels { list-style: none; margin-top: 1.75rem; }
.channels li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.channels svg { width: 22px; height: 22px; color: var(--sea); flex-shrink: 0; }
.channels a { font-weight: 500; }

/* ---- CTA band ------------------------------------------------ */
.cta-band {
  background: linear-gradient(135deg, var(--ink-2), var(--ink) 60%, #1A4A50);
  color: var(--fog);
  text-align: center;
  padding: var(--space-section) 0;
}
.cta-band h2 { color: var(--white); margin-bottom: 1rem; }
.cta-band p { max-width: 36rem; margin: 0 auto 2rem; color: rgba(244,247,245,0.9); }

/* ---- Footer --------------------------------------------------- */
.footer {
  background: var(--ink-2);
  color: rgba(244, 247, 245, 0.85);
  padding: 3.5rem 0 2.5rem;
  font-size: 0.93rem;
}
.footer a { color: rgba(244, 247, 245, 0.85); }
.footer a:hover { color: var(--gold); }
.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(244, 247, 245, 0.15);
}
.footer__brand { display: flex; align-items: center; gap: 0.6rem; color: var(--white); text-decoration: none; }
.footer__brand svg { width: 28px; height: 28px; }
.footer__brand span { font-weight: 700; letter-spacing: 0.22em; }
.footer__tagline { margin-top: 0.8rem; max-width: 22rem; color: rgba(244,247,245,0.7); }
.footer__col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 0.3rem; }
/* Comfortable tap targets (WCAG 2.5.8 — min 24px). Footer links are ~18px of
   text; the vertical padding lifts the hit area past 24px without changing the
   visual rhythm (the li margin was reduced to compensate). */
.footer__col li a, .footer__bottom a { display: inline-block; padding: 0.25rem 0; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  font-size: 0.84rem;
  color: rgba(244, 247, 245, 0.6);
}
/* LEGAL-009: standing fine-print disclosure under the footer bottom bar.
   Alpha matched to .footer__bottom so it clears WCAG AA (4.5:1) on the ink footer. */
.footer__legal {
  margin-top: 1.25rem;
  max-width: 64rem;
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(244, 247, 245, 0.62);
}

/* ---- Scroll reveal -------------------------------------------- */
/* Content is hidden ONLY when JS is running (html.js, set in base.njk).
   Without JS — or if site.js fails to load — everything stays visible. */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  /* UX-001 fail-safe: html.js (set in <head> by head-init.js) hides .reveal,
     but the code that reveals it — the IntersectionObserver AND the 2.5s
     catch-all — lives in site.js at end-of-body. If site.js fails to load
     (network/CDN error, blocked, parse error), content would stay hidden
     forever. This pure-CSS animation force-reveals after 4s with no JS, so a
     failed site.js can never blank the page. When site.js works it adds
     .is-visible well before 4s, so this never visibly fires. */
  animation: reveal-failsafe 0.01s linear 4s forwards;
}
html.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; animation: none; }
}

/* ---- 404 ------------------------------------------------------- */
.lost {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-section) 1.5rem;
}
.lost h1 { margin: 1.5rem 0 1rem; }
.lost p { max-width: 30rem; color: var(--slate); margin-bottom: 2rem; }

/* ---- Utility ---------------------------------------------------- */
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* === De-inlined style helpers ======================================
   Classes that replace former inline style="" attributes, so the
   Content-Security-Policy can drop style-src 'unsafe-inline'. Values are
   unchanged from the inline versions they replace. */
.mx-auto   { margin-left: auto; margin-right: auto; }
.mt-1      { margin-top: 1rem; }
.mt-25     { margin-top: 2.5rem; }
.mt-275    { margin-top: 2.75rem; }
.mb-125    { margin-bottom: 1.25rem; }
.measure   { max-width: 52rem; margin-left: auto; margin-right: auto; }
.lead-p    { font-size: 1.15rem; }
.t-ink     { color: var(--ink); }
.text-small-muted, .hint { font-size: var(--size-small); color: var(--slate); }
.list-indent { margin-top: 1rem; padding-left: 1.4rem; }
.callout--white { background: var(--white); color: var(--ink); }
/* White-callout headings must be ink: the dark-callout default (.callout h2/h3
   { color: var(--white) }) outranks the .t-ink helper, so without this the
   heading renders white-on-white and disappears (services, points-and-miles,
   expedition-cruises). */
.callout--white h2, .callout--white h3 { color: var(--ink); }
.prose-list { max-width: var(--width-prose); margin: 1.75rem auto 0; }
.policy-card { max-width: 50rem; margin: 0 auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 3rem); }
.footer__bottom--flush { border: none; padding-top: 0; }
.badge-logo { height: 72px; width: auto; }
.badges--start { justify-content: flex-start; }
.contact-fineprint { margin-top: 0.75rem; color: var(--slate); font-size: 0.82rem; }
.field-note { display: block; margin-top: 0.4rem; color: var(--slate); font-size: 0.82rem; }
.form__error { color: #9B2C2C; margin-top: 1rem; font-weight: 500; }
/* A11Y-002: per-radio-group required-error message. No `display` here so the
   `hidden` attribute keeps working; shown by site.js when a required group is
   left empty on submit. */
.field-error { color: #9B2C2C; font-weight: 500; font-size: 0.85rem; margin: -0.6rem 0 1rem; }
.form-turnstile { margin: 0.25rem 0 1.25rem; }
.cred-line { margin-top: 1rem; color: var(--slate); font-size: 0.9rem; }
.service--flush { padding: 0; }
.service__art--portrait { aspect-ratio: 4 / 5; max-width: 380px; }
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.testimonial { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.testimonial blockquote { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.testimonial figcaption { margin-top: 1rem; color: var(--slate); font-size: 0.9rem; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* ---------- Recently planned strip ---------- */
.recent-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 54rem;
  margin: 2.25rem auto 0;
}
.recent-strip span {
  background: var(--surface);
  color: var(--sea);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-size: 0.92rem;
  box-shadow: 0 2px 10px rgba(16, 57, 63, 0.08);
  white-space: nowrap;
}
.recent-strip strong { color: var(--text); font-weight: 600; }
.recent-note {
  text-align: center;
  color: var(--sea);
  font-size: 0.95rem;
  margin-top: 1.5rem;
  font-style: italic;
}
@media (max-width: 480px) {
  .recent-strip span { white-space: normal; text-align: center; }
}

/* ---------- Travels map page ---------- */
.map-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 3vw, 2rem);
}
.world-map { width: 100%; height: auto; display: block; }
.map-land { fill: var(--mist); stroke: none; }
.dot {
  fill: var(--gold);
  stroke: var(--white);
  stroke-width: 1.5;
  cursor: pointer;
  transition: r 0.15s ease;
}
.dot:hover, .dot:focus { r: 7; stroke: var(--ink); outline: none; }
.dot--home { fill: var(--ink); stroke: var(--gold); stroke-width: 2; }
.route { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.route--air { stroke: var(--gold); stroke-dasharray: 6 5; }
.route--sea { stroke: var(--sea); }
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: center;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: var(--sea);
}
.map-legend .key {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 0.4rem;
}
.key--dot { background: var(--gold); }
.key--home { background: var(--ink); box-shadow: 0 0 0 2px var(--gold) inset; }
.key--air, .key--sea { width: 22px; height: 0; border-radius: 0; border-top: 3px dashed var(--gold); vertical-align: 3px; }
.key--sea { border-top: 3px solid var(--sea); }
.map-inset-row {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: 3rem;
}
.map-inset svg { width: 100%; height: auto; display: block; border: 2px solid var(--mist); border-radius: 10px; background: var(--surface); }
.map-inset__caption { font-size: 0.88rem; color: var(--sea); margin-top: 0.75rem; }
.region-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 60rem;
  margin: 2.5rem auto 0;
}
.region-cols h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.region-cols h3 + p { color: var(--sea); font-size: 0.95rem; line-height: 1.8; margin-bottom: 1.5rem; }
@media (max-width: 800px) {
  .map-inset-row { grid-template-columns: 1fr; }
  .region-cols { grid-template-columns: 1fr; gap: 1rem; }
}

/* ---------- Horizon motif extensions ---------- */
.footer { position: relative; }
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, var(--gold) 82%, transparent);
  opacity: 0.65;
}
.cta-band { position: relative; overflow: hidden; }
.cta-band::before {
  content: "";
  position: absolute;
  top: -110px; right: 6%;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 168, 69, 0.30), transparent 65%);
  pointer-events: none;
}
.cta-band .container { position: relative; }

/* ---------- Guided intake form ---------- */
.form-step { border: none; padding: 0; margin: 0 0 2.25rem; }
.form-step__title {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  margin-right: 0.65rem;
  flex: none;
}
.form-step__hint { font-size: 0.9rem; color: var(--sea); margin-bottom: 1rem; }
.pill-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.pill-group input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.pill-group label {
  border: 1.5px solid var(--mist);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.5rem 1.05rem;
  cursor: pointer;
  font-size: 0.93rem;
  color: var(--sea);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill-group label:hover { border-color: var(--sea); }
.pill-group input:checked + label {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.pill-group input:focus-visible + label {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.group-label { display: block; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; font-size: 0.95rem; }

/* ============================================================
   Motion, polish & detail
   ============================================================ */

/* ---- Smooth page-to-page transitions (View Transitions API) ----
   Progressive enhancement: a soft cross-fade between pages in supporting
   browsers, a no-op everywhere else. Disabled under reduced-motion. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* ---- Branded text selection ---- */
::selection { background: var(--gold); color: #10393F; }

/* ---- Anchored sections clear the sticky nav when jumped to ---- */
:where([id]) { scroll-margin-top: 5.5rem; }

/* ---- Press feedback on buttons (pairs with the existing hover lift) ---- */
.btn:active { transform: translateY(0) scale(0.98); }

/* ---- Show invalid form fields once the visitor has interacted ---- */
.form input:user-invalid,
.form select:user-invalid,
.form textarea:user-invalid { border-color: #9B2C2C; }

/* ---- Cruise booking portals (cruise.farholm.com) ----
   auto-fit grid centers nicely whether there's one line or many. */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 1.75rem;
  justify-content: center;
  margin-top: 3rem;
}
.portal-grid .card .btn { margin-top: 1.4rem; text-align: center; }
.portal-grid .card .btn:hover { text-decoration: none; }

/* ---- View My Trip (my.farholm.com) ---- */
.trip-lookup { max-width: 30rem; margin: 0 auto; }
.trip-lookup .btn { width: 100%; margin-top: 0.25rem; }
.trip-error { margin-top: 1.1rem; color: var(--err); font-weight: 500; }
html.dark .field-error { color: #F2A39B; }

.itin__head { max-width: 46rem; margin: 0 auto 2.5rem; text-align: center; }
.itin__summary { color: var(--slate); margin-top: 0.5rem; }
.itin__back { margin-top: 1.5rem; color: var(--text); border-color: var(--border); }
.itin__back:hover { border-color: var(--gold); color: var(--gold); }

.itinerary .itin__day {
  font-size: 1.15rem;
  color: var(--sea);
  margin: 2.5rem auto 1.25rem;
  max-width: 46rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.itin__group { max-width: 46rem; margin: 0 auto; }

.seg {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.seg:last-child { border-bottom: none; }
.seg__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--sea);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.seg__icon svg { width: 22px; height: 22px; }
.seg__type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.2rem;
}
.seg__title { font-size: 1.15rem; margin-bottom: 0.35rem; }
.seg__time { font-weight: 600; color: var(--text); }
.seg__loc { color: var(--slate); }
.seg__meta { color: var(--slate); font-size: 0.92rem; margin-top: 0.35rem; }
.seg__notes { margin-top: 0.6rem; color: var(--text); }
.seg__link { display: inline-block; margin-top: 0.6rem; font-weight: 600; text-decoration: none; }
.seg__link:hover { text-decoration: underline; }
.itin__empty, .itin__foot { text-align: center; color: var(--slate); }
.itin__foot { max-width: 46rem; margin: 2.5rem auto 0; }

/* ---- View My Trip: per-type detail, costs, tools ---- */
.itin__tools { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; justify-content: center; }
.itin__tools .btn { color: var(--text); border-color: var(--border); }
.itin__tools .btn:hover { border-color: var(--gold); color: var(--gold); }
.seg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.seg__title { margin-bottom: 0; }
.seg__cost { font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.seg__sub { color: var(--text); font-weight: 500; margin-top: 0.15rem; }
.seg__when { color: var(--slate); margin-top: 0.3rem; font-size: 0.95rem; }
.seg__badges { margin-top: 0.5rem; }
.seg__status { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 999px; }
.seg__status--confirmed { background: var(--ok-soft); color: var(--ok); }
.seg__status--pending { background: var(--warn-soft); color: var(--warn); }
/* Informational, not a status: arranged by the traveller, not booked through Farholm. */
.seg__status--independent { background: transparent; color: var(--slate); border: 1px solid var(--border); }
.seg__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.55rem 1.5rem; margin-top: 0.85rem; }
.seg__f dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); }
.seg__f dd { color: var(--text); }
/* Cruise port calls — structured table (replaces the legacy pipe-delimited blob). */
.seg__ports { width: 100%; border-collapse: collapse; margin-top: 0.85rem; font-size: 0.9rem; }
.seg__ports th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate); font-weight: 700; padding: 0 0.9rem 0.35rem 0; border-bottom: 1px solid var(--border); }
.seg__ports td { padding: 0.45rem 0.9rem 0.45rem 0; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); }
.seg__ports tr:last-child td { border-bottom: 0; }
.seg__port-date, .seg__port-when { white-space: nowrap; }
.seg__port-when { font-variant-numeric: tabular-nums; }
.seg__port-sub { display: block; color: var(--slate); font-size: 0.8rem; margin-top: 0.15rem; }
@media (max-width: 560px) {
  .seg__ports, .seg__ports tbody, .seg__ports tr, .seg__ports td { display: block; }
  .seg__ports thead { display: none; }
  .seg__ports td { border: 0; padding: 0.1rem 0; }
  .seg__ports tr { border-bottom: 1px solid var(--border); padding: 0.55rem 0; }
  .seg__ports tr:last-child { border-bottom: 0; }
}
.cost-summary { max-width: 46rem; margin: 2.5rem auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.cost-summary h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.cost__row, .cost__total { display: flex; justify-content: space-between; padding: 0.35rem 0; font-variant-numeric: tabular-nums; }
.cost__total { border-top: 1px solid var(--border); margin-top: 0.4rem; padding-top: 0.7rem; font-weight: 700; font-size: 1.1rem; }
.cost__note { font-size: 0.82rem; color: var(--slate); margin-top: 0.6rem; }
@media print {
  .no-print { display: none !important; }
  .itinerary { display: block !important; }
  .seg { break-inside: avoid; }
  .cost-summary { border: 1px solid #ccc; }
}

/* ---- Theme toggle (light/dark) ---- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--text);
  cursor: pointer;
  flex: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.theme-toggle:hover { background: var(--surface-alt); color: var(--gold); }
.theme-toggle svg { width: 20px; height: 20px; }
/* Show the sun in dark mode (to switch back to light), the moon in light mode. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html.dark .theme-toggle .icon-sun,
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon,
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(.light) .theme-toggle .icon-sun { display: block; }
  :root:not(.light) .theme-toggle .icon-moon { display: none; }
}

/* ---- Ship finder (/ships) --------------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.ship-filter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ship-filter label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.35rem;
}
.ship-filter input,
.ship-filter select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
}
.ship-filter input:focus,
.ship-filter select:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--sea);
}
/* A11Y-011: ease the dim so the disabled select's "Select a cruise line first"
   guidance stays legible (the disabled attribute already conveys the state to AT). */
.ship-filter select:disabled { opacity: 0.7; cursor: not-allowed; }
.ship-filter__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem 1rem;
}
.ship-filter__field { flex: 1 1 160px; min-width: 140px; }
.ship-filter__reset {
  flex: 0 0 auto;
  background: transparent;
  border: 1.5px solid var(--input-border);
  border-radius: 8px;
  color: var(--sea);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  cursor: pointer;
}
.ship-filter__reset:hover { border-color: var(--gold); color: var(--gold-2); }

.ship-count {
  margin-top: 1.25rem;
  font-size: var(--size-small);
  font-weight: 600;
  color: var(--slate);
}

.ship-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.1rem;
  margin-top: 1rem;
}
.ship-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.ship-card[hidden] { display: none; }
.ship-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.ship-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}
.ship-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.2;
}
.ship-card__name a { color: var(--text); text-decoration: none; }
.ship-card__name a:hover { color: var(--sea); text-decoration: underline; }
.ship-card__status {
  flex: 0 0 auto;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.18rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
}
.ship-card__status--in-service { color: var(--sea); }
.ship-card__status--on-order { color: var(--gold-2); }
.ship-card__status--retired { color: var(--slate); }
.ship-card__line { font-size: 0.85rem; color: var(--slate); }
.ship-card__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.ship-card__specs dt {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.15rem;
}
.ship-card__specs dd { font-size: 0.98rem; font-weight: 600; }
.ship-card__unit { font-size: 0.78rem; font-weight: 400; color: var(--slate); }
.ship-card__meta { font-size: 0.78rem; color: var(--slate); }
.ship-card__meta span + span::before { content: " · "; color: var(--border); }

.ship-empty {
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
  color: var(--slate);
  background: var(--surface-alt);
  border-radius: var(--radius);
}
.ship-empty__reset {
  background: none;
  border: 0;
  padding: 0;
  color: var(--sea);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
@media (max-width: 560px) {
  .ship-grid { grid-template-columns: 1fr; }
  .ship-filter__field { flex-basis: 100%; }
}

/* ---- Print: clean, ink-on-white, drop the chrome ---- */
@media print {
  .nav, .footer, .cta-band, .theme-toggle, .skip-link, .hero__scene { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  .section, .service { padding: 1rem 0; }
  .card, .form, .faq details { box-shadow: none; border: 1px solid #ccc; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   App UI primitives (Phase 0) — js/ui.js: confirm dialog + toast
   CSP-safe, framework-free. Built from the design tokens; the global
   :focus-visible gold ring applies to the dialog buttons automatically.
   ============================================================ */
/* ---- Confirm dialog (native <dialog>, showModal) ---- */
.fh-dialog {
  margin: auto;                 /* centered in the top layer */
  width: 100%;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: var(--space-5);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.fh-dialog::backdrop { background: rgba(12, 46, 51, 0.45); }
.fh-dialog__title { font-family: var(--font-display); font-size: var(--size-h3); line-height: 1.2; margin: 0 0 var(--space-2); }
.fh-dialog__msg { margin: 0; line-height: 1.55; color: var(--text); }
.fh-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-5); }
.fh-dialog__btn {
  font: inherit; font-weight: 600;
  padding: 0.55rem 1.2rem;
  min-height: 2.5rem;           /* >= 24px target (WCAG 2.5.8), comfortably */
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
@media (prefers-reduced-motion: reduce) { .fh-dialog__btn { transition: none; } }
.fh-dialog__btn--cancel { background: var(--surface); color: var(--text); border-color: var(--border); }
.fh-dialog__btn--cancel:hover { border-color: var(--gold); }
.fh-dialog__btn--confirm { background: var(--gold); color: var(--ink); }
.fh-dialog__btn--confirm:hover { background: var(--gold-2); }
.fh-dialog--danger .fh-dialog__btn--confirm { background: transparent; color: var(--err); border-color: var(--err); }
/* Hover = a soft red wash keeping the (AA-safe) --err text/border, rather than a
   solid --err fill: in dark mode --err lightens to #F2A39B, so white-on-fill would
   drop to ~2:1. --err on --err-soft holds >=4.5:1 in BOTH themes. */
.fh-dialog--danger .fh-dialog__btn--confirm:hover { background: var(--err-soft); }

/* ---- Toast (aria-live; polite by default, assertive for errors) ---- */
.fh-toast-root {
  position: fixed; inset: auto 0 1rem 0; z-index: 1000;
  display: grid; justify-items: center; gap: var(--space-2);
  padding: 0 1rem; pointer-events: none;
}
.fh-toast-region { display: grid; justify-items: center; gap: var(--space-2); }
.fh-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 0.6rem;
  max-width: 34rem;
  padding: 0.6rem 0.7rem 0.6rem 1rem;
  font-size: 0.95rem; line-height: 1.45;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--slate);   /* status accent, recolored per kind below */
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fh-toast__msg { flex: 1 1 auto; min-width: 0; }
.fh-toast__close {
  flex: none; border: 0; background: none; color: var(--slate);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
  padding: 0.1rem 0.35rem; border-radius: var(--radius-sm);
}
.fh-toast__close:hover { color: var(--text); }
.fh-toast--ok   { border-left-color: var(--ok); }
.fh-toast--err  { border-left-color: var(--err); }
.fh-toast--warn { border-left-color: var(--warn); }
.fh-toast--out  { opacity: 0; transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) { .fh-toast { transition: none; } }
@media print { .fh-toast-root, dialog.fh-dialog { display: none !important; } }
