/* 🌲 Cascadia Prep - Pacific Northwest Coastal Design System */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400;1,9..144,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* PNW Coastal Palette: Deep Sitka spruce, ocean mist, weathered cedar, sand, maritime buoy alerts */
  --coastal-spruce: #16302B;
  --coastal-spruce-deep: #0D1F1C;
  --coastal-spruce-light: #234841;
  --coastal-fog: #F4F6F4;
  --coastal-fog-card: #FFFFFF;
  --coastal-sand: #EAE6DF;
  --coastal-sand-dark: #D4CDC3;
  --coastal-slate: #2B3A42;
  --coastal-water: #1C4456;
  --coastal-mist-blue: #E2ECF0;
  
  /* Hazard & Safety Signals */
  --tsunami-red: #C53030;
  --tsunami-red-bg: #FEF2F2;
  --tsunami-red-border: #FCA5A5;
  --warning-amber: #D97706;
  --warning-amber-bg: #FFFBEB;
  --safe-highground: #166534;
  --safe-highground-bg: #F0FDF4;
  --safe-highground-border: #86EFAC;
  --bridge-collapsed: #991B1B;

  /* Typography & Structure */
  --text-main: #1C2726;
  --text-muted: #576765;
  --text-light: #F4F6F4;
  --border-subtle: #D8DFDC;
  --border-card: #E5EBE8;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 1px 3px rgba(22, 48, 43, 0.06);
  --shadow-md: 0 4px 14px rgba(22, 48, 43, 0.08);
  --shadow-lg: 0 10px 30px rgba(22, 48, 43, 0.12);
}

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

body {
  background-color: var(--coastal-fog);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--coastal-spruce);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  color: var(--text-muted);
  line-height: 1.65;
}

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }

/* Layout Containers */
.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Maritime Coastal Header */
header.coastal-header {
  background: var(--coastal-spruce);
  color: var(--coastal-fog);
  border-bottom: 3px solid #234841;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand-anchor {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-beacon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #234841;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand-text h1 {
  font-family: var(--font-serif);
  color: #FFFFFF;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.brand-text .tagline {
  font-size: 0.76rem;
  color: var(--coastal-sand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* User Journey Stage Navigation */
.journey-nav {
  display: flex;
  background: var(--coastal-spruce-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.journey-nav::-webkit-scrollbar { display: none; }

.journey-step {
  flex: 1;
  min-width: 140px;
  padding: 0.85rem 1.25rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.journey-step:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.04);
}

.journey-step.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.07);
  border-bottom-color: var(--coastal-sand);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}
.journey-step.active .step-num {
  background: var(--coastal-sand);
  color: var(--coastal-spruce);
  font-weight: 800;
}

/* Atmospheric Hero Section */
.hero-coastal {
  background: linear-gradient(180deg, #16302B 0%, #1F423C 60%, #F4F6F4 100%);
  color: #FFFFFF;
  padding: 3.5rem 0 4rem;
  position: relative;
}

.hero-content {
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--coastal-sand);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.85rem;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: #D8DFDC;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-sand {
  background: var(--coastal-sand);
  color: var(--coastal-spruce);
  box-shadow: var(--shadow-sm);
}
.btn-sand:hover {
  background: #DDD5C9;
  transform: translateY(-1px);
}

.btn-spruce {
  background: var(--coastal-spruce);
  color: #FFFFFF;
}
.btn-spruce:hover {
  background: var(--coastal-spruce-light);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--tsunami-red);
  color: #FFFFFF;
}
.btn-danger:hover {
  background: #A82525;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--coastal-mist-blue);
  border-color: var(--coastal-water);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}

/* Cards & Surfaces */
.card-coastal {
  background: var(--coastal-fog-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-coastal:hover {
  border-color: #CBD5D1;
  box-shadow: var(--shadow-md);
}

.card-header-coastal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Preset Switcher Badge */
.preset-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--coastal-fog);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
}

.preset-selector label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.preset-selector select {
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--coastal-spruce);
  cursor: pointer;
  outline: none;
}

/* Reality Check & Comparison Cards */
.reality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.reality-box {
  background: var(--coastal-fog-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.reality-box.danger-accent {
  border-left: 5px solid var(--tsunami-red);
}

.reality-box.warning-accent {
  border-left: 5px solid var(--warning-amber);
}

.reality-box.safe-accent {
  border-left: 5px solid var(--safe-highground);
}

.reality-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Map Experience Container */
.map-section-wrapper {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
@media (max-width: 992px) {
  .map-section-wrapper {
    grid-template-columns: 1fr;
  }
}

.map-container {
  height: 580px;
  width: 100%;
  border-radius: 12px;
  border: 2px solid var(--border-card);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  background: #E5EBE8;
}

.map-control-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-legend {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.swatch-inundation { background: rgba(197, 48, 48, 0.4); border: 1px solid #C53030; }
.swatch-highground { background: rgba(22, 101, 52, 0.3); border: 1px solid #166534; }
.swatch-bridge { background: #991B1B; border-radius: 50%; }

/* Route Steps & Timing Box */
.route-stage-box {
  background: var(--coastal-fog-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.stage-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.4rem;
}

.stage-1-badge { background: var(--tsunami-red-bg); color: var(--tsunami-red); border: 1px solid var(--tsunami-red-border); }
.stage-2-badge { background: var(--safe-highground-bg); color: var(--safe-highground); border: 1px solid var(--safe-highground-border); }

/* Form Elements */
.form-group-coastal {
  margin-bottom: 1rem;
}

.form-group-coastal label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--coastal-spruce);
  margin-bottom: 0.35rem;
}

.form-control-coastal {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control-coastal:focus {
  border-color: var(--coastal-spruce);
  box-shadow: 0 0 0 3px rgba(22, 48, 43, 0.1);
}

/* Checklists & Accordions */
.check-item-coastal {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.check-item-coastal:hover {
  background: var(--coastal-fog);
  border-color: #CBD5D1;
}

.check-item-coastal.checked {
  background: #F8FAF9;
  opacity: 0.75;
}

.check-item-coastal.checked .item-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.check-item-coastal input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--coastal-spruce);
}

/* Tier Badges */
.badge-must {
  background: var(--tsunami-red-bg);
  color: var(--tsunami-red);
  border: 1px solid var(--tsunami-red-border);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.badge-good {
  background: var(--warning-amber-bg);
  color: var(--warning-amber);
  border: 1px solid #FDE68A;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-mono);
}

.badge-skip {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-family: var(--font-mono);
}

/* Print Optimization */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  header, .journey-nav, .no-print, button, .btn {
    display: none !important;
  }
  .card-coastal {
    border: 1px solid #CCCCCC !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
}
