@font-face {
  font-family: "Newsreader";
  src: url("./assets/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("./assets/fonts/ibm-plex-sans-latin-var.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: dark;
  --c-ink: #101a1b;
  --c-ink-raised: #192725;
  --c-paper: #f3f0e7;
  --c-mist: #d8e0da;
  --c-muted: #bfcbc5;
  --c-peach: #ffd4a8;
  --c-green: #b7d8c5;
  --c-line: #34403f;
  --c-ember: #9c4f25;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-label: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --fs-display: clamp(46px, 7.2vw, 88px);
  --fs-name: clamp(40px, 5.2vw, 64px);
  --fs-body: 17px;
  --lh-body: 1.7;
  --fs-label: 12px;
  --tr-label: 0.08em;
  --panel-w: 480px;
  --r-control: 2px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --dur-in: 240ms;
  --dur-out: 200ms;
  --dur-camera: 720ms;
  --page-inset: clamp(24px, 5.625vw, 72px);
  --scrim-web: 0.88;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--c-ink);
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 32px;
  scrollbar-color: var(--c-line) var(--c-ink);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--c-ink);
  color: var(--c-paper);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-body);
}

body, button, input, textarea, select {
  font-family: var(--font-body);
}

a {
  color: var(--c-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--c-paper);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--c-peach);
  outline-offset: 3px;
}

/* Station headings take focus from script (keyboard and nav moves); they are not controls, so no ring. */
[tabindex="-1"]:focus {
  outline: none;
}

.site-root {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: clip;
  background: var(--c-ink);
}

#scene,
[data-scene-canvas] {
  position: fixed;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--c-ink);
}

.site-root::before {
  position: fixed;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg,
    rgb(16 26 27 / var(--scrim-web)) 0%,
    rgb(16 26 27 / var(--scrim-web)) 46%,
    rgb(16 26 27 / 0) 64%);
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  left: var(--page-inset);
  padding: 8px 12px;
  transform: translateY(-160%);
  border-radius: var(--r-control);
  background: var(--c-peach);
  color: var(--c-ink);
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: 1568px;
  margin-inline: auto;
  padding: 40px var(--page-inset) 0;
  pointer-events: none;
}

.topbar a,
.topbar nav,
.topbar output {
  pointer-events: auto;
}

.identity {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: var(--c-paper);
  line-height: 1;
  text-decoration: none;
}

.identity:hover {
  color: var(--c-paper);
}

.identity-rule {
  width: 40px;
  height: 3px;
  background: var(--c-peach);
}

.identity-name {
  font: 600 14px/1 var(--font-body);
  letter-spacing: var(--tr-label);
}

.station-nav {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 960px;
}

.station-nav ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
  max-width: 960px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.station-nav a {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 1px solid transparent;
  color: var(--c-muted);
  font: 500 var(--fs-label)/1.25 var(--font-label);
  letter-spacing: var(--tr-label);
  text-decoration: none;
  text-transform: uppercase;
  transition: color var(--dur-out) var(--ease), border-color var(--dur-out) var(--ease);
}

.station-nav a span {
  color: var(--c-muted);
}

.station-nav a[aria-current="true"] {
  border-color: var(--c-peach);
  color: var(--c-paper);
}

.station-nav a[aria-current="true"] span {
  color: var(--c-peach);
}

.phone-counter {
  display: none;
  color: var(--c-muted);
  font: 500 var(--fs-label)/1 var(--font-label);
  letter-spacing: var(--tr-label);
}

.walk {
  position: relative;
  z-index: 2;
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, var(--panel-w)) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  width: 100%;
  max-width: 1568px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 136px var(--page-inset) 72px;
  scroll-margin-top: 32px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.station-panel {
  position: relative;
  z-index: 3;
  width: min(100%, var(--panel-w));
  min-width: 0;
}

.eyebrow,
.station-number {
  margin: 0 0 16px;
  color: var(--c-peach);
  font: 500 var(--fs-label)/1.4 var(--font-label);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
}

.station-number {
  color: var(--c-muted);
}

h1,
.station-name {
  margin: 0 0 24px;
  color: var(--c-paper);
  font: 400 var(--fs-name)/1.02 var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 8ch;
  margin-bottom: 24px;
  font-size: var(--fs-display);
  line-height: 1;
  letter-spacing: -0.035em;
}

.body-copy {
  max-width: 56ch;
  margin: 0 0 12px;
  color: var(--c-mist);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-body);
}

.pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 12px;
  color: var(--c-mist);
  font: 500 var(--fs-label)/1.5 var(--font-label);
}

.pipeline-steps span {
  white-space: nowrap;
}

.link-list,
.tool-list,
.work-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-list a,
.work-list a {
  font-weight: 600;
}

.label-only {
  color: var(--c-mist);
  font-weight: 600;
}

.tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
}

.tool-list li {
  min-width: 0;
}

.tool-list a {
  font: 500 13px/1.4 var(--font-label);
  text-decoration: none;
}

.plate {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 880 / 520;
  height: auto;
  object-fit: cover;
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--dur-out) var(--ease);
}

.site-root[data-scene-ready="true"] .plate {
  opacity: 0;
}

.end-rule {
  display: block;
  width: 64px;
  height: 4px;
  margin: 0 0 16px;
  background: var(--c-peach);
}

.end-name {
  margin: 0 0 8px;
  color: var(--c-paper);
  font: 600 28px/1.1 var(--font-body);
  letter-spacing: var(--tr-label);
}

.location {
  margin: 0 0 16px;
  color: var(--c-muted);
}

.contact-action {
  margin: 16px 0 0;
}

.contact-link {
  display: inline-block;
  padding: 16px 24px;
  border-radius: var(--r-control);
  background: var(--c-peach);
  color: var(--c-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color var(--dur-out) var(--ease), color var(--dur-out) var(--ease);
}

.contact-link:hover {
  background: var(--c-paper);
  color: var(--c-ink);
}

/* the phone line under the button: Rising Factor's number, which rings Bryan (operator 2026-10-21) */
.contact-phone {
  margin: 14px 0 0;
  font-size: 18px;
  font-weight: 600;
}

.contact-phone a {
  color: var(--c-green);
  text-underline-offset: 4px;
}

.also-work {
  margin-top: 40px;
}

.also-label {
  margin: 0;
  color: var(--c-muted);
  font: 500 var(--fs-label)/1.5 var(--font-label);
  letter-spacing: var(--tr-label);
}

.work-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}

.site-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1568px;
  margin: 0 auto;
  padding: 24px var(--page-inset) 40px;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font: 500 var(--fs-label)/1.5 var(--font-label);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  scroll-snap-align: end;
  scroll-snap-stop: always;
}

/* The intake (#start): the live site's form, same fields and endpoint (POST /api/inquiry). */
.intake {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1568px;
  margin: 0 auto;
  padding: 112px var(--page-inset) 72px;
  scroll-margin-top: 32px;
  scroll-snap-align: start;
}

.intake-panel {
  width: min(100%, 560px);
}

.intake-title {
  margin: 0 0 20px;
  color: var(--c-paper);
  font: 400 var(--fs-name)/1.02 var(--font-display);
  letter-spacing: -0.03em;
}

.privacy-note,
.form-note {
  margin: 0 0 20px;
  color: var(--c-muted);
  font-size: 15px;
  line-height: 1.6;
}

.inquiry-form {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--c-mist);
  font-size: 15px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-control);
  background: var(--c-ink-raised);
  color: var(--c-paper);
  font: 400 16px/1.5 var(--font-body);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--c-peach);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.submit-row .form-note {
  margin: 0;
  flex: 1 1 220px;
}

button.contact-link {
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
}

@media (max-width: 1024px) {
  .topbar {
    padding-top: 28px;
  }

  .station-nav ol {
    gap: 10px 16px;
    max-width: 620px;
  }

  .station {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    gap: 32px;
  }
}

/* "How it works": the technical detail sits behind it on every size, so each station leads with the business result
   (feedback relayed by the operator 2026-10-21). Desktop opens it in place; phone opens the sheet (below). */
.station:not(.is-open) .station-panel .more {
  display: none;
}

.more-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-green);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

@media (max-width: 760px) {
  :root {
    --page-inset: 24px;
  }

  /* Phone: every station is exactly one screen and every swipe lands on one (operator 2026-10-21: proximity snapped back on
     slow swipes and stopped midway on fast ones). Secondary copy opens over the scene from the station's More button. */
  html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
  }

  /* The top band keeps the chrome readable where a station's thread enters from the top (CONTRACT rule 2). */
  .site-root::before {
    background: linear-gradient(180deg,
      rgb(16 26 27 / var(--scrim-web)) 0,
      rgb(16 26 27 / var(--scrim-web)) 60px,
      rgb(16 26 27 / 0) 92px,
      rgb(16 26 27 / 0) 28%,
      rgb(16 26 27 / var(--scrim-web)) 44%,
      rgb(16 26 27 / var(--scrim-web)) 100%);
  }

  .topbar {
    align-items: flex-start;
    padding-top: 24px;
  }

  .station-nav {
    align-items: flex-start;
  }

  .station-nav ol {
    display: none;
  }

  .phone-counter {
    display: block;
    padding-top: 3px;
  }

  .station {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 24px;
    height: 100vh;
    height: 100svh;
    min-height: 0;
    overflow: hidden;
    overflow: clip;
    position: relative;
    padding: 92px var(--page-inset) 40px;
    scroll-margin-top: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .station:not(.is-open) .station-panel .more {
    display: none;
  }

  .more-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--c-green, #b7d8c5);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
  }

  /* Open: the whole panel lifts over the scene as one readable sheet that scrolls inside itself, and never moves the page. */
  .site-root .station.is-open .station-panel,
  .site-root.is-webgl-active .station.is-open .station-panel {
    position: fixed;
    top: 84px;
    left: 0;
    right: 0;
    height: calc(100vh - 84px);
    height: calc(100svh - 84px);
    z-index: 6;
    margin: 0;
    padding: 24px var(--page-inset) 40px;
    max-width: none;
    width: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: rgb(16 26 27 / 0.97);
  }

  .intake {
    scroll-snap-align: start;
  }

  /* With the scenes running, the panel starts at 52% of the height (y 440 at 390x844, CONTRACT rule 3);
     the scene's subject owns the band above it. The plate row keeps its space for a failed station. */
  .site-root.is-webgl-active .station {
    grid-template-rows: max(120px, calc(52svh - 116px)) minmax(0, 1fr);
  }

  /* The panel keeps the lower row even on a station without a plate (the plate otherwise holds the scene band). */
  .site-root.is-webgl-active .station > .station-panel {
    grid-row: 2;
  }

  .station-panel {
    width: 100%;
    max-width: var(--panel-w);
    align-self: start;
  }

  /* When the copy is scrolled up over the scene band, it carries its own ground (invisible at rest, where the scrim is the same ink). */
  .site-root.is-webgl-active .station-panel {
    margin: 0 calc(-1 * var(--page-inset));
    padding: 0 var(--page-inset) 8px;
    width: auto;
    max-width: none;
    background: rgb(16 26 27 / var(--scrim-web));
  }

  .intake {
    padding: 92px var(--page-inset) 56px;
    background: var(--c-ink);
    scroll-margin-top: 0;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .plate {
    order: -1;
    width: 100%;
    max-height: 260px;
    aspect-ratio: 880 / 520;
  }

  h1 {
    max-width: 10ch;
  }

  .tool-list {
    gap: 6px 16px;
  }

  .tool-list a {
    font-size: 12px;
  }

  .also-work {
    margin-top: 28px;
  }

  .site-footer {
    scroll-snap-align: end;
    scroll-snap-stop: always;
  }
}

/* Short phones (780 px tall and under): a smaller scene band and tighter spacing so every station's copy fits one screen. */
@media (max-width: 760px) and (max-height: 780px) {
  .station {
    padding-top: 78px;
    gap: 14px;
  }

  .site-root.is-webgl-active .station {
    grid-template-rows: max(104px, calc(44svh - 116px)) minmax(0, 1fr);
  }

  .station-panel .body-copy {
    font-size: 15px;
    line-height: 1.55;
  }

  .station-name {
    font-size: 34px;
  }
}

@media (max-width: 360px) {
  .tool-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-list {
    gap: 8px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.rv-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.rv-cta-note {
  color: var(--c-muted);
  font: 500 var(--fs-label)/1.5 var(--font-label);
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
}
