/* Client-facing pages: traveler portal, tour pages, enquiry and supplier pages, proposals.
   Hand-written (no build step). Colours come from the brand kit as CSS variables
   ({% brand_vars %}, apps/tenants/templatetags/brand_tags.py); html[data-theme=dark]
   (static/js/theme.js) switches to the kit's dark colours. */

:root {
  --primary: #3d6535;
  --secondary: #31502b;
  --accent: #c2802f;
  --bg: #fbfaf6;
  --text: #1e293b;
  --font: Georgia, "Times New Roman", serif;
  --ui: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --radius: 10px;
  --surface: #ffffff;
  --muted: color-mix(in srgb, var(--text) 58%, var(--bg));
  --line: color-mix(in srgb, var(--text) 12%, var(--bg));
  --soft: color-mix(in srgb, var(--primary) 7%, var(--bg));
  --shadow: 0 1px 2px rgb(16 24 12 / 0.05), 0 10px 30px -14px rgb(16 24 12 / 0.18);
  --good: #15803d;
  --good-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: var(--dk-bg, #0f1512);
  --surface: var(--dk-surface, #18211c);
  --text: var(--dk-text, #e6ece7);
  --primary: var(--dk-primary, #8fc283);
  --accent: var(--dk-accent, #e3ad62);
  --secondary: color-mix(in srgb, var(--dk-surface, #18211c) 70%, black);
  --soft: color-mix(in srgb, var(--primary) 10%, var(--surface));
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px -14px rgb(0 0 0 / 0.6);
  --good: #86efac;
  --good-bg: color-mix(in srgb, #22c55e 18%, var(--surface));
  --warn: #fcd34d;
  --warn-bg: color-mix(in srgb, #f59e0b 18%, var(--surface));
  --bad: #fca5a5;
  --bad-bg: color-mix(in srgb, #ef4444 18%, var(--surface));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.site {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.site h1, .site h2, .site h3, .site .display { font-family: var(--font); line-height: 1.2; letter-spacing: -0.01em; }
.site h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 0 0 0.35em; }
.site h2 { font-size: 1.35rem; margin: 0 0 0.6em; }
.site h3 { font-size: 1.1rem; margin: 0 0 0.4em; }
.site a { color: var(--primary); text-underline-offset: 3px; }
.site img { max-width: 100%; height: auto; }
.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.eyebrow { font-family: var(--ui); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.site-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font); font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.site-brand img { height: var(--logo-h, 36px); max-height: 120px; width: auto; }
.site-brand .logo-dark { display: none; }
html[data-theme="dark"] .site-brand .logo-dark { display: inline; }
html[data-theme="dark"] .site-brand .logo-light.has-dark { display: none; }
.site-nav { display: flex; align-items: center; gap: 0.5rem; }
.site-footer { margin-top: 4rem; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }

/* Theme toggle */
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-dark, .theme-toggle .i-system { display: none; }
html[data-theme-pref="dark"] .theme-toggle .i-light, html[data-theme-pref="system"] .theme-toggle .i-light { display: none; }
html[data-theme-pref="dark"] .theme-toggle .i-dark { display: block; }
html[data-theme-pref="system"] .theme-toggle .i-system { display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--primary) 88%, black), var(--secondary)); }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; padding: 3.5rem 0 3rem; }
.hero .eyebrow { color: color-mix(in srgb, var(--accent) 70%, white); }
.hero p { color: rgb(255 255 255 / 0.85); margin: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1rem; font-size: 0.95rem; }
.countdown { display: inline-flex; align-items: baseline; gap: 0.4rem; margin-top: 1.5rem; padding: 0.6rem 1rem; border-radius: 999px; background: rgb(255 255 255 / 0.14); backdrop-filter: blur(6px); }
.countdown strong { font-family: var(--font); font-size: 1.6rem; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: 1.25rem 1.4rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.card-title h2 { margin: 0; }
.stack > * + * { margin-top: 1rem; }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 84px; }
.notice { border-radius: var(--radius); padding: 0.85rem 1rem; border: 1px solid var(--line); background: var(--soft); }
.notice.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.notice.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.notice.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.emergency { display: flex; align-items: center; gap: 1rem; border-left: 4px solid var(--bad); }
.emergency .phone { font-family: var(--font); font-size: 1.5rem; font-weight: 700; user-select: all; }

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.15rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 0.95rem/1 var(--ui); text-decoration: none; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, background 0.12s; }
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
html[data-theme="dark"] .btn-primary { color: #0b120d; }
.btn-block { width: 100%; }
/* One primary per screen; the rest secondary (.btn), quiet (.btn-ghost) or destructive. */
.btn-danger { border-color: color-mix(in srgb, #dc2626 45%, transparent); color: #b91c1c; background: var(--surface); }
.btn-danger:hover { background: #fef2f2; border-color: #dc2626; }
html[data-theme="dark"] .btn-danger { color: #fca5a5; background: transparent; }
html[data-theme="dark"] .btn-danger:hover { background: rgb(127 29 29 / .3); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--text) 6%, transparent); box-shadow: none; }
.btn-sm { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.field { display: block; margin-top: 0.9rem; }
.field > span, .label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.site input[type=text], .site input[type=email], .site input[type=tel], .site input[type=date], .site input[type=number], .site select, .site textarea {
  width: 100%; padding: 0.65rem 0.8rem; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--text) 22%, var(--bg)); background: var(--surface); color: var(--text); font: inherit; font-size: 0.95rem;
}
.site input:focus, .site select:focus, .site textarea:focus, .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-top: 0.75rem; }

/* Pills and badges */
.pill { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 999px; padding: 0.15rem 0.65rem; font: 600 0.78rem/1.6 var(--ui); background: var(--soft); color: var(--muted); border: 0; }
.pill.done { background: var(--good-bg); color: var(--good); }
.pill.todo { background: var(--warn-bg); color: var(--warn); }
button.pill { cursor: pointer; background: var(--primary); color: #fff; }

/* Tables and lists */
.site table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.site th { text-align: left; font: 600 0.75rem/1.4 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--line); }
.site td { padding: 0.65rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.site tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Checklist with progress */
.progress { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.checklist { list-style: none; margin: 1rem 0 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; border: 2px solid var(--line); color: transparent; font-weight: 700; }
.checklist .is-done .tick { background: var(--primary); border-color: var(--primary); color: #fff; }
.checklist .grow { flex: 1; min-width: 0; }

/* Day by day timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; gap: 1rem; padding: 0.5rem 0 1rem; }
.timeline .dot { position: relative; z-index: 1; flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--primary); font: 700 0.85rem/1 var(--ui); color: var(--primary); }
.timeline .is-today .dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--soft); }

/* Scores (daily pulse, feedback) */
.scores { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.scores button { min-width: 52px; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 700 1.1rem/1 var(--ui); cursor: pointer; transition: transform 0.12s, background 0.12s; }
.scores button:hover { transform: translateY(-2px); background: var(--soft); border-color: var(--primary); }
.scores .face { display: block; font-size: 1.3rem; margin-bottom: 2px; }

/* Plain message pages (thanks, link gone, unsubscribe) */
.message-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.message-page .card { max-width: 520px; }

@media print {
  .site-header, .theme-toggle, .site-footer { display: none; }
  body.site { background: white; color: black; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================================
   The journey look (the platform home page's "Live journey"): ink bands with the brand and
   its accent glowing, a glass header with a thin brand-to-accent line, cards that lift.
   ========================================================================================== */
:root {
  --ink: color-mix(in srgb, var(--secondary) 55%, #0a0e0b);
  --ink-2: color-mix(in srgb, var(--secondary) 40%, #141a16);
  --j-ink: var(--ink); --j-ink-2: var(--ink-2); --j-accent: var(--accent);
  --display: var(--font);
}
.site-header::after {
  content: ""; position: absolute; inset: auto 0 -1px 0; height: 1px;
  background: linear-gradient(90deg, var(--primary), var(--accent) 40%, transparent 80%); opacity: .6;
}
.hero {
  background:
    radial-gradient(700px 300px at 0% 0%, color-mix(in srgb, var(--primary) 45%, transparent), transparent 70%),
    radial-gradient(600px 320px at 100% 120%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    linear-gradient(135deg, var(--ink), var(--ink-2));
}
.hero::after { opacity: .6; }
.card { transition: transform .18s ease, box-shadow .18s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .4); }
@media (prefers-reduced-motion: reduce) { a.card:hover { transform: none; } }

/* Travel movements inside a day (traveler portal; apps/tours/movements.py). */
.timeline .moves { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.timeline .moves li { display: block; padding: 0.2rem 0 0.2rem 0.75rem; border-left: 2px dashed var(--line); font-size: 0.92rem; }
.timeline .moves li::before, .timeline .moves li::after { content: none; }
.timeline .moves .crossing { margin-top: 0.2rem; padding: 0.3rem 0.5rem; border-radius: 6px; background: #fffbeb; color: #78350f; }
@media (prefers-color-scheme: dark) { .timeline .moves .crossing { background: rgba(245, 158, 11, 0.14); color: #fde68a; } }

/* "Powered by" the platform (templates/themes/_powered_by.html): quiet, on its own line. */
.powered-by { margin: 1.25rem 0 0; text-align: center; font-size: 0.78rem; }
.powered-by a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.8rem; border: 1px solid var(--line, rgb(0 0 0 / 0.12)); border-radius: 999px; color: inherit; text-decoration: none; opacity: 0.85; transition: opacity 0.15s, border-color 0.15s; }
.powered-by a:hover, .powered-by a:focus-visible { opacity: 1; border-color: currentColor; }
.powered-by img { width: 16px; height: 16px; border-radius: 4px; }

/* The trip a visitor asks about on the enquiry form (public/enquire.html). */
.enquire-trip { display: flex; gap: 1rem; align-items: flex-start; margin: 1rem 0; padding: .9rem; border: 1px solid var(--line, rgb(0 0 0 / .12)); border-radius: var(--radius, 12px); }
.enquire-trip img { width: 112px; height: 84px; object-fit: cover; border-radius: calc(var(--radius, 12px) * .6); flex-shrink: 0; }
@media (max-width: 480px) { .enquire-trip { flex-direction: column; } .enquire-trip img { width: 100%; height: 160px; } }
