:root {
  color-scheme: light;
  --ink: #151510;
  --coal: #171814;
  --paper: #f5f2e9;
  --white: #fffcf5;
  --muted: #59594e;
  --line: #cecdc0;
  --night-line: #454640;
  --yellow: #f9cc07;
  --body: "Barlow", system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --gutter: clamp(20px, 5vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 {
  font-family: var(--display);
  line-height: 1;
}
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; }
input, select { max-width: 100%; }
fieldset { min-inline-size: 0; padding: 0; border: 0; margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
::selection { color: var(--ink); background: var(--yellow); }
:focus-visible {
  outline: 3px solid #176d92;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 1rem; }

.wrap {
  width: min(78rem, calc(100% - var(--gutter) - var(--gutter)));
  margin-inline: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  z-index: 5;
  inset: .5rem auto auto .5rem;
  padding: .7rem 1rem;
  transform: translateY(-180%);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}
.skip:focus { transform: translateY(0); }
.masthead, .footer {
  background: var(--ink);
  color: var(--white);
}
.masthead { border-bottom: 1px solid var(--night-line); }
.nav-row, .nav-row nav, .brand, .footer-inner {
  display: flex;
  align-items: center;
}
.nav-row {
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding-top: env(safe-area-inset-top, 0px);
}
.brand, .nav-row nav a, .footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand { gap: .65rem; }
.brand img { width: 2.45rem; }
.brand b { font: 700 1.65rem/1 var(--display); letter-spacing: .04em; }
.brand > span {
  padding-left: .75rem;
  border-left: 1px solid var(--night-line);
  color: #d9d6c9;
  font: 600 .64rem/1.15 var(--body);
  text-transform: uppercase;
  letter-spacing: .09em;
}
.nav-row nav { gap: clamp(1rem, 3vw, 2.5rem); }
.nav-row nav a {
  font: 600 .93rem/1.25 var(--body);
  color: #dfdfd4;
}
.nav-row nav .home-link { gap: .5rem; color: var(--yellow); }
.nav-row a:hover, .footer a:hover { color: var(--yellow); }
.masthead :focus-visible, .hero :focus-visible,
.routes :focus-visible, .footer :focus-visible { outline-color: var(--yellow); }

.hero {
  position: relative;
  isolation: isolate;
  color: var(--white);
  background: var(--ink);
}
.hero-photo, .hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}
.hero-photo {
  object-fit: cover;
  object-position: center 57%;
}
.hero::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(14,16,12,.98), rgba(14,16,12,.91) 27%, rgba(14,16,12,.57) 49%, rgba(14,16,12,.05) 76%),
    linear-gradient(0deg, rgba(14,16,12,.58), transparent 32%);
}
.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(30rem, 39vw, 38rem);
  padding-block: clamp(2.75rem, 4.5vw, 5.25rem);
}
.hero-copy { width: min(38rem, 57%); }
.kicker {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--yellow);
  font: 700 .76rem/1.3 var(--body);
  text-transform: uppercase;
  letter-spacing: .13em;
}
.kicker::before { content: ""; width: 1.8rem; height: 2px; background: currentColor; }
.hero h1 {
  margin-block: 1.05rem;
  font-size: clamp(5.15rem, 8vw, 8.5rem);
  font-weight: 800;
  line-height: .84;
  letter-spacing: -.025em;
  text-transform: uppercase;
}
.hero h1 em { display: block; color: var(--yellow); font-style: normal; }
.hero-deck { max-width: 39ch; color: #eeece3; font-size: clamp(1.05rem, 1.4vw, 1.23rem); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3rem;
  padding: .75rem 1.2rem;
  font: 700 1rem/1.25 var(--body);
  text-decoration: none;
}
.button > span { font-size: 1.2em; line-height: 1; }
.primary { background: var(--yellow); color: var(--ink); }
.primary:hover { background: #ffdc35; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem 1.25rem;
  margin-top: 1.5rem;
}
.hero-route {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
.hero-route:hover { color: var(--yellow); }
.photo-caption {
  position: absolute;
  right: 0;
  bottom: 1.25rem;
  padding: .35rem .6rem;
  color: var(--white);
  background: rgba(16,17,14,.82);
  font: 600 .7rem/1.25 var(--body);
  letter-spacing: .06em;
}

.purchase, .routes { padding-block: clamp(3.5rem, 6.3vw, 6.5rem); }
.purchase { border-top: .3rem solid var(--yellow); }
.purchase-grid, .route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5.5rem);
}
h2 { font-size: clamp(2.75rem, 4.1vw, 4.35rem); font-weight: 700; letter-spacing: -.02em; }
.section-intro { max-width: 58ch; margin-top: .8rem; color: var(--muted); }
.material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
  margin-top: 1.75rem;
}
.material-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name select" "note note";
  align-content: start;
  align-items: center;
  gap: .5rem .6rem;
  min-height: 8.1rem;
  padding: clamp(.9rem, 1.4vw, 1.35rem);
  border: 1px solid var(--line);
  background: var(--white);
}
.materials:enabled .material-option { cursor: pointer; }
.materials:enabled .material-option:hover { border-color: #777869; }
.materials:enabled .material-option:has(input:checked) {
  border-color: #8c771a;
  background: #fff4bc;
  box-shadow: inset 3px 0 var(--yellow);
}
.material-option input {
  grid-area: select;
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  border: 1.5px solid #747568;
  border-radius: 50%;
  background-color: var(--white);
}
.material-option input:checked {
  background: radial-gradient(circle, var(--ink) 37%, var(--yellow) 40%);
  border-color: var(--ink);
}
.material-option:has(input:focus-visible) { outline: 3px solid #176d92; outline-offset: 2px; }
.materials:disabled input { visibility: hidden; }
.material-name { grid-area: name; font: 700 clamp(1.55rem, 2vw, 2rem)/1.1 var(--display); }
.material-note { grid-area: note; font-size: .96rem; line-height: 1.4; color: var(--muted); }

.quote-panel {
  padding: clamp(1.2rem, 2.45vw, 2.25rem);
  border: 1px solid var(--line);
  border-top: 4px solid var(--yellow);
  background: var(--white);
}
.quote-panel h3, .route-list h3 { font-size: clamp(1.9rem, 2.3vw, 2.5rem); font-weight: 700; }
#manual-hint { margin-top: 1rem; color: var(--muted); }
.quote-fields { display: grid; gap: 1rem; margin-top: 1.15rem; }
.selected-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding-block: .62rem;
  border-block: 1px solid var(--line);
}
.selected-line span { font-size: .88rem; color: var(--muted); }
.selected-line strong { font: 700 1.4rem/1.1 var(--display); }
.amount-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, .48fr); gap: .7rem; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .96rem; }
.field label small { font-size: .85rem; font-weight: 400; color: var(--muted); }
.field input, .field select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.9rem;
  padding: .6rem .7rem;
  border: 1px solid #929387;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}
.field input[aria-invalid="true"] { border-color: #9c3028; }
.field-hint, .field-error { font-size: .9rem; line-height: 1.4; margin-top: -.45rem; }
.field-hint { color: var(--muted); }
.field-error { color: #912318; font-weight: 600; }
.price-estimate { border-left: 3px solid var(--yellow); padding: .7rem .9rem; background: var(--paper); overflow-wrap: anywhere; }
.price-estimate > span { display: block; font-weight: 600; }
.price-estimate strong { display: block; margin-top: .25rem; font: 700 1.7rem/1.15 var(--display); }
.price-estimate small { display: block; margin-top: .3rem; color: var(--muted); line-height: 1.4; }
.quote-link { width: 100%; margin-top: 1.35rem; }

.routes { background: var(--coal); color: var(--white); }
.routes .section-intro { color: #c6c6b9; }
.route-grid { margin-top: 2rem; }
.map-card {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--night-line);
  color: var(--white);
  text-decoration: none;
}
.map-card img { width: 100%; aspect-ratio: 1.6; object-fit: cover; }
.map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.2rem;
  border-top: 1px solid var(--night-line);
  background: #22241e;
}
.map-caption strong { font: 600 clamp(1.25rem, 1.8vw, 1.65rem)/1.25 var(--display); }
.map-caption > span, .text-link { color: var(--yellow); }
.map-card:hover .map-caption { background: #30332a; }
.route-list table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  text-align: left;
}
.route-list th, .route-list td { padding: .57rem 0; border-bottom: 1px solid var(--night-line); }
.route-list thead th {
  color: #c2c4b6;
  font: 600 .69rem/1.3 var(--body);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.route-list td, .route-list thead th:last-child { text-align: right; white-space: nowrap; }
.route-list tbody th { padding-right: .65rem; font-weight: 600; }
.route-list tbody small { display: block; color: #bfc1b5; font-size: .84rem; line-height: 1.4; font-weight: 400; }
.route-list td { font-variant-numeric: tabular-nums; }
.text-link, .footer a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  font-weight: 600;
}
.text-link { margin-top: .7rem; font-size: .98rem; }
.footer { border-top: 1px solid var(--night-line); }
.footer-inner {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1.2rem;
  padding-block: 1rem max(1rem, env(safe-area-inset-bottom, 0px));
  font-size: .93rem;
}
.footer-inner > span { color: #bfc1b5; }

@media (max-width: 54rem) {
  .purchase-grid, .route-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .map-card img { max-height: 23rem; }
  .hero-copy { width: min(69%, 32rem); }
}
@media (max-width: 37.5rem) {
  .nav-row { min-height: 3.7rem; }
  .nav-row nav .section-link { display: none; }
  .hero-photo { height: 68%; object-position: 64% center; }
  .hero::after {
    background: linear-gradient(0deg, var(--ink) 32%, rgba(21,21,16,.96) 42%, rgba(21,21,16,.65) 62%, rgba(21,21,16,.08) 92%);
  }
  .hero-inner { min-height: 0; padding-block: clamp(9rem, 37vw, 13rem) 2rem; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: clamp(3.8rem, 16vw, 6rem); }
  .hero-deck { max-width: 37ch; }
  .photo-caption { top: .8rem; bottom: auto; font-size: .65rem; }
  .purchase, .routes { padding-block: 2.75rem; }
  .material-grid { margin-top: 1.25rem; }
  .route-grid { margin-top: 1.5rem; }
}
@media (max-width: 29rem) {
  .material-grid { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .material-option { min-height: 0; padding: .85rem 1rem; gap: .3rem 1rem; }
  .material-note { line-height: 1.35; }
  .quote-panel { padding: 1.1rem; }
  .amount-row { grid-template-columns: minmax(0, 1fr) minmax(4.7rem, .5fr); }
  .footer-inner { align-items: start; flex-direction: column; }
}
@media (forced-colors: active) {
  .material-option input { appearance: auto; }
  .primary { border: 1px solid ButtonText; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
