/* The Alpine Dream — Shared Design System
   Updated to match the design-system tokens. Drop-in replacement for
   the previous styles.css — all class names and CSS variable names
   are preserved; only values were tuned and a few new rules added.

   Changes from the previous version:
   - Semantic badge palette pushed richer/sharper (info, success, warn, red)
   - .ad-navlink.active is now a gold-light pill with a gold-mid hairline
   - .ad-logo grew an optional mark slot (logo-mark-mini.svg)
   - New tokens: --warn-bg, --warn-fg, --danger-bg, --danger-fg, --info-bg, --info-fg
*/

:root {
  /* Brand palette */
  --gold: #8B6914;
  --gold-light: #FAEEDA;
  --gold-mid: #EF9F27;
  --gold-dark: #633806;

  /* Warm grayscale */
  --text-primary: #1a1a1a;
  --text-secondary: #5a5a6a;
  --text-tertiary: #9090a0;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f4f0;
  --bg-tertiary: #eeece8;

  /* Hairlines */
  --border-light: rgba(0,0,0,0.08);
  --border-mid: rgba(0,0,0,0.15);

  /* Semantic — richer + sharper */
  --info-bg:    #CFE5FA;
  --info-fg:    #0B4A9E;
  --success-bg: #D5EDB8;
  --success-fg: #2F6309;
  --warn-bg:    #FFC857;   /* vivid, alarming */
  --warn-fg:    #5C2900;
  --danger-bg:  #F8C9C9;
  --danger-fg:  #8A1F1F;

  /* External brand */
  --strava: #FC4C02;

  /* Radii */
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
}

/* ───── Nav ───── */
.ad-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 0.5px solid var(--border-light);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.ad-logo {
  display: inline-flex;
  align-items: center;
  /* gap removed — was creating space between "Alpine" and "Dreams"
     because the <em> boundary splits them into two flex items.
     Spacing now lives on .ad-logo-mark as margin-right. */
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  text-decoration: none;
}
.ad-logo em { font-style: normal; color: var(--gold); margin-left: 3px; }
/* "The" prefix — same size, weight, and font as the rest of the wordmark.
   Inherits color from .ad-logo so it reads as a unified "The Alpine Dream"
   with the only color accent on "Dream." Tight margins so the gaps read as
   word-spaces, not interruptions.

   Footer instances (.footer-logo, .ad-footer-logo) tighten to 2px because
   the footer text is 13px and 3px would look proportionally larger there. */
.ad-logo-the { margin-right: 3px; }
.ad-footer-logo .ad-logo-the { margin-right: 2px; }
.footer-logo .ad-logo-the { margin-right: 2px; }
.footer-logo em { margin-left: 2px; }
.ad-footer-logo em { margin-left: 2px; }

/* Footer social pill row — appears in the middle of every page footer.
   Same visual language as .social-link / .badge but tuned for the footer. */
.footer-social { display: flex; gap: 8px; align-items: center; }
.footer-social-link {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 12px;
  border: 0.5px solid var(--border-light);
  border-radius: 16px;
  background: var(--bg-primary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.footer-social-link:hover { background: var(--gold-light); color: var(--gold-dark); border-color: var(--gold-mid); }
.footer-social-icon { font-size: 12px; line-height: 1; }
.ad-logo-mark { width: 24px; height: 19px; display: block; flex-shrink: 0; margin-right: 8px; }

/* Avatar — circular cropped photo (Frankie headshot or similar) */
.ad-avatar-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  border: 0.5px solid var(--border-light);
  background: var(--gold-light);
  display: block;
}
.ad-avatar-photo.lg { width: 96px; height: 96px; }
.ad-avatar-photo.sm { width: 40px; height: 40px; }

/* Footer mark — subtle echo of the brand */
.ad-footer-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.ad-footer-logo-mark { width: 20px; height: 16px; display: block; flex-shrink: 0; opacity: 0.7; }

.ad-navlinks { display: flex; gap: 6px; align-items: center; }
.ad-navlink {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 16px;
  transition: color 0.15s, background 0.15s;
}
.ad-navlink:hover { color: var(--text-primary); background: var(--bg-secondary); }
.ad-navlink.active {
  color: var(--gold-dark);
  background: var(--gold-light);
  border: 0.5px solid var(--gold-mid);
  padding: 5px 12px;          /* compensate for the border so height stays the same */
  font-weight: 600;
}

/* ───── Badges ───── */
.badge { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 20px; }
.badge-gold  { background: var(--gold-light);  color: var(--gold-dark); }
.badge-blue  { background: var(--info-bg);     color: var(--info-fg); }
.badge-gray  { background: var(--bg-secondary);color: var(--text-tertiary); border: 0.5px solid var(--border-light); }
.badge-green { background: var(--success-bg);  color: var(--success-fg); }
.badge-warn  { background: var(--warn-bg);     color: var(--warn-fg); }
.badge-red   { background: var(--danger-bg);   color: var(--danger-fg); }

/* ───── Buttons ───── */
.btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 8px 16px; border-radius: var(--radius-md); cursor: pointer; transition: opacity 0.15s; border: none; text-decoration: none; }
.btn:hover { opacity: 0.85; }
.btn-primary   { background: var(--gold); color: var(--gold-light); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 0.5px solid var(--border-mid); }
.btn-ghost     { background: var(--bg-secondary); color: var(--text-secondary); }

/* ───── Cards ───── */
.card { background: var(--bg-primary); border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; }
.card.featured { border-color: var(--gold-mid); }
.card-body { padding: 16px 20px; }

/* ───── Stats ───── */
.stat-val { font-size: 22px; font-weight: 600; color: var(--gold); line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }

/* ───── Section labels ───── */
.section-label { font-size: 10px; font-weight: 600; color: var(--text-tertiary); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 12px; }

/* ───── Progress ───── */
.progress-track { height: 6px; background: var(--bg-tertiary); border-radius: 3px; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--gold); }

/* ───── Info rows ───── */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 0.5px solid var(--border-light); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-tertiary); }
.info-val { color: var(--text-primary); font-weight: 500; }

/* ───── Stars ───── */
.stars { display: flex; gap: 1px; }
.star { font-size: 13px; color: var(--gold); }
.star.off { color: var(--border-mid); }

/* ───── Permit info (uses --info-* now) ───── */
.permit-info { background: var(--info-bg); border: 0.5px solid color-mix(in srgb, var(--info-fg) 25%, transparent); border-radius: var(--radius-md); padding: 12px; }
.permit-title { font-size: 12px; font-weight: 600; color: var(--info-fg); margin-bottom: 6px; }
.permit-text { font-size: 11px; color: var(--info-fg); line-height: 1.6; }

/* ───── Responsive ───── */
@media (max-width: 768px) {
  .ad-navlinks { display: none; }
  .ad-nav { padding: 12px 20px; }
}
