:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5a655f;
  --line: #d9e0da;
  --paper: #f8f7f1;
  --panel: #ffffff;
  --green: #245f49;
  --river: #2f6f8f;
  --gold: #d79b2a;
  --coral: #c75848;
  --shadow: 0 22px 70px rgba(23, 33, 29, 0.15);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

.hero {
  min-height: 92vh;
  display: grid;
  align-items: end;
  position: relative;
  background:
    linear-gradient(180deg, rgba(23, 33, 29, 0.16), rgba(23, 33, 29, 0.84)),
    url("./elora-gorge.jpg") center / cover;
  color: #fff;
}

.hero__nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 5vw, 64px);
}

.brand {
  font-weight: 800;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.navlinks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlinks a,
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 0 15px;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  background: rgba(23, 33, 29, 0.25);
  backdrop-filter: blur(10px);
}

.button {
  border-color: transparent;
  background: var(--gold);
  color: #241a06;
  cursor: pointer;
}

.hero__content {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 150px 0 52px;
}

.eyebrow {
  margin: 0 0 12px;
  font-weight: 800;
  color: #ffdb8a;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.9rem;
}

h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero__copy {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: end;
  margin-top: 28px;
}

.hero__copy p {
  margin: 0;
  max-width: 710px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.quick-panel {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.quick-panel h2,
.section h2,
.compact h3 {
  margin: 0 0 12px;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  line-height: 1.1;
}

.facts {
  display: grid;
  gap: 10px;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  font-size: 0.95rem;
}

.fact strong {
  color: var(--muted);
}

main {
  width: min(1120px, calc(100% - 36px));
  margin: 42px auto 80px;
}

.section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section__head p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.timeline {
  display: grid;
  gap: 14px;
}

.stop {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.time {
  font-weight: 900;
  color: var(--river);
}

.stop h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
}

.stop p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.tag {
  align-self: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  background: #e7f1ee;
  color: var(--green);
  font-weight: 800;
  font-size: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.compact {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.compact p,
.compact li {
  color: var(--muted);
  line-height: 1.5;
}

.compact ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.restaurant {
  display: grid;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.restaurant.pick {
  border-color: rgba(215, 155, 42, 0.8);
  box-shadow: 0 12px 34px rgba(215, 155, 42, 0.14);
}

.restaurant__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.badge,
.drive {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge {
  background: #fff2d4;
  color: #6b4500;
}

.drive {
  background: #e7f1ee;
  color: var(--green);
}

.restaurant h3 {
  margin: 0;
  font-size: 1.16rem;
}

.restaurant p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.restaurant__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-self: end;
}

.restaurant__actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  background: var(--river);
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 800;
}

.restaurant__actions a:nth-child(2) {
  background: var(--green);
}

.restaurant__actions a:last-child {
  background: var(--coral);
}

.food-note {
  margin-top: 16px;
  border-left: 4px solid var(--gold);
  background: #fffaf0;
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.5;
  color: var(--muted);
}

.food-note strong {
  color: var(--ink);
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-weight: 800;
}

.link-list span {
  color: var(--river);
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-weight: 700;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.actions .button:last-child {
  background: var(--green);
  color: #fff;
}

.callout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background: var(--green);
  color: #fff;
  border-radius: 8px;
  padding: 22px;
}

.callout h2 {
  margin: 0 0 6px;
}

.callout p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .hero {
    min-height: 88vh;
  }

  .hero__nav {
    align-items: flex-start;
  }

  .navlinks {
    max-width: 210px;
  }

  .hero__copy,
  .grid,
  .restaurant-grid,
  .checklist,
  .callout {
    grid-template-columns: 1fr;
  }

  .stop {
    grid-template-columns: 1fr;
  }

  .tag {
    justify-self: start;
  }

  .section__head {
    display: block;
  }

  .section__head p {
    margin-top: 8px;
  }

  .restaurant__top {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .hero {
    min-height: auto;
    color: var(--ink);
    background: none;
  }

  .hero__nav,
  .actions,
  .button {
    display: none;
  }

  main,
  footer,
  .hero__content {
    width: 100%;
    margin: 0;
  }

  .quick-panel,
  .stop,
  .compact,
  .callout {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ── Yondara theme palettes ───────────────────────────────────────────────
   The scaffold ships the Elora "forest" look as the default :root. A trip can
   pick a mood via <body data-theme="..."> (set from data.json by app.js).
   Each block only overrides the accent variables; layout is shared. */
body[data-theme="coast"] {
  --ink: #14242b; --muted: #51646c; --line: #d6e2e6; --paper: #f4f8f9;
  --green: #1f6f7a; --river: #2f7fae; --gold: #e0962b; --coral: #d4654a;
}
body[data-theme="desert"] {
  --ink: #2a1f16; --muted: #6c5b4a; --line: #e7ddcd; --paper: #faf6ee;
  --green: #9a6b2f; --river: #b5762a; --gold: #d79b2a; --coral: #c1583f;
}
body[data-theme="city"] {
  --ink: #18181f; --muted: #5b5b66; --line: #dcdce2; --paper: #f6f6f8;
  --green: #4338a6; --river: #5b53d6; --gold: #d79b2a; --coral: #d44a6f;
}
body[data-theme="alpine"] {
  --ink: #1a2330; --muted: #56616f; --line: #d9e0e8; --paper: #f5f7fa;
  --green: #2f5d8c; --river: #3a82c4; --gold: #d79b2a; --coral: #c75848;
}

/* Hero falls back to a calm gradient when a trip has no photo. */
.hero.hero--nophoto {
  background: linear-gradient(160deg, var(--green), var(--river) 70%, #11202a);
}

/* A section with no items is hidden by the renderer (display:none); nothing to style. */

/* ── Mobile-first: sticky quick-jump nav + phone tuning ──────────────────────
   Generated trip pages are used mostly on a phone, mid-trip. A slim sticky bar
   appears once you scroll past the hero so Timeline / Food / Bookings / Pack
   are always one tap away; sections get scroll-margin so anchors land clear. */
.stickybar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.93);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(23, 33, 29, 0.08);
  transform: translateY(-101%); transition: transform 0.25s ease;
}
.stickybar.show { transform: translateY(0); }
.stickybar .sb-brand {
  font-weight: 800; font-size: 0.95rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 0 1 auto; max-width: 44%;
}
.stickybar .sb-links {
  display: flex; gap: 8px; overflow-x: auto; flex: 1 1 auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.stickybar .sb-links::-webkit-scrollbar { display: none; }
.stickybar .sb-links a {
  flex: 0 0 auto; min-height: 38px; display: inline-flex; align-items: center;
  padding: 0 13px; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; font-weight: 700; font-size: 0.85rem;
}
section[id] { scroll-margin-top: 60px; }

@media (max-width: 820px) {
  /* Hero earns less of the first screen on a phone — get to the plan faster. */
  .hero { min-height: 72vh; }
  .hero__content { padding: 116px 0 36px; }
  .hero__nav .navlinks { display: none; }   /* the sticky bar is the phone nav */
  h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  main { margin: 22px auto 64px; }
  .section { padding: 24px 0; }

  /* Fatter, full-width tap targets. */
  .navlinks a, .button { min-height: 46px; }
  .restaurant__actions { gap: 8px; }
  .restaurant__actions a { flex: 1 1 30%; min-height: 46px; justify-content: center; }
  .check { min-height: 54px; font-size: 1rem; }
  .link-list a { padding: 14px 0; }
  .actions .button { flex: 1 1 auto; }

  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* Honour reduced-motion: skip smooth-scroll + bar slide. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stickybar { transition: none; }
}
