/* Fonts supplied by the Webflow export. */
@font-face {
  font-family: "Inter";
  src: url("./59-north.webflow/fonts/Inter-VariableFont_opszwght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Futura PT Heading";
  src: url("./59-north.webflow/fonts/FuturaStd-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
:root { font-family: "Inter", sans-serif; font-weight: 200; color: #172f40; background: #e3edf2; }
* { box-sizing: border-box; }
/* Typography reference: 59-north.webflow.css. Keep map-specific sizing. */
body { margin: 0; line-height: 1.5; }
#map { position: fixed; inset: 0; }
.masthead { position: absolute; top: 24px; left: 24px; display: flex; gap: 24px; align-items: center; padding: 18px 24px; background: #fff; border: 1px solid #dbe3e7; box-shadow: 0 4px 24px #12304312; border-radius: 4px; pointer-events: none; }
.brand { font-size: 21px; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.brand span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .3em; margin-top: 3px; }
.heading { border-left: 1px solid #dbe3e7; padding-left: 24px; }
h1 { margin: 0 0 5px; font-size: 17px; font-weight: 600; }
.heading > span { font-size: 12px; color: #586e7c; }
.passage-controls { position: absolute; top: 124px; left: 24px; display: flex; gap: 8px; max-width: calc(100% - 48px); }
button { font: inherit; cursor: pointer; }
.passage-controls button { min-height: 42px; padding: 10px 14px; background: white; border: 1px solid #c6d4dc; border-radius: 4px; font-size: 14px; color: #172f40; white-space: nowrap; }
button:hover { background: #eff5f8; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #e8a22a; outline-offset: 3px; }
.map-note { position: absolute; left: 24px; bottom: 40px; padding: 10px 13px; background: #ffffffed; border-radius: 3px; font-size: 12px; letter-spacing: .06em; }
.map-note span { display: block; margin-top: 5px; letter-spacing: 0; color: #586e7c; }
#status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 40px)); padding: 24px; border-radius: 6px; background: white; box-shadow: 0 8px 40px #172f4020; font-size: 16px; line-height: 1.6; }
[hidden] { display: none !important; }
.mapboxgl-popup-content { padding: 24px; border-radius: 6px; font-family: "Inter", sans-serif; font-weight: 200; color: #172f40; box-shadow: 0 8px 32px #172f4026; max-height: 70dvh; overflow-y: auto; }
.mapboxgl-popup-close-button { width: 32px; height: 32px; font-size: 22px; }
.popup-kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; color: #586e7c; }
h2 { margin: 0 0 20px; font-size: 21px; line-height: 1.25; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; line-height: 1.5; }
dt { color: #586e7c; } dd { margin: 0; font-weight: 200; }
.passage-link { display: block; margin-top: 20px; padding: 12px 16px; border-radius: 3px; background: #173e55; color: white; text-align: center; text-decoration: none; font-size: 14px; font-weight: 600; }
.passage-link:hover { background: #1769a0; }
.mapboxgl-ctrl-bottom-right { bottom: 28px; right: 12px; }
noscript { position: absolute; top: 45%; left: 10%; background: white; padding: 24px; }
@media (max-width: 639px) {
  .masthead { top: 12px; left: 12px; right: 12px; padding: 14px; gap: 14px; }
  .brand { font-size: 18px; } .heading { padding-left: 14px; }
  .heading > span { font-size: 12px; } h1 { font-size: 16px; }
  .passage-controls { top: 109px; left: 12px; max-width: calc(100% - 24px); }
  .map-note { left: 12px; bottom: 38px; max-width: calc(100% - 75px); }
}

/* Match the supplied Webflow heading face: Futura ExtraBold. */
.mapboxgl-popup-content h2 { font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-synthesis: none; }
.mapboxgl-popup-content .passage-link { font-weight: 200; }

/* Webflow heading/utility hierarchy across all HTML overlays. */
.brand, .brand span, h1,
.passage-controls button, .popup-kicker, .map-note,
.mapboxgl-popup-content .passage-link {
  font-family: "Futura PT Heading", sans-serif;
  font-weight: 800;
  font-synthesis: none;
}
.heading > span, .map-note span, #status, dl {
  font-family: "Inter", sans-serif;
  font-weight: 200;
  line-height: 1.5;
}

/* Compact Webflow-inspired map controls; no passage list. */
/* Futura is always uppercase; retain normal casing for Inter body copy. */
.brand, .brand span, h1, .mapboxgl-popup-content h2,
.passage-controls button, .map-controls button, .popup-kicker, .map-note,
.mapboxgl-popup-content .passage-link { text-transform: uppercase; }
.heading > span, .map-note span, #status, dl { text-transform: none; }
.map-controls { position: absolute; top: 16px; left: 16px; width: min(390px, calc(100% - 32px)); padding: 12px 16px; background: #fffffff2; border: 1px solid #0c0a091a; border-radius: 12px; color: #0c0a09; max-height: 40dvh; overflow-y: auto; }
.control-heading { display: flex; align-items: center; gap: 12px; }
.control-heading img { flex: none; }
.control-heading h1 { font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-size: 24px; margin: 0; }
.map-controls button { min-height: 36px; border: 1px solid transparent; border-radius: 999px; padding: 6px 10px; font-family: "Futura PT Heading", sans-serif; font-size: 13px; font-weight: 800; background: transparent; color: inherit; }
#fit-route { margin-left: auto; white-space: nowrap; }
#filters fieldset { border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
#filters legend { font-family: "Inter", sans-serif; font-weight: 200; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 3px; }
.filter-options button { flex: 0 1 auto; max-width: 100%; overflow-wrap: anywhere; }
.map-controls button:hover { background: #dae3e8; }
.map-controls button[aria-pressed="true"] { background: #0c0a09; color: #fff; }
#filter-empty { font-size: 14px; font-weight: 200; margin: 10px 0 0; }
@media (max-width: 639px) { .map-controls { top: 12px; left: 12px; width: calc(100% - 24px); } .control-heading img { width: 40px; height: 40px; } }

/* Passage cards: Webflow neutral palette and uppercase Futura. */
.passage-popup { width: min(360px, calc(100vw - 32px)); }
.passage-popup .mapboxgl-popup-content { padding: 0; border-radius: 12px; color: #0c0a09; background: #fff; box-shadow: 0 8px 32px #0c0a0926; max-height: 72dvh; overflow-y: auto; overscroll-behavior: contain; }
.passage-popup .mapboxgl-popup-close-button { z-index: 2; top: 6px; right: 5px; width: 44px; height: 44px; border-radius: 50%; color: #0c0a09; font: 800 24px/1 "Futura PT Heading", sans-serif; }
.passage-card { border-top: 4px solid var(--passage-color); padding: 22px 22px 20px; overflow-wrap: anywhere; }
.passage-card h2 { padding-right: 27px; margin: 0 0 12px; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
.passage-card-route { margin: 0 0 18px; font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-synthesis: none; text-transform: uppercase; font-size: 14px; line-height: 1.5; }
.passage-card dl { margin: 0; font-size: 13px; gap: 0; }
/* Keep field names available to screen readers, without visual labels. */
.passage-card dt { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.passage-card dd { color: #0c0a09; margin: 0; }
.passage-card-details { display: block; }
.passage-card-details .passage-card-field { margin: 6px 0; }
.passage-card, .passage-card dl, .passage-card dd { font-family: "Futura PT Heading", sans-serif; font-weight: 800; font-synthesis: none; text-transform: uppercase; }
.passage-card-summary { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #dae3e8; font-size: 13px; line-height: 1.6; }
.passage-card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 20px; }
.passage-card-bunks { display: flex; align-items: center; justify-content: center; margin: 0 0 0 auto; max-width: 50%; padding: 6px 10px; min-height: 36px; border: 1px solid transparent; border-radius: 999px; background: var(--passage-color); color: #fff; text-align: center; font-size: 13px; line-height: 1.5; }
.passage-card-patches { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; padding-left: 16px; min-width: 64px; margin: 0; }
.passage-card-patch { display: block; flex: none; width: 64px; height: 64px; margin-left: -16px; object-fit: contain; }
.passage-card .passage-link { margin-top: 18px; padding: 14px 12px; min-height: 48px; border-radius: 6px; background: #0c0a09; color: #fff; font-size: 13px; line-height: 20px; transition: opacity .2s; }
.passage-card .passage-link:hover { background: #0c0a09; opacity: .7; }
@media (max-width: 639px) {
  /* Reuse the anchored popup component, pin its presentation to the map bottom. */
  body:has(.passage-popup) .map-note { visibility: hidden; }
  .passage-popup { transform: none !important; top: auto !important; bottom: 0; left: 0 !important; right: 0; width: 100%; max-width: none !important; z-index: 3; }
  .passage-popup .mapboxgl-popup-tip { display: none; }
  .passage-popup .mapboxgl-popup-content { width: 100%; max-height: 62dvh; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 30px #0c0a0926; }
  .passage-card { padding: 20px 24px max(20px, env(safe-area-inset-bottom)); }
  .passage-card h2 { font-size: 21px; }
  .passage-card dl, .passage-card-route { font-size: 14px; }
  .passage-card dt { font-size: 12px; }
}


@font-face {
  font-family: "Futura PT Heading";
  src: url("./59-north.webflow/fonts/FuturaStd-ExtraBoldOblique.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Caligraf Port";
  src: url("./59-north.webflow/fonts/Caligraf-1435.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.port-popup .mapboxgl-popup-content .port-popup-title {
  font-family: "Caligraf Port", cursive;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.3;
  text-transform: none;
  margin: 0 20px 14px 0;
}
.port-popup-about { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* Shared light parchment for port stories and the map notice. */
.port-popup .mapboxgl-popup-content, .map-note, #status.is-loading, .map-controls {
  padding: 28px;
  color: #493622;
  border: 1px solid #b99b66;
  border-radius: 5px 12px 6px 10px;
  background-color: #f8edd5;
  background-image:
    radial-gradient(ellipse at 5% 0%, #9b6b3018, transparent 55%),
    radial-gradient(ellipse at 100% 100%, #90622920, transparent 55%),
    repeating-linear-gradient(15deg, #ffffff08 0 1px, #86622b06 1px 3px);
  box-shadow: inset 0 0 28px #94652b18, 0 8px 28px #30201340;
}
.port-popup .mapboxgl-popup-content .port-popup-title {
  font-size: 42px;
  color: #493622;
  padding-bottom: 16px;
  border-bottom: 1px solid #96723d70;
}
.port-popup-about { font-weight: 400; line-height: 1.75; }
.port-popup .mapboxgl-popup-close-button { color: #493622; }
.port-popup.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip { border-top-color: #f1e3c6; }
.port-popup.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.port-popup.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip { border-bottom-color: #f1e3c6; }
.port-popup.mapboxgl-popup-anchor-left .mapboxgl-popup-tip { border-right-color: #f1e3c6; }
.port-popup.mapboxgl-popup-anchor-right .mapboxgl-popup-tip { border-left-color: #f1e3c6; }

/* Keep filter group names available to screen readers without visible headings. */
#filters legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.map-controls button.boat-filter:hover {
  background: color-mix(in srgb, var(--boat-color) 25%, transparent);
  color: #0c0a09;
}

.map-patch-logo {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 104px;
  height: 104px;
  object-fit: contain;
  pointer-events: none;
}
.map-controls #fit-route { background: rgba(130, 140, 148, .16); color: #647079; }
.map-controls #fit-route:hover { background: rgba(130, 140, 148, .28); }
@media (max-width: 940px) {
  .map-controls { top: 132px; }
}

.map-note {
  padding: 14px 18px;
  font-family: "Caligraf Port", cursive;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}
.map-note span {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #493622;
  margin-top: 8px;
}

#status.is-loading {
  font-family: "Caligraf Port", cursive;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  font-size: 32px;
  line-height: 1.3;
  text-transform: none;
  color: #000000;
  text-align: center;
}

.map-controls { padding: 12px 16px; }
.control-heading { flex-wrap: wrap; }
.control-heading h1 {
  font-family: "Caligraf Port", cursive;
  font-weight: 400;
  font-size: 54px;
  line-height: 1.2;
  text-transform: none;
}

/* Layered singed edges and an irregular paper silhouette, without clipping controls. */
.port-popup .mapboxgl-popup-content, .map-note, #status.is-loading, .map-controls {
  border: 1px solid #987345;
  border-radius: 3px 9px 4px 7px;
  background-image:
    radial-gradient(ellipse at 0% 12%, #70451c48, transparent 12%),
    radial-gradient(ellipse at 100% 82%, #70451c40, transparent 14%),
    radial-gradient(ellipse at 22% 100%, #84532730, transparent 16%),
    radial-gradient(ellipse at 76% 0%, #84532730, transparent 15%),
    repeating-linear-gradient(15deg, #ffffff08 0 1px, #86622b06 1px 3px);
  box-shadow: inset 0 0 5px 2px #70451c70, inset 0 0 18px #94652b30, 0 8px 24px #30201330;
  /* Small notches stay inside the padding, away from text and click targets. */
  clip-path: polygon(0% 2%, 5% 1%, 11% 2%, 17% 0%, 25% 1%, 34% 0%,
    43% 1%, 52% 0%, 61% 1%, 70% 0%, 81% 1%, 90% 0%, 99% 1%,
    100% 13%, 99% 25%, 100% 37%, 99% 49%, 100% 62%, 99% 75%,
    100% 88%, 99% 99%, 90% 100%, 80% 99%, 70% 100%, 61% 99%,
    51% 100%, 41% 99%, 31% 100%, 21% 99%, 11% 100%, 1% 99%,
    0% 88%, 1% 76%, 0% 64%, 1% 52%, 0% 40%, 1% 28%, 0% 16%);
}
@media (min-width: 941px) {
  .map-controls { width: min(510px, calc(50vw - 76px)); }
  .map-controls .filter-options { gap: 2px; }
  .map-controls .filter-options button { padding-inline: 8px; }
}

@media (max-width: 639px) {
  body:has(.port-popup) .map-note { visibility: hidden; }
  .port-popup {
    transform: none !important;
    top: auto !important;
    bottom: 0;
    left: 0 !important;
    right: 0;
    width: 100%;
    max-width: none !important;
    z-index: 3;
  }
  .port-popup .mapboxgl-popup-tip { display: none; }
  .port-popup .mapboxgl-popup-content {
    width: 100%;
    max-height: 62dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 24px max(24px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    /* Keep the sheet's close button and scrollable text clear of paper notches. */
    clip-path: none;
  }
  .port-popup .mapboxgl-popup-close-button {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    font-size: 26px;
    z-index: 2;
  }
  .port-popup .mapboxgl-popup-content .port-popup-title {
    margin-right: 28px;
    overflow-wrap: anywhere;
  }
}

/* Simplified mobile map: retain the map, logo, navigation and interactive popups. */
@media (max-width: 639px) {
  .map-controls, .map-note { display: none; }
}
