/* ── Page layout: rail, header, sections, grids ─────────────────────── */

/* depth gauge — fixed rail on the left */
.depth-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  z-index: 40;
  pointer-events: none;
}

.rail-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--line) 0 10px,
    transparent 10px 18px
  );
}

.rail-bucket {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 11px;
  height: 11px;
  transform: translateX(-50%);
  background: var(--ember);
  border-radius: 2px 2px 4px 4px;
  box-shadow: 0 0 14px rgba(255, 158, 58, 0.55);
  transition: transform 0.15s linear;
}

.rail-readout {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: var(--bone-dim);
  white-space: nowrap;
}

@media (max-width: 1099px) {
  .depth-rail { display: none; }
}

/* header */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.site-head.scrolled {
  padding: 0.65rem var(--pad);
  background: rgba(12, 10, 7, 0.86);
  background: color-mix(in srgb, var(--ink-0) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--bone);
}

.brand .mark {
  width: 34px;
  height: 34px;
  color: var(--ember);
}

.wordmark {
  font-size: 0.95rem;
  font-weight: 500;
}

.wordmark em {
  font-style: normal;
  color: var(--ember);
}

.nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  font-size: 0.85rem;
}

.nav a {
  color: var(--bone-dim);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

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

.nav a.active {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.nav .nav-cta { color: var(--water); }

.nav .lang-switch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--bone-dim);
  transition: color 0.2s, border-color 0.2s;
}

.nav .lang-switch:hover {
  color: var(--ember);
  border-color: var(--ember);
  border-bottom-color: var(--ember);
}

@media (max-width: 640px) {
  .wordmark { display: none; }
  .brand { flex-shrink: 0; }
  .nav {
    font-size: 0.78rem;
    gap: 0.2rem 0.85rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
  }
  .nav a { padding: 0.45rem 0; }
  .nav .lang-switch { padding: 0.2rem 0.6rem; }
}

/* sections as strata; content hangs on one shared left axis */
main > section {
  position: relative;
  padding-block: clamp(5rem, 11vh, 8.5rem);
  padding-inline: max(var(--pad), calc((100% - var(--maxw)) / 2));
}

@media (min-width: 1100px) {
  main > section {
    padding-left: max(calc(var(--rail-w) + var(--pad)), calc((100% - var(--maxw)) / 2));
  }
}

.strata-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  max-width: none;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

.depth-mark {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.1rem;
}

.section-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--bone-dim);
  max-width: 46rem;
  margin-top: 1.4rem;
}

/* hero */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 7rem;
  background:
    radial-gradient(1100px 500px at 78% 8%, rgba(255, 122, 24, 0.07), transparent 65%),
    radial-gradient(900px 700px at 12% 95%, rgba(255, 158, 58, 0.05), transparent 60%),
    var(--ink-0);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  width: 100%;
}

.hero-copy { min-width: 0; }

.hero-well {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 420px;
  justify-self: center;
}

.well-scene {
  width: 100%;
  height: auto;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}

.hero-stats li {
  background: var(--ink-0);
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-stats strong {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 500;
  color: var(--ember);
}

.hero-stats span {
  font-size: 0.86rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-well { max-width: 170px; order: -1; margin-top: 0.5rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* story — background one step deeper */
.strata { background: var(--ink-1); }

/* smithy */
.forge-sec {
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(255, 122, 24, 0.06), transparent 60%),
    var(--ink-2);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-top: 3.2rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-top: clamp(1rem, 2vw, 1.6rem);
}

@media (max-width: 900px) {
  .pipeline, .tool-grid { grid-template-columns: 1fr; }
}

/* companies */
.firms { background: var(--ink-1); }

.firm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-top: 3rem;
}

@media (max-width: 800px) {
  .firm-grid { grid-template-columns: 1fr; }
}

/* the bottom — water */
.bottom {
  background:
    radial-gradient(1000px 480px at 50% 118%, rgba(143, 216, 208, 0.13), transparent 70%),
    linear-gradient(var(--ink-1), var(--water-deep));
  text-align: center;
  padding-bottom: clamp(7rem, 16vh, 11rem);
}

.bottom .section-lede { margin-inline: auto; }

.waterline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  max-width: none;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(143, 216, 208, 0.06));
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.8rem;
}

/* footer */
.site-foot {
  background: var(--water-deep);
  text-align: center;
  padding: 3rem var(--pad) 3.5rem;
  border-top: 1px solid rgba(143, 216, 208, 0.12);
}

.site-foot .mark {
  width: 30px;
  height: 30px;
  margin: 0 auto 1rem;
  color: var(--water);
  opacity: 0.8;
}

.site-foot p {
  font-size: 0.82rem;
  color: var(--muted);
}

.site-foot .foot-note {
  margin-top: 0.4rem;
  color: var(--water);
  opacity: 0.6;
}
