/* ──────────────────────────────────────────────────────────
   Geo-Weather — Tour & Wander-aligned styles
   Tokens kept in sync with /globetour/css/styles.css
   ────────────────────────────────────────────────────────── */

:root {
  /* Palette — Tour & Wander (muted red + navy + cream, not patriotic) */
  --stone:        #F5F0E8;
  --stone-dark:   #E8E0D0;
  --brand-red:        #B23A48;
  --brand-red-light:  #D85460;
  --brand-red-pale:   #FCEEEF;
  --terracotta:       var(--brand-red);
  --terracotta-light: var(--brand-red-light);
  --deep-blue:    #1B3A5C;
  --deep-blue-light: #2A5580;
  --ink:          #1A1A1A;
  --ink-light:    #4A4A4A;
  --ink-muted:    #8A8A80;
  --white:        #FFFFFF;
  --off-white:    #FAFAF6;

  /* Semantic */
  --bg:           var(--off-white);
  --surface:      var(--white);
  --border:       #E0DBD0;
  --border-light: #EEEAE2;
  --accent:       var(--brand-red);
  --accent-hover: var(--brand-red-light);

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;

  /* Type */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

/* ── Top brand bar (mirrors Tour & Wander hub nav) ── */
.gt-tool-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
}
.gt-tool-bar-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}
.gt-tool-brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-xs);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}
.gt-tool-mark { color: var(--accent); font-size: 24px; line-height: 1; }
.gt-tool-mark-img {
  display: inline-block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  transform: translateY(-1px);
}
.gt-tool-accent {
  color: var(--accent);
  font-style: italic;
  font-size: 1.15em;
  font-weight: 500;
  margin: 0 0.06em;
}
.gt-tool-tag {
  margin-left: var(--sp-sm);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  border-left: 1px solid var(--border);
  padding-left: var(--sp-sm);
  font-family: var(--font-body);
}
.gt-tool-back {
  font-size: 13px;
  color: var(--ink-light);
  text-decoration: none;
  font-weight: 500;
}
.gt-tool-back:hover { color: var(--accent); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-2xl) var(--sp-lg);
}

/* ── Header ── */
header.page-intro { margin-bottom: var(--sp-xl); }
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}
header.page-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: var(--sp-sm);
}
header.page-intro .subtitle {
  color: var(--ink-light);
  font-size: 1rem;
  max-width: 42rem;
}

/* ── Controls ── */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
}
.select-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  flex: 1 1 280px;
}
.select-wrapper label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 600;
}
.select-wrapper select {
  font: 500 14px var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 150ms cubic-bezier(0.16, 1, 0.3, 1);
}
.select-wrapper select:hover { border-color: var(--accent); }
.select-wrapper select:focus-visible {
  outline: 2px solid var(--deep-blue);
  outline-offset: 2px;
}
.btn-primary {
  font: 600 14px var(--font-body);
  color: var(--white);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 150ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover { background: var(--accent-hover); }

/* ── States ── */
.loading,
.error {
  border-radius: 12px;
  padding: var(--sp-lg);
  margin-bottom: var(--sp-lg);
  font-size: 0.95rem;
}
.loading {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  text-align: center;
  font-style: italic;
}
.error {
  background: #fef5f0;
  border: 1px solid var(--terracotta);
  color: #7a2c0e;
}
.hidden { display: none; }

/* ── Dashboard ── */
.dashboard { display: flex; flex-direction: column; gap: var(--sp-lg); }

.current-conditions h2,
.chart-section h2,
.climate-info h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: var(--sp-md);
}

/* ── Stat cards (current conditions) ── */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-md);
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--sp-lg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: var(--sp-xs);
}
.stat-context {
  font-size: 0.85rem;
  color: var(--ink-light);
}

/* ── Chart sections ── */
.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--sp-lg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.chart-description {
  font-size: 0.9rem;
  color: var(--ink-light);
  margin-bottom: var(--sp-md);
}
.chart-container {
  position: relative;
  min-height: 280px;
  height: 320px;
}

/* ── Climate info ── */
.climate-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: var(--sp-lg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.climate-info p { color: var(--ink-light); }
.climate-info p + p { margin-top: var(--sp-sm); }
.climate-info strong { color: var(--ink); }

/* ── Climate card (Best/Worst tiles + notes list) ── */
.climate-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}
.climate-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}
.climate-stat {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--off-white);
  border-left-width: 4px;
}
.climate-stat--good { border-left-color: #2A8C6A; }
.climate-stat--bad  { border-left-color: var(--terracotta); }
.climate-stat-label {
  font: 600 11px var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: var(--sp-xs);
}
.climate-stat-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.25;
}

.climate-notes-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 var(--sp-sm) 0;
}
.climate-notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.climate-notes-list li {
  position: relative;
  padding: 10px 12px 10px 32px;
  background: var(--off-white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: var(--ink-light);
  line-height: 1.6;
  font-size: 0.95rem;
}
.climate-notes-list li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Inline chip for parenthetical data: (16-32°C), (8-10in rain) */
.climate-data {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-size: 0.85em;
  color: var(--ink);
  white-space: nowrap;
}

/* Inline emphasis for ALL-CAPS warnings: HURRICANE SEASON, BUSHFIRE SEASON */
.climate-warn {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 2px;
  background: #fef0e8;
  color: #7a2c0e;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .climate-stats { grid-template-columns: 1fr; }
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-xl) var(--sp-lg);
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
}
footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
footer a:hover { text-decoration: underline; }
footer p + p { margin-top: var(--sp-xs); }

/* ── Mobile ── */
@media (max-width: 720px) {
  .container { padding: var(--sp-lg); }
  .controls { flex-direction: column; align-items: stretch; }
  .gt-tool-bar-inner { padding: 0 var(--sp-md); }
  .gt-tool-tag { display: none; }
  .stat-value { font-size: 1.6rem; }
}
