/* ============================================
   Saginaw Bay Fishing Hub
   Design: Nautical utility, editorial fishing
   Network: chrisizworski.com
   ============================================ */

:root {
  --navy:       #1a2e3b;
  --navy-mid:   #243d4d;
  --navy-light: #2f5060;
  --cream:      #f5f0e8;
  --cream-warm: #ece5d8;
  --sand:       #d9cfc0;
  --water:      #3d7a9c;
  --water-light:#5a9ab8;
  --go:         #2d8659;
  --go-bg:      rgba(45, 134, 89, 0.12);
  --caution:    #c68b2c;
  --caution-bg: rgba(198, 139, 44, 0.12);
  --nogo:       #b84040;
  --nogo-bg:    rgba(184, 64, 64, 0.1);
  --ink:        #1e2d35;
  --ink-soft:   #5a6b78;
  --ink-muted:  #8a97a2;
  --card-bg:    #ffffff;
  --card-border:rgba(30, 45, 53, 0.1);
  --shadow-sm:  0 1px 3px rgba(26, 46, 59, 0.08);
  --shadow-md:  0 4px 16px rgba(26, 46, 59, 0.1);
  --shadow-lg:  0 8px 32px rgba(26, 46, 59, 0.12);
  --radius:     10px;
  --radius-sm:  6px;
  --ff-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --ff-body:    Georgia, 'Times New Roman', serif;
  --ff-ui:      'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--water); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.muted { color: var(--ink-soft); font-size: 0.9rem; }

/* ---- NAV ---- */
.site-nav {
  background: var(--navy);
  border-bottom: 3px solid var(--water);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  color: var(--cream);
  text-decoration: none;
}
.brand-accent { color: var(--water-light); }

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  font-family: var(--ff-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(245, 240, 232, 0.65);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav-link:hover { color: var(--cream); background: rgba(255,255,255,0.08); text-decoration: none; }
.nav-link.active { color: var(--cream); background: rgba(61, 122, 156, 0.25); }

/* ---- HEADER ---- */
.page-header {
  background:
    linear-gradient(165deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
  padding: 2rem 1.25rem 1.75rem;
  color: var(--cream);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-text h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 0.4rem;
}

.header-sub {
  color: rgba(245, 240, 232, 0.7);
  font-size: 1.05rem;
  max-width: 50ch;
}

.header-meta {
  text-align: right;
  flex-shrink: 0;
}

.bay-call-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-family: var(--ff-ui);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.bay-call-badge.loading { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.6); }
.bay-call-badge.go      { background: var(--go); color: #fff; }
.bay-call-badge.caution  { background: var(--caution); color: #fff; }
.bay-call-badge.nogo     { background: var(--nogo); color: #fff; }

.updated-stamp {
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.5);
  margin-top: 0.45rem;
}

/* ---- MAP ---- */
.map-section {
  position: relative;
  border-bottom: 1px solid var(--sand);
}

.bay-map {
  width: 100%;
  height: 520px;
  background: var(--navy);
}

.map-legend {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  gap: 0.85rem;
  font-family: var(--ff-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  z-index: 800;
  box-shadow: var(--shadow-sm);
}

.legend-item { display: flex; align-items: center; gap: 0.3rem; }
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.go      { background: var(--go); }
.legend-dot.caution { background: var(--caution); }
.legend-dot.nogo    { background: var(--nogo); }
.legend-marker { color: var(--navy); font-size: 0.9rem; }

/* ---- CONTENT WRAP ---- */
.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* ---- SUMMARY ROW ---- */
.summary-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.summary-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--card-border);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metric-block {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
}

.metric-label {
  display: block;
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}

.metric-val {
  display: block;
  font-family: var(--ff-display);
  font-size: 1.05rem;
  color: var(--ink);
}

.rationale p { font-size: 0.88rem; margin-top: 0.3rem; color: var(--ink-soft); }
.rationale ul {
  margin: 0; padding-left: 1.1rem;
  font-size: 0.88rem; color: var(--ink-soft);
}
.rationale li + li { margin-top: 0.25rem; }

.species-buttons {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.species-btn {
  font-family: var(--ff-ui);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
}
.species-btn:hover { border-color: var(--water); }
.species-btn.active {
  background: var(--water);
  border-color: var(--water);
  color: #fff;
}

.captain-note-wrap {
  border-top: 1px solid var(--card-border);
  padding-top: 0.85rem;
  margin-top: auto;
}
.captain-note-wrap h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.btn-sm {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--water);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--water);
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.15s;
}
.btn-sm:hover { background: var(--water); color: #fff; }

/* ---- SECTION BLOCKS ---- */
.section-block {
  margin-bottom: 1.75rem;
}

.section-block > h2 {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.section-sub {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ---- CONDITIONS GRID ---- */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.6rem;
}

.cond-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  box-shadow: var(--shadow-sm);
}

.cond-box .cond-label {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.cond-box .cond-value {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  margin-top: 0.15rem;
  color: var(--ink);
}

/* ---- ZONES GRID ---- */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.85rem;
}

.zone-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 0.6rem;
}

.zone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.zone-head h3 { font-size: 1.1rem; }

.zone-rec {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.score-badge {
  font-family: var(--ff-ui);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.score-badge.strong  { background: var(--go-bg); color: var(--go); }
.score-badge.moderate { background: var(--caution-bg); color: var(--caution); }
.score-badge.weak    { background: var(--nogo-bg); color: var(--nogo); }

.zone-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.zone-stat {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  text-align: center;
}

.zone-stat .stat-label {
  font-family: var(--ff-ui);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.zone-stat .stat-val {
  font-family: var(--ff-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.zone-action {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.zone-action strong { color: var(--ink); font-weight: 600; }
.zone-action p + p { margin-top: 0.3rem; }

.fav-btn {
  font-size: 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  opacity: 0.35;
  transition: opacity 0.15s;
}
.fav-btn:hover, .fav-btn.active { opacity: 1; }

/* ---- LAUNCHES & REPORTS (TWO COL) ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.two-col h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.card-stack { display: grid; gap: 0.6rem; }

.launch-card, .report-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.launch-head, .report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.launch-head h3, .report-head h3 {
  font-size: 0.95rem;
}

.launch-meta, .report-meta {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.launch-notes, .report-summary {
  font-size: 0.88rem;
  margin-top: 0.3rem;
  color: var(--ink-soft);
}

/* ---- SEO PROSE ---- */
.seo-prose {
  max-width: 780px;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--sand);
}

.seo-prose h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.seo-prose h3 { font-size: 1.15rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.seo-prose p { margin-top: 0.65rem; color: var(--ink); line-height: 1.7; }
.seo-prose p:first-of-type { margin-top: 0; }
.seo-prose a { text-decoration: underline; text-underline-offset: 2px; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: rgba(245, 240, 232, 0.6);
  padding: 2rem 1.25rem;
  font-family: var(--ff-ui);
  font-size: 0.85rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand { color: rgba(245, 240, 232, 0.8); margin-bottom: 0.6rem; }
.footer-brand a { color: var(--water-light); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-links a {
  color: var(--water-light);
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(245, 240, 232, 0.35);
  max-width: 60ch;
  margin: 0 auto;
}

/* ---- LOADING SHIMMER ---- */
@keyframes shimmer {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}
.loading .call-label { animation: shimmer 1.5s infinite; }

/* ---- RESPONSIVE ---- */
@media (max-width: 960px) {
  .summary-row { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .header-meta { text-align: left; }
}

@media (max-width: 640px) {
  .nav-links { gap: 0; overflow-x: auto; }
  .nav-link { padding: 0.35rem 0.45rem; font-size: 0.72rem; }
  .hero-metrics { grid-template-columns: 1fr; }
  .bay-map { height: 380px; }
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }
  .zones-grid { grid-template-columns: 1fr; }
  .zone-stats { grid-template-columns: repeat(2, 1fr); }
  .content-wrap { padding: 1rem 0.75rem 2rem; }
}

/* ---- MAP MARKERS v4: research-based ---- */
.map-marker { background:transparent !important; border:none !important; }

/* Structure markers: icon + name label */
.mk-struct {
  display:flex; align-items:center; gap:3px; white-space:nowrap;
  font-family:var(--ff-ui); pointer-events:auto;
}
.mk-struct .mk-icon {
  font-size:0.7rem; color:var(--c); text-shadow:0 1px 2px rgba(0,0,0,0.3);
  width:14px; text-align:center; flex-shrink:0;
}
.mk-struct .mk-name {
  font-size:0.65rem; font-weight:700; color:var(--c);
  background:rgba(255,255,255,0.88); padding:1px 5px; border-radius:3px;
  box-shadow:0 1px 3px rgba(0,0,0,0.15); letter-spacing:0.02em;
}

/* Launch markers: anchor + name */
.mk-launch {
  display:flex; align-items:center; gap:3px; white-space:nowrap;
  font-family:var(--ff-ui); pointer-events:auto;
}
.mk-launch .mk-lanchor {
  font-size:0.85rem; color:var(--navy);
  text-shadow:0 1px 2px rgba(0,0,0,0.2);
}
.mk-launch .mk-name {
  font-size:0.62rem; font-weight:700; color:var(--navy);
  background:rgba(255,255,255,0.9); padding:1px 5px; border-radius:3px;
  box-shadow:0 1px 3px rgba(0,0,0,0.12); letter-spacing:0.02em;
}

/* Sensor data cards on map */
.mk-sensor {
  display:flex; flex-direction:column; gap:1px;
  background:rgba(26,46,59,0.9); backdrop-filter:blur(4px);
  border-radius:6px; padding:4px 8px;
  box-shadow:0 2px 8px rgba(0,0,0,0.25);
  font-family:var(--ff-ui); white-space:nowrap;
  pointer-events:auto; max-width:180px;
}
.mk-sensor .mk-sname {
  font-size:0.58rem; font-weight:600; color:rgba(245,240,232,0.6);
  text-transform:uppercase; letter-spacing:0.06em;
}
.mk-sensor .mk-wind {
  font-size:0.82rem; font-weight:800; color:#fff;
}
.mk-sensor .mk-temp {
  font-size:0.65rem; font-weight:600; color:rgba(245,240,232,0.75);
}
.mk-sensor .mk-wtemp { color:#5ac8fa; }
.mk-sensor.mk-level { background:rgba(90,107,120,0.88); }

/* Report hotspots */
.mk-report {
  display:flex; align-items:center; gap:4px;
  background:rgba(255,255,255,0.93); border:2px solid var(--c);
  border-radius:20px; padding:2px 8px 2px 4px;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
  font-family:var(--ff-ui); pointer-events:auto;
}
.mk-rcount {
  font-weight:800; font-size:0.78rem; color:#fff;
  background:var(--c); border-radius:50%;
  width:18px; height:18px; display:flex; align-items:center; justify-content:center;
}
.mk-rlabel { font-weight:700; font-size:0.65rem; color:var(--c); text-transform:uppercase; letter-spacing:0.04em; }

/* Map overlay panel */
.map-overlay {
  position:absolute; top:10px; left:10px; z-index:800;
  display:flex; flex-direction:column; gap:2px;
  background:rgba(26,46,59,0.92); backdrop-filter:blur(8px);
  border-radius:8px; padding:8px 10px;
  box-shadow:0 4px 16px rgba(0,0,0,0.25); max-width:220px;
}
.ov-item { display:flex; justify-content:space-between; gap:8px; font-family:var(--ff-ui); font-size:0.68rem; color:rgba(245,240,232,0.7); }
.ov-item .ov-k { font-weight:500; white-space:nowrap; }
.ov-item .ov-v { font-weight:700; color:rgba(245,240,232,0.95); text-align:right; }
.ov-alert .ov-v { color:#f87171; font-size:0.62rem; }
.ov-link { color:#5ac8fa; text-decoration:none; font-weight:600; font-size:0.65rem; }
.ov-link:hover { text-decoration:underline; }

/* Map controls */
.map-controls {
  position:absolute; top:10px; right:10px; z-index:800;
  display:flex; gap:4px;
}
.map-btn {
  font-family:var(--ff-ui); font-size:0.68rem; font-weight:700;
  padding:5px 10px; border-radius:4px; border:none;
  background:rgba(255,255,255,0.9); color:var(--ink);
  cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,0.15);
  transition:all 0.15s;
}
.map-btn:hover { background:#fff; }
.map-btn.active { background:var(--water); color:#fff; }

/* Popup styles */
.pop { font-family:var(--ff-ui); font-size:0.82rem; line-height:1.5; color:var(--ink); }
.pop h4 { font-family:var(--ff-display); font-size:1rem; margin:0 0 4px; }
.pop strong { color:var(--ink); }
.pop a { color:var(--water); }
.pop p { margin:4px 0; font-size:0.8rem; }
.pop-t { border-collapse:collapse; margin:6px 0; width:100%; }
.pop-t td { padding:2px 8px 2px 0; font-size:0.8rem; }
.pop-t td:first-child { color:var(--ink-soft); font-weight:500; white-space:nowrap; }
.pop-t td:last-child { font-weight:600; }
.pop-rpt { border-top:1px solid var(--card-border); padding-top:6px; margin-top:6px; }
.pop-rpt p { font-size:0.76rem; }
.pop-rpt small { display:block; font-size:0.66rem; color:var(--ink-soft); }

.leaflet-popup-content-wrapper { border-radius:8px !important; box-shadow:0 4px 16px rgba(0,0,0,0.15) !important; }

/* ---- REPORT SOURCE BADGES ---- */
.source-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0;
}

.src-badge {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.src-ok { background: var(--go-bg); color: var(--go); }
.src-err { background: var(--nogo-bg); color: var(--nogo); }
.src-warn { background: var(--caution-bg); color: var(--caution); }

/* ---- REPORT TAGS ---- */
.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.tag {
  font-family: var(--ff-ui);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  border: 1px solid var(--sand);
}

/* ---- SIGNAL COLORS ---- */
.sig-pos { color: var(--go); font-weight: 700; }
.sig-neg { color: var(--nogo); font-weight: 700; }
.sig-mix { color: var(--caution); font-weight: 700; }
