:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #63736b;
  --paper: #f7f4ee;
  --surface: #fffdf8;
  --forest: #20483b;
  --moss: #6f8b57;
  --water: #2f6f88;
  --clay: #b9603d;
  --line: rgba(23, 33, 29, 0.14);
  --shadow: 0 22px 55px rgba(32, 72, 59, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 244, 238, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--forest);
  color: white;
  border-radius: 8px;
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
}

.header-nav-group {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.recent-parks {
  display: flex;
  max-width: min(44vw, 520px);
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.recent-parks[hidden] {
  display: none;
}

.recent-parks span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.recent-parks a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest);
  font-size: 0.8rem;
  font-weight: 750;
  padding: 5px 9px;
  text-decoration: none;
}

.recent-parks a:hover,
.recent-parks a[aria-current="page"] {
  background: rgba(32, 72, 59, 0.1);
}

.site-nav a,
.nav-toggle,
.button {
  border-radius: 8px;
}

.site-nav a {
  padding: 9px 11px;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(32, 72, 59, 0.1);
  color: var(--forest);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 9px 12px;
  color: var(--ink);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: calc(100vh - 66px);
  padding: clamp(32px, 5vw, 70px) clamp(18px, 5vw, 78px) 44px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  display: block;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

.home-hero h1 {
  margin-top: 14px;
  font-size: clamp(3rem, 8vw, 7.6rem);
  max-width: 780px;
}

.home-hero p,
.page-hero p,
.inventory-hero p {
  color: #405048;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--forest);
  color: white;
}

.button.secondary {
  background: white;
  border: 1px solid var(--line);
}

.hero-streams,
.hero-photo {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-streams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  background: #17211d;
  padding: 12px;
}

.hero-stream-card {
  overflow: hidden;
  min-width: 0;
  background: var(--surface);
  border-radius: 8px;
}

.hero-stream-card:first-child {
  grid-column: span 2;
}

.hero-stream-card a {
  display: grid;
  gap: 2px;
  text-decoration: none;
}

.hero-stream-card a > span,
.hero-stream-card strong {
  margin-inline: 12px;
}

.hero-stream-card a > span {
  margin-top: 12px;
}

.hero-stream-card strong {
  margin-bottom: 12px;
}

.hero-stream-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(111, 139, 87, 0.28), rgba(47, 111, 136, 0.24));
}

.hero-stream-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  border-radius: 999px;
  background: var(--clay);
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 4px 8px;
  text-transform: uppercase;
}

.hero-stream-card span {
  color: var(--water);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-stream-thumb .play-badge {
  color: white;
}

.hero-stream-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-photo {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, rgba(47, 111, 136, 0.24), rgba(185, 96, 61, 0.18));
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.stats-band div {
  padding: 24px clamp(18px, 5vw, 78px);
  border-right: 1px solid var(--line);
}

.stats-band div:last-child {
  border-right: 0;
}

.stats-band strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.stats-band span {
  color: var(--muted);
}

.park-browser,
.resource-section,
.inventory-table-wrap {
  padding: clamp(34px, 6vw, 78px) clamp(18px, 5vw, 78px);
}

.park-browser {
  display: grid;
  gap: 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 4rem);
}

.search-box {
  display: grid;
  gap: 5px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 13px 14px;
  font: inherit;
}

.park-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.map-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  min-height: 620px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.webcam-map {
  min-height: 620px;
  z-index: 1;
}

.map-side {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
}

.map-side h3 {
  font-size: 1.7rem;
}

.map-side p {
  margin-top: 0;
  color: var(--muted);
}

.map-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.map-park-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 3px;
  padding: 11px;
  text-align: left;
}

.map-park-button:hover,
.map-park-button.active {
  border-color: rgba(47, 111, 136, 0.46);
  background: rgba(47, 111, 136, 0.08);
}

.map-park-button strong {
  font-size: 0.98rem;
}

.map-park-button span,
.cam-pill {
  color: var(--water);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cam-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--clay);
  color: white;
  box-shadow: 0 9px 24px rgba(23, 33, 29, 0.28);
  font-size: 0.75rem;
  font-weight: 900;
}

.cam-marker.no-live {
  background: var(--water);
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.leaflet-control-attribution {
  display: none;
}

.map-popup {
  min-width: 190px;
}

.map-popup strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
}

.map-popup a {
  color: var(--water);
  font-weight: 850;
}

.park-grid-heading {
  margin-top: 12px;
  margin-bottom: -4px;
}

.park-card {
  position: relative;
  min-height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.park-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(23, 33, 29, 0.12);
}

.park-card a {
  display: grid;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.park-card-body {
  padding: 18px;
}

.park-card-body span,
.embed-meta span {
  color: var(--water);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.park-card-body h2 {
  margin-top: 8px;
  font-size: 1.2rem;
  line-height: 1.18;
}

.park-card-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}

.card-action {
  display: inline-flex;
  margin-top: 6px;
  color: var(--forest);
}

.official-link {
  position: relative;
  display: inline-flex;
  margin: 0 18px 18px;
  color: var(--water);
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
}

.official-link:hover {
  text-decoration: underline;
}

.nps-overview-section {
  padding: clamp(26px, 5vw, 54px) clamp(18px, 5vw, 78px);
  background: #ece7dc;
  border-bottom: 1px solid var(--line);
}

.nps-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  overflow: hidden;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(23, 33, 29, 0.1);
}

.nps-card:hover {
  box-shadow: 0 22px 52px rgba(23, 33, 29, 0.15);
}

.nps-card-image {
  min-height: 260px;
  background: linear-gradient(135deg, rgba(111, 139, 87, 0.28), rgba(47, 111, 136, 0.24));
}

.nps-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nps-card-body {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(22px, 4vw, 44px);
}

.nps-card-body h2 {
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.12;
}

.nps-card-body p {
  max-width: 72ch;
  margin: 0;
  color: #2f3d37;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.page-hero {
  position: relative;
  display: block;
  padding: clamp(24px, 4vw, 52px) clamp(18px, 5vw, 78px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-hero-copy h1 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  max-width: 1280px;
}

.page-hero-copy p {
  max-width: 1280px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.back-link {
  color: var(--water);
  font-weight: 800;
  text-decoration: none;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  padding: clamp(34px, 6vw, 78px) clamp(18px, 5vw, 78px);
}

.page-content {
  min-width: 0;
}

.content-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.content-section:first-child {
  padding-top: 0;
}

.content-section h2 {
  margin-bottom: 14px;
  color: var(--forest);
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}

.content-section p {
  color: #2f3d37;
  font-size: 1.03rem;
}

.resource-panel {
  align-self: start;
  display: grid;
  gap: 16px;
}

.panel-card,
.links-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.panel-card h2,
.links-panel h2 {
  font-size: 1.2rem;
}

.panel-card p {
  color: var(--muted);
}

.panel-card a,
.links-panel a {
  color: var(--water);
  font-weight: 800;
}

.photo-strip {
  display: grid;
  gap: 10px;
}

.photo-strip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}

.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.live-first {
  background: #ece7dc;
  border-bottom: 1px solid var(--line);
}

.embed-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.embed-card > .embed-frame,
.embed-card > .webcam-image-media {
  order: 1;
  flex: 0 0 auto;
}

.video-card:first-child {
  grid-column: span 2;
}

.embed-frame {
  aspect-ratio: 16 / 9;
  background: #dbe4dc;
}

.embed-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-frame.map {
  aspect-ratio: 4 / 3;
}

.webcam-image-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dbe4dc;
  cursor: zoom-in;
}

.webcam-image-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.webcam-image-media:hover img,
.webcam-image-media:focus img {
  transform: scale(1.02);
}

.webcam-image-media:focus {
  outline: 3px solid var(--water);
  outline-offset: 3px;
}

.webcam-unavailable-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 24px;
  background: #dbe4dc;
  color: var(--muted);
  text-align: center;
}

.webcam-unavailable-media span {
  max-width: 16rem;
  font-weight: 700;
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 52px);
  background: rgba(12, 23, 18, 0.86);
  cursor: zoom-out;
}

.image-viewer figure {
  width: min(1180px, 96vw);
  margin: 0;
  cursor: default;
}

.image-viewer img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  background: #101814;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.image-viewer img.image-viewer-load-error {
  min-height: 280px;
  opacity: 0;
}

.image-viewer figcaption {
  margin-top: 12px;
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.image-viewer-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #102019;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.image-viewer-open {
  overflow: hidden;
}

.embed-meta {
  order: 2;
  padding: 15px;
}

.embed-meta strong {
  display: block;
  margin-top: 4px;
}

.embed-meta p {
  margin-bottom: 0;
  color: var(--muted);
}

.embed-meta a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--water);
  font-weight: 850;
}

.links-panel {
  margin-top: 18px;
}

.weather-section {
  padding: clamp(34px, 6vw, 78px) clamp(18px, 5vw, 78px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.weather-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.weather-card {
  background: #f4f8f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.weather-card h3 {
  margin-bottom: 14px;
  font-size: 1.15rem;
}

.hourly-weather {
  display: grid;
  grid-template-columns: repeat(6, minmax(72px, 1fr));
  gap: 8px;
}

.hourly-item,
.daily-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hourly-item {
  display: grid;
  gap: 3px;
  min-height: 110px;
  padding: 10px;
}

.hourly-item span,
.daily-item span {
  color: var(--water);
  font-size: 0.8rem;
  font-weight: 800;
}

.hourly-item strong {
  font-size: 1.25rem;
}

.hourly-item small {
  color: var(--muted);
  line-height: 1.25;
}

.daily-weather {
  display: grid;
  gap: 8px;
}

.daily-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px;
}

.daily-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.weather-unavailable {
  color: var(--muted);
}

.links-panel ul {
  columns: 2;
  padding-left: 19px;
}

.links-panel li {
  break-inside: avoid;
  margin-bottom: 9px;
}

.related-parks-section {
  padding: clamp(28px, 5vw, 60px) clamp(18px, 5vw, 78px);
  border-top: 1px solid var(--line);
}

.related-park-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.related-park-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.related-park-card:hover {
  border-color: var(--forest);
}

.related-park-card span {
  font-size: 1.08rem;
  font-weight: 800;
}

.related-park-card strong {
  align-self: end;
  color: var(--water);
  font-size: 0.9rem;
}

.inventory-hero {
  padding: clamp(36px, 6vw, 78px) clamp(18px, 5vw, 78px) 24px;
}

.inventory-hero h1 {
  margin-top: 10px;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
}

.inventory-table-wrap {
  padding-top: 20px;
  overflow-x: auto;
}

.inventory-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
}

.inventory-table th,
.inventory-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.inventory-table th {
  background: #ece7dc;
}

.inventory-table a {
  color: var(--water);
  font-weight: 750;
}

.footer-contact {
  padding: 28px clamp(18px, 5vw, 78px) 8px;
  color: var(--ink);
  font-weight: 700;
}

.footer-contact p {
  margin: 0;
}

.footer-contact a {
  color: var(--forest);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 5vw, 78px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--forest);
  font-weight: 800;
}

@media (max-width: 920px) {
  .home-hero,
  .nps-card,
  .page-layout,
  .map-explorer,
  .weather-layout {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-streams {
    grid-template-columns: 1fr;
  }

  .hero-stream-card:first-child,
  .video-card:first-child {
    grid-column: span 1;
  }

  .hero-photo {
    aspect-ratio: 16 / 10;
  }

  .nps-card-image {
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .resource-panel {
    position: static;
  }

  .map-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .webcam-map,
  .map-explorer {
    min-height: 520px;
  }

  .section-heading,
  .site-footer {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .header-nav-group {
    width: 100%;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .recent-parks {
    max-width: 100%;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    white-space: normal;
  }

  .site-nav.open {
    display: flex;
  }

  .stats-band {
    grid-template-columns: 1fr;
  }

  .stats-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .links-panel ul {
    columns: 1;
  }

  .webcam-map {
    min-height: 420px;
  }

  .hourly-weather {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}
