/* DESIGN TOKENS */
/* Brand palette (light theme only) plus safe-area padding so content clears phone notches. */
/* Change colours here and the whole site follows. */
:root {
  --bg: #fafafa;
  --sf: #f1f5f9;
  --ink: #0f172a;
  --mut: #475569;
  --blue: #1d4ed8;
  --sage: #65a30d;
  --ln: #e2e8f0;
  --glass: rgba(250, 250, 250, 0.74);
  --on: #fff;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* BASE */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(72px + env(safe-area-inset-top, 0px));
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    400 16px/1.6 Inter,
    system-ui,
    sans-serif;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--glass);
  backdrop-filter: blur(14px);
  z-index: 30;
}
/* Headings use Space Grotesk; .mono is for technical numbers and labels (JetBrains Mono) */
h1,
h2,
h3 {
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
a {
  color: inherit;
}
/* STICKY HEADER (frosted glass) */
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(16px, 3vw, 40px);
  height: 64px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ln);
}
.logo {
  font: 600 19px 'Space Grotesk';
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
}
.logo i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--blue);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: block;
  background: linear-gradient(135deg, transparent 50%, var(--sage) 50%);
}
nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--mut);
}
nav a {
  text-decoration: none;
}
nav a:hover {
  color: var(--ink);
}
/* BUTTONS */
.btn {
  display: inline-block;
  font: 500 14px Inter;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.btn:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn.p {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn.p:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.hbtns {
  display: flex;
  gap: 10px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
/* HERO: 40% typography / 60% 3D stage. The grid backdrop is a pseudo-element so the text stays fully opaque */
.hero {
  display: grid;
  grid-template-columns: 40% 60%;
  min-height: calc(100svh - 64px);
}
.hl {
  position: relative;
  padding: clamp(28px, 5vw, 72px) clamp(16px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.hl::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--ln) 1px, transparent 1px), linear-gradient(90deg, var(--ln) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent);
  mask-image: linear-gradient(90deg, #000 55%, transparent);
}
.hl > * {
  position: relative;
}
.eyebrow {
  font-size: 12px;
  color: var(--sage);
  letter-spacing: 0.04em;
}
.hero h1 {
  font-size: clamp(34px, 4.2vw, 62px);
}
.sub {
  color: var(--mut);
  max-width: 46ch;
  margin: 0;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* 3D STAGE: dusk tint overlay (--d is set from JS), canvas, and no-WebGL fallback */
.stage {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}
.stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(#1e293b, #334155 62%, #0f172a);
  opacity: var(--d, 0);
  -webkit-mask-image: radial-gradient(ellipse at 50% 52%, #000 38%, transparent 74%);
  mask-image: radial-gradient(ellipse at 50% 52%, #000 38%, transparent 74%);
}
#cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  cursor: grab;
}
.nogl #cv {
  display: none;
}
.nogl::after {
  content: '3D view needs WebGL. The rest of the page works as normal.';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--mut);
  padding: 24px;
  text-align: center;
}
/* EXPLODED-VIEW CALLOUTS: positioned every frame from JS using the 3D anchor points */
.co {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  font:
    500 10px 'JetBrains Mono',
    monospace;
  white-space: nowrap;
  color: var(--ink);
}
.co::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  border-top: 1px solid #0f172a;
  background: none;
}
.co::after {
  content: '';
  position: absolute;
  left: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #65a30d;
}
.co span {
  position: absolute;
  left: 46px;
  top: -7px;
  background: var(--bg);
  border: 1px solid var(--ln);
  padding: 1px 5px;
}
/* CONTROL DOCK: frosted-glass bar holding the sun slider and toggles */
.dock {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(580px, 92%);
  padding: 12px 16px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--ln);
  border-radius: 4px;
  display: grid;
  gap: 10px;
}
.dock .r {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.dock label {
  font-size: 12px;
  color: var(--mut);
}
input[type='range'] {
  flex: 1;
  min-width: 120px;
  accent-color: var(--blue);
}
.ro {
  font-size: 13px;
  white-space: nowrap;
}
.ro b {
  font-weight: 500;
  color: var(--blue);
}
.tg {
  font: 500 12px Inter;
  padding: 8px 12px;
  border: 1px solid var(--ln);
  background: var(--bg);
  color: var(--ink);
  border-radius: 2px;
  cursor: pointer;
}
.tg[aria-pressed='true'] {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
/* TRUST STRIP */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ln);
  border-bottom: 1px solid var(--ln);
  background: var(--sf);
}
.trust div {
  padding: 20px clamp(16px, 3vw, 40px);
  border-right: 1px solid var(--ln);
  font-size: 14px;
  color: var(--mut);
}
.trust div:last-child {
  border: 0;
}
.trust b {
  display: block;
  color: var(--ink);
  font:
    500 14px 'JetBrains Mono',
    monospace;
  margin-bottom: 2px;
}
/* SHARED SECTION LAYOUT */
section {
  padding: clamp(56px, 8vw, 112px) clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--ln);
}
.w {
  max-width: 1200px;
  margin: 0 auto;
}
.lab {
  font-size: 12px;
  color: var(--sage);
  margin-bottom: 14px;
  display: block;
}
h2 {
  font-size: clamp(28px, 3.4vw, 46px);
  max-width: 20ch;
  margin-bottom: 20px;
}
.lead {
  color: var(--mut);
  max-width: 60ch;
  margin: 0 0 40px;
}
/* 01 FIELD EXECUTION (project card and photo placeholder) */
.fx {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border: 1px solid var(--ln);
}
.ph {
  position: relative;
  min-height: 340px;
  background: var(--sf);
  display: grid;
  place-items: center;
  color: var(--mut);
  font-size: 12px;
  text-align: center;
  padding: 24px;
  border-right: 1px solid var(--ln);
  background-image:
    linear-gradient(45deg, transparent 49.8%, var(--ln) 50%, transparent 50.2%),
    linear-gradient(-45deg, transparent 49.8%, var(--ln) 50%, transparent 50.2%);
}
.ph em {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-style: normal;
  color: var(--ink);
}
.ph span {
  background: var(--sf);
  padding: 4px 8px;
}
dl {
  margin: 0;
  padding: 28px;
}
dt {
  font-size: 11px;
  color: var(--mut);
  margin-top: 16px;
}
dd {
  margin: 2px 0 0;
}
/* 02 CAPABILITIES (three-column grid) */
.caps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ln);
}
.cap {
  padding: 28px;
  border-right: 1px solid var(--ln);
}
.cap:last-child {
  border: 0;
}
.cap h3 {
  font-size: 21px;
  margin: 12px 0;
}
.cap p {
  color: var(--mut);
  margin: 0;
  font-size: 15px;
}
.cap .mono {
  color: var(--blue);
  font-size: 12px;
}
/* 03 INSTANT SIZING ESTIMATOR (tabs, input, readouts) */
.est {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.seg {
  display: flex;
  margin-bottom: 14px;
}
.seg button {
  flex: 1;
  font: 500 13px Inter;
  padding: 10px;
  border: 1px solid var(--ln);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.seg button + button {
  border-left: 0;
}
.seg button[aria-pressed='true'] {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.num {
  width: 100%;
  font:
    500 26px 'JetBrains Mono',
    monospace;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  border-radius: 2px;
  margin-bottom: 14px;
}
.out {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ln);
}
.out div {
  padding: 22px;
  border-bottom: 1px solid var(--ln);
}
.out div:nth-child(odd) {
  border-right: 1px solid var(--ln);
}
.out div:nth-child(n + 3) {
  border-bottom: 0;
}
.out small {
  display: block;
  color: var(--mut);
  font-size: 12px;
}
.out b {
  font:
    500 clamp(22px, 2.6vw, 32px) 'JetBrains Mono',
    monospace;
  color: var(--blue);
}
.out i {
  font-style: normal;
  font-size: 13px;
  color: var(--mut);
}
.note {
  font-size: 12px;
  color: var(--mut);
  margin-top: 12px;
}
.out div:nth-child(4) b {
  color: var(--sage);
}
/* 04 METHODOLOGY STEPS (horizontal timeline; vertical on mobile) */
ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--ink);
}
ol li {
  padding: 22px 18px 0 0;
  position: relative;
}
ol li::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--ink);
}
ol li:nth-child(odd)::before {
  background: var(--blue);
}
ol li:nth-child(even)::before {
  background: var(--sage);
}
ol .mono {
  font-size: 12px;
  color: var(--mut);
}
ol h3 {
  font-size: 18px;
  margin: 8px 0;
}
ol p {
  font-size: 14px;
  color: var(--mut);
  margin: 0;
}
/* AUDIT FORM */
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 820px;
}
form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--mut);
}
form .f {
  grid-column: 1/-1;
}
form input,
form select {
  font: 400 15px Inter;
  padding: 12px;
  border: 1px solid var(--ln);
  background: var(--bg);
  color: var(--ink);
  border-radius: 2px;
}
/* FOOTER */
footer {
  padding: 48px clamp(16px, 3vw, 40px) 32px;
  background: var(--sf);
  font-size: 14px;
  color: var(--mut);
}
footer .w {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
footer b {
  color: var(--ink);
  font-family: 'Space Grotesk';
}
/* SCROLL REVEAL: only hides content when JavaScript is running */
.js .rv {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.7s,
    transform 0.7s;
}
.js .rv.in {
  opacity: 1;
  transform: none;
}
/* RESPONSIVE: tablet and phone layout */
@media (max-width: 900px) {
  nav {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hl {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .stage {
    min-height: 560px;
  }
  .fx,
  .caps,
  .est {
    grid-template-columns: 1fr;
  }
  .cap {
    border-right: 0;
    border-bottom: 1px solid var(--ln);
  }
  .ph {
    border-right: 0;
    border-bottom: 1px solid var(--ln);
  }
  ol {
    grid-template-columns: 1fr;
  }
  ol li {
    padding: 22px 0 18px 18px;
    border-left: 1px solid var(--ink);
    margin-left: 3px;
  }
  ol li::before {
    top: 0;
    left: -4px;
  }
  .trust {
    grid-template-columns: 1fr;
  }
  .trust div {
    border-right: 0;
    border-bottom: 1px solid var(--ln);
  }
  form {
    grid-template-columns: 1fr;
  }
  .hbtns .btn:first-child {
    display: none;
  }
}
/* REDUCED MOTION: switch off reveal animation and smooth scroll */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .rv {
    transition: none;
    opacity: 1;
    transform: none;
  }
}
:root {
  --logo: url('../assets/logo.png');
}
/* LOGO WORDMARK: image comes from the --logo variable in :root */
.lg {
  display: block;
  height: 30px;
  width: 156px;
  background: var(--logo) left center/contain no-repeat;
}
.lg.ft {
  height: 26px;
  width: 135px;
  margin-bottom: 10px;
}
