/* =========================================================
   SIMPLE v2 — liquid glass + 3D
   ========================================================= */

:root {
  --mist: #E8EBE3;
  --mist-deep: #DCE1D3;
  --ink: #131410;
  --ink-2: #474A41;
  --ink-3: rgba(19, 20, 16, .5);
  --lime: #A8C636;
  --lime-hi: #C2DB5A;
  --fog: #C9D3E4;

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --nav-h: 64px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1.0625rem/1.55 var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(60vmax 50vmax at 88% 6%, rgba(168, 198, 54, .42), transparent 62%),
    radial-gradient(55vmax 45vmax at 6% 92%, rgba(201, 211, 228, .9), transparent 60%),
    radial-gradient(40vmax 40vmax at 46% 48%, rgba(248, 249, 245, .7), transparent 70%),
    var(--mist);
  background-attachment: fixed;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--mist);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease-out);
}
.skip:focus { transform: none; }

/* ---------- 3D canvas (fixed background layer) ---------- */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  display: block;
  opacity: 0;
  transition: opacity .8s var(--ease-out);
  pointer-events: none;
}
.webgl #scene { opacity: 1; }
.no-webgl #scene { display: none; }
.is-over-object body { cursor: pointer; }

/* ---------- Liquid glass surface ---------- */

.lg {
  --lg-tint: rgba(255, 255, 255, .2);
  --lg-blur: 14px;
  position: relative;
  isolation: isolate;
  background: var(--lg-tint);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(1.7) brightness(1.04);
  backdrop-filter: blur(var(--lg-blur)) saturate(1.7) brightness(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 1px 0 0 rgba(255, 255, 255, .35),
    inset 0 -1px 0 rgba(255, 255, 255, .3),
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    inset 0 -16px 28px -22px rgba(255, 255, 255, .6),
    0 1px 1px rgba(19, 20, 16, .05),
    0 18px 40px -22px rgba(19, 20, 16, .32);
}
/* rim light: bright top-left edge fading to a softer bottom-right edge */
.lg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .12) 32%, rgba(255, 255, 255, 0) 58%, rgba(255, 255, 255, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* specular sheen that follows the pointer */
.lg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, .5), transparent 62%);
  opacity: 0;
  transition: opacity .35s var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) {
  .lg:hover::after { opacity: 1; }
}

@media (prefers-reduced-transparency: reduce) {
  .lg { --lg-tint: rgba(246, 247, 243, .94); }
}

/* ---------- Buttons ---------- */

.btn {
  --tx: 0px; --ty: 0px; --s: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 48px;
  padding: 0 1.3em;
  border: 0;
  border-radius: 999px;
  font: 600 1rem/1.1 var(--font-body);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transform: translate(var(--tx), var(--ty)) scale(var(--s));
  transition: transform .55s var(--ease-spring), background-color .25s, box-shadow .25s;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn:active { --s: .95; transition-duration: .12s; }

.btn--sm { min-height: 42px; padding: 0 1em; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding: 0 1.55em; font-size: 1.0625rem; }

/* lime: brand fill with glassy highlights (no backdrop so it can live inside other glass) */
.btn--lime {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 55%),
    var(--lime);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -2px 6px rgba(80, 100, 10, .25),
    inset 0 0 0 1px rgba(255, 255, 255, .25),
    0 10px 24px -12px rgba(90, 115, 15, .7);
}
.btn--lime:hover { background-color: var(--lime-hi); }
.btn--lime.lg { --lg-tint: rgba(168, 198, 54, .86); background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 55%), var(--lg-tint); }
.btn--lime.lg:hover { --lg-tint: rgba(186, 214, 72, .92); }

.btn--glass {
  background: rgba(255, 255, 255, .34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 0 0 1px rgba(255, 255, 255, .4),
    0 8px 20px -14px rgba(19, 20, 16, .35);
}
.btn--glass:hover { background: rgba(255, 255, 255, .55); }
.btn--glass.lg { --lg-tint: rgba(255, 255, 255, .26); }
.btn--glass.lg:hover { --lg-tint: rgba(255, 255, 255, .45); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 0; right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.nav__pill {
  --lg-tint: rgba(255, 255, 255, .24);
  --lg-blur: 10px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  width: min(100%, 720px);
  height: var(--nav-h);
  padding: 0 11px 0 22px;
  border-radius: 999px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font: 800 1.2rem/1 var(--font-display);
  letter-spacing: -.03em;
  text-decoration: none;
}
.nav__mark { width: 18px; height: 18px; color: var(--lime); filter: drop-shadow(0 1px 0 rgba(19, 20, 16, .35)); }
.nav__links {
  display: flex;
  gap: 2px;
  margin: 0 8px 0 0;
  padding: 0;
  list-style: none;
}
.nav__links a {
  display: block;
  padding: 11px 15px;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s;
}
.nav__links a:hover { background: rgba(255, 255, 255, .42); }
.nav__links a[aria-current="true"] { background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  margin-left: 4px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  cursor: pointer;
  place-content: center;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 16px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease-out);
}
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.nav__sheet {
  --lg-tint: rgba(255, 255, 255, .5);
  pointer-events: auto;
  display: grid;
  width: min(100%, 720px);
  padding: 8px;
  border-radius: 28px;
}
.nav__sheet[hidden] { display: none; }
.nav__sheet a {
  padding: 14px 18px;
  border-radius: 20px;
  font: 600 1.25rem/1.2 var(--font-display);
  text-decoration: none;
}
.nav__sheet a:hover { background: rgba(255, 255, 255, .5); }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__toggle { display: grid; }
  .nav__pill { padding-left: 18px; }
}
@media (min-width: 721px) {
  .nav__sheet { display: none !important; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 48px;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 40px) var(--gutter) clamp(28px, 6vh, 64px);
}
.hero__title {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: grid;
  grid-template-rows: 1fr auto;
  font-weight: 700;
}
.wordmark {
  align-self: center;
  justify-self: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 27vw, 26rem);
  font-variation-settings: "opsz" 96;
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--ink);
  transition: color .4s;
  transform: translateY(-4%);
}
/* while WebGL boots (or once it runs) the canvas draws the wordmark */
.webgl-pending .wordmark,
.webgl .wordmark { color: transparent; }

.hero__line {
  align-self: end;
  max-width: 11.5ch;
  font-size: clamp(2.1rem, 1.2rem + 2.7vw, 3.75rem);
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero__side {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  max-width: 460px;
}
.hero__sub {
  margin-bottom: 24px;
  color: var(--ink-2);
  font-size: 1.0625rem;
  text-wrap: pretty;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* the one orchestrated load moment */
.js .hero__line,
.js .hero__side { opacity: 0; transform: translateY(28px); }
.is-ready .hero__line,
.is-ready .hero__side {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out);
}
.is-ready .hero__line { transition-delay: .35s; }
.is-ready .hero__side { transition-delay: .55s; }
.no-webgl .wordmark { opacity: 0; }
.no-webgl.is-ready .wordmark { opacity: 1; transition: opacity 1s var(--ease-out), color .4s; }

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    row-gap: 28px;
    padding-top: calc(var(--nav-h) + 28px);
  }
  .hero__title { grid-row: 1; }
  .hero__side { grid-column: 1; grid-row: 2; justify-self: start; }
  .hero__line { max-width: 12ch; }
}

/* ---------- Section headings ---------- */

.services h2,
.process h2 {
  font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.6rem);
  line-height: 1;
  letter-spacing: -.035em;
  text-wrap: balance;
}

/* ---------- Services (scroll-driven on desktop) ---------- */

.services { position: relative; }
.services__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: center;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 48px;
}
.services__intro h2 { max-width: 15ch; }

.svc-tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: clamp(28px, 5vh, 48px);
}
.svc-tab {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 2px 22px 2px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 700 clamp(1.25rem, .9rem + 1vw, 1.75rem)/1.1 var(--font-display);
  letter-spacing: -.025em;
  text-align: left;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .3s, background-color .3s, box-shadow .3s;
}
.svc-tab:hover { color: var(--ink); }
.svc-tab[aria-selected="true"] {
  color: var(--ink);
  background: rgba(255, 255, 255, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 0 0 1px rgba(255, 255, 255, .45);
}
.svc-tab__slot {
  width: 56px; height: 56px;
  flex: none;
  border-radius: 50%;
}

.svc-progress {
  display: flex;
  gap: 6px;
  width: 200px;
  margin: 24px 0 0 4px;
}
.svc-progress span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(19, 20, 16, .12);
  transition: background-color .3s;
}
.svc-progress span.is-on { background: var(--ink); }

.services__stage {
  display: grid;
  grid-template-rows: minmax(180px, 1fr) auto;
  height: min(76vh, 700px);
}
.svc-visual { min-height: 0; }
.svc-panels { position: relative; margin-top: -64px; }
.svc-panel {
  --lg-tint: rgba(255, 255, 255, .3);
  --lg-blur: 18px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: 32px;
}
.svc-panel h3 {
  font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.4rem);
  line-height: 1;
  letter-spacing: -.03em;
}
.svc-panel p { margin-top: 14px; max-width: 46ch; color: var(--ink-2); }
.svc-panel:not([hidden]) { animation: panel-in .55s var(--ease-out); }
.svc-panel:focus-visible { outline-offset: 4px; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 28px;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 0 0 1px rgba(19, 20, 16, .07);
  font-size: .9rem;
  font-weight: 500;
}

/* without JS every service is listed; with JS they become tabs */
html:not(.js) .svc-panel[hidden] { display: block; margin-top: 12px; }

@media (min-width: 900px) {
  .js .services { height: 440vh; scroll-margin-top: -88px; }
  .js .services__sticky {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    height: 100vh;
  }
}
@media (max-width: 899px) {
  .services__inner { grid-template-columns: minmax(0, 1fr); padding-top: 72px; }
  .svc-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .svc-tab {
    gap: 10px;
    min-height: 56px;
    padding: 4px 12px 4px 4px;
    border-radius: 22px;
    font-size: 1.05rem;
  }
  .svc-tab__slot { width: 48px; height: 48px; }
  .svc-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .svc-progress { display: none; }
  .services__stage { height: auto; grid-template-rows: 220px auto; }
  .svc-panels { margin-top: -40px; }
}

/* ---------- Process ---------- */

.process {
  --visual: clamp(110px, 12vw, 170px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(96px, 16vh, 180px) var(--gutter) clamp(64px, 10vh, 120px);
}
.process__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px 48px;
}
.process__head p { max-width: 36ch; color: var(--ink-2); }

.steps {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin: clamp(32px, 6vh, 56px) 0 0;
  padding: 0;
  list-style: none;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--visual) + 21px);
  height: 2px;
  border-radius: 2px;
  background: rgba(19, 20, 16, .12);
}
.steps::after {
  background: var(--ink);
  transform-origin: left center;
  transform: scaleX(var(--p));
}
.step__visual { height: var(--visual); }
.step__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--mist);
  box-shadow: inset 0 0 0 2px rgba(19, 20, 16, .16);
  font: 700 1rem/1 var(--font-display);
  transition: background-color .35s, box-shadow .35s;
}
.step.is-on .step__num { background: var(--lime); box-shadow: inset 0 0 0 2px var(--ink); }
.step h3 {
  margin-top: 20px;
  font-size: 1.5rem;
  letter-spacing: -.025em;
}
.step p { margin-top: 8px; max-width: 26ch; color: var(--ink-2); }

@media (max-width: 760px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before,
  .steps::after {
    top: 22px; bottom: 22px;
    left: 21px; right: auto;
    width: 2px; height: auto;
  }
  .steps::after { transform-origin: center top; transform: scaleY(var(--p)); }
  .step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 96px;
    column-gap: 18px;
    align-items: start;
    padding-bottom: 36px;
  }
  .step__visual { grid-column: 3; grid-row: 1 / span 3; height: 96px; }
  .step__num { grid-column: 1; grid-row: 1 / span 3; }
  .step h3 { grid-column: 2; margin-top: 8px; }
  .step p { grid-column: 2; }
}

/* ---------- Clients ---------- */

.clients {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 40px;
}
.clients h2 {
  font: 500 .95rem/1.4 var(--font-body);
  color: var(--ink-2);
}
.clients ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 700 clamp(1.3rem, 1rem + 1vw, 1.8rem)/1 var(--font-display);
  letter-spacing: -.03em;
  color: rgba(19, 20, 16, .55);
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  justify-items: center;
  padding: clamp(80px, 14vh, 160px) var(--gutter) clamp(64px, 10vh, 120px);
  text-align: center;
}
.contact__visual {
  width: min(64vw, 380px);
  aspect-ratio: 1;
  margin-bottom: clamp(-110px, -9vw, -56px);
}
.contact__card {
  --lg-tint: rgba(255, 255, 255, .26);
  --lg-blur: 16px;
  width: 100%;
  max-width: 880px;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border-radius: clamp(28px, 4vw, 44px);
}
.contact h2 {
  font-size: clamp(2.5rem, 1.2rem + 5vw, 5.2rem);
  line-height: .95;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.contact__card > p {
  max-width: 40ch;
  margin: 18px auto 0;
  color: var(--ink-2);
  font-size: 1.125rem;
  text-wrap: balance;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}
@media (max-width: 520px) {
  .contact__actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(19, 20, 16, .1);
  font-size: .9375rem;
  color: var(--ink-2);
}
.footer__brand strong {
  margin-right: 6px;
  font: 800 1.05rem/1 var(--font-display);
  letter-spacing: -.03em;
  color: var(--ink);
}

/* ---------- Fallback visuals when WebGL is not available ---------- */

.no-webgl .svc-visual,
.no-webgl .step__visual,
.no-webgl .contact__visual {
  display: grid;
  place-items: center;
}
.no-webgl .svc-visual::before,
.no-webgl .step__visual::before,
.no-webgl .contact__visual::before {
  content: "";
  width: 34%;
  max-width: 120px;
  aspect-ratio: 1;
  border-radius: 18%;
  transform: rotate(45deg);
  background: linear-gradient(140deg, rgba(255, 255, 255, .7), rgba(168, 198, 54, .85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 20px 40px -20px rgba(90, 115, 15, .6);
}
.no-webgl .svc-tab__slot {
  background: radial-gradient(circle at 35% 30%, #fff, rgba(168, 198, 54, .6) 70%);
  transform: scale(.55);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .hero__line,
  .js .hero__side { opacity: 1; transform: none; }
  .svc-panel:not([hidden]) { animation: none; }
  .btn { transition: background-color .2s; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
