/* ============================================================
   Design tokens — dusk forest palette
   ============================================================ */
:root {
  --forest-night: #0C1712;  /* deep background */
  --forest-mist:  #16261D;  /* raised surfaces */
  --moss:         #8FBF6B;  /* primary accent — living green */
  --sun-gold:     #E8B84B;  /* secondary accent — low sun */
  --root-glow:    #7FD8C0;  /* underground moss */
  --warm-white:   #F5F1E6;  /* main text */
  --dim-white:    rgba(245, 241, 230, 0.64);

  --font-display: "Zen Old Mincho", serif;
  --font-body:    "Manrope", sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  /* Static dusk gradient behind the transparent WebGL canvas */
  background: linear-gradient(to bottom, #0A1613 0%, #0F1F17 45%, #1C231A 78%, #241F16 100%);
  background-attachment: fixed;
  color: var(--warm-white);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--moss); color: var(--forest-night); }

/* ============================================================
   Fixed WebGL canvas behind everything
   ============================================================ */
#scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(8, 15, 12, 0.55) 100%);
}

/* ============================================================
   Progress rail — the descent map
   ============================================================ */
.rail {
  position: fixed;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.rail-line {
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(245, 241, 230, 0.15);
}
.rail-fill {
  position: absolute;
  left: 3px;
  top: 8px;
  width: 1px;
  height: 0%;
  background: linear-gradient(to bottom, var(--sun-gold), var(--moss), var(--root-glow));
  transition: height 0.1s linear;
}
.rail-stop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.4rem 0;
  text-decoration: none;
}
.rail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(245, 241, 230, 0.25);
  transition: background 0.3s, box-shadow 0.3s;
}
.rail-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--dim-white);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s, transform 0.3s;
}
.rail-stop.active .rail-dot {
  background: var(--moss);
  box-shadow: 0 0 10px rgba(143, 191, 107, 0.8);
}
.rail-stop.active .rail-label { opacity: 1; transform: translateX(0); }
.rail-stop:last-child.active .rail-dot {
  background: var(--root-glow);
  box-shadow: 0 0 10px rgba(127, 216, 192, 0.8);
}

/* ============================================================
   Top bar
   ============================================================ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--warm-white);
  text-decoration: none;
}
.brand em { font-style: normal; color: var(--moss); }
.topbar-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--warm-white);
  text-decoration: none;
  border: 1px solid rgba(245, 241, 230, 0.25);
  padding: 0.55rem 1.1rem;
  border-radius: 2rem;
  transition: border-color 0.3s, color 0.3s;
}
.topbar-cta:hover { border-color: var(--moss); color: var(--moss); }

/* ============================================================
   Content sections riding on top of the scene
   ============================================================ */
main { position: relative; z-index: 2; }

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 8vw;
}
.section-inner {
  max-width: 34rem;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.section.visible .section-inner { opacity: 1; transform: translateY(0); }
.section.right { justify-content: flex-end; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: var(--moss);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--moss);
  opacity: 0.6;
}
.eyebrow.root-tone { color: var(--root-glow); }
.eyebrow.root-tone::before { background: var(--root-glow); }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}
h1 { font-size: clamp(3rem, 8vw, 5.6rem); margin-bottom: 1.4rem; }
h1 em, h2 em { font-style: normal; color: var(--sun-gold); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: 1.2rem; }
.lede { font-size: 1.05rem; color: var(--dim-white); max-width: 28rem; }

.hero .section-inner { max-width: 42rem; }
.scroll-hint {
  margin-top: 3.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--dim-white);
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}
.scroll-hint .arrow { display: inline-block; animation: drift 2.2s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(6px); opacity: 1; }
}

.service-list { margin-top: 2.4rem; }
.service {
  padding: 1.4rem 0;
  border-top: 1px solid rgba(245, 241, 230, 0.14);
  display: grid;
  gap: 0.3rem;
}
.service:last-child { border-bottom: 1px solid rgba(245, 241, 230, 0.14); }
.service h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.service p { color: var(--dim-white); font-size: 0.92rem; max-width: 26rem; }

.steps { margin-top: 2.4rem; display: flex; flex-direction: column; gap: 1.6rem; }
.step { display: flex; gap: 1.2rem; align-items: baseline; }
.step-marker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--sun-gold);
  white-space: nowrap;
}
.step-body strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}
.step-body span { color: var(--dim-white); font-size: 0.92rem; }

.contact-cta {
  display: inline-block;
  margin-top: 2.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--warm-white);
  text-decoration: none;
  border-bottom: 1px solid var(--root-glow);
  padding-bottom: 0.3rem;
  transition: color 0.3s;
}
.contact-cta:hover { color: var(--root-glow); }

footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 8vw 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--dim-white);
}

/* ============================================================
   Responsive & accessibility
   ============================================================ */
@media (max-width: 720px) {
  .rail { display: none; }
  .topbar { padding: 1.1rem 1.3rem; }
  .section { padding: 5rem 1.6rem; }
  .section.right { justify-content: flex-start; }
  footer { flex-direction: column; gap: 0.6rem; padding: 2rem 1.6rem; }
}

a:focus-visible, .topbar-cta:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint .arrow { animation: none; }
  .section-inner { transition: none; }
}
