/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --ink: #0a0a0a;
  --ink-1: #171717;
  --ink-2: #525252;
  --ink-3: #8a8a8a;
  --rule: #ececec;
  --rule-strong: #d4d4d4;
  --accent: #b6571e;
  --accent-soft: #f3e6dc;

  --max: 1120px;
  --gutter: clamp(20px, 4vw, 48px);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;

  --shadow-soft: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px rgba(10, 10, 10, 0.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--ink); color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.nav__links {
  display: flex;
  gap: 28px;
}

.nav__links a {
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color 0.18s ease;
}

.nav__links a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .nav__links { gap: 18px; }
  .nav__links a { font-size: 13px; }
}

@media (max-width: 480px) {
  .nav__links a:nth-child(n+3) { display: none; }
}

/* ---------- Layout primitives ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
}

.section + .section {
  border-top: 1px solid var(--rule);
}

.eyebrow,
.kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0;
}

.kicker--muted { color: var(--ink-3); }

.section__head {
  max-width: 720px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.section__head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 18px 0 18px;
}

.section__lede {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 14vw, 180px) var(--gutter) clamp(60px, 10vw, 120px);
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 24px 0 32px;
  max-width: 14ch;
}

.hero__title em {
  font-style: italic;
  color: var(--ink-2);
}

.hero__lede {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 36px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(56px, 8vw, 96px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}
.btn--primary:hover { background: #000; transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
}

.hero__facts > div { min-width: 0; }

.hero__facts dt {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.hero__facts dd {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .hero__facts { grid-template-columns: repeat(2, 1fr); gap: 22px 24px; }
}

/* ---------- Route ---------- */
.route {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.route__leg,
.route__stay {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.2s ease;
}

.route__stay {
  background: var(--bg-soft);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 4px;
}

.route__leg--soft { color: var(--ink-2); }

.route__num {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.route__od {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.route__od strong { font-weight: 600; }

.route__sub {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: 0;
}

.route__arrow {
  color: var(--accent);
  font-size: 16px;
}

.route__tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-weight: 500;
}

.route__meta {
  display: flex;
  gap: 18px;
  color: var(--ink-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
}

.route__link {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  padding: 0;
  transition: color 0.18s ease;
  white-space: nowrap;
}

.route__link:hover { color: var(--ink); }

@media (max-width: 720px) {
  .route__leg,
  .route__stay {
    grid-template-columns: 36px 1fr auto;
    gap: 14px;
    padding: 18px 0;
  }
  .route__stay { padding-left: 14px; padding-right: 14px; margin: 0 -14px; }
  .route__meta {
    grid-column: 2 / 4;
    grid-row: 2;
    margin-top: 4px;
    font-size: 13px;
    gap: 14px;
  }
  .route__link { grid-column: 3; grid-row: 1; }
  .route__od { font-size: 15.5px; }
}

/* ---------- Alt ---------- */
.alt {
  margin-top: 56px;
  padding: 28px 0 0;
  border-top: 1px solid var(--rule);
}

.alt__list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
}

.alt__list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}

.alt__list li > span:first-child { font-weight: 500; }

.alt__meta {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.alt__note {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 13.5px;
}

@media (max-width: 640px) {
  .alt__list { grid-template-columns: 1fr; }
}

/* ---------- Map ---------- */
.section--map {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.section--map .section__head {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}

.map {
  position: relative;
  margin: 0 var(--gutter);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #f3f3f1;
}

#leaflet {
  height: clamp(420px, 60vh, 640px);
  width: 100%;
}

.map__chips {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 400;
  pointer-events: none;
}

.map__chips button {
  pointer-events: auto;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.map__chips button:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  list-style: none;
  margin: 24px auto 0;
  max-width: var(--max);
  padding: 0 var(--gutter);
  font-size: 13.5px;
  color: var(--ink-2);
}

.legend li { display: inline-flex; align-items: center; gap: 10px; }

.legend__swatch {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--ink);
}

.legend__swatch--route { background: var(--accent); height: 3px; }
.legend__swatch--day {
  background: linear-gradient(to right, var(--ink-2) 50%, transparent 50%);
  background-size: 6px 100%;
}
.legend__swatch--ferry {
  background: linear-gradient(to right, var(--ink-3) 33%, transparent 33%);
  background-size: 4px 100%;
}

@media (max-width: 600px) {
  .map { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
  #leaflet { height: clamp(360px, 56vh, 520px); }
  .legend { gap: 18px; }
}

/* ---------- Stays table ---------- */
.stays {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.stays thead th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 0 14px;
  border-bottom: 1px solid var(--rule-strong);
}

.stays tbody th,
.stays tbody td {
  text-align: left;
  font-weight: 500;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.stays tbody th {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.stays tbody td {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.stays__hint {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

.stays__group th {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding-top: 36px;
  padding-bottom: 8px;
  border-bottom: none;
}

.stays__total th,
.stays__total td {
  font-weight: 600;
  font-size: 17px;
  border-top: 1px solid var(--rule-strong);
  border-bottom: none;
  padding-top: 28px;
}

.footnote {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-3);
}

@media (max-width: 600px) {
  .stays {
    font-size: 14px;
  }

  .stays tbody th,
  .stays tfoot th,
  .stays tfoot td {
    font-size: 15.5px;
  }
}

/* ---------- Stops ---------- */
.stops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 32px;
}

.stop {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stop__media {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-soft);
}

.stop__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
  transition: transform 0.6s ease;
}

.stop:hover .stop__media img { transform: scale(1.02); }

.stop__no {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.stop__body { display: flex; flex-direction: column; gap: 6px; }

.stop h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 4px 0 2px;
}

.stop__sub {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0 0 6px;
}

.stop__body p:last-child {
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
}

.stop--quiet {
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 32px;
  justify-content: center;
}

.stop--quiet .stop__body { gap: 8px; }

@media (max-width: 900px) {
  .stops { grid-template-columns: repeat(2, 1fr); gap: 48px 24px; }
}

@media (max-width: 560px) {
  .stops { grid-template-columns: 1fr; gap: 48px; }
  .stop__media { aspect-ratio: 3 / 2; }
}

/* ---------- End ---------- */
.section--end {
  text-align: left;
  padding-top: clamp(100px, 14vw, 180px);
  padding-bottom: clamp(100px, 14vw, 180px);
}

.end__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 18px 0 20px;
  max-width: 18ch;
}
.end__title em { font-style: italic; color: var(--ink-2); }

.end__lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 36px;
}

.end__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Foot ---------- */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* ---------- Leaflet polish ---------- */
.leaflet-container {
  background: #f3f3f1 !important;
  font-family: var(--font-sans) !important;
}

.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85) !important;
  font-size: 10.5px !important;
  color: var(--ink-3) !important;
}

.leaflet-control-zoom a {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--rule) !important;
  color: var(--ink-1) !important;
  font-weight: 400 !important;
}

.leaflet-control-zoom a:hover {
  background: var(--ink) !important;
  color: #fff !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: var(--shadow-soft) !important;
  padding: 4px 6px !important;
}

.leaflet-popup-content {
  margin: 12px 16px !important;
  font-family: var(--font-sans);
}

.map-popup h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.map-popup p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
}
