/* Tall Timbers Group: Trail Map. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.woff2") format("woff2-variations"), url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/work-sans.woff2") format("woff2-variations"), url("../fonts/work-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --snow: #f7f6f1;      /* ground */
  --paper: #ecebe3;     /* surface step */
  --ink: #14213d;       /* text, logo, ridgeline */
  --trail: #e4572e;     /* accent: trail line, waypoints */
  --trail-text: #c2410c;/* accent at text size and button fill (AA on snow) */
  --lichen: #a3b18a;    /* contour lines only */

  --logo-mark: url("../img/logo/option-c-ridgeline.svg");

  --display: "Fraunces", Georgia, serif;
  --body: "Work Sans", system-ui, sans-serif;

  /* five sizes, three doing most of the work */
  --fs-xl: clamp(2.5rem, 1.2rem + 5.4vw, 5.75rem);
  --fs-l: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);
  --fs-m: 1.375rem;
  --fs-body: 1.125rem;
  --fs-s: 0.875rem;

  --gap-section: clamp(5rem, 2rem + 9vw, 10rem);
  --edge: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-xl); line-height: 0.98; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-l); line-height: 1.04; letter-spacing: -0.02em; }
p { margin: 0 0 1em; max-width: 36em; }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--snow);
  padding: 0.75rem 1rem; z-index: 10;
}
.skip:focus { top: 1rem; }

/* buttons and links: flat, square, one fill */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.4rem;
  background: var(--trail-text); color: var(--snow);
  font-weight: 600; text-decoration: none;
  border-radius: 0;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.button:hover { background: var(--ink); }
.button:active { transform: translateY(1px); }

.text-link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--trail);
  text-decoration-thickness: 2px; text-underline-offset: 0.3em;
}
.text-link:hover { text-decoration-thickness: 4px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }

/* header */
.site-header {
  display: flex; align-items: center; gap: 1rem 2.25rem;
  padding: 1.25rem var(--edge);
  position: relative; z-index: 2;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  min-height: 2.75rem; text-decoration: none; margin-right: auto;
}
.logo-mark {
  width: 2.25rem; height: 2.25rem; flex: none;
  background-color: currentColor;
  -webkit-mask: var(--logo-mark) center / contain no-repeat;
  mask: var(--logo-mark) center / contain no-repeat;
}
.wordmark {
  font-family: var(--display); font-size: var(--fs-m); font-weight: 600;
  font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -0.01em;
}
.site-nav { display: flex; gap: 0.25rem 1.75rem; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-decoration-color: var(--trail); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }

/* hero: the map sheet */
.hero {
  position: relative;
  min-height: min(52rem, 88vh);
  padding: clamp(3rem, 8vh, 7rem) var(--edge) 4rem;
  margin-top: -5.5rem; padding-top: calc(clamp(3rem, 8vh, 7rem) + 5.5rem);
  background: var(--snow) url("../img/contours-hero.svg") no-repeat right -260px top -60px / 1500px auto;
}
.hero-copy { max-width: 40rem; position: relative; z-index: 1; }
.hero-copy h1 { max-width: 11ch; margin-bottom: 2rem; }
.lead { font-size: var(--fs-m); line-height: 1.45; max-width: 30em; }

.you-are-here {
  position: absolute; right: 300px; top: 222px; margin: 0;
  transform: translate(-0.75rem, -50%);
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-size: var(--fs-m);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.yah-dot {
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--trail); box-shadow: 0 0 0 5px var(--snow), 0 0 0 7px var(--trail);
  order: -1;
}

.cartouche {
  position: absolute; right: var(--edge); bottom: 3rem;
  width: 19rem; padding: 1.25rem 1.4rem 1.1rem;
  background: var(--snow);
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink); outline-offset: 4px;
  font-size: var(--fs-s); line-height: 1.4;
}
.cartouche-title { font-size: var(--fs-m); line-height: 1.15; margin-bottom: 0.9rem; padding-right: 2rem; }
.legend { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.55rem; }
.legend li { display: flex; align-items: center; gap: 0.7rem; }
.sym { flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; }
.sym-wp {
  border-radius: 50%; border: 2.5px solid var(--trail); background: var(--snow);
  font-family: var(--display); font-weight: 600; font-size: 0.8rem;
}
.sym-trail { height: 0; border-top: 3px dashed var(--trail); }
.sym-summit { background: var(--ink); clip-path: polygon(50% 8%, 96% 92%, 4% 92%); }
.scale { display: grid; grid-template-columns: repeat(4, 1fr); width: 9rem; height: 0.45rem; border: 1.5px solid var(--ink); }
.scale span:nth-child(odd) { background: var(--ink); }
.scale-label { margin: 0.35rem 0 0.75rem; }
.survey { margin: 0; text-wrap: balance; }
.north { position: absolute; top: 1rem; right: 1.1rem; width: 1.25rem; height: 2.1rem; color: var(--ink); }
.north text { font: 600 9px var(--body); fill: currentColor; }

/* products: the trail map */
.products {
  background: var(--paper) url("../img/contours-map.svg") repeat-y center top / max(100%, 62.5rem) auto;
  padding: var(--gap-section) var(--edge);
  display: grid;
  grid-template-columns: minmax(16rem, 21rem) 1fr;
  gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
}
.route-rail { position: sticky; top: 2rem; }
/* short desktop windows: the rail plus an answer can be taller than the screen, so let it scroll with the page */
@media (max-height: 820px) { .route-rail { position: static; } }
.route-rail h2 { margin-bottom: 1rem; }

.profile { width: 100%; max-width: 20rem; height: auto; margin: 1.25rem 0 0.5rem; overflow: visible; }
.profile-ground { fill: var(--snow); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.profile-marker { transform: translate(0px, 78px); transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.2, 1); }
.profile-marker circle { fill: var(--trail); stroke: var(--ink); stroke-width: 2; }

.routes { list-style: none; margin: 0; padding: 0; }
.routes a {
  display: flex; align-items: center; min-height: 3rem;
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: 4px solid var(--lichen);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.routes a:hover { border-left-color: var(--ink); text-decoration: underline; text-underline-offset: 0.25em; }
.routes a[aria-current="true"] { border-left-color: var(--trail-text); font-weight: 600; }

.answer:empty { display: none; }
.answer {
  margin-top: 1.25rem; padding: 1.1rem 1.25rem;
  background: var(--snow);
}
.answer p { margin: 0 0 0.6rem; }
.answer p:last-child { margin: 0; }
.answer a { font-weight: 600; text-decoration-color: var(--trail); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.answer .answer-link { display: inline-flex; align-items: center; min-height: 2.75rem; }

.trailmap {
  position: relative;
  padding: 0.5rem 0 1rem;
}
.trail-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trail-lines .trail-path { fill: none; stroke: var(--trail); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 11 9; }
.trail-lines .trail-mask { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; }

.trail { position: relative; }
.trail-b { margin-top: 6rem; }
.trailhead {
  position: relative; display: flex; align-items: center; gap: 1rem;
  font-size: var(--fs-l); font-weight: 400; line-height: 1.05;
  margin-bottom: 3.5rem;
}
.th-mark {
  flex: none; width: 2.5rem; height: 2.5rem;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
}

.waypoints { list-style: none; margin: 0; padding: 0; }
.waypoints li {
  position: relative;
  margin: 0 0 4.5rem calc(var(--x) * 1%);
  max-width: 26rem;
  padding: 0.25rem 1rem 0.5rem 3.75rem;
  scroll-margin-top: 2rem;
  transition: background-color 0.25s ease;
}
.waypoints li:last-child { margin-bottom: 0; }
.wp {
  position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--snow); border: 3px solid var(--trail);
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.waypoints h4 { font-size: var(--fs-m); font-weight: 600; line-height: 1.2; margin: 0.3rem 0 0.5rem; letter-spacing: -0.01em; }
.waypoints h4 a, .summit h3 { text-decoration: none; }
.waypoints h4 a {
  display: inline-block; min-height: 2.75rem; padding-top: 0.25rem;
  text-decoration: underline; text-decoration-color: var(--trail);
  text-decoration-thickness: 2px; text-underline-offset: 0.22em;
}
.waypoints h4 a:hover { text-decoration-thickness: 4px; }
.waypoints p { margin: 0; }

.summit {
  position: relative;
  margin: 6rem 0 0 18%;
  max-width: 28rem;
  padding: 0.25rem 1rem 0.75rem 3.75rem;
  scroll-margin-top: 2rem;
  transition: background-color 0.25s ease;
}
.summit-mark {
  position: absolute; left: 0; top: 0.2rem; width: 2.6rem; height: 2.3rem;
  background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.summit h3 { font-size: var(--fs-m); font-weight: 600; margin: 0.35rem 0 0.5rem; }
.summit p { margin-bottom: 0.25rem; }

.is-lit { background: var(--snow); }
.is-lit .wp { background: var(--trail-text); border-color: var(--trail-text); color: var(--snow); transform: scale(1.12); }
.waypoints li:target, .summit:target { background: var(--snow); }

/* about: a field note */
.field-note {
  padding: var(--gap-section) var(--edge);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  align-items: start;
}
.note-photo { grid-column: 2 / span 3; margin: 6rem 0 0; }
.note-photo img { width: 100%; max-width: 300px; }
.note-photo figcaption { font-size: var(--fs-s); margin-top: 0.6rem; }
.note-body { grid-column: 6 / span 6; }
.note-body h2 { margin-bottom: 2rem; }
.note-lead {
  font-family: var(--display); font-size: var(--fs-m); line-height: 1.5;
  font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 400;
}
.signature {
  font-family: var(--display); font-size: var(--fs-l); line-height: 1;
  font-variation-settings: "SOFT" 100, "WONK" 1; font-weight: 300;
  margin-top: 2rem;
}

/* contact close */
.contact {
  background: var(--paper);
  padding: var(--gap-section) var(--edge);
  padding-left: max(var(--edge), 33%);
}
.contact h2 { max-width: 13ch; margin-bottom: 1.75rem; }
.contact-body .actions { margin-top: 1.5rem; }
.alt-mail { margin: 0; }
.alt-mail a { text-decoration-color: var(--ink); text-underline-offset: 0.25em; display: inline-flex; align-items: center; min-height: 2.75rem; }

/* footer band */
.site-footer { background: var(--snow); }
.ridge-band { padding-top: 3rem; line-height: 0; }
.ridge-art, .ridge-photo { display: block; width: 100%; height: clamp(13rem, 29vw, 28.75rem); object-fit: cover; object-position: 50% 100%; }
.footer-ground {
  background: var(--ink); color: var(--snow);
  padding: 2rem var(--edge) 3rem;
  margin-top: -1px;
}
.closing {
  font-family: var(--display); font-size: var(--fs-xl); line-height: 1;
  font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 400; letter-spacing: -0.03em;
  text-align: center; max-width: none; margin: 0 0 3.5rem;
}
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem 2rem; font-size: var(--fs-s); }
.footer-meta p { margin: 0; }
.footer-meta a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration-color: var(--lichen); text-underline-offset: 0.25em; }
.site-footer a:focus-visible { outline-color: var(--snow); }

/* 404: the footer ground steps to paper so the hero contours end on a tone change */
.page-lost .site-footer { background: var(--paper); }

/* tablet and phone: a composition of its own */
@media (max-width: 1100px) {
  .you-are-here { display: none; }
  .hero { min-height: 0; background-position: right -420px top -60px; }
  .cartouche { position: relative; right: auto; bottom: auto; margin-top: 4rem; margin-left: auto; }
}

@media (max-width: 860px) {
  .products { grid-template-columns: 1fr; }
  .route-rail { position: static; }
  .field-note { grid-template-columns: 1fr; gap: 2.5rem; }
  .note-photo { grid-column: 1; margin: 0; display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: end; }
  .note-body { grid-column: 1; }
  .contact { padding-left: var(--edge); }
}

@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; gap: 0.25rem 0.75rem; padding-top: 1rem; padding-bottom: 0.5rem; }
  .brand { gap: 0.5rem; }
  .logo-mark { width: 1.9rem; height: 1.9rem; }
  .wordmark { font-size: 1.0625rem; }
  .site-nav { order: 3; width: 100%; gap: 0 1.75rem; }
  .button-nav { padding: 0 0.9rem; font-size: 1rem; min-height: 2.75rem; }
  .hero { margin-top: -6.5rem; padding-top: 8.5rem; padding-bottom: 3rem; background-size: 1000px auto; background-position: right -420px bottom -260px; }
  .hero-copy h1 { margin-bottom: 1.5rem; }
  .lead { font-size: 1.25rem; }
  .cartouche { width: auto; margin: 3rem 0.4rem 0; }
  .waypoints li { margin: 0 0 3rem calc(var(--x) * 0.05rem); padding-right: 0; padding-left: 3.4rem; }
  .trailhead { margin-bottom: 2.5rem; }
  .trail-b { margin-top: 4rem; }
  .summit { margin: 4rem 0 0; padding-right: 0; padding-left: 3.4rem; }
  .closing { text-align: left; margin-bottom: 2.5rem; }
  .footer-meta { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* print: ink on paper, no backgrounds to lean on */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .skip, .site-nav, .you-are-here, .trail-lines, .profile, .north, .ridge-band { display: none !important; }
  .hero, .products, .contact, .site-footer, .footer-ground, .page-lost .site-footer { background: none !important; color: #000; }
  .hero { margin-top: 0; padding-top: 1rem; min-height: 0; }
  .button { background: none !important; color: #000 !important; border: 2px solid #000; }
  .route-rail { position: static; }
  .cartouche, .waypoints li, .summit, .note-photo { break-inside: avoid; }
  .cartouche { position: relative; right: auto; bottom: auto; margin-top: 2rem; }
  .is-lit, .waypoints li:target, .summit:target { background: none; }
  .is-lit .wp { background: none; color: #000; }
}
