:root {
  --ink: #24180f;
  --muted: #715f4d;
  --paper: #f8efe0;
  --paper-deep: #ead5b9;
  --green: #315e4f;
  --teal: #397c78;
  --rust: #9b4e2d;
  --gold: #c18a38;
  --blue: #394f74;
  --cream: #fff9ee;
  --shadow: 0 24px 70px rgba(50, 32, 16, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 12%, rgba(193, 138, 56, 0.2), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(57, 124, 120, 0.16), transparent 24rem),
    linear-gradient(180deg, #fbf4e7 0%, #f2dfc3 52%, #e7cfac 100%);
  font-family: Inter, system-ui, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(82, 55, 28, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 55, 28, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, black, transparent 80%);
}

a {
  color: inherit;
}

.hero {
  min-height: 92vh;
  padding: 22px clamp(18px, 4vw, 64px) 52px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(36, 24, 15, 0.1), rgba(36, 24, 15, 0.02)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=2200&q=80");
  background-size: cover;
  background-position: center;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(36, 24, 15, 0.78) 0%, rgba(36, 24, 15, 0.38) 48%, rgba(36, 24, 15, 0.08) 100%),
    linear-gradient(0deg, rgba(248, 239, 224, 0.95) 0%, transparent 24%);
}

.nav,
.hero-grid {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 249, 238, 0.65);
  border-radius: 50%;
  font-family: Cinzel, serif;
}

.nav-links {
  display: flex;
  gap: clamp(10px, 3vw, 28px);
  color: #fff9ee;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: end;
  gap: clamp(28px, 6vw, 90px);
  min-height: calc(92vh - 78px);
}

.hero-copy {
  max-width: 780px;
  color: var(--cream);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.76rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.93;
  text-wrap: balance;
}

.intro {
  max-width: 650px;
  margin: 26px 0 0;
  color: rgba(255, 249, 238, 0.86);
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  line-height: 1.75;
}

.hero-actions,
.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.resource-links a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 800;
}

.primary {
  background: var(--gold);
  color: #1d130b;
}

.secondary {
  color: var(--cream);
  border-color: rgba(255, 249, 238, 0.45);
  background: rgba(255, 249, 238, 0.08);
  backdrop-filter: blur(8px);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 249, 238, 0.28);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.16);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-panel div {
  padding: 22px;
  background: rgba(36, 24, 15, 0.28);
  color: var(--cream);
}

.stat-number {
  display: block;
  font-family: Cinzel, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: rgba(255, 249, 238, 0.76);
  font-size: 0.9rem;
  font-weight: 700;
}

.section {
  padding: clamp(58px, 9vw, 110px) clamp(18px, 4vw, 64px);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.compact {
  margin-bottom: 22px;
}

.section-heading h2,
.planning-card h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.04;
}

.section-heading p:not(.eyebrow),
.planning-card p {
  color: var(--muted);
  line-height: 1.75;
}

.map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: stretch;
}

.map-card,
.stop-detail,
.planning-card {
  border: 1px solid rgba(94, 62, 33, 0.18);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.78);
  box-shadow: var(--shadow);
}

.map-card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
}

.trip-map {
  width: 100%;
  height: 560px;
  min-height: 460px;
  display: block;
  z-index: 1;
}

.leaflet-container {
  background: #dce8df;
  font: inherit;
}

.leaflet-control-attribution {
  font-size: 0.68rem;
}

.trip-marker {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 3px solid var(--cream);
  border-radius: 50%;
  color: var(--cream);
  background: var(--rust);
  box-shadow: 0 6px 18px rgba(36, 24, 15, 0.32);
  font-size: 0.66rem;
  font-weight: 900;
}

.trip-marker.start,
.trip-marker.home {
  background: var(--green);
}

.trip-marker.family {
  background: var(--teal);
}

.trip-marker.active {
  width: 32px;
  height: 32px;
  border-width: 4px;
  background: var(--blue);
  font-size: 0.78rem;
}

.trip-tooltip {
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 249, 238, 0.92);
  box-shadow: 0 8px 20px rgba(36, 24, 15, 0.18);
  font-size: 0.76rem;
  font-weight: 900;
}

.map-legend {
  position: absolute;
  left: 14px;
  bottom: 18px;
  z-index: 450;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: calc(100% - 28px);
  padding: 10px 12px;
  border: 1px solid rgba(94, 62, 33, 0.16);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.92);
  box-shadow: 0 10px 28px rgba(36, 24, 15, 0.14);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.map-legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--rust);
}

.map-legend .legend-start {
  background: var(--green);
}

.map-legend .legend-family {
  background: var(--teal);
}

.map-legend .legend-route {
  width: 24px;
  height: 5px;
  border-radius: 999px;
  background: var(--rust);
}

.map-fallback {
  display: grid;
  min-height: 460px;
  margin: 0;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.stop-detail {
  padding: 26px;
}

.stop-detail .date {
  color: var(--rust);
  font-weight: 900;
}

.stop-detail h3 {
  margin-top: 8px;
  font-size: 1.7rem;
}

.stop-detail p {
  color: var(--muted);
  line-height: 1.7;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(49, 94, 79, 0.1);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tag:hover,
.tag:focus-visible {
  color: var(--cream);
  background: var(--green);
  transform: translateY(-1px);
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(94, 62, 33, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 249, 238, 0.68);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.filter.active {
  color: var(--cream);
  background: var(--green);
}

.timeline {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(94, 62, 33, 0.16);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.72);
  box-shadow: 0 12px 38px rgba(50, 32, 16, 0.08);
  cursor: pointer;
}

.timeline-item.active {
  border-color: rgba(57, 124, 120, 0.52);
  box-shadow: 0 16px 44px rgba(57, 124, 120, 0.16);
}

.timeline-item[hidden] {
  display: none;
}

.timeline-date {
  color: var(--rust);
  font-weight: 900;
}

.timeline-title {
  margin: 0;
  font-family: Cinzel, serif;
  font-size: 1.22rem;
}

.timeline-body {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.field-guide {
  background: linear-gradient(180deg, rgba(49, 94, 79, 0.1), rgba(57, 124, 120, 0.05));
}

.guide-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.guide-grid article {
  min-height: 260px;
  padding: 22px;
  border: 1px solid rgba(94, 62, 33, 0.16);
  border-radius: 8px;
  background: rgba(255, 249, 238, 0.72);
}

.guide-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: var(--cream);
  background: var(--rust);
  font-weight: 900;
}

.guide-grid h3 {
  margin-top: 22px;
  font-size: 1.25rem;
}

.guide-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.planning-card {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 48px);
  text-align: center;
}

.resource-links {
  justify-content: center;
}

.resource-links a {
  border-color: rgba(94, 62, 33, 0.18);
  background: var(--cream);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 4vw, 64px);
  color: rgba(255, 249, 238, 0.8);
  background: var(--ink);
}

.footer p {
  margin: 0;
}

@media (max-width: 940px) {
  .hero-grid,
  .map-shell,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    align-items: center;
    padding-top: 80px;
  }

  .map-card {
    min-height: 390px;
  }

  .trip-map {
    height: 460px;
    min-height: 390px;
  }

  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 100vh;
    padding-inline: 16px;
  }

  .nav {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero-grid {
    min-height: calc(100vh - 72px);
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.1rem);
    line-height: 1;
  }

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

  .hero-panel div:last-child {
    grid-column: 1 / -1;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .map-legend {
    right: 10px;
    bottom: 10px;
    left: 10px;
    font-size: 0.7rem;
  }

  .footer {
    display: block;
  }

  .footer a {
    display: inline-block;
    margin-top: 12px;
  }
}
