/* ============================================================
   Milly Roams — design system
   Warm, playful photography-adventure brand. Mobile-first.
   Fonts are system stacks only so everything works offline.

   Reusable class reference (Dawnna: use these in your pages):
     .container    — centered content column, max 1100px, side padding
     .site-header  — sticky teal header bar (injected by js/nav.js)
     .site-nav     — nav links; horizontal scroll row on small screens
     .hero         — big rounded welcome banner
     .btn          — base button
     .btn-primary  — amber button (main actions)
     .btn-ghost    — subtle outline button (secondary actions)
     .card-grid    — responsive grid of cards
     .card         — white rounded card with soft shadow
     .badge/.chip  — small labeled pills (regions, tags)
     .input/.select — form controls (search, filters, game forms)
     .section-title — big section heading style
     .site-footer  — footer bar (injected by js/nav.js)
     .game-area    — playful container for games
     .alert-note   — friendly info/warning box
   ============================================================ */

/* ---- Palette (CSS variables) ---- */
:root {
  --teal: #0F3D3E;        /* primary */
  --forest: #2E5E4E;      /* secondary */
  --amber: #E8A93D;       /* accent */
  --amber-dark: #C98F2B;  /* accent pressed/hover */
  --cream: #FBF6EC;       /* page background */
  --ink: #2A2620;         /* body text */
  --white: #FFFFFF;
  --line: #E7DCC6;        /* borders on cream */
  --radius: 14px;
  --shadow: 0 4px 18px rgba(15, 61, 62, 0.10);
  --shadow-soft: 0 2px 8px rgba(15, 61, 62, 0.08);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Display headings: warm serif */
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--teal);
  line-height: 1.25;
  margin: 0 0 0.6em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--teal); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.1rem;
}

main.container { padding-top: 1.5rem; padding-bottom: 3rem; }

/* ---- Header (markup injected by js/nav.js) ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.brand:hover { color: var(--amber); }
.site-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  overflow-x: auto;              /* horizontal scroll row on mobile */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--cream);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.95rem;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.site-nav a.active { background: var(--amber); color: var(--teal); font-weight: 600; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--forest) 100%);
  color: var(--cream);
  border-radius: 22px;
  padding: 2.4rem 1.6rem;
  margin: 0 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* playful sun accent in the corner */
.hero::after {
  content: "";
  position: absolute;
  width: 170px; height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,169,61,0.9) 0%, rgba(232,169,61,0) 70%);
  top: -70px; right: -50px;
  pointer-events: none;
}
.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
  margin-bottom: 0.35em;
}
.hero .tagline {
  font-size: 1.2rem;
  font-style: italic;
  opacity: 0.95;
  margin-bottom: 1.4rem;
}
.hero .cta-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--amber);
  color: var(--teal);
  border-color: var(--amber);
}
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: var(--teal); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: var(--white); }
/* ghost button on light backgrounds */
.on-light .btn-ghost, .btn-ghost.on-light {
  color: var(--teal);
  border-color: var(--teal);
}
.on-light .btn-ghost:hover, .btn-ghost.on-light:hover { background: rgba(15,61,62,0.08); }

/* ---- Section titles ---- */
.section-title {
  font-size: 1.7rem;
  margin: 2.2rem 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-sub { color: var(--forest); margin-bottom: 1.2rem; }

/* ---- Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card:hover { box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.2em; }
.card p { font-size: 0.97rem; color: #4a443a; }
.card .card-link { margin-top: auto; font-weight: 600; }
.card .meta { font-size: 0.85rem; color: var(--forest); }

/* ---- Badges / chips ---- */
.badge, .chip {
  display: inline-block;
  background: var(--forest);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  text-transform: uppercase;
  width: fit-content;
}
.chip { background: var(--teal); }
.badge.amber, .chip.amber { background: var(--amber); color: var(--teal); }

/* ---- Form controls ---- */
.input, .select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(46,94,78,0.18);
}
label { font-weight: 600; color: var(--teal); display: block; margin-bottom: 0.3rem; }

/* ---- Game area ---- */
.game-area {
  background: var(--white);
  border: 2px dashed var(--amber);
  border-radius: 18px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}

/* ---- Alert note ---- */
.alert-note {
  background: #FFF7E8;
  border-left: 5px solid var(--amber);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-size: 0.97rem;
}

/* ---- Footer (markup injected by js/nav.js) ---- */
.site-footer {
  background: var(--teal);
  color: var(--cream);
  margin-top: 3rem;
  padding: 2rem 0 1.5rem;
}
.site-footer .tagline { font-family: Georgia, serif; font-style: italic; margin-bottom: 0.3rem; }
.site-footer .made { font-size: 0.9rem; opacity: 0.85; }
.site-footer nav { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.site-footer nav a { color: var(--amber); font-size: 0.9rem; }

/* ---- Two-column helper ---- */
.two-col { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }

/* ---- Lists on cream ---- */
ul.clean, ol.clean { padding-left: 1.3rem; }
ol.steps { padding-left: 1.4rem; }
ol.steps li { margin-bottom: 0.7rem; }

/* ---- Larger screens ---- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.6rem; }
  .hero h1 { font-size: 3.1rem; }
  .two-col { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .site-header .container { gap: 1.6rem; }
}

/* ---- Companion-pack additions (integration pass) ---- */

/* Back-to-main-site link */
.back-link { display: inline-block; margin: 0 0 1rem; font-weight: 600; color: var(--teal); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* Lede paragraphs + filter rows used by section pages */
.lede { font-size: 1.1rem; color: #4a4438; max-width: 42rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0.4rem; }
.filters .input { flex: 2 1 220px; }
.filters .select { flex: 1 1 150px; }
.count { color: #6b6355; font-size: 0.95rem; }

/* Filter chips */
.chip { display: inline-block; padding: 0.45rem 0.95rem; border-radius: 999px;
  border: 2px solid var(--line); background: var(--white); color: var(--ink);
  font-weight: 600; cursor: pointer; }
.chip.is-active { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Learn page */
.learn-intro { font-size: 1.1rem; color: #4a4438; max-width: 42rem; }
.learn-progress { font-weight: 700; color: var(--teal); }
.learn-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.learn-search { margin: 0 0 1.2rem; max-width: 28rem; }
.learn-card .learn-badge { margin-bottom: 0.4rem; }
.learn-tryit { background: #fdf3df; border-left: 4px solid var(--amber);
  border-radius: 0 10px 10px 0; padding: 0.7rem 1rem; margin-top: 0.9rem; }
.learn-tryit strong { color: #8a5f14; }
.learn-read-btn { margin-top: 0.9rem; }
.learn-empty { color: #6b6355; font-style: italic; }

/* Game page helpers */
.game-scene { max-width: 100%; border-radius: var(--radius); cursor: crosshair; display: block; }
.game-status { font-weight: 700; color: var(--teal); }
.challenge-card { text-align: center; padding: 2rem 1.5rem; }
.challenge-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.progress-bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--amber); border-radius: 999px; }

/* ---- Tracker page ---- */
.privacy-note { border-left: 5px solid var(--teal); background: #eef5f2; }
.privacy-note h3 { margin-top: 0; }
#milly-map { width: 100%; height: auto; display: block; }

/* ---- Discover / Road-trips ad-hoc classes ---- */
.empty-state { color: #6b6355; font-style: italic; padding: 1rem 0; }
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.photo-why { font-size: 0.98rem; }
.photo-why strong { color: var(--teal); }
.best-line { font-size: 0.92rem; color: #6b6355; }
.route-card { margin-bottom: 1rem; }
.route-card summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; color: var(--teal); }
.route-card summary::-webkit-details-marker { color: var(--amber); }
.stop-list { list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: stop; }
.stop { position: relative; padding: 0 0 1.1rem 2.6rem; border-left: 3px solid var(--line); margin-left: 0.6rem; }
.stop:last-child { border-left-color: transparent; padding-bottom: 0.2rem; }
.stop::before { counter-increment: stop; content: counter(stop); position: absolute; left: -1.05rem; top: -0.15rem;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--amber); color: #fff;
  font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }
.stop-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-bottom: 0.25rem; }
.stop-name { font-weight: 700; }
.photo-tip { font-style: italic; color: #4a4438; background: #fdf3df; border-radius: 8px; padding: 0.5rem 0.8rem; margin-top: 0.4rem; }

/* ---- Blog ---- */
.post { max-width: 42rem; }
.post h1 { margin-bottom: 0.25rem; }
.post-meta { color: #6b6355; font-size: 0.92rem; margin-bottom: 1.2rem; }
.post-body p { line-height: 1.75; margin-bottom: 1.1rem; }
.post-body strong { color: var(--teal); }

/* ---- Community wall ---- */
.composer-top { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 0.8rem; }
.composer-top textarea { flex: 1; font: inherit; border: 2px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; resize: vertical; min-height: 3.5rem; }
.composer-top textarea:focus { outline: none; border-color: var(--teal); }
.composer-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.composer-row input[type="text"] { font: inherit; border: 2px solid var(--line); border-radius: 10px; padding: 0.5rem 0.7rem; flex: 1; min-width: 10rem; }
.composer-photo-btn { cursor: pointer; }
.composer-preview { margin-bottom: 0.8rem; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.composer-preview img { max-width: 220px; border-radius: 12px; }
.composer-hint { color: #6b6355; font-size: 0.9rem; margin-top: 0.6rem; min-height: 1.2em; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--line); }
.avatar-initial, .avatar-you { display: flex; align-items: center; justify-content: center; background: var(--teal); color: #fff; font-weight: 700; font-size: 1.2rem; }
.feed-post { margin-bottom: 1rem; }
.post-head { display: flex; gap: 0.7rem; align-items: center; margin-bottom: 0.6rem; }
.post-name { font-weight: 700; }
.post-time { font-size: 0.85rem; color: #6b6355; }
.post-text { line-height: 1.65; margin-bottom: 0.6rem; white-space: pre-wrap; }
.post-photo { width: 100%; border-radius: 12px; margin-bottom: 0.6rem; display: block; }
.post-actions { display: flex; gap: 0.8rem; align-items: center; }
.like-btn { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 0.3rem 0.9rem; font: inherit; cursor: pointer; }
.like-btn.liked { border-color: var(--teal); color: var(--teal); font-weight: 700; }
.link-btn { background: none; border: none; color: #6b6355; font: inherit; font-size: 0.9rem; cursor: pointer; text-decoration: underline; }
