/* ====================================================================
   FAR CANYON — expedition survey aesthetic
   basalt / sand / amber / ember · Instrument Serif · IBM Plex Mono
   ==================================================================== */

:root {
  --bg: #0e0b09;
  --bg-2: #131008;
  --bg-3: #1a1410;
  --sand: #ece0c8;
  --sand-dim: rgba(236, 224, 200, 0.62);
  --sand-faint: rgba(236, 224, 200, 0.14);
  --sand-ghost: rgba(236, 224, 200, 0.07);
  --amber: #e0a04e;
  --amber-bright: #f0bb6d;
  --ember: #c4502a;
  --ember-deep: #7d2d16;
  --paper: #e9dcc1;
  --ink: #1a1208;
  --ink-dim: rgba(26, 18, 8, 0.64);
  --ink-faint: rgba(26, 18, 8, 0.16);
  --rail: 72px;
  --gutter: clamp(24px, 5vw, 96px);
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--sand);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  color: var(--ink);
  background: var(--amber);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- shared utilities ---------- */

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section {
  position: relative;
  padding: clamp(110px, 14vw, 200px) var(--gutter);
  scroll-margin-top: 70px;
}

.section-kicker {
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: var(--sand-dim);
}

.section-kicker .wpt {
  position: relative;
  padding-left: 22px;
  color: var(--amber);
}

.section-kicker .wpt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 1px;
  background: var(--amber);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.7rem, 5.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--sand);
}

.section-title em,
.hero-line em,
.contact-title em,
.service-row h3 em {
  font-style: italic;
  color: var(--amber-bright);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 28px clamp(40px, 6vw, 110px);
  align-items: end;
  margin-bottom: clamp(54px, 7vw, 110px);
}

.section-head .section-kicker {
  grid-column: 1 / -1;
  margin-bottom: clamp(28px, 4vw, 56px);
}

.section-copy {
  color: var(--sand-dim);
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  max-width: 46ch;
}

/* corner-tick instrument framing */
.ticks {
  position: relative;
}

.ticks::before,
.ticks::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid rgba(224, 160, 78, 0.65);
}

.ticks::before {
  left: -8px;
  top: -8px;
  border-left-width: 1px;
  border-top-width: 1px;
}

.ticks::after {
  right: -8px;
  bottom: -8px;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 80;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  mix-blend-mode: overlay;
}

/* ---------- loader ---------- */

.loader {
  display: none;
}

html.js .loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: block;
  background: #0b0907;
}

.loader-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
}

.loader-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--sand);
}

.loader-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sand-dim);
}

.loader-count {
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  bottom: clamp(8px, 2.5vw, 28px);
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 9vw, 8.5rem);
  line-height: 1;
  color: var(--amber);
}

.loader-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px var(--gutter);
  transition: background 360ms ease, box-shadow 360ms ease, padding 360ms ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: rgba(13, 10, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand-ghost);
  transition: opacity 360ms ease;
}

.site-header.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-header.is-scrolled::before {
  opacity: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: var(--sand);
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--amber);
  flex: 0 0 auto;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 3vw, 44px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-dim);
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color 200ms ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms cubic-bezier(0.6, 0, 0.2, 1);
}

.nav-links a:hover {
  color: var(--sand);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 22px;
  border: 1px solid rgba(236, 224, 200, 0.28);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  transition: border-color 240ms ease, background 240ms ease, color 240ms ease;
}

.cta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px rgba(196, 80, 42, 0.9);
  transition: background 240ms ease;
}

.header-cta:hover {
  border-color: var(--amber);
  background: rgba(224, 160, 78, 0.1);
}

.header-cta:hover .cta-dot {
  background: var(--amber);
}

/* ---------- route rail ---------- */

.route-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  width: var(--rail);
  pointer-events: none;
  border-right: 1px solid var(--sand-ghost);
  /* difference keeps the instrument legible over the light services band */
  mix-blend-mode: difference;
}

.rail-track {
  position: absolute;
  top: 96px;
  bottom: 300px;
  left: 50%;
  width: 1px;
  background: var(--sand-faint);
}

.rail-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(236, 224, 200, 0.95), rgba(236, 224, 200, 0.55));
  transform: scaleY(0);
  transform-origin: top;
}

.rail-progress::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  background: var(--sand);
  box-shadow: 0 0 12px rgba(236, 224, 200, 0.8);
}

.rail-readout {
  position: absolute;
  left: 50%;
  bottom: 30px;
  display: flex;
  gap: 14px;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--sand-dim);
  white-space: nowrap;
}

.rail-elev b {
  font-weight: 500;
  color: var(--sand);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(130px, 16vh, 190px) var(--gutter) 110px calc(var(--rail) + clamp(28px, 4vw, 80px));
  isolation: isolate;
  background: var(--bg);
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* fallback terrain if WebGL unavailable */
.hero.no-webgl .hero-canvas {
  display: none;
}

.hero.no-webgl .hero-scene {
  background:
    radial-gradient(120% 70% at 70% 100%, rgba(196, 80, 42, 0.22), transparent 60%),
    radial-gradient(90% 55% at 30% 92%, rgba(224, 160, 78, 0.14), transparent 65%),
    linear-gradient(180deg, #0c0a08 0%, #141009 58%, #1d130c 100%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 64% 56%, rgba(224, 140, 60, 0.16), transparent 70%),
    radial-gradient(110% 60% at 50% 110%, rgba(196, 80, 42, 0.18), transparent 62%);
  mix-blend-mode: screen;
}

.hero-horizon {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 11, 9, 0.55) 0%, transparent 26%, transparent 70%, rgba(14, 11, 9, 0.72) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(26px, 3.4vh, 40px);
  color: var(--sand-dim);
}

.eyebrow-tick {
  width: 28px;
  height: 1px;
  background: var(--amber);
}

.hero-title {
  margin: 0 0 clamp(18px, 2.6vh, 30px) -0.04em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4.6rem, 13vw, 12.5rem);
  line-height: 0.88;
  letter-spacing: -0.025em;
  color: var(--sand);
  text-shadow: 0 6px 60px rgba(0, 0, 0, 0.45);
}

.hero-line {
  max-width: 30ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.65rem, 2.8vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--sand);
}

.hero-text {
  max-width: 52ch;
  margin-top: clamp(20px, 2.8vh, 30px);
  color: var(--sand-dim);
  font-size: clamp(1rem, 1.15vw, 1.14rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(22px, 3vw, 40px);
  margin-top: clamp(34px, 4.6vh, 52px);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber-bright), var(--amber));
  color: #1d1206;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 18px 48px rgba(196, 80, 42, 0.28), inset 0 1px 0 rgba(255, 240, 212, 0.5);
  transition: transform 240ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 240ms ease;
}

.button svg {
  width: 14px;
  height: 14px;
  transition: transform 240ms ease;
}

.button:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(196, 80, 42, 0.4), inset 0 1px 0 rgba(255, 240, 212, 0.55);
}

.button:hover svg {
  transform: translateX(4px);
}

.ghost-link {
  position: relative;
  padding-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand-dim);
  transition: color 220ms ease;
}

.ghost-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
  transition: background 220ms ease, opacity 220ms ease;
}

.ghost-link:hover {
  color: var(--sand);
}

.ghost-link:hover::after {
  background: var(--amber);
  opacity: 1;
}

/* code plan panel */

.code-plan {
  position: absolute;
  z-index: 2;
  right: clamp(36px, 5vw, 96px);
  top: 50%;
  transform: translateY(-50%);
  width: 296px;
  padding: 24px 26px 26px;
  border: 1px solid rgba(236, 224, 200, 0.18);
  background: rgba(15, 11, 8, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.4);
}

.code-plan::before,
.code-plan::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid rgba(224, 160, 78, 0.7);
}

.code-plan::before {
  left: -8px;
  top: -8px;
  border-left-width: 1px;
  border-top-width: 1px;
}

.code-plan::after {
  right: -8px;
  bottom: -8px;
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.code-plan header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.code-plan header .mono-label {
  color: var(--amber);
}

.code-plan-id {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--sand-dim);
}

.code-plan pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.85;
  color: rgba(236, 224, 200, 0.72);
  white-space: pre;
  overflow: hidden;
}

.cp-line {
  display: block;
}

.cp-caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 6px;
  vertical-align: text-bottom;
  background: var(--amber);
  animation: caret-blink 1.1s steps(2, start) infinite;
}

@keyframes caret-blink {
  to {
    visibility: hidden;
  }
}

/* hero foot */

.hero-foot {
  position: absolute;
  z-index: 2;
  left: calc(var(--rail) + clamp(28px, 4vw, 80px));
  right: var(--gutter);
  bottom: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--sand-dim);
}

.cue-line {
  position: relative;
  width: 44px;
  height: 1px;
  overflow: hidden;
  background: var(--sand-faint);
}

.cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform: translateX(-100%);
  animation: cue-sweep 2.2s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}

@keyframes cue-sweep {
  45% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(102%);
  }
}

.hero-meta {
  color: rgba(236, 224, 200, 0.4);
}

/* ---------- work ---------- */

.section-work {
  padding-left: calc(var(--rail) + clamp(28px, 4vw, 80px));
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(196, 80, 42, 0.08), transparent 60%),
    var(--bg);
}

.work-list {
  border-top: 1px solid var(--sand-faint);
}

.work-row {
  position: relative;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.05fr) 60px;
  gap: clamp(20px, 3vw, 56px);
  align-items: center;
  padding: clamp(34px, 4.4vw, 56px) clamp(8px, 1.4vw, 24px);
  border-bottom: 1px solid var(--sand-faint);
  transition: background 360ms ease;
}

.work-row::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23ece0c8' stroke-opacity='0.07' transform='translate(300 300)'%3E%3Cpath transform='scale(0.24)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.42)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.6)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.78)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.96)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3C/g%3E%3C/svg%3E")
    right -80px center / 520px 520px no-repeat;
  transition: opacity 420ms ease;
}

.work-row:hover::before {
  opacity: 1;
}

.work-row:hover {
  background: rgba(236, 224, 200, 0.025);
}

.work-index {
  color: var(--amber);
}

.work-row h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.7vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--sand);
  transition: transform 360ms cubic-bezier(0.3, 0.9, 0.3, 1);
}

.work-row:hover h3 {
  transform: translateX(10px);
}

.work-row p {
  color: var(--sand-dim);
  font-size: clamp(0.96rem, 1.05vw, 1.06rem);
  max-width: 44ch;
}

.work-arrow {
  width: 26px;
  height: 26px;
  justify-self: end;
  color: var(--sand-dim);
  opacity: 0.4;
  transition: opacity 300ms ease, transform 360ms cubic-bezier(0.3, 0.9, 0.3, 1), color 300ms ease;
}

.work-row:hover .work-arrow {
  opacity: 1;
  color: var(--amber);
  transform: translateX(8px);
}

/* ---------- services (light) ---------- */

.section-services {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%231a1208' stroke-opacity='0.05' transform='translate(300 300)'%3E%3Cpath transform='scale(0.24)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.42)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.6)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.78)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(0.96)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3Cpath transform='scale(1.14)' d='M-280 20C-270-150-150-270 10-278C170-286 268-180 276-20C284 140 180 262 10 274C-160 286-290 190-280 20Z'/%3E%3C/g%3E%3C/svg%3E")
    115% -160px / 760px 760px no-repeat,
    var(--paper);
  color: var(--ink);
}

.section-services .section-head {
  margin-bottom: clamp(20px, 3vw, 40px);
}

.section-services .section-kicker {
  color: var(--ink-dim);
}

.section-services .section-kicker .wpt {
  color: var(--ember);
}

.section-services .section-kicker .wpt::before {
  background: var(--ember);
}

.service-list {
  border-top: 1px solid var(--ink-faint);
}

.service-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(240px, 0.42fr);
  gap: clamp(20px, 3.4vw, 70px);
  align-items: start;
  padding: clamp(44px, 6vw, 84px) 0;
  border-bottom: 1px solid var(--ink-faint);
}

.service-tag {
  padding-top: 14px;
  color: var(--ember);
}

.service-row h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.service-row h3 em {
  color: var(--ember);
}

.service-row p {
  padding-top: 14px;
  color: var(--ink-dim);
  font-size: clamp(0.98rem, 1.1vw, 1.1rem);
  max-width: 36ch;
}

/* ---------- studio ---------- */

.section-studio {
  overflow: hidden;
  background: var(--bg-2);
  padding-bottom: clamp(170px, 22vw, 300px);
}

.studio-scene {
  position: absolute;
  inset: auto 0 0 0;
  height: clamp(180px, 30vw, 380px);
  pointer-events: none;
}

.ridge {
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: -2px;
  width: 108%;
  height: 100%;
}

.ridge-far path {
  fill: #241a12;
}

.ridge-near path {
  fill: #0c0907;
}

.studio-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(44px, 7vw, 120px);
  align-items: center;
}

.studio-copy .section-kicker {
  margin-bottom: clamp(28px, 4vw, 52px);
}

.studio-panel {
  padding: clamp(30px, 3.6vw, 48px);
  border: 1px solid rgba(236, 224, 200, 0.16);
  background: rgba(13, 10, 7, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.45);
}

.panel-label {
  display: block;
  margin-bottom: 24px;
  color: var(--amber);
}

.studio-panel ul {
  display: grid;
  gap: 20px;
  padding: 0;
  list-style: none;
}

.studio-panel li {
  position: relative;
  padding-left: 32px;
  color: var(--sand-dim);
  font-size: clamp(1rem, 1.12vw, 1.12rem);
}

.studio-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 16px;
  /* 2px: a 1px hairline at fractional offsets can rasterize away on some
     zoom levels / pixel ratios (middle item lost its dash) */
  height: 2px;
  background: var(--amber);
}

/* ---------- approach ---------- */

.section-approach {
  background:
    radial-gradient(60% 40% at 0% 20%, rgba(224, 160, 78, 0.06), transparent 60%),
    var(--bg);
}

.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(48px, 7vw, 130px);
  align-items: start;
}

.approach-intro {
  position: sticky;
  top: clamp(110px, 16vh, 160px);
}

.approach-intro .section-kicker {
  margin-bottom: clamp(28px, 4vw, 52px);
}

.approach-intro .section-copy {
  margin-top: 26px;
}

.route-steps {
  position: relative;
  list-style: none;
  padding: 8px 0 8px 58px;
}

.steps-track {
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--sand-faint);
}

.steps-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--amber), var(--ember));
  transform: scaleY(0);
  transform-origin: top;
}

.route-step {
  position: relative;
  padding-bottom: clamp(54px, 7vw, 96px);
}

.route-step:last-child {
  padding-bottom: 0;
}

.step-node {
  position: absolute;
  left: -58px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(236, 224, 200, 0.4);
  background: var(--bg);
  transition: background 400ms ease, border-color 400ms ease, box-shadow 400ms ease;
}

.route-step.is-active .step-node {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 16px rgba(224, 160, 78, 0.75);
}

.step-num {
  display: block;
  margin-bottom: 14px;
  color: var(--sand-dim);
  transition: color 400ms ease;
}

.route-step.is-active .step-num {
  color: var(--amber);
}

.route-step h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 2.9vw, 2.9rem);
  line-height: 1;
  color: rgba(236, 224, 200, 0.45);
  transition: color 500ms ease;
}

.route-step.is-active h3 {
  color: var(--sand);
}

.route-step p {
  margin-top: 14px;
  max-width: 46ch;
  color: rgba(236, 224, 200, 0.42);
  font-size: clamp(0.98rem, 1.1vw, 1.1rem);
  transition: color 500ms ease;
}

.route-step.is-active p {
  color: var(--sand-dim);
}

/* ---------- contact ---------- */

.section-contact {
  overflow: hidden;
  padding-top: clamp(120px, 13vw, 180px);
  padding-bottom: clamp(120px, 15vw, 200px);
  background:
    radial-gradient(80% 60% at 50% 118%, rgba(196, 80, 42, 0.24), transparent 65%),
    radial-gradient(50% 35% at 78% 100%, rgba(224, 160, 78, 0.12), transparent 70%),
    var(--bg-2);
}

.contact-title {
  margin: clamp(26px, 4vw, 48px) 0 clamp(20px, 3vw, 34px);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.6rem, 9.5vw, 9.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--sand);
}

.contact-copy {
  max-width: 52ch;
  color: var(--sand-dim);
  font-size: clamp(1rem, 1.2vw, 1.2rem);
}

.contact-mail {
  position: relative;
  display: inline-block;
  margin-top: clamp(40px, 5.5vw, 72px);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 3.6vw, 3.5rem);
  line-height: 1.15;
  color: var(--amber-bright);
  overflow-wrap: anywhere;
}

.contact-mail i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0.22);
  transform-origin: left;
  transition: transform 500ms cubic-bezier(0.6, 0, 0.2, 1);
}

.contact-mail:hover i {
  transform: scaleX(1);
}

.journal-note {
  max-width: 430px;
  margin-top: clamp(70px, 9vw, 120px);
  padding-left: 26px;
  border-left: 1px solid rgba(224, 160, 78, 0.5);
}

.journal-note .mono-label {
  color: var(--amber);
}

.journal-note p {
  margin-top: 12px;
  color: var(--sand-dim);
  font-size: 0.98rem;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 36px;
  padding: 34px var(--gutter);
  border-top: 1px solid var(--sand-ghost);
  background: var(--bg);
}

.site-footer .brand-word {
  font-size: 1.2rem;
}

.site-footer .brand-mark {
  width: 24px;
  height: 24px;
}

.footer-meta {
  color: rgba(236, 224, 200, 0.4);
  font-size: 0.64rem;
}

/* ---------- animation initial states (JS only) ---------- */

html.js [data-hero-fade],
html.js [data-hero-panel],
html.js [data-hero-line],
html.js .reveal {
  opacity: 0;
}

html.js [data-hero-title],
html.js [data-split] {
  visibility: hidden;
}

html.js [data-hero-title].is-split,
html.js [data-split].is-split {
  visibility: visible;
}

/* ---------- responsive ---------- */

/* below ~1340px the floating panel starts colliding with the hero title,
   so it drops into the flow under the hero copy */
@media (max-width: 1340px) {
  .code-plan {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    margin: 72px 0 0;
    width: min(340px, 100%);
  }

  .hero {
    justify-content: flex-start;
    padding-top: clamp(120px, 16vh, 170px);
    padding-bottom: 150px;
  }
}

@media (max-width: 1120px) {
  :root {
    --rail: 0px;
  }

  .route-rail {
    display: none;
  }

  .hero,
  .section-work {
    padding-left: var(--gutter);
  }

  .hero-foot {
    left: var(--gutter);
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .approach-grid {
    grid-template-columns: 1fr;
  }

  .approach-intro {
    position: static;
  }

  .studio-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .studio-panel {
    max-width: 560px;
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .site-header {
    grid-template-columns: auto 1fr;
  }

  .work-row {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "index title"
      "index copy";
    row-gap: 12px;
    align-items: start;
  }

  .work-index {
    grid-area: index;
    padding-top: 8px;
  }

  .work-row h3 {
    grid-area: title;
  }

  .work-row p {
    grid-area: copy;
  }

  .work-arrow {
    display: none;
  }

  .work-row::before {
    background-position: right -160px center;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: clamp(36px, 8vw, 56px) 0;
  }

  .service-tag,
  .service-row p {
    padding-top: 0;
  }

  .hero-meta {
    display: none;
  }

  .route-steps {
    padding-left: 44px;
  }

  .step-node {
    left: -44px;
  }
}

@media (max-width: 560px) {
  html {
    scroll-padding-top: 74px;
  }

  .site-header {
    padding: 14px 20px;
  }

  .header-cta {
    padding: 9px 16px;
    font-size: 0.62rem;
    white-space: nowrap;
  }

  .brand-word {
    font-size: 1.25rem;
  }

  .hero {
    padding-top: 118px;
    padding-bottom: 120px;
  }

  .hero-title {
    font-size: clamp(4rem, 21vw, 5.6rem);
  }

  .hero-line {
    font-size: clamp(1.5rem, 6.6vw, 1.9rem);
  }

  .hero-actions {
    gap: 20px;
  }

  .button {
    padding: 16px 26px;
  }

  .code-plan {
    margin-top: 56px;
    padding: 20px;
  }

  .section {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .section-title {
    font-size: clamp(2.3rem, 10.4vw, 3.2rem);
  }

  .service-row h3 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .route-step h3 {
    font-size: clamp(1.6rem, 7.6vw, 2.1rem);
  }

  .contact-title {
    font-size: clamp(3rem, 14.5vw, 4.2rem);
  }

  .contact-mail {
    font-size: clamp(1.35rem, 6.8vw, 1.8rem);
  }

  .loader-count {
    font-size: 3.6rem;
  }
}

@media (max-width: 374px) {
  .header-cta {
    padding: 9px 13px;
    gap: 0;
  }

  .cta-dot {
    display: none;
  }
}

/* ---------- reduced motion ---------- */

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

  html.js .loader {
    display: none;
  }

  html.js [data-hero-fade],
  html.js [data-hero-panel],
  html.js [data-hero-line],
  html.js .reveal {
    opacity: 1;
  }

  html.js [data-hero-title],
  html.js [data-split] {
    visibility: visible;
  }

  .cue-line::after,
  .cp-caret {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
  }
}
