/* Concept 20 — The Watershed, new brief (concept 15 with engineering support and AI leading, first person).
   One typeface (Archivo, using its width axis), paper-and-ink by day, and a single night scene for the AI section.
   Colour: spruce for the land, flagging-tape orange for the things people put there. */
:root {
  --paper: #EDF1EC;
  --paper-rgb: 237, 241, 236;
  --ink: #10231D;
  --muted: #4C5F58;
  --line: rgba(16, 35, 29, .16);
  --spruce: #2E6B4F;
  --flag: #F0531C;
  --card: rgba(255, 255, 255, .55);
  --gutter: clamp(20px, 5vw, 72px);
  --col: min(540px, 42vw);
  --font: "Archivo", system-ui, sans-serif;
}
body.is-night {
  --paper: #071018;
  --paper-rgb: 7, 16, 24;
  --ink: #E8F3EF;
  --muted: #9FB6AF;
  --line: rgba(232, 243, 239, .18);
  --spruce: #5FD9B5;
  --card: rgba(255, 255, 255, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--font); font-stretch: 100%; -webkit-font-smoothing: antialiased; transition: background-color .7s, color .7s; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--flag); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- The world behind the page ---------- */
.world { position: fixed; inset: 0; z-index: 0; }
.world__canvas { width: 100%; height: 100%; display: block; }
.world__scrim { position: absolute; inset: 0; pointer-events: none; transition: opacity .7s;
  background: linear-gradient(90deg, rgba(var(--paper-rgb), .94) 0%, rgba(var(--paper-rgb), .86) 30%, rgba(var(--paper-rgb), 0) 58%); }
.no-webgl .world__canvas { display: none; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--gutter); }
.nav::before { content: ""; position: absolute; inset: 0 0 -28px 0; z-index: -1; pointer-events: none; background: linear-gradient(rgba(var(--paper-rgb), .92), rgba(var(--paper-rgb), 0)); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 5px 18px 5px 10px; margin-left: -10px; border-radius: 999px; background: rgba(var(--paper-rgb), .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .7s; }
.brand__mark { position: relative; width: 28px; height: 46px; overflow: hidden; flex: none; }
.brand__mark img { position: absolute; max-width: none; width: auto; height: 49px; left: -8.6px; top: -1.5px; }
.brand__name { font: 700 18px/1.1 var(--font); font-stretch: 112%; letter-spacing: -.01em; display: grid; gap: 3px; }
.brand__name small { font: 500 12px/1 var(--font); color: var(--muted); letter-spacing: 0; }
.nav__list { display: flex; align-items: center; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--paper-rgb), .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .7s, border-color .7s; }
.nav__list a { display: block; padding: 9px 15px; font: 500 15px/1 var(--font); text-decoration: none; border-radius: 999px; }
.nav__list a:hover { background: var(--line); }
.nav__list .nav__cta { background: var(--ink); color: var(--paper); }
.nav__list .nav__cta:hover { background: var(--flag); color: #10231D; }

/* ---------- Station rail ---------- */
.rail { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 15; }
.rail ol { display: grid; gap: 2px; position: relative; }
.rail ol::before { content: ""; position: absolute; right: 9px; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 24px; padding-right: 4px; text-decoration: none; font: 500 12px/1 var(--font); color: var(--muted); }
.rail a::after { content: ""; position: relative; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--muted); background: var(--paper); transition: background-color .25s, border-color .25s, transform .25s; }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; padding: 5px 9px; border-radius: 4px; background: rgba(var(--paper-rgb), .85); white-space: nowrap; }
.rail a:hover span, .rail a:focus-visible span, .rail a.is-here span { opacity: 1; transform: none; }
.rail a.is-here { color: var(--ink); }
.rail a.is-here::after { background: var(--flag); border-color: var(--flag); transform: scale(1.25); }

/* ---------- Stations (sections) ---------- */
main { position: relative; z-index: 5; }
.st { min-height: 125vh; display: flex; align-items: center; padding: 14vh var(--gutter); }
.st--hero { min-height: 100vh; padding-top: 16vh; }
.st--end { min-height: 100vh; }
.st__body { width: var(--col); }
.st__body--wide { width: min(640px, 48vw); }

h1 { font: 760 clamp(46px, 6.6vw, 108px)/.94 var(--font); font-stretch: 116%; letter-spacing: -.035em; margin-bottom: 28px; text-wrap: balance; }
h2 { font: 720 clamp(34px, 4.2vw, 62px)/1 var(--font); font-stretch: 114%; letter-spacing: -.03em; margin-bottom: 20px; text-wrap: balance; }
h3 { font: 650 17px/1.3 var(--font); letter-spacing: -.005em; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--muted); max-width: 30em; }
.lead { font-size: 19px; line-height: 1.5; margin-bottom: 26px; }
.st__body > p:not([class]) { color: var(--muted); margin-bottom: 26px; }
.fine, .note, .hint { font-size: 14px; color: var(--muted); }
.note { margin-top: 22px; padding-left: 14px; border-left: 2px solid var(--flag); }
.hint { margin-top: 44px; }

/* Station marker: a flagged survey stake and the chainage along the creek */
.sta { display: flex; align-items: center; gap: 10px; font: 600 14px/1 var(--font); font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.sta span { font-weight: 400; color: var(--muted); }
.sta i { position: relative; width: 2px; height: 20px; background: var(--ink); flex: none; margin-right: 12px; }
.sta i::after { content: ""; position: absolute; left: 2px; top: 0; width: 12px; height: 8px; background: var(--flag); clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%); }

.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.btn { display: inline-block; padding: 15px 22px; font: 600 16px/1 var(--font); text-decoration: none; border: 1.5px solid var(--ink); border-radius: 999px; transition: background-color .2s, color .2s, border-color .2s, box-shadow .3s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--flag { background: var(--flag); border-color: var(--flag); color: #10231D; }
.btn--flag:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Services: plain definition rows */
.work { border-top: 1px solid var(--line); }
.work > div { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.work dt { font: 650 17px/1.3 var(--font); }
.work dd { color: var(--muted); font-size: 15.5px; line-height: 1.5; }

/* About */
.people { display: grid; gap: 16px; margin-bottom: 22px; }
.people li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; }
.people img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; filter: grayscale(.25); }
.people p { color: var(--muted); font-size: 15.5px; line-height: 1.45; margin-top: 2px; }

/* ---------- After dark: the AI station ---------- */
.st--night h2 { font-size: clamp(30px, 3.5vw, 52px); background: linear-gradient(95deg, #7CF5C8 0%, #8FD8FF 48%, #B9A1FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
body:not(.is-night) .st--night h2 { background: none; color: var(--ink); }
.steps { counter-reset: s; display: grid; gap: 10px; margin-top: 6px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.steps li::before { content: counter(s); grid-row: span 2; font: 700 22px/1.2 var(--font); font-stretch: 120%; color: var(--spruce); }
.steps p { color: var(--muted); font-size: 15px; line-height: 1.45; }
.btn--aurora { border-color: transparent; color: #071018; background: linear-gradient(95deg, #7CF5C8, #8FD8FF 55%, #B9A1FF); box-shadow: 0 0 0 rgba(124, 245, 200, 0); }
.btn--aurora:hover { color: #071018; background: linear-gradient(95deg, #7CF5C8, #8FD8FF 55%, #B9A1FF); box-shadow: 0 0 34px rgba(124, 245, 200, .45); }

/* ---------- Courses ---------- */
.courses { border-top: 1px solid var(--line); margin-bottom: 26px; }
.courses li > * { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.courses h3 { grid-column: 1; }
.courses p { grid-column: 1; color: var(--muted); font-size: 14.5px; }
.status { grid-column: 2; grid-row: 1 / span 2; font: 500 13px/1 var(--font); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.status--open { background: var(--spruce); border-color: var(--spruce); color: #fff; }
.courses a:hover h3 { color: var(--flag); }
.groups { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.groups img { width: 100%; height: 132px; object-fit: cover; border-radius: 6px; }

/* ---------- Contact ---------- */
.contacts { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; }
.contacts dt { font-size: 14.5px; color: var(--muted); }
.contacts a { font: 600 clamp(17px, 1.6vw, 21px)/1.3 var(--font); text-decoration-color: var(--flag); text-underline-offset: 4px; white-space: nowrap; }
.contacts a:hover { color: var(--flag); }
.foot { margin-top: 56px; font-size: 13.5px; color: var(--muted); }

/* ---------- Phones and tablets: the model sits above each station's text ---------- */
@media (max-width: 899px) {
  :root { --col: 100%; }
  .world__scrim { display: none; }
  .nav { padding: 12px 16px; }
  .nav__list li:not(:last-child) { display: none; }
  .nav__list { padding: 4px; }
  .st, .st--hero, .st--end { min-height: 0; display: block; padding: 50vh 0 0; }
  .st--hero { padding-top: 46vh; }
  .st__body, .st__body--wide { width: 100%; padding: 30px 20px 44px; background: var(--paper); border-top: 1px solid var(--line); transition: background-color .7s; }
  .st--end .st__body { padding-bottom: 96px; }
  h1 { font-size: clamp(40px, 12vw, 64px); }
  .groups { grid-template-columns: 1fr 1fr; }
  .groups img:first-child { grid-column: 1 / -1; height: 170px; }
  .contacts a { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .world__scrim, .nav__list, .st__body { transition: none; }
}

/* ---------- Concept 20 additions: what-you-get lines, status tags in rows, links, sub-headings, calculator ---------- */
.work dt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.work dt small { font: 400 14.5px/1.3 var(--font); color: var(--muted); }
.work dt .status { grid-column: auto; grid-row: auto; padding: 5px 9px; font-size: 12.5px; }
.work dd.get { color: var(--ink); margin-top: 3px; }
.work dd.get::before { content: "You get: "; font-weight: 650; color: var(--spruce); }
.note a, .fine a { color: var(--ink); text-decoration-color: var(--flag); text-underline-offset: 3px; }
.sub { font: 650 15px/1 var(--font); color: var(--spruce); margin: 34px 0 12px; }
.sub--big { font: 720 clamp(24px, 2.3vw, 32px)/1.1 var(--font); font-stretch: 112%; letter-spacing: -.02em; color: var(--ink); margin: 44px 0 14px; text-wrap: balance; }
.courses { margin-bottom: 0; }
.courses li > div { min-height: 50px; }
.groups { margin-top: 28px; }

.calc { margin: 30px 0 6px; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; gap: 8px; }
.calc h3 { font: 700 22px/1.15 var(--font); font-stretch: 112%; letter-spacing: -.015em; }
.calc label { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; font: 500 15.5px/1.3 var(--font); }
.calc output { font: 720 21px/1 var(--font); color: var(--spruce); font-variant-numeric: tabular-nums; }
.calc input[type="range"] { width: 100%; height: 26px; accent-color: var(--spruce); }
.calc__rate { display: inline-flex; align-items: center; gap: 6px; width: 130px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 9px; font: 650 18px/1 var(--font); }
.calc__rate:focus-within { border-color: var(--spruce); }
.calc__rate input { width: 100%; padding: 9px 0; border: 0; background: none; font: inherit; color: inherit; outline: none; -moz-appearance: textfield; }
.week { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 14px; }
.week i { aspect-ratio: 2.2; border-radius: 3px; background: var(--line); transition: background-color .25s; }
.week i.busy { background: var(--muted); }
.week i.free { background: var(--spruce); }
.key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); }
.key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.k-free { background: var(--spruce); } .k-busy { background: var(--muted); } .k-rest { background: var(--line); }
.calc__nums { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 30px; margin-top: 8px; }
.calc__nums dt { font-size: 13.5px; color: var(--muted); }
.calc__nums dd { font: 760 clamp(28px, 2.8vw, 40px)/1 var(--font); font-stretch: 112%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.calc__nums div:first-child dd { color: var(--spruce); }
@media (max-width: 899px) { .calc__nums { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .week i { transition: none; } }
/* The new headline is longer than the original, so it runs smaller */
h1 { font-size: clamp(40px, 5.2vw, 84px); line-height: .98; }
.hint { margin-top: 30px; }
@media (max-width: 899px) { h1 { font-size: clamp(36px, 10.5vw, 56px); } }

/* ---------- Concept 22: sections snap into place, and a Next button jumps one section on ---------- */
@media (min-width: 900px) {
  html { scroll-snap-type: y mandatory; }
  .st__body { scroll-snap-align: center; }
  .st__body.is-tall { scroll-snap-align: start; scroll-margin-top: 92px; }   /* long sections snap to their top, then scroll freely */
  .st--hero { scroll-snap-align: start; }
  .st--hero .st__body { scroll-snap-align: none; }                           /* the opening section rests at the very top of the page */
}
/* Phones scroll freely: no snapping. The section bar at the bottom of the screen does the jumping. */
@media (max-width: 899px) {
  .rail { display: block; position: fixed; inset: auto 0 0 0; top: auto; transform: none; z-index: 16; padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(var(--paper-rgb), .92); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .7s; }
  .rail ol { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rail ol::-webkit-scrollbar { display: none; }
  .rail ol::before, .rail a::after { display: none; }
  .rail li { flex: none; }
  .rail a { height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; }
  .rail a span { opacity: 1; transform: none; padding: 0; background: none; }
  .rail a.is-here { border-color: var(--flag); box-shadow: inset 0 0 0 1px var(--flag); font-weight: 650; }
  .st { scroll-margin-top: -18vh; }                 /* a jump lands with the heading in view and the model still showing above it */
  .st--hero { scroll-margin-top: 0; }
  .st--end .st__body { padding-bottom: 120px; }
  .has-switcher .rail { bottom: 56px; border-bottom: 1px solid var(--line); }
  .has-switcher .st--end .st__body { padding-bottom: 180px; }
}
.next { position: fixed; left: 50%; bottom: 20px; z-index: 16; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(var(--paper-rgb), .86); color: var(--ink); font: 500 14px/1 var(--font); cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .7s, border-color .2s, opacity .3s; }
.next:hover { border-color: var(--flag); }
.next span { color: var(--muted); }
.next b { font-weight: 650; }
.next::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--flag); border-bottom: 2px solid var(--flag); transform: rotate(45deg) translate(-2px, -2px); }
.next[hidden] { display: none; }
@media (max-width: 899px) { .next { display: none; } }   /* the section bar replaces it on phones */
@media (prefers-reduced-motion: reduce) { .next { transition: none; } }

/* Taglines: one above the site office lead, one on the design reviews row */
.tagline { font: 720 clamp(20px, 1.85vw, 26px)/1.15 var(--font); font-stretch: 112%; letter-spacing: -.02em; margin-bottom: 14px; }
.tagline span { white-space: nowrap; }
.work dd.hook { color: var(--ink); font-weight: 650; }
/* Two-sentence headline: larger again, one sentence per line */
h1 { font-size: clamp(46px, 6.2vw, 100px); line-height: .96; }
h1 span { display: block; white-space: nowrap; }
@media (max-width: 899px) { h1 { font-size: clamp(38px, 11.5vw, 60px); } }

/* Service cards: the AI step bubbles without numbers */
.cards { list-style: none; display: grid; gap: 10px; margin-top: 6px; }
.cards li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cards p { color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Course rows as bubbles, matching the service cards */
.courses { border-top: 0; display: grid; gap: 8px; }
.courses li > * { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .2s; }
.courses a:hover { border-color: var(--spruce); }

/* Revised copy (2026-12-02): a longer headline and a one-sentence tagline */
h1 { font-size: clamp(40px, 5.3vw, 86px); }
.tagline span { white-space: normal; }
@media (max-width: 899px) {
  h1 { font-size: clamp(34px, 10.5vw, 56px); }
  h1 span { white-space: normal; }
}

/* Phone menu (2026-12-02): a Menu button in the top bar opens the section list as a panel. Replaces the bottom bar. */
.menu-btn { display: none; }
@media (max-width: 899px) {
  .nav__list { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 16px 0 14px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--font); cursor: pointer; transition: background-color .7s, color .7s; }
  .menu-btn i { position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: background-color .2s; }
  .menu-btn i::before, .menu-btn i::after { content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: var(--paper); border-radius: 2px; transition: transform .2s; }
  .menu-btn i::before { top: -5px; } .menu-btn i::after { top: 5px; }
  .menu-open .menu-btn i { background: transparent; }
  .menu-open .menu-btn i::before { transform: translateY(5px) rotate(45deg); }
  .menu-open .menu-btn i::after { transform: translateY(-5px) rotate(-45deg); }

  .rail, .has-switcher .rail { display: none; inset: 74px 12px auto 12px; bottom: auto; z-index: 19; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(var(--paper-rgb), .97); box-shadow: 0 18px 50px rgba(0, 0, 0, .22); max-height: calc(100vh - 100px); overflow-y: auto; }
  .menu-open .rail { display: block; }
  .rail ol { display: grid; gap: 2px; overflow: visible; padding: 0; }
  .rail a { height: 50px; justify-content: flex-start; padding: 0 16px; border: 0; border-radius: 12px; font-size: 18px; font-weight: 550; color: var(--ink); }
  .rail a.is-here { border: 0; box-shadow: inset 3px 0 0 var(--flag); background: var(--line); font-weight: 700; }
  .st--end .st__body, .has-switcher .st--end .st__body { padding-bottom: 96px; }
}
