/* Tokens from DESIGN.md. Media-query breakpoints repeat bp-md (48rem) and bp-lg (64rem) because custom properties cannot be used there. */

:root {
  --sand: #f4efe6;
  --sand-deep: #e7dfd0;
  --paper: #fffdf8;
  --ink: #1a2418;
  --ink-muted: #3e4a38;
  --canopy: #1b4332;
  --canopy-deep: #0f2a1f;
  --on-canopy: #f4efe6;
  --teal: #0c5c56;
  --teal-deep: #084440;
  --amber: #d4923a;
  --amber-ink: #7a4510;
  --line: #d9d0c2;
  --focus: #0c5c56;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Source Sans 3", sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.35rem;
  --text-xl: 1.75rem;
  --text-2xl: 2.4rem;
  --text-3xl: 3.4rem;
  --leading-body: 1.6;
  --leading-tight: 1.12;
  --tracking-label: 0.14em;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 6.5rem;
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;
  --content-max: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-body);
}

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

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 560;
  line-height: var(--leading-tight);
  margin: 0;
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

p,
ul,
ol,
dl {
  margin: 0;
}

a {
  color: var(--teal);
}

a:hover {
  color: var(--teal-deep);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: var(--space-md);
  top: var(--space-md);
  z-index: 20;
  background: var(--paper);
  color: var(--ink);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--canopy);
  color: var(--on-canopy);
  padding: var(--space-md) var(--space-lg);
}

.site-header :focus-visible {
  outline-color: var(--on-canopy);
}

.brand {
  color: var(--on-canopy);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 640;
  text-decoration: none;
}

.brand:hover {
  color: var(--on-canopy);
}

.menu-button {
  display: none;
  align-items: center;
  gap: var(--space-xs);
  border: 1px solid var(--on-canopy);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-canopy);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: var(--space-xs) var(--space-md);
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: var(--space-md);
  height: 1px;
  background: var(--on-canopy);
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: calc(var(--space-2xs) * -1);
}

.menu-icon::after {
  top: var(--space-2xs);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
}

.site-nav a {
  color: var(--on-canopy);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--on-canopy);
  text-decoration: underline;
  text-underline-offset: var(--space-2xs);
}

.site-nav a[aria-current="true"] {
  box-shadow: inset 0 calc(var(--space-2xs) * -1) 0 var(--amber);
}

.js .menu-button {
  display: inline-flex;
}

.js .site-nav {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: var(--space-sm);
}

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

.hero {
  display: grid;
  background: var(--canopy);
  color: var(--on-canopy);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-3xl) var(--space-lg);
}

.hero-copy .lede {
  font-size: var(--text-lg);
  max-width: 38ch;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.eyebrow-on-dark {
  color: var(--on-canopy);
}

.hero-photo {
  margin: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.hero-photo figcaption,
.bleed figcaption,
.frame figcaption {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
}

.hero-photo figcaption {
  background: var(--canopy-deep);
  color: var(--on-canopy);
}

.band {
  padding: var(--space-3xl) 0;
}

.band-inset {
  background: var(--sand-deep);
}

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.wrap > .eyebrow {
  margin-bottom: var(--space-sm);
}

.wrap > h2 {
  margin-bottom: var(--space-md);
}

.intro {
  max-width: 62ch;
  margin-bottom: var(--space-xl);
  color: var(--ink-muted);
}

.fact-grid,
.card-grid {
  display: grid;
  gap: var(--space-lg);
}

.fact,
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
}

.fact dt,
.card h3 {
  margin-bottom: var(--space-xs);
}

.fact dd {
  margin: 0;
  color: var(--ink-muted);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card ul {
  padding-left: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.card li::marker {
  color: var(--teal);
}

.suits {
  margin-top: auto;
  padding-top: var(--space-sm);
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.suits span {
  display: block;
  color: var(--amber-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.bleed,
.frame {
  margin: 0;
}

.bleed img,
.frame img {
  width: 100%;
  object-fit: cover;
}

.bleed img {
  aspect-ratio: 16 / 9;
  object-position: center;
}

.bleed figcaption {
  background: var(--canopy);
  color: var(--on-canopy);
}

.frame {
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.frame img {
  aspect-ratio: 16 / 8;
}

.frame figcaption {
  background: var(--paper);
  color: var(--ink-muted);
}

.timeline {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-xl);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-lg);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: calc(var(--space-3xl) / 2);
  top: var(--space-3xl);
  bottom: calc(var(--space-xl) * -1);
  width: 1px;
  background: var(--line);
}

.timeline li:last-child::before {
  display: none;
}

.day-num {
  display: grid;
  place-items: center;
  width: var(--space-3xl);
  height: var(--space-3xl);
  border-radius: var(--radius-sm);
  background: var(--canopy-deep);
  color: var(--amber);
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 640;
  position: relative;
  z-index: 1;
}

.timeline h3 {
  margin-bottom: var(--space-xs);
}

.timeline p {
  color: var(--ink-muted);
  max-width: 62ch;
}

.phrases {
  display: grid;
  gap: var(--space-sm);
}

.phrases div {
  display: grid;
  gap: var(--space-2xs);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line);
}

.phrases dt {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 560;
}

.phrases dd {
  margin: 0;
  color: var(--ink-muted);
}

.map-canvas {
  position: relative;
  width: 100%;
  height: 78vh;
  min-height: 26rem;
  max-height: 52rem;
  border-block: 1px solid var(--line);
  background: var(--sand-deep);
}

.map-fallback {
  margin: 0;
  padding: var(--space-lg);
  color: var(--ink-muted);
}

.place-marker {
  background: transparent;
  border: 0;
}

.pin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--paper);
  box-shadow: 0 1px 4px rgb(15 42 31 / 0.35);
  transition: transform 0.15s ease;
}

.pin-kind-airport { background: var(--canopy-deep); }
.pin-kind-restaurant { background: #9a3f1f; }
.pin-kind-town { background: #4a4a6a; }
.pin-kind-beach { background: var(--teal); }
.pin-kind-nature { background: #2f6b2f; }
.pin-kind-zipline { background: var(--amber-ink); }
.pin-kind-stay { background: #6b3552; }
.pin-kind-attraction { background: #2e4f80; }

.pin[class*="pin-kind-"] {
  color: var(--paper);
}

.pin-cluster {
  background: var(--paper);
  color: var(--canopy-deep);
  border-color: var(--canopy-deep);
  font-weight: 700;
  font-size: var(--text-sm);
}

.pin-active {
  transform: scale(1.25);
  box-shadow: 0 0 0 3px var(--canopy-deep), 0 2px 8px rgb(15 42 31 / 0.45);
}

.map-key {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-xs);
  line-height: 1.3;
  color: var(--ink);
}

.map-key fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.map-key fieldset + fieldset {
  margin-top: var(--space-xs);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--line);
}

.key-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 32px;
  cursor: pointer;
}

.key-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.key-toggle:has(input:not(:checked)) .key-label,
.key-toggle:has(input:not(:checked)) .pin-key,
.key-toggle:has(input:not(:checked)) .key-label {
  flex: 1;
}

.key-count {
  min-width: 1.5em;
  text-align: right;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.key-quick {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.key-quick button {
  flex: 1;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--sand);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.key-status {
  margin: var(--space-xs) 0 0;
  color: var(--ink-muted);
}

.map-key summary {
  min-height: 32px;
  padding-block: 0.35rem;
  cursor: pointer;
  font-weight: 700;
}

.map-key details[open] summary {
  margin-bottom: var(--space-xs);
}

.map-key ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2xs);
}

.map-key ul + ul,
.map-key-unused {
  margin-top: var(--space-xs);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--line);
}

.map-key li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pin-key {
  width: 22px;
  height: 22px;
  border: 0;
  box-shadow: none;
}



@media (max-width: 40rem) {
  .map-key {
    max-height: 60vh;
    overflow-y: auto;
  }

  .map-key summary,
  .key-toggle,
  .key-quick button {
    min-height: 44px;
  }

  .map-key summary {
    min-height: 44px;
    padding-block: 0.75rem;
    box-sizing: border-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin { transition: none; }
}

.leaflet-container {
  font-family: var(--font-sans);
  background: var(--sand-deep);
}

.leaflet-popup-content-wrapper {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.leaflet-popup-content {
  margin: var(--space-md);
  font-size: var(--text-sm);
  line-height: var(--leading-body);
}

.leaflet-popup-tip {
  background: var(--paper);
  box-shadow: none;
}

.leaflet-popup-content .popup-title {
  display: block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 560;
  line-height: var(--leading-tight);
}

.leaflet-popup-content p {
  margin: 0;
  color: var(--ink-muted);
}

.leaflet-popup-content .popup-address {
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
}

.leaflet-popup-content .popup-weather {
  margin-top: var(--space-xs);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-sm);
  background: var(--sand);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 600;
}

.leaflet-popup-content .popup-status {
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 700;
}

.leaflet-popup-content .popup-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-sm);
  font-weight: 600;
}

.leaflet-popup-content .popup-suits {
  margin-top: var(--space-xs);
  color: var(--amber-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.leaflet-control-attribution {
  background: var(--paper);
  color: var(--ink-muted);
  font-size: var(--text-xs);
}

.leaflet-control-attribution a {
  color: var(--teal);
}

.season-scroll {
  overflow-x: auto;
}

.season-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: separate;
  border-spacing: 3px;
  font-size: var(--text-xs);
}

.season-table caption {
  text-align: left;
  margin-bottom: var(--space-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--amber-ink);
}

.season-table thead th {
  font-weight: 700;
  color: var(--ink-muted);
}

.season-table tbody th {
  text-align: left;
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: 560;
  padding-right: var(--space-sm);
  min-width: 10rem;
}

.season-table tbody th small {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--ink-muted);
}

.season-table td {
  height: 3rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
}

.season-dry { background: var(--amber); color: var(--canopy-deep); }
.season-drier { background: #ebc58f; color: var(--canopy-deep); }
.season-rain { background: #7fb3ad; color: var(--canopy-deep); }
.season-wet { background: var(--teal-deep); color: var(--paper); }

.season-sources {
  margin-top: var(--space-md);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}

.site-footer {
  background: var(--canopy-deep);
  color: var(--on-canopy);
  padding: var(--space-3xl) 0;
}

.site-footer a {
  color: var(--on-canopy);
}

.site-footer a:hover {
  color: var(--on-canopy);
}

.credits {
  list-style: none;
  padding: 0;
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--text-sm);
}

section[id] {
  scroll-margin-top: var(--space-4xl);
}

@media (min-width: 48rem) {
  h1 {
    font-size: var(--text-3xl);
  }

  .site-header {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }

  .wrap {
    padding-inline: var(--space-xl);
  }

  .hero-copy,
  .band {
    padding-top: var(--space-4xl);
    padding-bottom: var(--space-4xl);
  }

  .hero-copy {
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
  }

  .fact-grid,
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .js .menu-button {
    display: none;
  }

  .js .site-nav {
    display: flex;
    flex-basis: auto;
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg);
    padding-top: 0;
  }

  .hero {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero-copy {
    justify-content: center;
  }

  .hero-photo {
    display: grid;
    grid-template-rows: 1fr auto;
  }

  .hero-photo img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .bleed img {
    aspect-ratio: 21 / 9;
  }

  .fact-grid,
  .card-grid-regions {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .card-grid-regions .card-wide {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

#map {
  padding-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
