/* Cordillera Coast Trading Co.
   Type: Big Shoulders Stencil Display (headings; the stencil lettering used to
   mark green-coffee sacks) and Overpass (text; a libre revival of Highway
   Gothic, the US road and freight signage face). Both OFL, self-hosted. */

@font-face {
  font-family: "Shoulders Stencil";
  src: url("/assets/fonts/big-shoulders-stencil-display-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Overpass";
  src: url("/assets/fonts/overpass-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F4F5F2;
  --tint: #E8EBE5;
  --ink: #1D2B33;
  --ink-2: #44535B;
  --blue: #1F4A86;
  --blue-deep: #173A6B;
  --red: #A8281E;
  --jute: #E2DAC6;
  --line: #C9CCC4;
  --stencil: "Shoulders Stencil", "Arial Narrow", Impact, sans-serif;
  --sans: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --wrap: 76rem;
  --gut: clamp(1rem, 4vw, 2.5rem);
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s6: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--blue-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
p { margin: 0 0 var(--s2); max-width: 66ch; }
h1, h2, h3 { margin: 0; }
h2, h1 { font-family: var(--stencil); font-weight: 700; line-height: .98; letter-spacing: .005em; }
h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.35; }
strong { font-weight: 700; }
q { quotes: "“" "”"; font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: var(--s2); top: -4rem; background: var(--ink); color: var(--paper); padding: .75rem 1rem; z-index: 50; }
.skip-link:focus { top: var(--s2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.25rem .6rem;
  background: var(--blue); color: #fff;
  font: 700 1rem/1.2 var(--sans); text-decoration: none;
  border: 2px solid var(--blue); border-radius: 2px;
  cursor: pointer;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--blue); }
.btn-quiet:hover { background: var(--blue); color: #fff; }
.btn-onink { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-onink:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* Spanish suggestion banner (inserted by main.js) */
.lang-hint { background: var(--ink); color: var(--paper); font-size: .95rem; }
.lang-hint .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem var(--s2); padding-top: .25rem; padding-bottom: .25rem; }
.lang-hint p { margin: 0; flex: 1 1 18rem; }
.lang-hint a { color: #fff; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
.lang-hint button { min-height: 44px; min-width: 44px; background: none; border: 1px solid #8C979D; color: var(--paper); font: inherit; padding: 0 .9rem; cursor: pointer; border-radius: 2px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: var(--s3); min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); min-height: 44px; margin-right: auto; }
.brand-name { font-family: var(--stencil); font-weight: 700; font-size: 1.45rem; line-height: 1; letter-spacing: .01em; }
.brand-name span { color: var(--blue); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s3); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .8rem; border: 1.5px solid var(--ink); border-radius: 2px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.lang:hover { background: var(--ink); color: var(--paper); }
.nav-toggle { display: none; }

@media (max-width: 920px) {
  .header-inner { flex-wrap: wrap; gap: var(--s2); }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav ul { flex-wrap: wrap; gap: 0 var(--s3); padding-bottom: .5rem; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav.is-open ul { flex-direction: column; border-top: 1px solid var(--line); padding: .5rem 0 1rem; }
  .js .nav-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; background: var(--ink); color: var(--paper); border: 0; border-radius: 2px; font: 700 .95rem var(--sans); cursor: pointer; }
  .brand-name { font-size: 1.25rem; }
}
@media (max-width: 400px) { .brand-name span { display: none; } }

/* Hero */
.hero { padding: var(--s5) 0 var(--s5); }
.hero-grid {
  display: grid; gap: var(--s4) var(--s5);
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "copy map" "doors map";
  align-items: start;
}
.hero-copy { grid-area: copy; }
.hero-map { grid-area: map; margin: 0; align-self: start; padding-top: var(--s3); }
.doors { grid-area: doors; }
.hero h1 { font-size: clamp(2.9rem, 5.4vw, 4.9rem); max-width: 15ch; margin-bottom: var(--s3); }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); max-width: 44ch; }

.doors { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.door { border-top: 6px solid var(--blue); padding-top: var(--s2); display: flex; flex-direction: column; align-items: flex-start; }
.door + .door { border-top-color: var(--ink); }
.door h2 { font-family: var(--sans); font-size: 1.25rem; font-weight: 800; line-height: 1.25; margin-bottom: .5rem; letter-spacing: 0; }
.door p { color: var(--ink-2); font-size: 1rem; }
.door .btn { margin-top: auto; }
.door + .door .btn { background: var(--ink); border-color: var(--ink); }
.door + .door .btn:hover { background: #000; border-color: #000; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .95rem; margin-top: .25rem; }

@media (max-width: 920px) {
  .hero { padding: var(--s4) 0; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "doors" "map"; }
  .hero-map { max-width: 28rem; margin: 0 auto; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(2.6rem, 12.5vw, 3.4rem); }
  .lede { font-size: 1.08rem; }
  .doors { grid-template-columns: 1fr; gap: var(--s3); }
  .door p { margin-bottom: var(--s2); }
}

/* Maps (inline SVG) */
.map text { font-family: var(--sans); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.m-grat { fill: none; stroke: #A7AB9F; stroke-width: .7; stroke-dasharray: 2 5; }
.m-nb { fill: #E4E5DE; stroke: #A8AA9F; stroke-width: .7; stroke-linejoin: round; }
.m-land { fill: var(--jute); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.m-hi { fill: var(--blue); stroke: var(--paper); stroke-width: .8; }
.m-crr { fill: var(--red); stroke: var(--ink); stroke-width: .6; }
.m-rt { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-dasharray: 10 7; }
.m-city { fill: var(--ink); }
.m-area { fill: var(--blue); fill-opacity: .13; stroke: var(--blue); stroke-width: 1; }
.m-dot { fill: var(--blue); }
.m-lead { stroke: var(--blue); stroke-width: 1; fill: none; }
.m-label { font-size: 18px; font-weight: 700; fill: var(--ink); }
.m-big { font-size: 24px; }
.m-sm { font-size: 15px; fill: var(--ink-2); }
.m-coord { font-size: 13px; }
.m-sea { font-size: 16px; font-style: italic; fill: #5F6A70; letter-spacing: .08em; }
.m-port { fill: var(--paper); stroke: var(--red); stroke-width: 2.4; }
.m-portlabel { font-size: 17px; font-weight: 700; fill: var(--red); }
.map-route .m-label { font-size: 21px; }
.map-route .m-big { font-size: 26px; }
.map-route .m-sm { font-size: 18px; }
.map-route .m-nb { fill: #E2E4DC; }

/* Principle band */
.rule-band { background: var(--blue); color: #fff; padding: var(--s5) 0; }
.principle { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s3) var(--s5); align-items: end; }
.principle h2 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); max-width: 14ch; }
.principle p { color: #E6ECF5; margin: 0; font-size: 1.05rem; }
@media (max-width: 860px) { .principle { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: var(--s6) 0; }
.section-tint { background: var(--tint); }
.section h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); margin-bottom: var(--s3); max-width: 18ch; }
.section-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s2) var(--s5); align-items: end; margin-bottom: var(--s4); }
.section-head h2 { margin-bottom: 0; }
.section-head p { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s5); align-items: start; }
@media (max-width: 920px) { .two-col { grid-template-columns: 1fr; gap: var(--s4); } }

.three { list-style: none; counter-reset: n; padding: 0; margin: var(--s3) 0 var(--s3); display: grid; gap: 0; border-top: 2px solid var(--ink); max-width: 40rem; }
.three li { counter-increment: n; position: relative; padding: var(--s2) 0 var(--s2) 3.25rem; border-bottom: 1px solid var(--line); }
.three li::before { content: counter(n); position: absolute; left: 0; top: .85rem; font-family: var(--stencil); font-weight: 700; font-size: 2.3rem; line-height: 1; color: var(--blue); }
.plain { padding-left: 1.2rem; margin: 0 0 var(--s3); }
.plain li { margin-bottom: .4rem; max-width: 60ch; }

/* Collapsible checklist */
.checklist { margin-top: var(--s4); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.checklist summary {
  display: flex; align-items: center; gap: .75rem; min-height: 56px; cursor: pointer;
  font-weight: 700; font-size: 1.05rem; list-style: none;
}
.checklist summary::-webkit-details-marker { display: none; }
.checklist summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 2px solid var(--ink); font-weight: 700; line-height: 1; flex: none; }
.checklist[open] summary::before { content: "−"; }
.checklist-body { padding: var(--s1) 0 var(--s3); }
.fields { margin: 0 0 var(--s3); }
.fields div { display: grid; grid-template-columns: 13rem 1fr; gap: var(--s2); padding: .7rem 0; border-top: 1px solid var(--line); }
.fields dt { font-weight: 700; }
.fields dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .fields div { grid-template-columns: 1fr; gap: .1rem; } }
pre {
  white-space: pre-wrap; word-break: break-word;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue);
  padding: var(--s2); margin: var(--s2) 0 var(--s1);
  font: 400 .9rem/1.55 var(--sans); color: var(--ink);
}
.copy-row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.copy-status { font-weight: 600; color: var(--blue); }

/* Side notes */
.col-side { background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--ink); padding: var(--s3); }
.col-side h3 { font-family: var(--stencil); font-size: 1.9rem; line-height: 1; margin-bottom: var(--s2); }
.col-side p { font-size: .98rem; color: var(--ink-2); }
.cost-lines { list-style: none; padding: 0; margin: var(--s2) 0 0; }
.cost-lines li { padding: .6rem 0; border-top: 1px dashed var(--line); }
.cost-lines strong { display: block; }
.cost-lines span { display: block; font-size: .94rem; color: var(--ink-2); line-height: 1.5; }
.hold { border-top-color: var(--red); }

/* Origin reference */
.origin-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s4) var(--s5); align-items: start; }
@media (max-width: 1000px) { .origin-grid { grid-template-columns: 1fr; } }
.cr-map { margin: 0; }
.cr-map figcaption, .note { font-size: .9rem; color: var(--ink-2); margin-top: var(--s1); }

.calendar { width: 100%; border-collapse: collapse; font-size: .95rem; }
.calendar caption { text-align: left; font-family: var(--stencil); font-weight: 700; font-size: 1.9rem; line-height: 1; padding-bottom: var(--s2); }
.calendar tr { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem 11.5rem; gap: 0 var(--s2); align-items: center; border-top: 1px solid var(--line); padding: .55rem 0; }
.calendar thead tr { border-top: 2px solid var(--ink); padding: .4rem 0; }
.calendar th, .calendar td { padding: 0; text-align: left; }
.calendar thead th { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.calendar tbody th { font-weight: 700; }
.alt-col { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.months, .cal-col { display: grid; grid-template-columns: repeat(9, 1fr); }
.months span { text-align: center; font-size: .8rem; }
.cal-col .bar { grid-row: 1; height: .8rem; background: var(--blue); align-self: center; }
.cal-col .when { grid-row: 2; grid-column: 1 / -1; font-size: .8rem; color: var(--ink-2); }
.calendar thead .cal-col { display: block; }
.s1 { grid-column-start: 1; } .s2 { grid-column-start: 2; } .s3 { grid-column-start: 3; } .s4 { grid-column-start: 4; } .s5 { grid-column-start: 5; }
.e8 { grid-column-end: 9; } .e9 { grid-column-end: 10; }
.calendar tbody .cal-col { background: linear-gradient(var(--tint), var(--tint)) 0 0 / 100% .8rem no-repeat; }
@media (max-width: 560px) {
  .calendar tr { grid-template-columns: minmax(0, 1fr) 10rem; grid-template-areas: "name cal" "alt cal"; }
  .calendar tr > :first-child { grid-area: name; }
  .calendar .alt-col { grid-area: alt; font-size: .85rem; }
  .calendar .cal-col { grid-area: cal; }
  .calendar thead .alt-col { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s5); }
@media (max-width: 860px) { .ref-grid { grid-template-columns: 1fr; gap: var(--s3); } }
.ref { border-top: 2px solid var(--ink); padding-top: var(--s2); }
.ref h3 { font-family: var(--stencil); font-size: 1.75rem; line-height: 1; margin-bottom: var(--s2); }
.ref dl { margin: 0 0 var(--s2); }
.ref dl div { margin-bottom: .75rem; }
.ref dt { font-weight: 800; color: var(--blue); }
.ref dd { margin: 0; font-size: .97rem; color: var(--ink-2); }
.ref p { font-size: .95rem; color: var(--ink-2); }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; counter-reset: st; padding: 0; margin: 0 0 var(--s5); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3); }
.steps li { counter-increment: st; border-top: 6px solid var(--blue); padding-top: var(--s2); }
.steps li:last-child { border-top-color: var(--red); }
.steps li::before { content: counter(st); display: block; font-family: var(--stencil); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--blue); margin-bottom: .4rem; }
.steps li:last-child::before { color: var(--red); }
.steps h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.steps p { font-size: .96rem; color: var(--ink-2); margin: 0; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li { display: grid; grid-template-columns: 3rem 1fr; column-gap: var(--s2); } .steps li::before { grid-row: span 2; } }

.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: 2px; }
.models { width: 100%; border-collapse: collapse; min-width: 40rem; background: #fff; border: 1px solid var(--line); }
.models caption { text-align: left; font-family: var(--stencil); font-weight: 700; font-size: 1.9rem; line-height: 1; padding-bottom: var(--s2); }
.models th, .models td { text-align: left; vertical-align: top; padding: .9rem 1rem; border-top: 1px solid var(--line); font-size: .98rem; }
.models thead th { background: var(--ink); color: var(--paper); font-weight: 700; font-size: .92rem; border-top: 0; }
.models tbody th { font-weight: 800; width: 24%; }
.models td { color: var(--ink-2); }
@media (max-width: 700px) {
  .models { min-width: 0; border: 0; background: none; }
  .models thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .models tr { display: block; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--ink); margin-bottom: var(--s2); padding: .5rem 0; }
  .models th, .models td { display: block; border: 0; padding: .35rem 1rem; width: auto; }
  .models tbody th { width: auto; font-size: 1.05rem; }
  .models td::before { content: attr(data-label); display: block; font-weight: 700; font-size: .85rem; color: var(--ink); }
}

/* About */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s5); }
.about > div { grid-column: 1; }
.scope { border-left: 4px solid var(--blue); padding-left: var(--s2); color: var(--ink-2); }
.founder { border-left: 4px solid var(--ink); padding-left: var(--s2); margin: var(--s3) 0; }
.founder-sign { font-weight: 700; }
.photo { margin: 0; grid-column: 2; }
.photo img { width: 100%; }
.photo figcaption { font-size: .88rem; color: var(--ink-2); margin-top: .5rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .photo { grid-column: 1; } }

/* Contact */
.contact { background: var(--ink); color: var(--paper); padding: var(--s6) 0; }
.contact h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); color: #fff; }
.contact h3 { color: #fff; margin-bottom: .4rem; font-size: 1.15rem; }
.contact p { color: #D4DADD; }
.email-line { margin: var(--s2) 0 var(--s4); max-width: none; }
.email-big { color: #fff; font-weight: 700; font-size: clamp(1.15rem, 3.4vw, 2.1rem); word-break: break-word; text-decoration-thickness: 2px; }
.email-big:hover { color: #fff; text-decoration-thickness: 3px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); border-top: 1px solid #4B5961; padding-top: var(--s3); }
.contact q { color: #fff; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: var(--s3); } }

/* Footer */
.site-footer { background: var(--paper); padding: var(--s4) 0; border-top: 6px solid var(--blue); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 3fr); gap: var(--s4); }
.footer-grid p { margin: 0 0 .4rem; }
.footer-grid ul { list-style: none; margin: 0 0 .5rem; padding: 0; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 44px; word-break: break-word; }
.footer-name { display: flex; align-items: center; gap: .5rem; font-weight: 800; }
.fine { font-size: .88rem; color: var(--ink-2); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: var(--s2); } }

/* 404 */
.notfound { padding: var(--s6) 0; min-height: 70vh; }
.notfound h1 { font-size: clamp(3rem, 9vw, 6rem); margin-bottom: var(--s3); }
.notfound .row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
@media (max-width: 640px) {
  .map-cr .m-label { font-size: 25px; }
  .map-cr .m-portlabel { font-size: 23px; }
  .map-cr .m-sm, .map-cr .m-sea { font-size: 19px; }
  .map-cr .m-coord { display: none; }
}
