/*
  site.css
  --------
  Shared styles for the public client site. "Trailhead" direction: light
  canvas/putty page + warm paper cards, olive-green accent, rounded
  shapes, an italic serif for headlines - a trail/backpacking feel
  replacing the earlier dark "Golden Hour" (amber/charcoal) direction.
  One light theme throughout, not a light/dark toggle.

  Token model: --ink/--ink-soft/--ink-faint are the default text colors -
  they work on both --bg and --card-bg (the two are close enough in
  tone that the same text colors clear AA on both, see the numbers in
  comments below). The --on-photo/--photo-overlay-* pair is the one
  exception: text sitting directly on the hero photo (or apply.html's
  per-destination scenic background) needs a dark translucent overlay
  under it regardless of the light theme everywhere else.

  Loaded with a plain <link>, no build step - keeps this a static site.
*/

:root {
  --bg: #e9e6d6;               /* canvas/putty - the page itself */
  --card-bg: #f8f6ec;          /* warm paper - where content lives */

  --ink: #2b2f22;              /* 10.9:1 on --bg, 12.7:1 on --card-bg */
  --ink-soft: #5c6350;         /* 5.0:1 on --bg, 5.8:1 on --card-bg */
  --ink-faint: #686e5c;        /* 4.9:1 on --card-bg - card-only, not on plain --bg */

  --accent: #4f5c34;           /* olive - 5.8:1 on --bg, 6.7:1 on --card-bg */
  --accent-dark: #3c4627;      /* hover state - 8.0:1 on --bg */
  --accent-ink: #f8f6ec;       /* text ON the olive accent - 6.7:1 */
  --accent-soft: #dde3c9;      /* light olive badge background */
  --accent-soft-text: #3c4627; /* text on --accent-soft: 7.6:1 */

  --rust: #954c26;             /* secondary highlight (prices) - 5.8:1 on card, 5.0:1 on bg */

  --good: #2f7d32;
  --good-soft: #e3efd9;
  --warn: #8a5a12;
  --warn-soft: #f3e3c0;

  --border: #d6d2bd;
  --shadow: 0 1px 2px rgba(43, 47, 34, 0.06), 0 8px 20px rgba(43, 47, 34, 0.08);
  --radius: 16px;

  /* Text directly on the hero photo / a scenic destination background -
     see the module comment above. */
  --on-photo: #faf8f0;
  --on-photo-soft: rgba(250, 248, 240, 0.85);
  --photo-overlay-strong: rgba(28, 31, 20, 0.72);
  --photo-overlay-soft: rgba(28, 31, 20, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Heebo', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The italic serif used for headlines throughout - see h1 rules on each
   page. A system stack (no webfont) on purpose, keeps this a build-free
   static site; Georgia/Times New Roman both have a genuine italic cut
   that reads as "travel journal," not just slanted body text. */
.headline-serif {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); }

/* ---------- skip-to-content link (accessibility) ---------- */
.skip-link {
  position: absolute;
  /* inset-inline-start (not left) - "left: -9999px" only hides this off
     the correct edge in LTR. In an RTL document the physical left edge is
     the reading END, not the start, so a fixed "left" offset instead
     balloons the page's real horizontal scroll width by ~9999px and left
     Hebrew-language mobile visitors landing on a shifted/zoomed-looking
     page (scrollX defaulting to some point inside that huge, mostly
     invisible canvas) - this logical property flips automatically with
     dir="rtl"/"ltr" so there's no separate override needed. */
  inset-inline-start: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  inset-inline-start: 0;
}

/* ---------- top banner (demo mode notice) ---------- */
.demo-banner {
  background: var(--warn-soft);
  color: var(--warn);
  text-align: center;
  font-size: 0.85rem;
  padding: 10px 16px;
}

/* ---------- header / nav - stays on its own white bar regardless of
   the dark page below it, so all its --ink/--ink-soft text stays
   correct unchanged ---------- */
header.site {
  position: relative;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

header.site .brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

header.site .brand .brand-logo {
  height: 88px;
  width: auto;
  display: block;
}

header.site nav {
  display: flex;
  align-items: center;
}

header.site nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  margin-left: 22px;
}
header.site nav a:hover { color: var(--accent-dark); }

.lang-switcher {
  margin-left: 22px;
  padding: 5px 8px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
}

/* ---------- mobile nav toggle ---------- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin: -8px 0 -8px 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  border-radius: 1px;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }

  header.site nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    flex-direction: column;
    align-items: stretch;
    padding: 4px 24px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 20;
  }
  header.site nav.open { display: flex; }
  header.site nav a {
    margin-left: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .lang-switcher { margin-left: 0; margin-top: 12px; width: 100%; }
}

/* ---------- RTL (Hebrew) ----------
   Best-effort layout flip for the main structural pieces - nav spacing,
   text alignment, list markers. Treat this like the rest of the site's
   placeholder content: give it a real visual QA pass in Hebrew before
   publishing, don't assume this covers every pixel. */
[dir="rtl"] header.site nav a { margin-left: 0; margin-right: 22px; }
[dir="rtl"] .lang-switcher { margin-left: 0; margin-right: 22px; }
[dir="rtl"] .nav-toggle { margin: -8px 8px -8px 0; }
@media (max-width: 640px) {
  [dir="rtl"] header.site nav a { margin-right: 0; }
  [dir="rtl"] .lang-switcher { margin-right: 0; }
}
[dir="rtl"] .page-narrow,
[dir="rtl"] .docs-card,
[dir="rtl"] .faq-item,
[dir="rtl"] .fine-print { text-align: right; }
[dir="rtl"] .footer .fine-print { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(43, 47, 34, 0.1), 0 4px 10px rgba(43, 47, 34, 0.12);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
/* .btn-disabled: same idea as :disabled above, but for <a> tags (which
   have no real disabled state) - see apply.html's comingSoon handling. */
.btn-disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* Default ghost button is for the light theme (works on both --bg and
   --card-bg). .hero/.apply-head-panel override it below for the photo
   contexts - see --on-photo etc. */
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); }

.hero .btn-ghost,
.apply-head-panel .btn-ghost {
  color: var(--on-photo-soft);
  border-color: rgba(250, 248, 240, 0.35);
}
.hero .btn-ghost:hover,
.apply-head-panel .btn-ghost:hover { border-color: var(--on-photo); color: var(--on-photo); }

/* ---------- generic card ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
}

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0 44px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 40px;
}
footer.site a { color: var(--ink-soft); }
footer.site a:hover { color: var(--accent); }
footer.site .fine-print {
  max-width: 640px;
  margin: 10px auto 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

/* ---------- simple centered page (privacy, about, accessibility,
   contact, checkout-success) - a paper card sitting on the slightly
   darker canvas page background, same idea as the destination hero
   panels, so long-form copy stays easy to read. ---------- */
.page-narrow {
  max-width: 640px;
  margin: 40px auto 64px;
  padding: 40px 40px 48px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.page-narrow h1 { font-size: 1.6rem; margin-bottom: 4px; color: var(--ink); }
.page-narrow .lede { color: var(--ink-soft); margin-top: 0; }

/* ---------- badges ---------- */
.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.good { background: var(--good-soft); color: var(--good); }

/* A badge sitting directly on a hero/destination photo needs the
   photo-safe variant instead of the card-oriented default above. */
.hero .badge,
.apply-head-panel .badge {
  background: rgba(250, 248, 240, 0.16);
  color: var(--on-photo);
}
