@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@700;800;900&family=Roboto+Slab:wght@700;900&display=swap");

:root {
  --paper: #f0ecdf;
  --paper-light: #faf7ee;
  --ink: #191c18;
  --spruce: #28483a;
  --spruce-soft: #dce4dc;
  --signal: #c95432;
  --line: #b6b0a1;
  --muted: #5f625a;
  --success: #2d654c;
  --warning: #a34d2f;
  --page: min(1260px, calc(100% - 96px));
  --step: 8px;
  --font-sans: "Golos Text", Arial, sans-serif;
  --font-serif: "Roboto Slab", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.45;
}

body::before,
body::after {
  position: fixed;
  z-index: 45;
  pointer-events: none;
}

body::before {
  content: "";
  top: 69px;
  bottom: 0;
  left: 0;
  width: 36px;
  border-right: 1px solid var(--line);
  background: var(--paper);
  box-shadow: inset 0 32px 0 var(--signal);
}

body::after {
  content: "09 · " attr(data-page-code) " · АРХЫЗ";
  top: 116px;
  left: 12px;
  color: var(--signal);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input,
textarea {
  color: inherit;
  font: inherit;
  font-weight: 700;
}

button,
select,
a {
  min-height: 44px;
}

button {
  cursor: pointer;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  min-height: 64px;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.edition {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-left: 20px;
  padding-top: 4px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  background: var(--spruce);
  opacity: 0;
}

.main-nav a[aria-current="page"]::after {
  opacity: 1;
}

.main-nav a:hover {
  color: var(--spruce);
}

.header-action,
.button,
.row-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--signal);
  border-radius: 0;
  background: var(--signal);
  color: #fff9ed;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition: background 140ms ease, color 140ms ease, transform 100ms ease;
}

.header-action:hover,
.button:hover,
.row-action:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.header-action:active,
.button:active,
.row-action:active {
  transform: scale(0.98);
}

.button--quiet {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.button--quiet:hover {
  color: var(--paper-light);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 20px;
}

main {
  min-height: 70vh;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  margin-bottom: 20px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 24px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}

.lede {
  max-width: 58ch;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr);
  gap: 56px;
  align-items: end;
  padding: 56px 0 30px;
  border-bottom: 1px solid var(--ink);
}

.page-intro h1 {
  max-width: 920px;
  margin-bottom: 0;
}

.intro-aside {
  padding-left: 20px;
  border-left: 2px solid var(--signal);
  font-size: 13px;
}

.intro-aside p:last-child {
  margin-bottom: 0;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(380px, 1.12fr);
  min-height: 480px;
  border-bottom: 1px solid var(--ink);
}

.home-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px 56px 40px 0;
}

.home-hero__copy h1 {
  max-width: 720px;
}

.home-hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.home-hero__bottom p {
  max-width: 36ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.home-hero__image {
  position: relative;
  min-height: 480px;
  border-left: 1px solid var(--ink);
  overflow: hidden;
}

.home-hero__image.is-placeholder {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(20, 76, 55, 0.13) 22px 24px),
    var(--paper-light);
  padding: 28px;
  color: var(--spruce);
  text-transform: uppercase;
}

.home-hero__image.is-placeholder img {
  display: none;
}

.home-hero__image.is-placeholder span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.home-hero__image.is-placeholder strong {
  font-size: clamp(112px, 16vw, 230px);
  font-weight: 950;
  line-height: 0.7;
  letter-spacing: -0.09em;
}

.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.text-link:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.working-list {
  border-top: 1px solid var(--ink);
}

.working-row {
  display: grid;
  grid-template-columns: 86px minmax(240px, 1.4fr) minmax(140px, 0.58fr) minmax(140px, 0.55fr) 104px;
  gap: 20px;
  align-items: center;
  min-height: 84px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.date-block {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.date-block strong {
  display: block;
  width: 2ch;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  text-align: left;
}

.date-block span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trip-summary {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.trip-summary:has(> .trip-copy:only-child) {
  grid-template-columns: 1fr;
}

.trip-thumb {
  display: block;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--spruce-soft);
  object-fit: cover;
}

.trip-thumb-link {
  display: block;
  width: 32px;
  height: 32px;
  min-height: 32px;
  overflow: hidden;
}

.trip-thumb-link:hover .trip-thumb {
  border-color: var(--signal);
}

.trip-thumb--sofia { object-position: 68% 48%; }
.trip-thumb--orlenok { object-position: 70% 60%; }
.trip-thumb--dukka { object-position: 52% 58%; }
.trip-thumb--aimatly { object-position: 50% 66%; }
.trip-thumb--belkau { object-position: 50% 58%; }
.trip-thumb--zakan { object-position: 70% 54%; }
.trip-thumb--semicolor { object-position: 34% 56%; }

.trip-copy {
  min-width: 0;
}

.trip-title {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 900;
}

.trip-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.trip-status {
  display: grid;
  gap: 7px;
}

.status-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 900;
}

.status-mark {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  background: transparent;
}

.status-mark--open {
  color: var(--success);
  background: var(--success);
}

.status-mark--soon {
  color: var(--signal);
  background: var(--signal);
}

.status-mark--full {
  color: var(--ink);
  background: var(--ink);
}

.status-mark--flex {
  border-style: dashed;
  color: var(--spruce);
}

.trip-facts {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.trip-facts strong {
  font-size: 16px;
  font-weight: 900;
}

.row-action {
  justify-self: end;
  padding-inline: 13px;
}

.schedule-inline-note {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.schedule-inline-note--page {
  margin: 28px 0 72px;
  border-top: 1px solid var(--ink);
}

.text-button {
  min-height: 40px;
  flex: 0 0 auto;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 900;
}

.text-button:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.route-ledger {
  border-top: 2px solid var(--ink);
}

.route-ledger__row {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1.1fr) minmax(220px, 1fr) minmax(180px, 0.75fr) 44px;
  gap: 22px;
  align-items: center;
  min-height: 90px;
  border-bottom: 1px solid var(--line);
}

.route-ledger__index {
  color: var(--signal);
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
}

.route-ledger__row h3,
.route-ledger__row p {
  margin: 0;
}

.route-ledger__row p {
  color: var(--muted);
  font-size: 12px;
}

.date-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--ink);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.route-ledger__arrow {
  display: grid;
  place-items: center;
  min-height: 44px;
  font-size: 22px;
}

.route-ledger__row:hover .route-ledger__arrow {
  color: var(--signal);
}

.mini-gallery {
  columns: 3;
  column-gap: 8px;
}

.mini-gallery figure,
.contact-sheet figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--spruce-soft);
}

.mini-gallery figure {
  display: inline-block;
  width: 100%;
  margin-bottom: 8px;
  break-inside: avoid;
  vertical-align: top;
}

.mini-gallery figure img,
.mini-gallery figure video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.published-media-empty {
  column-span: all;
  display: block;
  width: 100%;
  margin: 0;
  padding: 24px 0;
  color: var(--muted);
  font-size: 13px;
}

.public-data-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.media-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  padding: 6px 8px;
  background: var(--paper-light);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  opacity: 0;
  pointer-events: none;
  text-overflow: ellipsis;
  text-transform: uppercase;
  transform: translateY(6px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  white-space: nowrap;
}

.mini-gallery figure:hover .media-label,
.mini-gallery figure:focus-within .media-label,
.contact-sheet figure:hover .media-label,
.contact-sheet figure:focus-within .media-label,
.direction-gallery figure:hover .media-label,
.direction-gallery figure:focus-within .media-label {
  opacity: 1;
  transform: translateY(0);
}

.video-label::before {
  content: "▶";
  margin-right: 6px;
  color: var(--signal);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.filter-field {
  position: relative;
  display: grid;
  min-width: 190px;
  gap: 5px;
}

.filter-field::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 14px;
  height: 14px;
  background: var(--ink);
  clip-path: polygon(0 15%, 50% 65%, 100% 15%, 100% 35%, 50% 85%, 0 35%);
  pointer-events: none;
  transform: scaleY(1);
  transform-origin: 50% 50%;
  transition: transform 160ms ease-out, background-color 140ms ease-out;
}

.filter-field:hover::after,
.filter-field:focus-within::after {
  background: var(--signal);
}

.filter-field:has(select:open)::after {
  transform: scaleY(-1);
}

.filter-field label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-field select {
  appearance: none;
  min-height: 46px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper-light);
  padding: 0 48px 0 12px;
  font-size: 13px;
}

.filter-field select:focus,
.filter-field select:focus-visible {
  outline: none;
  outline-offset: 0;
}

.filter-field:focus-within label {
  color: var(--signal);
}

.filter-reset {
  align-self: end;
  min-height: 46px;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 900;
}

.filter-reset:hover {
  background: var(--ink);
  color: var(--paper-light);
}

.result-count {
  align-self: end;
  margin: 0 0 12px auto;
  color: var(--muted);
  font-size: 12px;
}

.week {
  margin-top: 48px;
}

.week[hidden],
.working-row[hidden] {
  display: none;
}

.week-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.week-title h2 {
  margin: 0;
  font-size: 28px;
}

.week-title span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.route-archive {
  padding: 40px 0 72px;
}

.route-entry {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(340px, 1fr) minmax(300px, 0.85fr);
  gap: 28px;
  min-height: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--ink);
}

.route-entry:first-child {
  border-top: 1px solid var(--ink);
}

.route-entry:nth-child(even),
.route-entry:nth-child(3) {
  grid-template-columns: 60px minmax(340px, 1fr) minmax(300px, 0.85fr);
}

.route-entry:nth-child(even) .route-entry__content {
  order: initial;
}

.route-entry:nth-child(even) .route-entry__media {
  order: initial;
}

.route-entry__number {
  padding-top: 4px;
  color: var(--signal);
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 900;
}

.route-entry__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.route-entry__content h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 3vw, 38px);
}

.route-entry__content h2 a {
  transition: color 160ms ease-out;
}

.route-entry__content h2 a:hover,
.route-entry__content h2 a:focus-visible {
  color: var(--signal);
}

.route-entry__content > div > p {
  max-width: 45ch;
  color: var(--muted);
  font-size: 13px;
}

.route-entry__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 28px 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}

.route-entry__facts span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.route-entry__facts strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-transform: none;
}

.route-more {
  position: absolute;
  right: 14px;
  bottom: 42px;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--ink);
  background: rgba(244, 241, 230, 0.94);
  padding: 0 14px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 160ms ease-out, color 160ms ease-out;
}

.route-more span {
  font-size: 16px;
  transition: transform 160ms ease-out;
}

.route-more:hover,
.route-more:focus-visible {
  background: var(--ink);
  color: var(--paper-light);
}

.route-more:hover span,
.route-more:focus-visible span {
  transform: translateX(3px);
}

.route-entry__media {
  min-height: 0;
  aspect-ratio: 4 / 3;
  align-self: center;
  border-left: 5px solid var(--spruce);
}

.route-entry__media-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.route-entry__media-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 200ms ease-out;
}

.route-entry__media-link:hover img,
.route-entry__media-link:focus-visible img {
  transform: scale(1.025);
}

.route-entry__media--no-photo {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(20, 76, 55, 0.12) 18px 20px),
    var(--paper-light);
  padding: 18px;
  color: var(--spruce);
  text-transform: uppercase;
}

.route-entry__media--no-photo span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.route-entry__media--no-photo strong {
  font-size: clamp(72px, 11vw, 156px);
  font-weight: 950;
  line-height: 0.72;
  letter-spacing: -0.08em;
}

.route-entry:nth-child(2) .route-entry__media {
  min-height: 0;
  margin-right: 0;
}

.route-entry:nth-child(3) {
  grid-template-columns: 60px minmax(340px, 1fr) minmax(300px, 0.85fr);
}

.route-entry:nth-child(3) .route-entry__media {
  min-height: 0;
  align-self: center;
}

.route-entry:nth-child(4) .route-entry__media {
  border-left: 5px solid var(--spruce);
  border-bottom: 0;
}

.route-date-list {
  display: grid;
  gap: 8px;
}

.route-date-list button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 8px 12px;
  text-align: left;
  font-size: 12px;
}

.route-date-list button:hover {
  background: var(--spruce);
  color: var(--paper-light);
}

.route-no-dates {
  display: block;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.direction-back-wrap {
  padding-top: 22px;
}

.direction-back {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.direction-back:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.direction-hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
  min-height: 560px;
  margin-top: 18px;
  border-block: 2px solid var(--ink);
}

.direction-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px 48px 42px 0;
}

.direction-hero__copy h1 {
  max-width: 10ch;
  margin: 10px 0 0;
  font-size: clamp(48px, 6vw, 86px);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.direction-hero__bottom {
  display: grid;
  max-width: 460px;
  gap: 22px;
}

.direction-hero__bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.direction-hero__bottom .button {
  justify-self: start;
}

.direction-hero__media {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-left: 2px solid var(--ink);
  background: var(--spruce-soft);
}

.direction-hero__media.is-placeholder {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(20, 76, 55, 0.13) 22px 24px),
    var(--paper-light);
  padding: 28px;
  color: var(--spruce);
  text-transform: uppercase;
}

.direction-hero__media.is-placeholder span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.direction-hero__media.is-placeholder strong {
  font-size: clamp(112px, 16vw, 230px);
  font-weight: 950;
  line-height: 0.7;
  letter-spacing: -0.09em;
}

.direction-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-bottom: 2px solid var(--ink);
}

.direction-facts div {
  min-height: 104px;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.direction-facts div:first-child {
  padding-left: 0;
}

.direction-facts div:last-child {
  border-right: 0;
}

.direction-facts span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.direction-facts strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.1;
}

.direction-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 64px;
  padding: 76px 0;
  border-bottom: 1px solid var(--ink);
}

.direction-story {
  display: grid;
  gap: 64px;
}

.direction-copy-block h2,
.packing-card h2 {
  margin: 5px 0 24px;
  font-size: clamp(30px, 4vw, 50px);
}

.direction-copy-block [data-direction-about] {
  max-width: 62ch;
}

.direction-copy-block [data-direction-about] p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.65;
}

.direction-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.direction-timeline li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: baseline;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.direction-timeline li:last-child {
  border-bottom: 1px solid var(--line);
}

.direction-timeline span {
  color: var(--signal);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
}

.direction-timeline p {
  margin: 0;
  font-size: 15px;
}

.packing-card {
  align-self: start;
  border: 2px solid var(--ink);
  background: var(--paper-light);
  padding: 28px;
}

.packing-card h2 {
  font-size: 34px;
}

.packing-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.packing-list li {
  position: relative;
  padding: 13px 0 13px 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.packing-list li::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 1px;
  width: 9px;
  height: 9px;
  background: var(--spruce);
}

.packing-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.packing-subtitle {
  margin: 30px 0 12px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.direction-gallery-section,
.direction-dates-section {
  padding: 72px 0;
  border-bottom: 1px solid var(--ink);
}

.direction-gallery {
  display: block;
  columns: 3 280px;
  column-gap: 8px;
}

.direction-gallery figure {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 8px;
  break-inside: avoid;
  overflow: hidden;
  background: var(--spruce-soft);
  content-visibility: auto;
}

.direction-gallery figure img,
.direction-gallery figure video {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

.direction-gallery-more {
  margin-top: 24px;
}

.direction-date-list {
  border-top: 2px solid var(--ink);
}

.direction-date-list article {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 0.35fr) auto;
  align-items: center;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.direction-date-list article > div {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.direction-date-list article > div strong {
  font-family: var(--font-serif);
  font-size: 26px;
}

.direction-date-list article > div span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.direction-date-list article > b {
  font-size: 18px;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 0;
}

.gallery-filter {
  min-height: 44px;
  border: 1px solid var(--ink);
  background: transparent;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 900;
}

.gallery-filter:hover,
.gallery-filter.is-active {
  background: var(--spruce);
  color: var(--paper-light);
}

.contact-sheet {
  display: block;
  columns: 4 220px;
  column-gap: 8px;
  padding-bottom: 48px;
}

.contact-sheet figure {
  display: inline-block;
  width: 100%;
  min-height: 0;
  margin: 0 0 8px;
  break-inside: avoid;
}

.contact-sheet figure:nth-child(n) {
  grid-column: auto;
  grid-row: auto;
}

.contact-sheet figure img,
.contact-sheet figure video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}

.contact-sheet figure[hidden] {
  display: none;
}

.media-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.show-more-wrap {
  display: flex;
  justify-content: center;
  padding: 0 0 64px;
}

.empty-state {
  display: none;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: flex;
}

.contact-toggle {
  align-self: flex-start;
  min-height: 44px;
  text-align: left;
}

.form-field > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.form-field input[aria-invalid="true"] {
  border-color: #a33722;
}

.site-footer {
  background: var(--ink);
  color: var(--paper-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 48px;
  padding: 52px 0;
}

.footer-grid h2 {
  font-size: 32px;
}

.footer-grid p,
.footer-grid a {
  font-size: 12px;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 7px;
}

.footer-links a {
  display: flex;
  align-items: center;
}

.footer-links a:hover {
  color: #ff9d7f;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid #50534d;
  color: #c9c7bf;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

dialog {
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(23, 26, 23, 0.62);
}

.join-dialog {
  width: min(560px, 100%);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0 0 0 auto;
}

.dialog-panel {
  min-height: 100%;
  overflow-y: auto;
  border-left: 2px solid var(--ink);
  background: var(--paper-light);
  padding: 34px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}

.dialog-head h2 {
  margin: 6px 0 0;
  font-size: 34px;
}

.dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 22px;
}

.dialog-close:hover {
  background: var(--ink);
  color: var(--paper-light);
}

.join-form {
  display: grid;
  gap: 20px;
  padding-top: 24px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-card {
  position: relative;
  display: block;
  min-height: 110px;
  border: 1px solid var(--ink);
  padding: 16px;
}

.choice-card input {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  accent-color: var(--signal);
}

.choice-card strong {
  display: block;
  margin: 30px 0 3px;
  font-weight: 900;
}

.choice-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.choice-card:has(input:checked) {
  border: 3px solid var(--signal);
  padding: 14px;
  background: #f5dfd5;
}

.choice-card.is-disabled {
  border-color: var(--line);
  color: var(--muted);
  background: rgba(23, 26, 23, 0.035);
  cursor: not-allowed;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field label,
.form-field legend {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  padding: 11px 12px;
  font-size: 14px;
}

.form-field textarea {
  min-height: 92px;
  resize: vertical;
}

.flex-fields[hidden] {
  display: none;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.consent-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.consent-choice input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--signal);
}

.consent-choice a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-error {
  margin: 0;
  border-left: 4px solid var(--signal);
  background: #f5dfd5;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.form-success {
  display: none;
  padding: 20px;
  border: 2px solid var(--spruce);
  background: var(--spruce-soft);
}

.form-success.is-visible {
  display: grid;
  gap: 12px;
}

.form-success h3 {
  margin: 0;
  font-family: var(--font-serif);
}

.form-success p {
  margin: 0;
  line-height: 1.5;
}

.media-dialog {
  width: min(1040px, calc(100% - 32px));
  max-width: none;
}

.media-dialog__panel {
  position: relative;
  background: var(--ink);
  color: var(--paper-light);
}

.media-dialog__panel img,
.media-dialog__panel video {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: var(--ink);
}

.media-dialog__panel [hidden] { display: none; }

.media-dialog__panel p {
  margin: 0;
  padding: 14px 112px 14px 18px;
  font-size: 12px;
}

.media-nav {
  position: absolute;
  top: 50%;
  right: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
}

.media-nav[hidden] {
  display: none;
}

.media-nav button {
  display: grid;
  width: 48px;
  min-height: 48px;
  place-items: center;
  border: 1px solid var(--paper-light);
  background: rgba(18, 18, 16, 0.82);
  color: var(--paper-light);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  pointer-events: auto;
}

.media-nav button:hover,
.media-nav button:focus-visible {
  background: var(--paper-light);
  color: var(--ink);
}

.media-counter {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: var(--paper-light);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.media-dialog .dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border-color: var(--paper-light);
  background: var(--ink);
  color: var(--paper-light);
}

@media (max-width: 1080px) {
  :root { --page: min(100% - 32px, 960px); }

  body::before,
  body::after { display: none; }

  .edition { display: none; }
  .masthead { grid-template-columns: auto 1fr auto; gap: 16px; }
  .home-hero { grid-template-columns: 1fr 1fr; }
  .home-hero__copy { padding-right: 32px; }
  .working-row {
    grid-template-columns: 94px minmax(220px, 1.4fr) minmax(140px, 0.7fr) minmax(120px, 0.55fr);
  }
  .working-row .row-action { grid-column: 2 / -1; justify-self: start; }
  .route-entry,
  .route-entry:nth-child(even),
  .route-entry:nth-child(3) {
    grid-template-columns: 60px minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  }

  .direction-hero { grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr); }
  .direction-hero__copy { padding-right: 32px; }
  .direction-main { gap: 40px; }
}

@media (max-width: 820px) {
  :root { --page: calc(100% - 28px); }

  .masthead { min-height: 62px; }
  .menu-toggle { display: inline-flex; justify-self: end; }
  .header-action { display: none; }
  .main-nav {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    display: none;
    border-bottom: 2px solid var(--ink);
    background: var(--paper-light);
    padding: 8px 14px 14px;
  }
  .main-nav.is-open { display: grid; }
  .main-nav a { border: 0; border-bottom: 1px solid var(--line); padding: 0 6px; }
  .main-nav a::after { display: none; }

  .home-hero { grid-template-columns: 1fr; }
  .home-hero__copy {
    min-height: 0;
    justify-content: flex-start;
    gap: clamp(36px, 8vw, 56px);
    padding: 40px 0 28px;
  }
  .home-hero__image { min-height: 340px; border-left: 0; border-top: 2px solid var(--ink); }
  .page-intro { grid-template-columns: 1fr; gap: 28px; padding-top: 54px; }
  .section { padding: 58px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 14px; }

  .working-row {
    grid-template-columns: 80px 1fr auto;
    gap: 14px;
    min-height: 0;
    padding: 20px 0;
  }
  .trip-status { grid-column: 2 / 3; }
  .trip-facts { grid-column: 3; grid-row: 1 / 3; }
  .working-row .row-action { grid-column: 2 / -1; }
  .route-ledger__row {
    grid-template-columns: 36px 1fr 44px;
    gap: 12px;
    padding: 16px 0;
  }
  .route-ledger__row > p,
  .route-ledger__row > .date-pair { grid-column: 2 / 3; }
  .route-ledger__arrow { grid-column: 3; grid-row: 1; }

  .route-entry,
  .route-entry:nth-child(even),
  .route-entry:nth-child(3) {
    grid-template-columns: 50px 1fr;
    min-height: 0;
  }
  .route-entry__content,
  .route-entry:nth-child(even) .route-entry__content { order: 2; }
  .route-entry__media,
  .route-entry:nth-child(even) .route-entry__media,
  .route-entry:nth-child(3) .route-entry__media {
    grid-column: 1 / -1;
    order: 3;
    min-height: 0;
    margin: 0;
  }

  .direction-back-wrap { padding-top: 16px; }
  .direction-hero { grid-template-columns: 1fr; min-height: 0; }
  .direction-hero__copy { min-height: 440px; padding: 44px 0 32px; }
  .direction-hero__media {
    min-height: 420px;
    border-top: 2px solid var(--ink);
    border-left: 0;
  }
  .direction-facts { grid-template-columns: repeat(2, 1fr); }
  .direction-facts div { border-bottom: 1px solid var(--line); }
  .direction-facts div:nth-child(even) { border-right: 0; }
  .direction-facts div:nth-child(odd) { padding-left: 0; }
  .direction-facts div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
    padding-left: 0;
  }
  .direction-main { grid-template-columns: 1fr; gap: 48px; padding: 58px 0; }
  .packing-card { max-width: 560px; }
  .direction-gallery { columns: 2; }
  .direction-gallery-section,
  .direction-dates-section { padding: 58px 0; }

  .mini-gallery { columns: 3; }
  .contact-sheet { columns: 3; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  :root { --page: calc(100% - 24px); }

  h1 { font-size: clamp(36px, 13vw, 54px); }
  h2 { font-size: 30px; }
  .home-hero__copy { min-height: 0; gap: 30px; padding: 30px 0 22px; }
  .home-hero__bottom { align-items: flex-start; flex-direction: column; gap: 16px; }
  .home-hero__image { min-height: 250px; }

  .working-row {
    grid-template-columns: 72px 1fr;
  }
  .trip-status,
  .working-row .row-action { grid-column: 2; }
  .trip-facts { grid-column: 2; grid-row: auto; }
  .date-block { grid-template-columns: 1fr; align-items: start; gap: 2px; }
  .date-block strong { font-size: 36px; }

  .filters { display: grid; }
  .filter-field { min-width: 0; }
  .result-count { margin-left: 0; }
  .route-entry,
  .route-entry:nth-child(even),
  .route-entry:nth-child(3) { grid-template-columns: 42px 1fr; gap: 14px; }
  .route-entry__number { font-size: 32px; }
  .route-entry__media,
  .route-entry:nth-child(even) .route-entry__media,
  .route-entry:nth-child(3) .route-entry__media { min-height: 0; }
  .route-entry__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .route-entry__facts span { font-size: 8px; }
  .route-entry__facts strong { font-size: 12px; }

  .direction-hero__copy { min-height: 390px; }
  .direction-hero__copy h1 { font-size: clamp(42px, 14vw, 62px); }
  .direction-hero__media { min-height: 320px; }
  .direction-facts div { min-height: 88px; padding: 18px 10px; }
  .direction-facts strong { font-size: 18px; }
  .direction-main { padding: 48px 0; }
  .packing-card { padding: 22px 18px; }
  .direction-gallery { columns: 1; }
  .direction-date-list article { grid-template-columns: 1fr auto; gap: 12px; }
  .direction-date-list article > div { flex-direction: column; gap: 2px; }
  .direction-date-list article > b { grid-column: 2; grid-row: 1; }
  .direction-date-list .row-action { grid-column: 1 / -1; justify-self: start; }

  .mini-gallery { columns: 2; }
  .contact-sheet { columns: 2; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .choice-grid { grid-template-columns: 1fr; }
  .dialog-panel { padding: 22px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* Hidden fields must stay hidden when their layout uses display:grid. */
.join-form[hidden], .join-form [hidden] { display:none !important; }
.join-note { border-top:1px solid var(--line, #b9b5a5); padding-top:10px; }
.join-note > summary { cursor:pointer; min-height:44px; display:list-item; padding:10px 0; font-size:14px; }
.join-note textarea { width:100%; min-height:85px; padding:12px; border:1px solid #aaa799; background:#fffdf5; color:#191916; font:inherit; resize:vertical; }
