/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Palette pulled from the header pixel-art (sky + sun + forest) */
  --primary:       #2f7dd1;  /* sky blue */
  --primary-dark:  #1f5f97;  /* deeper sky */
  --accent:        #ffd21e;  /* sun */

  --bg:            #f4f7fa;  /* softer, warmer gray-blue */
  --card-bg:       #ffffff;
  --text:          #1f2937;  /* darker, sharper text */
  --text-muted:    #6b7280;

  --warning-bg:    #fffbeb;
  --warning-border:#fcd34d;
  --warning-text:  #92400e;

  --border:        #e5e7eb;
  --shadow-sm:     0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:     0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:     0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  --radius:        16px;
  --radius-sm:     8px;

  /* category left-border colors (playful but harmonious) */
  --cat-kids:   #10b981; /* emerald */
  --cat-food:   #f97316; /* orange */
  --cat-hood:   #3b82f6; /* blue */
  --cat-shop:   #8b5cf6; /* violet */

  /* Modern system font stack + rounded headings */
  --font-head: 'Nunito', system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

.skip {
  position: absolute; left: -9999px;
  &:focus { left: 1rem; top: 1rem; z-index: 999; background: #fff; padding: .75rem 1.25rem; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 10;
}

/* Make the SVG a true “hero” block (not squeezed behind text) */
.site-header__hero {
  position: relative;
  background: #4fa4e4;
  overflow: hidden;
  isolation: isolate;

  /* 256×192 = 4:3; keep it tall enough to read the pixel detail */
  aspect-ratio: 4 / 3;
  min-height: 260px;
  max-height: 420px;

  /* Ensure true centering / full-bleed */
  width: 100%;
}

/* Vignette + fun color wash (on top of the SVG, behind nothing else) */
.site-header__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Lighter overlays so the new bright sky SVG stays crisp */
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 55%),
    radial-gradient(120% 90% at 18% 40%, rgba(255,242,0,.16) 0%, rgba(255,242,0,0) 60%),
    radial-gradient(120% 90% at 82% 45%, rgba(76,175,80,.14) 0%, rgba(76,175,80,0) 62%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,.06) 60%, rgba(0,0,0,.20) 100%);
  pointer-events: none;
}

/* Subtle scanline texture (still CSS-only) */
.site-header__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.05) 0px,
    rgba(255,255,255,.05) 1px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0) 4px
  );
  opacity: .10;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.site-header__art {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.site-header__art svg {
  display: block;
  width: 100%;
  height: 100%;

  /* Keep it centered + give it breathing room (no sideways drift) */
  transform: scale(1.12);
  transform-origin: 50% 50%;

  filter: saturate(1.05) contrast(1.05) brightness(1.02);
}

/* Content sits BELOW the hero as a separate playful “label” */
.site-header__content {
  /* More padding + actually centered (no translate hacks) */
  margin: -40px auto 0;
  width: min(760px, calc(100% - 2rem));
  padding: 1.5rem;

  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 24px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
  color: var(--text);

  position: relative;
  z-index: 5;
}

.site-header h1 {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.site-header .trip-meta {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 500;
}

@media (min-width: 720px) {
  .site-header__hero {
    min-height: 340px;
    max-height: 520px;
  }
  .site-header__content {
    margin-top: -50px;
    padding: 2rem;
  }
  .site-header h1 { font-size: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header__art animate,
  .site-header__art animateTransform { display: none; }

  .site-header__art svg {
    transform: none;
  }
}

/* ── Day Nav ──────────────────────────────────────────────── */
.day-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.day-nav {
  display: flex;
  overflow-x: auto;
  gap: .5rem;
  padding: .75rem 1rem;
  scrollbar-width: none;
  scroll-padding-left: 1rem;
  scroll-padding-right: 1rem;
}
.day-nav::-webkit-scrollbar { display: none; }

.day-nav a {
  flex: 0 0 auto;
  padding: .5rem 1rem;
  border-radius: 99px;
  font-size: .85rem;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
}
.day-nav a:hover {
  background: var(--bg);
  color: var(--primary);
}
.day-nav a.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ── Page Layout ──────────────────────────────────────────── */
.page-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* ── Category Legend ──────────────────────────────────────── */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 700;
  font-family: var(--font-head);
  transition: all 0.2s;
  border: 1px solid transparent;
}

/* Make the colored badges usable as filter tabs */
button.badge {
  appearance: none;
  cursor: pointer;
}
button.badge:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
button.badge:hover {
  transform: translateY(-1px);
}
button.badge:active {
  transform: translateY(0);
}

.badge--all  { background: #fff; color: var(--text-muted); border-color: var(--border); }
.badge--all.active { background: var(--text); color: #fff; border-color: var(--text); }

.badge--kids { background: rgba(16, 185, 129, 0.1); color: #047857; }
.badge--kids.active { background: var(--cat-kids); color: #fff; }

.badge--food { background: rgba(249, 115, 22, 0.1); color: #c2410c; }
.badge--food.active { background: var(--cat-food); color: #fff; }

.badge--hood { background: rgba(59, 130, 246, 0.1); color: #1d4ed8; }
.badge--hood.active { background: var(--cat-hood); color: #fff; }

.badge--shop { background: rgba(139, 92, 246, 0.1); color: #6d28d9; }
.badge--shop.active { background: var(--cat-shop); color: #fff; }

/* ── Key Flags ────────────────────────────────────────────── */
.key-flags {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.key-flags-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.key-flags-header span { font-size: 1.5rem; }
.key-flags-header h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--warning-text);
  margin: 0;
}
.key-flags ol {
  padding-left: 1.5rem;
  font-size: .95rem;
  color: #78350f;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.key-flags li { line-height: 1.5; }
.key-flags a { color: var(--warning-text); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(146, 64, 14, 0.3); }
.pill {
  display: inline-block;
  background: #fff;
  color: var(--warning-text);
  border: 1px solid rgba(252, 211, 77, 0.5);
  border-radius: 6px;
  padding: 0 .4rem;
  font-size: .75rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* ── Day Section ──────────────────────────────────────────── */
.day-section {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--card-bg);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0,0,0,0.03);
}

/* accordion trigger */
.day-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  background: #fff;
  color: var(--text);
  border: none;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}
.day-section__header:hover { background: #f9fafb; }
.day-section__header:active { background: #f3f4f6; }

.day-title-block { flex: 1; min-width: 0; }
.day-title-block h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}
.day-meta {
  font-size: .85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.day-chevron {
  flex: 0 0 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 50%;
}
.day-section--open .day-chevron { 
  transform: rotate(180deg); 
  background: var(--primary);
  color: #fff;
}

/* accordion body */
.day-section__body {
  display: none;
  border-top: 1px solid var(--border);
}
.day-section--open .day-section__body {
  display: block;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Stop Card ────────────────────────────────────────────── */
.stop {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.2s;
}
.stop:hover { background: #fcfdfe; }
.stop:last-child { border-bottom: none; }

/* Category indicator pill instead of border-left */
.stop::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--border);
}
.stop[data-category="kids"]::before  { background: var(--cat-kids); }
.stop[data-category="food"]::before  { background: var(--cat-food); }
.stop[data-category="hood"]::before  { background: var(--cat-hood); }
.stop[data-category="shop"]::before  { background: var(--cat-shop); }

.stop__img {
  display: block;
  width: calc(100% + 3rem);
  margin: -1.25rem -1.5rem 1.25rem -1.5rem;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.stop__row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .5rem;
}
.stop__icon {
  font-size: 1.5rem;
  flex: 0 0 2rem;
  line-height: 1.2;
  text-align: center;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}
.stop__title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
  flex: 1;
}

.stop p {
  font-size: .95rem;
  color: var(--text-muted);
  margin-top: .5rem;
  line-height: 1.6;
  padding-left: 2.75rem; /* align with title text */
}

.stop .bullets {
  margin: .5rem 0 0 0;
  padding-left: 3.75rem;
  font-size: .9rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.stop__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
  padding-left: 2.75rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  font-family: var(--font-head);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  background: #f3f4f6;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #e5e7eb; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(47, 125, 209, 0.2);
}
.btn--primary:hover { background: var(--primary-dark); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--text-muted); color: var(--text); background: #fff; }

/* ── Quick Reference ──────────────────────────────────────── */
.section-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 3rem 0 1rem;
  text-align: center;
}
.section-sub {
  font-size: .95rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
  margin-bottom: 2rem;
  text-align: center;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.quickref {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.qrRow {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.qrRow:hover { background: #f9fafb; }
.qrRow:last-child { border-bottom: none; }

.qrCat {
  flex: 0 0 70px;
  font-size: .7rem;
  font-weight: 800;
  font-family: var(--font-head);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-align: center;
}

.qrMain { flex: 1; min-width: 0; }
.qrMain strong { display: block; font-size: 1rem; color: var(--text); margin-bottom: 0.1rem; }
.qrSub { font-size: .85rem; color: var(--text-muted); }

.qrActions { display: flex; gap: .75rem; }
.link {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  font-family: var(--font-head);
}
.link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1f2937;
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: 99px;
  font-size: .95rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast[hidden] {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  display: flex; /* keep flex so transition works */
  pointer-events: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 3rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
}

/* ── Mobile Optimization ──────────────────────────────────── */
@media (max-width: 640px) {
  .stop { padding: 1rem; }
  .stop p, .stop .bullets, .stop__actions { padding-left: 0; }
  .stop__icon { display: none; } /* Simplify on very small screens? or keep it? Let's keep it but inline it */
  .stop__row { align-items: center; }
  .stop__icon { display: block; font-size: 1.25rem; flex: 0 0 1.5rem; }
  
  .qrRow { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .qrActions { width: 100%; justify-content: flex-start; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }
  .qrCat { display: inline-block; margin-bottom: 0.25rem; }
}
