:root {
  --font-display: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
  --font-body: "Public Sans", "Avenir Next", "Trebuchet MS", sans-serif;
  --panel-border: rgba(216, 190, 133, 0.38);
  --panel-bg: rgba(23, 33, 28, 0.34);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  margin: 24px;
  max-width: 960px;
  color: #1d1a16;
  background: #f8f4ec;
}

header {
  margin-bottom: 18px;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
}

main :is(#trip-summary, #trip-route, #trip-days, #day-summary, #day-route, #day-snapshot, #day-legs, #activity-summary, #activity-route, #activity-snapshot, #activity-details, #activity-notes) {
  scroll-margin-top: 92px;
}

h1,
h2,
h3,
.title {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.trip {
  margin-bottom: 30px;
}

.trip-group {
  margin-bottom: 24px;
}

.trip-overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.trip-overview-main {
  min-width: 0;
}

.trip-overview-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.15;
}

.trip-overview-sub {
  margin: 6px 0 0;
  opacity: 0.72;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.trip-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.trip-stat {
  margin: 0;
  border: 1px solid #ddcfbb;
  border-radius: 12px;
  background: #fffdf8;
  padding: 8px 10px;
  min-width: 128px;
}

.trip-stat-label {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.trip-stat-value {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.15;
}

.trip-dropdown {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.trip-summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.trip-summary::-webkit-details-marker {
  display: none;
}

.trip-summary-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trip-summary-title {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 700;
}

.trip-summary-sub {
  opacity: 0.72;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trip-summary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  padding: 6px 10px;
  white-space: nowrap;
}

.trip-summary-chevron {
  display: inline-block;
  transition: transform 180ms ease;
}

.trip-dropdown[open] .trip-summary-chevron {
  transform: rotate(180deg);
}

.trip-dropdown .trip {
  margin-bottom: 0;
  padding: 0 8px 16px;
}

.trip-days-summary .trip-summary-title {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.trip-days-summary .trip-summary-sub {
  font-size: 0.7rem;
}

.trip-route {
  margin: 12px 0 16px;
  border: 1px solid #ded3c2;
  border-radius: 14px;
  background: #fffaf1;
  position: relative;
  overflow: hidden;
}

.trip-route-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px 8px;
}

.trip-route-head h2,
.trip-route-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.trip-route-head .small {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trip-route-map {
  width: 100%;
  height: 240px;
  border-top: 1px solid #e8ddcb;
  background: #e8e1d3;
  touch-action: pan-y;
}

.map-interaction-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 620;
  border: 1px solid rgba(216, 190, 133, 0.55);
  border-radius: 999px;
  background: rgba(16, 23, 20, 0.84);
  color: #fff6df;
  padding: 6px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.trip-route-map.is-map-interactive + .map-interaction-toggle {
  background: rgba(48, 78, 64, 0.86);
}

.trip-route-map-lg {
  height: 320px;
}

.trip-route-empty {
  margin: 0;
  padding: 14px 12px 16px;
  opacity: 0.72;
  font-size: 0.88rem;
}

.trip-route-note {
  margin: 10px 0 14px;
}

.trip-route .leaflet-container {
  font-family: var(--font-display);
}

.trip-route .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.75);
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid #d6d0c4;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdf8;
}

.card a {
  text-decoration: none;
  display: block;
}

.title {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 4px;
}

.meta {
  opacity: 0.75;
  font-size: 0.95rem;
}

.activity-description {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.86;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.day-card {
  padding: 0;
  overflow: hidden;
}

.day-combined-link {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.day-combined-link:hover,
.day-combined-link:focus-visible {
  background: rgba(0, 0, 0, 0.03);
}

.day-combined-link-text {
  margin: 8px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.day-legs {
  margin: 0;
}

.day-legs-summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 14px 10px;
}

.day-legs-summary::-webkit-details-marker {
  display: none;
}

.day-legs-toggle-text {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.day-legs-chevron {
  display: inline-block;
  transition: transform 180ms ease;
}

.day-legs[open] .day-legs-chevron {
  transform: rotate(180deg);
}

.day-legs-list {
  list-style: none;
  margin: 0;
  padding: 0 14px 12px;
  display: grid;
  gap: 8px;
}

.day-legs-list li {
  margin: 0;
}

.day-legs-list a {
  border: 1px solid #ddd4c4;
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.7);
}

.day-leg-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.3;
}

.day-leg-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.8rem;
  opacity: 0.72;
}

.day-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.day-notes-list li {
  margin: 0;
}

.day-note-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
}

.day-note-title a {
  text-decoration: underline;
}

.day-page-legs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.day-page-legs-list li {
  margin: 0;
}

.day-page-legs-list a {
  border: 1px solid #ddd4c4;
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.7);
  display: block;
  text-decoration: none;
}

.small {
  opacity: 0.7;
  font-size: 0.9rem;
}

.small code {
  font-size: 0.85rem;
}

.photos {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

.photos img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.photo-caption {
  opacity: 0.7;
  font-size: 0.9rem;
  margin-top: 4px;
  margin-bottom: 12px;
}

/* Home-only hero carousel */
.home-page {
  --adventure-bg-color: #4f5e58;
  --adventure-bg-image:
    radial-gradient(circle at 16% 20%, rgba(150, 174, 145, 0.24) 0, transparent 44%),
    radial-gradient(circle at 82% 12%, rgba(200, 169, 98, 0.24) 0, transparent 42%),
    radial-gradient(circle at 18% 86%, rgba(176, 147, 84, 0.2) 0, transparent 46%),
    radial-gradient(circle at 84% 78%, rgba(122, 146, 122, 0.2) 0, transparent 44%),
    repeating-radial-gradient(circle at 18% 32%, rgba(240, 214, 153, 0.12) 0 1px, transparent 1px 24px),
    repeating-radial-gradient(circle at 78% 72%, rgba(136, 160, 130, 0.12) 0 1px, transparent 1px 26px),
    linear-gradient(140deg, #5f6d66 0%, #526159 50%, #44514b 100%);
  margin: 0;
  max-width: none;
  background-color: var(--adventure-bg-color);
  background-image: var(--adventure-bg-image);
  background-attachment: scroll;
  color: #f6efe4;
  font-family: var(--font-body);
}

.home-page .hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #334038;
}

.home-page .hero-slides {
  position: absolute;
  inset: 0;
}

.home-page .hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
  pointer-events: none;
}

.home-page .hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.home-page .hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 900ms ease;
}

.home-page .hero-slide.is-active img {
  will-change: transform;
}

.home-page .hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(16deg, rgba(24, 34, 29, 0.78) 0%, rgba(34, 45, 38, 0.16) 55%, rgba(30, 39, 33, 0.7) 100%);
}

.home-page .hero-slide-content {
  position: absolute;
  left: clamp(16px, 4vw, 56px);
  right: clamp(16px, 4vw, 56px);
  bottom: clamp(72px, 14vh, 130px);
  z-index: 5;
  max-width: 680px;
}

.home-page .hero-slide-content h2 {
  margin: 0.2rem 0;
  font-size: clamp(1.4rem, 2.4vw, 2.35rem);
  line-height: 1.1;
}

.home-page .hero-slide-content h2 a {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.home-page .hero-slide-content p {
  margin: 0.1rem 0;
  line-height: 1.35;
}

.home-page .hero-meta {
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.79rem;
  opacity: 0.85;
}

.home-page .hero-shell {
  position: relative;
  z-index: 6;
  padding: clamp(22px, 4vw, 52px);
  max-width: 620px;
}

.home-page .hero-shell h1 {
  margin: 0.4rem 0 0.6rem;
  font-size: clamp(1.7rem, 3.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.home-page .hero-kicker {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
}

.home-page .hero-intro {
  margin: 0;
  font-size: clamp(0.96rem, 1.35vw, 1.08rem);
  max-width: 50ch;
  opacity: 0.92;
}

.home-page .hero-jump {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.48rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
}

.home-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1rem;
}

.home-page .hero-actions .hero-jump {
  margin-top: 0;
}

.home-page .hero-jump.hero-jump-alt {
  background: rgba(219, 192, 132, 0.2);
}

.home-page .hero-arrow {
  position: absolute;
  z-index: 8;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.home-page .hero-arrow-left {
  left: clamp(10px, 2vw, 22px);
}

.home-page .hero-arrow-right {
  right: clamp(10px, 2vw, 22px);
}

.home-page .hero-controls {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: clamp(10px, 2vw, 22px);
  height: 46px;
  pointer-events: none;
}

.home-page .hero-progress {
  display: flex;
  gap: 10px;
  align-items: center;
  width: min(240px, calc(100% - 132px));
  margin: 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(10, 14, 12, 0.5);
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.home-page .hero-progress-track {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.home-page .hero-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f2c86a 0%, #fff4db 100%);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 240ms ease;
}

.home-page .hero-progress-count {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 245, 220, 0.92);
}

.home-page .hero.full-photo-carousel {
  background: #1f2b25;
}

.home-page .hero.full-photo-carousel .hero-slide {
  background: #111712;
}

.home-page .hero.full-photo-carousel .hero-slide img {
  object-fit: contain;
  transform: none;
  background: #111712;
}

.home-page .hero.full-photo-carousel .hero-shade {
  background:
    linear-gradient(12deg, rgba(9, 12, 10, 0.44) 0%, rgba(9, 12, 10, 0.08) 52%, rgba(9, 12, 10, 0.36) 100%);
}

/* Keep the hero visible while the page content scrolls up and covers it. */
.home-page .hero.full-photo-carousel,
.trip-page .trip-hero,
.activity-page .activity-photo-carousel {
  position: sticky;
  top: 0;
  z-index: 1;
}

.home-page .hero + .home-main,
.trip-page .trip-hero + .trip-main,
.activity-page .activity-photo-carousel + .activity-main {
  position: relative;
  z-index: 12;
}

.home-page .hero + .home-main::before,
.trip-page .trip-hero + .trip-main::before,
.activity-page .activity-photo-carousel + .activity-main::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  background-color: var(--adventure-bg-color);
  background-image: var(--adventure-bg-image);
  background-attachment: scroll;
  pointer-events: none;
  z-index: -2;
}

.home-page .home-header,
.home-page .home-main {
  max-width: 980px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  background: transparent;
  color: #f6efdf;
}

.home-page .home-header {
  padding-top: 34px;
  margin-bottom: 0;
}

.home-page .home-header h1 {
  margin: 0;
}

.home-page .home-main {
  padding-top: 16px;
  padding-bottom: 64px;
}

.home-page .home-main .card {
  color: #281f15;
  border-color: rgba(158, 132, 84, 0.45);
  background: rgba(250, 245, 232, 0.9);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.08);
}

@media (hover: hover) and (pointer: fine) {
  .home-page .trip-overview,
  .home-page .trip-route,
  .home-page .trip-dropdown,
  .home-page .home-main .card {
    transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease;
  }

  .home-page .trip-overview:hover,
  .home-page .trip-route:hover,
  .home-page .trip-dropdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(10, 14, 12, 0.24);
  }

  .home-page .home-main .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(16, 12, 7, 0.16);
  }
}

.home-page .day-legs-list a {
  border-color: rgba(158, 132, 84, 0.36);
  background: rgba(255, 252, 244, 0.84);
}

.home-page .day-combined-link {
  border-bottom-color: rgba(216, 188, 131, 0.3);
}

.home-page .day-combined-link:hover,
.home-page .day-combined-link:focus-visible {
  background: rgba(216, 188, 131, 0.12);
}

.home-page .trip-group {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 4px 0 20px;
  box-shadow: none;
}

.home-page .trip-group + .trip-group {
  margin-top: 26px;
  padding-top: 34px;
}

.home-page .trip-group + .trip-group::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      rgba(224, 200, 145, 0) 0%,
      rgba(224, 200, 145, 0.78) 12%,
      rgba(224, 200, 145, 0.78) 88%,
      rgba(224, 200, 145, 0) 100%
    );
  box-shadow:
    0 1px 0 rgba(19, 28, 24, 0.35),
    0 6px 18px rgba(8, 12, 10, 0.24);
}

.home-page .trip-overview-sub a {
  color: #f3d48c;
  font-weight: 600;
}

.home-page .trip-dropdown {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  margin-bottom: 0;
  padding: 0 12px;
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.16);
  backdrop-filter: blur(7px);
}

.home-page .trip-summary {
  padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease;
}

.home-page .trip-summary-title {
  color: #f4ecd9;
}

.home-page .trip-summary-action {
  color: #f2dfb5;
  border-color: rgba(216, 188, 131, 0.55);
  background: rgba(21, 28, 24, 0.35);
}

.home-page .trip-summary:hover,
.home-page .trip-summary:focus-visible {
  background: rgba(219, 192, 132, 0.12);
}

.home-page .trip-dropdown[open] .trip-summary {
  border-bottom-color: rgba(210, 184, 127, 0.32);
}

.home-page .trip-dropdown[open] .trip-summary-action {
  background: rgba(31, 42, 36, 0.42);
}

.home-page .trip-dropdown .trip {
  padding: 12px 0 16px;
}

.home-page .trip-route {
  border-color: var(--panel-border);
  background: rgba(24, 34, 30, 0.42);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.14);
  backdrop-filter: blur(7px);
}

.home-page .trip-route-head h2,
.home-page .trip-route-head h3,
.home-page .trip-route-head .small {
  color: #f3e7cc;
}

.home-page .trip-stat {
  border-color: rgba(216, 190, 133, 0.45);
  background: rgba(23, 33, 28, 0.56);
  position: relative;
  padding: 10px 10px 10px 34px;
}

.home-page .trip-stat-label {
  color: rgba(242, 227, 194, 0.82);
}

.home-page .trip-stat-value {
  color: #fff6df;
}

.home-page .trip-stat::before {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.56rem;
  letter-spacing: 0.01em;
  color: #f9edd2;
  border: 1px solid rgba(242, 227, 194, 0.5);
  background: rgba(18, 25, 21, 0.65);
}

.home-page .trip-stat--time::before {
  content: "T";
}

.home-page .trip-stat--distance::before {
  content: "D";
}

.home-page .trip-stat--elevation::before {
  content: "E";
}

.home-page .trip-overview-sub,
.home-page .trip-summary-sub,
.home-page .trip-route-note {
  color: rgba(246, 237, 216, 0.82);
}

.home-page .trip-overview {
  margin-bottom: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: var(--panel-bg);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.14);
  backdrop-filter: blur(7px);
}

.home-page .trip-route-map {
  height: 230px;
}

.section-nav {
  position: sticky;
  top: 10px;
  z-index: 40;
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(214, 189, 135, 0.45);
  border-radius: 12px;
  background: rgba(23, 33, 28, 0.5);
  backdrop-filter: blur(8px);
}

.section-nav a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f2dfb5;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(216, 188, 131, 0.35);
  background: rgba(18, 25, 21, 0.4);
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.section-nav a:hover,
.section-nav a:focus-visible {
  background: rgba(219, 192, 132, 0.18);
  border-color: rgba(216, 188, 131, 0.62);
}

.section-nav a.is-active {
  color: #281f15;
  border-color: rgba(242, 227, 194, 0.78);
  background: #f2dfb5;
}

.trip-page .trip-page-header,
.activity-page .activity-page-header {
  margin-bottom: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--panel-bg);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.14);
  backdrop-filter: blur(7px);
}

.trip-page .trip-hero {
  min-height: min(86vh, 760px);
}

.trip-page .trip-hero-shell {
  max-width: 760px;
}

.trip-page .hero-slide-content {
  bottom: clamp(56px, 11vh, 96px);
}

.trip-page .trip-main {
  padding-top: 26px;
  padding-bottom: 74px;
}

.trip-page .trip-page-header {
  margin-bottom: 18px;
}

.trip-page .trip-page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
  color: #f7f0df;
}

.trip-page .trip-page-header .small {
  color: rgba(247, 239, 216, 0.84);
}

.trip-page .trip-page-header a {
  color: #f3d48c;
  font-weight: 600;
}

.trip-page .trip-route-map-lg {
  height: 360px;
}

.activity-page .activity-photo-carousel {
  min-height: min(82vh, 760px);
  background: #1f2b25;
}

.activity-page .activity-photo-carousel .hero-slide img {
  object-fit: contain;
  transform: none;
  background: #111712;
}

.activity-page .activity-photo-carousel .hero-shade {
  background:
    linear-gradient(12deg, rgba(9, 12, 10, 0.44) 0%, rgba(9, 12, 10, 0.08) 52%, rgba(9, 12, 10, 0.36) 100%);
}

.activity-page .activity-hero-shell {
  max-width: 760px;
}

.activity-page .hero-slide-content {
  bottom: clamp(20px, 5vh, 44px);
}

.activity-page .hero-slide-content p {
  max-width: 48ch;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.activity-page .activity-main {
  padding-top: 26px;
  padding-bottom: 74px;
}

.activity-page .activity-page-header {
  margin-bottom: 18px;
}

.activity-page .activity-page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
  color: #f7f0df;
}

.activity-page .activity-page-header .meta {
  color: rgba(247, 239, 216, 0.92);
}

.activity-page .activity-page-header .small {
  color: rgba(247, 239, 216, 0.84);
}

.activity-page .activity-page-header a {
  color: #f3d48c;
  font-weight: 600;
}

.activity-page .activity-panel {
  margin: 0 0 16px;
  border: 1px solid rgba(216, 190, 133, 0.45);
  border-radius: 14px;
  background: rgba(20, 29, 25, 0.34);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.14);
  padding: 14px;
}

.activity-page .activity-panel h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f3e7cc;
}

.activity-page .activity-notes-text {
  margin: 0;
  white-space: pre-line;
  line-height: 1.55;
}

.activity-page .activity-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.activity-page .activity-metric {
  margin: 0;
  border: 1px solid rgba(216, 190, 133, 0.45);
  border-radius: 12px;
  background: rgba(16, 23, 20, 0.42);
  padding: 8px 10px 8px 12px;
  position: relative;
  overflow: hidden;
}

.activity-page .activity-metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(242, 227, 194, 0.46);
}

.activity-page .activity-metric[data-metric="distance"]::before {
  background: #6ca6ff;
}

.activity-page .activity-metric[data-metric="elevation"]::before {
  background: #f2c86a;
}

.activity-page .activity-metric[data-metric="time"]::before {
  background: #7ecb9a;
}

.activity-page .activity-metric-label {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 227, 194, 0.82);
}

.activity-page .activity-metric-value {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff6df;
}

.activity-page .activity-details-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
}

.activity-page .activity-details-list div {
  border-top: 1px solid rgba(216, 190, 133, 0.22);
  padding-top: 6px;
}

.activity-page .activity-details-list dt {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 227, 194, 0.8);
}

.activity-page .activity-details-list dd {
  margin: 3px 0 0;
  color: #f6efdf;
}

.activity-page .day-page-legs-list a {
  border-color: rgba(216, 190, 133, 0.45);
  background: rgba(16, 23, 20, 0.42);
  color: #f6efdf;
}

.activity-page .day-note-title {
  color: #f6efdf;
}

.activity-page .day-note-title a {
  color: #f3d48c;
}

.gallery-page .gallery-main {
  max-width: 1180px;
  padding-top: 24px;
  padding-bottom: 74px;
}

.gallery-page .gallery-header {
  margin-bottom: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-bg);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.14);
  backdrop-filter: blur(7px);
}

.gallery-page .gallery-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
  color: #f7f0df;
}

.gallery-page .gallery-header .small {
  color: rgba(247, 239, 216, 0.84);
}

.gallery-page .gallery-header a {
  color: #f3d48c;
  font-weight: 600;
}

.gallery-page .gallery-intro {
  margin-bottom: 0;
}

.gallery-page .gallery-filters {
  position: sticky;
  top: 10px;
  z-index: 40;
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(214, 189, 135, 0.45);
  border-radius: 12px;
  background: rgba(23, 33, 28, 0.5);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.14);
  backdrop-filter: blur(8px);
}

.gallery-page .gallery-filter {
  cursor: pointer;
  border: 1px solid rgba(216, 188, 131, 0.35);
  border-radius: 999px;
  background: rgba(18, 25, 21, 0.4);
  color: #f2dfb5;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gallery-page .gallery-filter span {
  font-size: 0.64rem;
  opacity: 0.85;
}

.gallery-page .gallery-filter:hover,
.gallery-page .gallery-filter:focus-visible {
  background: rgba(219, 192, 132, 0.18);
  border-color: rgba(216, 188, 131, 0.62);
}

.gallery-page .gallery-filter.is-active {
  color: #281f15;
  border-color: rgba(242, 227, 194, 0.78);
  background: #f2dfb5;
}

.gallery-page .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.gallery-page .gallery-card {
  margin: 0;
  border: 1px solid rgba(216, 190, 133, 0.45);
  border-radius: 14px;
  background: rgba(20, 29, 25, 0.34);
  box-shadow: 0 8px 20px rgba(16, 12, 7, 0.14);
  overflow: hidden;
}

.gallery-page .gallery-photo-button {
  width: 100%;
  border: 0;
  padding: 0;
  background: #111712;
  cursor: pointer;
  display: block;
}

.gallery-page .gallery-photo-button img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-page .gallery-card-meta {
  padding: 10px 10px 12px;
  display: grid;
  gap: 6px;
}

.gallery-page .gallery-card-meta p {
  margin: 0;
}

.gallery-page .gallery-card-trip {
  font-family: var(--font-display);
  font-size: 0.88rem;
  line-height: 1.3;
}

.gallery-page .gallery-card-trip a,
.gallery-page .gallery-card-activity a {
  color: #f3d48c;
}

.gallery-page .gallery-card-activity {
  color: rgba(247, 239, 216, 0.88);
  font-size: 0.82rem;
  line-height: 1.35;
}

.gallery-page .gallery-card-caption {
  color: rgba(247, 239, 216, 0.9);
  font-size: 0.87rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-page .gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox-open {
  overflow: hidden;
}

.gallery-page .gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(6, 9, 8, 0.9);
}

.gallery-page .gallery-lightbox-figure {
  margin: 0;
  width: min(1200px, 100%);
  max-height: calc(100vh - 32px);
  justify-self: center;
  display: grid;
  gap: 10px;
}

.gallery-page .gallery-lightbox-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.gallery-page .gallery-lightbox-image {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  background: #111712;
}

.gallery-page .gallery-lightbox-caption-wrap {
  border: 1px solid rgba(216, 190, 133, 0.45);
  border-radius: 12px;
  background: rgba(20, 29, 25, 0.72);
  padding: 10px 12px;
  color: #f7f0df;
}

.gallery-page .gallery-lightbox-count {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(242, 227, 194, 0.82);
}

.gallery-page .gallery-lightbox-meta {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 0.96rem;
  line-height: 1.3;
}

.gallery-page .gallery-lightbox-caption {
  margin: 7px 0 0;
  line-height: 1.5;
}

.gallery-page .gallery-lightbox-links {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-page .gallery-lightbox-links a {
  color: #f3d48c;
  font-weight: 600;
}

.gallery-page .gallery-lightbox-nav,
.gallery-page .gallery-lightbox-close {
  border: 1px solid rgba(216, 190, 133, 0.55);
  border-radius: 999px;
  background: rgba(16, 23, 20, 0.82);
  color: #fff6df;
  width: 46px;
  height: 46px;
  font-size: 1.38rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-page .gallery-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
}

.gallery-page .gallery-lightbox-nav:disabled {
  opacity: 0.42;
  cursor: default;
}

.ui-reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ui-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ui-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 760px) {
  .home-page .home-header,
  .home-page .home-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-page .hero-kicker,
  .home-page .hero-meta {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
  }

  .home-page .hero-intro {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .home-page .hero-shell h1,
  .trip-page .hero-shell h1,
  .activity-page .hero-shell h1 {
    font-size: clamp(1.32rem, 5.4vw, 1.72rem);
    line-height: 1.1;
  }

  .home-page .hero-slide-content h2,
  .trip-page .hero-slide-content h2,
  .activity-page .hero-slide-content h2 {
    font-size: clamp(1.08rem, 4.6vw, 1.34rem);
  }

  .home-page .hero-slide-content h2 + p,
  .trip-page .hero-slide-content h2 + p,
  .activity-page .hero-slide-content h2 + p {
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .home-page .hero-jump,
  .trip-page .hero-jump,
  .activity-page .hero-jump {
    font-size: 0.76rem;
    padding: 0.42rem 0.65rem;
  }

  .home-page .hero-actions {
    gap: 8px;
  }

  .section-nav {
    top: 6px;
    gap: 6px;
    padding: 6px;
    margin-bottom: 12px;
  }

  .section-nav a {
    font-size: 0.64rem;
    letter-spacing: 0.07em;
    padding: 5px 8px;
  }

  .home-page .hero.full-photo-carousel {
    min-height: 58vh;
  }

  .home-page .trip-overview-sub,
  .home-page .trip-summary-sub,
  .home-page .small {
    font-size: 0.84rem;
    letter-spacing: 0.04em;
  }

  .trip-overview-title {
    font-size: clamp(1.34rem, 6.2vw, 1.62rem);
  }

  .trip-days-summary .trip-summary-title {
    font-size: 1.02rem;
    letter-spacing: 0.04em;
  }

  .trip-days-summary .trip-summary-sub {
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    text-transform: none;
  }

  .home-page .trip-summary-action {
    font-size: 0.82rem;
    padding: 7px 11px;
  }

  .cards .title {
    font-size: 1.28rem;
    margin-bottom: 6px;
  }

  .cards .meta {
    font-size: 1.03rem;
    line-height: 1.35;
  }

  .day-legs-summary {
    padding: 13px 14px;
  }

  .day-combined-link {
    padding: 13px 14px;
  }

  .day-leg-title {
    font-size: 0.96rem;
  }

  .day-leg-meta {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .activity-description {
    font-size: 1rem;
    line-height: 1.5;
    -webkit-line-clamp: 4;
  }

  .home-page .hero-slide-content {
    bottom: 70px;
  }

  .home-page .hero-arrow {
    width: 42px;
    height: 42px;
  }

  .home-page .hero-controls {
    height: 42px;
    bottom: clamp(8px, 3vw, 14px);
  }

  .home-page .hero-progress {
    width: min(200px, calc(100% - 112px));
    padding: 6px 8px;
  }

  .home-page .hero-progress-count {
    font-size: 0.66rem;
  }

  .trip-overview {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-page .trip-group + .trip-group {
    margin-top: 22px;
    padding-top: 28px;
  }

  .trip-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .trip-stat {
    min-width: 0;
    flex: 1 1 135px;
  }

  .trip-stat-label {
    font-size: 0.68rem;
  }

  .trip-stat-value {
    font-size: 1rem;
  }

  .trip-route-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .trip-route-map {
    height: 210px;
  }

  .trip-route-map-lg {
    height: 260px;
  }

  .trip-page .trip-hero {
    min-height: 58vh;
  }

  .trip-page .trip-main {
    padding-top: 20px;
  }

  .trip-page .trip-route-map-lg {
    height: 280px;
  }

  .activity-page .activity-photo-carousel {
    min-height: 58vh;
  }

  .activity-page .activity-main {
    padding-top: 20px;
  }

  .activity-page .activity-metric-label {
    font-size: 0.68rem;
  }

  .activity-page .activity-metric-value {
    font-size: 0.99rem;
  }

  .activity-page .activity-details-list dt {
    font-size: 0.72rem;
  }

  .activity-page .activity-details-list dd {
    font-size: 0.98rem;
  }

  .gallery-page .gallery-main {
    padding-top: 18px;
  }

  .gallery-page .gallery-filters {
    top: 6px;
    gap: 6px;
    padding: 6px;
  }

  .gallery-page .gallery-filter {
    font-size: 0.64rem;
    letter-spacing: 0.07em;
    padding: 5px 8px;
  }

  .gallery-page .gallery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-page .gallery-lightbox {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .gallery-page .gallery-lightbox-figure {
    max-height: calc(100vh - 20px);
  }

  .gallery-page .gallery-lightbox-image {
    max-height: 68vh;
  }

  .gallery-page .gallery-lightbox-nav {
    position: absolute;
    bottom: 16px;
  }

  .gallery-page .gallery-lightbox-prev {
    left: 12px;
  }

  .gallery-page .gallery-lightbox-next {
    right: 12px;
  }
}
