/* Oak & Sprocket — site layer.
 *
 * The design system lives in /tokens/*.css, copied verbatim from the brand
 * bundle. Do not edit those files here — re-sync them from the bundle instead.
 * Everything below composes the documented components on top of those tokens.
 *
 * The rules, from guidelines/rules.card.html:
 *   Oak Green means act. If it isn't clickable, it isn't Oak Green.
 *   Trail Clay means where. Ride facts, never a control.
 *   One filled green button per screen; secondary actions are outlined.
 *   No gradients in the brand layer except photo scrims.
 *   Sprocket Gray never carries body text.
 *   Everything must survive grayscale.
 */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ---------- layout ---------- */

:root {
  --wrap: 1160px;
  --gut: clamp(20px, 5vw, 56px);
  --sec-y: clamp(48px, 7vw, 72px);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }

section { padding-block: var(--sec-y); }
section.tight { padding-block: clamp(32px, 4vw, 48px); }

.ground-limestone { background: var(--os-limestone); }
.rule { height: 1px; background: var(--os-border-rule); border: 0; margin: 0; }

/* ---------- type ---------- */

h1, .display {
  font-family: var(--os-font-display);
  font-weight: var(--os-weight-semibold);
  font-size: clamp(var(--os-size-display-sm), 6.4vw, var(--os-size-display));
  line-height: var(--os-lh-display);
  color: var(--os-text-heading);
  margin: 0;
}
h1 em, .display em { font-style: italic; font-weight: var(--os-weight-regular); }

/* Interior page titles sit a step below the hero display size. */
h1.page-title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
}

h2 {
  font-family: var(--os-font-display);
  font-weight: var(--os-weight-semibold);
  font-size: clamp(30px, 4vw, var(--os-size-h2));
  line-height: var(--os-lh-h2);
  color: var(--os-text-heading);
  margin: 0;
}

h3 {
  font-family: var(--os-font-display);
  font-weight: var(--os-weight-medium);
  font-size: var(--os-size-h3);
  line-height: var(--os-lh-h3);
  color: var(--os-text-heading);
  margin: 0;
}

p { margin: 0 0 1.1em; max-width: var(--os-measure-body); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--os-size-lead);
  font-weight: var(--os-weight-light);
  line-height: var(--os-lh-lead);
  max-width: 62ch;
}

.small { font-size: var(--os-size-small); line-height: var(--os-lh-small); }

/* Eyebrow — caps at 10px take the wide track, 11px labels the narrow one. */
.eyebrow {
  font-family: var(--os-font-body);
  font-size: var(--os-size-caps);
  font-weight: var(--os-weight-semibold);
  letter-spacing: var(--os-track-caps);
  text-transform: uppercase;
  color: var(--os-text-muted);
  margin: 0 0 12px;
}
.eyebrow--clay     { color: var(--os-wayfinding); }
.eyebrow--reversed { color: var(--os-on-dark-muted); }

.section-head { max-width: var(--os-measure-body); margin-bottom: 34px; }
.section-head > * + * { margin-top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--os-paper);
  border-bottom: 1px solid var(--os-border-rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px; padding-block: 14px;
}
/* Clear space = one sprocket tooth on all four sides. */
.lockup { display: block; flex: none; padding: 7px; margin: -7px; }
.lockup img { display: block; height: 44px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--os-font-body); font-size: var(--os-floor-screen); font-weight: var(--os-weight-medium);
  color: var(--os-text-body); text-decoration: none;
  padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--os-text-heading); }
.site-nav a[aria-current="page"] { color: var(--os-text-heading); border-bottom-color: var(--os-action); }

/* ---------- buttons ---------- */

.btn {
  font-family: var(--os-font-body); font-size: 14px; font-weight: var(--os-weight-medium);
  line-height: 1.2;
  min-height: var(--os-control-min-h);
  border-radius: var(--os-radius-control);
  padding: 13px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background var(--os-ease), color var(--os-ease),
              border-color var(--os-ease), transform var(--os-ease);
}
.btn:hover { transform: var(--os-lift); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 2px solid var(--os-action); outline-offset: 2px; }

.btn--filled { background: var(--os-action); color: var(--os-white); }
.btn--filled:hover { background: var(--os-action-hover); color: var(--os-white); }
.btn--filled:disabled {
  background: var(--os-disabled-fill); color: var(--os-text-muted);
  cursor: not-allowed; transform: none;
}

.btn--outlined {
  background: transparent; color: var(--os-action);
  border-color: var(--os-action); padding: 12px 21px;
}
.btn--outlined:hover { background: rgba(44,76,59,.06); color: var(--os-action-hover); border-color: var(--os-action-hover); }

.btn--pill { border-radius: var(--os-radius-pill); padding: 12px 24px; font-size: var(--os-floor-screen); }

/* Reversed, on Oak Green / Deep Oak grounds */
.btn--reversed {
  background: transparent; color: var(--os-on-dark);
  border-color: rgba(245,245,240,.55);
}
.btn--reversed:hover { background: rgba(245,245,240,.1); color: var(--os-on-dark); border-color: var(--os-on-dark); }

/* ---------- cards ---------- */

.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--os-surface-card);
  border: 1px solid var(--os-border-subtle);
  border-radius: var(--os-radius-card);
  box-shadow: var(--os-shadow-card);
  padding: 26px 28px;
}
.card--limestone { background: var(--os-limestone); }
.card .card-icon {
  width: 44px; height: 44px; border-radius: var(--os-radius-pill);
  background: var(--os-limestone); color: var(--os-action);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.card h3 { font-size: 22px; line-height: 1.25; }
.card p { font-size: var(--os-size-small); line-height: 1.75; margin: 0; }

.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

/* ---------- tags — Trail Clay, ride facts, never a control ---------- */

.tag {
  font-family: var(--os-font-body); font-size: 11px; font-weight: var(--os-weight-semibold);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--os-wayfinding);
  background: var(--os-clay-tint);
  border: 1px solid var(--os-clay-hairline);
  border-radius: var(--os-radius-tag);
  padding: 6px 11px; display: inline-block; white-space: nowrap;
}
.tag--solid { color: var(--os-limestone); background: var(--os-wayfinding); border-color: var(--os-wayfinding); }

/* ---------- photo panels ---------- */

.photo {
  position: relative; overflow: hidden;
  border-radius: var(--os-radius-panel);
  background: var(--os-surface-inverse);
  isolation: isolate;
}
.photo > img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.photo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--os-scrim); pointer-events: none;
}
.photo--plain::after { content: none; }
.photo--hero { aspect-ratio: var(--os-crop-hero); }
.photo--card { aspect-ratio: var(--os-crop-card); }
.photo--band { aspect-ratio: var(--os-crop-band); }

/* Hero — full-bleed, square corners, content pinned to the bottom. */
.hero {
  border-radius: 0;
  min-height: clamp(440px, 62vh, 620px);
  display: flex; align-items: flex-end;
}
.hero > img { object-position: center 62%; }
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-block: clamp(40px, 6vw, 72px); }
.hero h1 { color: var(--os-on-dark); max-width: 17ch; }
.hero .lead { color: var(--os-on-dark-body); max-width: 620px; margin-top: 24px; }
.hero .eyebrow { color: var(--os-on-dark-muted); }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.photo-credit {
  position: absolute; right: var(--gut); bottom: 12px; z-index: 2;
  font-size: var(--os-size-fine); letter-spacing: .1em; text-transform: uppercase;
  font-weight: var(--os-weight-semibold); color: var(--os-on-dark-muted);
}

/* Band — full-bleed strip, 3:1, caption bottom-left. */
.band {
  border-radius: 0;
  min-height: clamp(190px, 25vw, 320px);
  display: flex; align-items: flex-end;
}
.band .wrap { position: relative; z-index: 1; width: 100%; padding-block: 26px; }
.band .caption {
  margin: 0; font-family: var(--os-font-display); font-weight: var(--os-weight-medium);
  font-size: clamp(22px, 2.6vw, var(--os-size-h3)); line-height: var(--os-lh-h3);
  color: var(--os-on-dark); max-width: 30ch;
}
.band .eyebrow { color: var(--os-on-dark-muted); margin-bottom: 8px; }
.band--slim { min-height: clamp(150px, 19vw, 240px); }

/* ---------- forms ---------- */

.signup {
  background: var(--os-surface-card);
  border: 1px solid var(--os-border-subtle);
  border-radius: var(--os-radius-card);
  box-shadow: var(--os-shadow-card);
  padding: clamp(24px, 4vw, 40px);
  max-width: 780px;
}
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.field-label, .legend {
  font-family: var(--os-font-body); font-size: var(--os-size-label);
  font-weight: var(--os-weight-semibold); letter-spacing: var(--os-track-label);
  text-transform: uppercase; color: var(--os-text-body);
}
.optional { font-weight: var(--os-weight-regular); letter-spacing: 0; text-transform: none; color: var(--os-text-muted); }
.hint { font-size: var(--os-size-fine); line-height: 1.6; color: var(--os-text-muted); margin: 0; }

input[type="text"], input[type="email"], textarea {
  font-family: var(--os-font-body); font-size: 14px; color: var(--os-text-heading);
  background: var(--os-field-fill);
  border: 1px solid var(--os-hairline-firm);
  border-radius: var(--os-radius-control);
  padding: 13px 16px; min-height: var(--os-control-min-h);
  width: 100%; outline: none;
  transition: border-color var(--os-ease), box-shadow var(--os-ease), background var(--os-ease);
}
textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
input:focus, textarea:focus {
  background: var(--os-white);
  border-color: var(--os-action);
  box-shadow: var(--os-focus-shadow);
}
::placeholder { color: var(--os-text-muted); }

fieldset { border: 0; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; }

/* Role selector — pills, green when chosen. */
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--os-font-body); font-size: var(--os-floor-screen); font-weight: var(--os-weight-medium);
  padding: 12px 20px; border-radius: var(--os-radius-pill);
  min-height: var(--os-control-min-h); cursor: pointer;
  background: var(--os-limestone); color: var(--os-text-body);
  border: 1px solid var(--os-hairline-firm);
  transition: all var(--os-ease);
}
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt:hover { border-color: var(--os-action); }
.opt:has(input:checked) {
  background: var(--os-action); color: var(--os-limestone); border-color: var(--os-action);
}
.opt:has(input:focus-visible) { outline: 2px solid var(--os-action); outline-offset: 2px; }

.form-msg { margin: 18px 0 0; font-size: var(--os-size-small); font-weight: var(--os-weight-medium); }
.form-msg[data-tone="err"] { color: var(--os-error); }
.consent { margin-top: 16px; font-size: var(--os-size-fine); line-height: 1.7; color: var(--os-text-muted); max-width: 56ch; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Green means act — a confirmation panel is not clickable, so it gets the
   Limestone card treatment, not a green rail. */
.success {
  background: var(--os-limestone);
  border: 1px solid var(--os-hairline);
  border-radius: var(--os-radius-card);
  padding: 30px 32px; max-width: 780px;
}
.success h3 { margin-bottom: 10px; }

/* ---------- route library ---------- */

.filters {
  display: flex; flex-wrap: wrap; gap: 24px;
  padding: 24px 26px; margin-bottom: 28px;
  background: var(--os-surface-card);
  border: 1px solid var(--os-border-subtle);
  border-radius: var(--os-radius-card);
  box-shadow: var(--os-shadow-card);
}
.filter-group { min-width: 190px; display: flex; flex-direction: column; gap: 10px; }
.filter-group .legend { color: var(--os-text-muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-family: var(--os-font-body); font-size: var(--os-floor-screen); font-weight: var(--os-weight-medium);
  min-height: 38px; padding: 8px 16px;
  border-radius: var(--os-radius-pill);
  background: var(--os-limestone); color: var(--os-text-body);
  border: 1px solid var(--os-hairline-firm); cursor: pointer;
  transition: all var(--os-ease);
}
.pill:hover { border-color: var(--os-action); }
.pill[aria-pressed="true"] { background: var(--os-action); border-color: var(--os-action); color: var(--os-limestone); }

.count { font-size: var(--os-size-small); color: var(--os-text-muted); margin-bottom: 18px; }

.route-list { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.route {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--os-surface-card);
  border: 1px solid var(--os-border-subtle);
  border-radius: var(--os-radius-card);
  box-shadow: var(--os-shadow-card);
  padding: 24px 26px;
  transition: border-color var(--os-ease), transform var(--os-ease);
}
.route:hover { border-color: var(--os-action); transform: var(--os-lift); }
.route h3 { font-size: 22px; }
.route .facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.route p { font-size: var(--os-size-small); line-height: 1.75; margin: 0; }
.route .source-line {
  font-size: var(--os-size-fine); color: var(--os-text-muted);
  margin: 0; letter-spacing: .02em;
}
.route .go { margin-top: auto; font-size: var(--os-size-small); font-weight: var(--os-weight-medium); }
.route .go::after { content: " \2192"; }

.empty { padding: 40px; text-align: center; color: var(--os-text-muted); }
.note { font-size: var(--os-size-small); color: var(--os-text-muted); max-width: var(--os-measure-body); }

/* ---------- resources ---------- */

.stack { display: grid; gap: 14px; }
.res {
  background: var(--os-surface-card); border: 1px solid var(--os-border-subtle);
  border-radius: var(--os-radius-card); box-shadow: var(--os-shadow-card);
  padding: 22px 24px; display: flex; flex-direction: column; gap: 8px;
}
.res h3 { font-size: 20px; }
.res p { font-size: var(--os-size-small); line-height: 1.75; margin: 0; }
.res a { font-size: var(--os-size-small); font-weight: var(--os-weight-medium); }

/* ---------- prose ---------- */

.prose { max-width: var(--os-measure-body); }
.prose h2 { font-size: var(--os-size-h3); margin-top: 2.2em; }
.prose h2:first-of-type { margin-top: 1.4em; }
.prose ul { padding-left: 1.15em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .55em; max-width: var(--os-measure-body); }
.prose .stamp {
  font-size: var(--os-size-fine); letter-spacing: var(--os-track-label);
  text-transform: uppercase; font-weight: var(--os-weight-semibold);
  color: var(--os-text-muted); margin-top: 2.6em; padding-top: 18px;
  border-top: 1px solid var(--os-border-rule);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--os-surface-inverse);
  color: var(--os-on-dark-muted);
  padding-block: 48px 36px;
  font-size: var(--os-size-small);
}
.site-footer .lockup img { height: 40px; }
.site-footer a { color: var(--os-on-dark-body); }
.site-footer a:hover { color: var(--os-on-dark); }
.footer-cols {
  display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--os-on-dark-hairline);
}
.footer-cols h4 {
  font-family: var(--os-font-body); font-size: var(--os-size-caps);
  font-weight: var(--os-weight-semibold); letter-spacing: var(--os-track-caps);
  text-transform: uppercase; color: var(--os-on-dark); margin: 0 0 12px;
}
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 8px; }
.legal {
  margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--os-on-dark-hairline);
  font-size: var(--os-size-fine); line-height: 1.8; color: var(--os-on-dark-muted);
  max-width: none;
}

/* ---------- small screens ---------- */

@media (max-width: 700px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 14px 0; }
  .site-nav { width: 100%; gap: 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding-bottom: 12px; }
  .site-nav .btn { display: none; }
  .lockup img { height: 38px; }
  .route-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; transform: none !important; }
}
