/* =========================================================
   Workspace Matter — design tokens
   Mineral greys + emerald accent
   ========================================================= */
:root {
  --bg:        #E6E8E7;
  --bg-soft:   #EEF0EF;
  --surface:   #F6F7F6;
  --ink:       #111714;
  --ink-2:     #2A332F;
  --muted:     #5E6964;
  --line:      rgba(17, 23, 20, 0.12);

  --em-900:    #06291F;
  --em-800:    #0B3D2E;
  --em-700:    #0F5140;
  --em-600:    #1A6B53;
  --em-500:    #2E8A6B;
  --em-300:    #8EC3AE;
  --em-200:    #BFDDD0;
  --em-100:    #DDEDE6;

  --font:      "Geist", system-ui, sans-serif;
  --mono:      "Geist Mono", ui-monospace, monospace;

  --gutter:    clamp(16px, 3.4vw, 48px);
  --radius:    18px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }

:focus-visible { outline: 2px solid var(--em-600); outline-offset: 3px; border-radius: 4px; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .2s var(--ease);
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.98); }

.btn--solid { background: var(--em-800); color: var(--surface); }
.btn--solid:hover { background: var(--em-700); }

.btn--ghost { border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--em-700); color: var(--em-800); }

.btn--link {
  padding: 0 4px;
  height: auto;
  color: var(--ink-2);
  border-radius: 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
}
.btn--link:hover { color: var(--em-700); }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px var(--gutter);
  transition: padding .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(230, 232, 231, 0.8);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}

.nav__logo { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: 0.02em; }
.nav__logo b { font-weight: 600; }
.nav__mark {
  width: 18px; height: 18px; border-radius: 4px;
  background: linear-gradient(135deg, var(--em-200), var(--em-800));
}

.nav__links { display: flex; gap: 32px; }
.nav__links a { position: relative; font-size: 14px; color: var(--ink-2); transition: color .3s var(--ease); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--em-700); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .4s var(--ease);
}
.nav__links a:hover { color: var(--em-800); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta { justify-self: end; height: 42px; }
.nav__toggle { display: none; }

/* =========================================================
   01 Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

/* ---- slideshow ---- */
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__slide {
  position: absolute; inset: 0;
  background: var(--img) center right / cover no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s var(--ease), transform 9s linear;
  will-change: opacity, transform; /* own compositor layer: fades/zooms never repaint the page */
  backface-visibility: hidden;
}
.hero__slide.is-active { opacity: 1; transform: scale(1); }

/* light touch: keep the photo's depth, only lift contrast behind text */
.hero__wash {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(230, 232, 231, 0.5) 0%,
      rgba(230, 232, 231, 0.28) 28%,
      rgba(230, 232, 231, 0) 48%),
    linear-gradient(180deg, rgba(230, 232, 231, 0.35) 0%, rgba(230, 232, 231, 0) 14%),
    linear-gradient(0deg, rgba(230, 232, 231, 0.4) 0%, rgba(230, 232, 231, 0) 16%);
}

/* ---- content ---- */
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 140px var(--gutter) 40px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink-2);
  font-size: 10px;
  letter-spacing: 0.24em;
  margin-bottom: 32px;
}
.hero__eyebrow i { font-style: normal; opacity: .4; }
.hero__eyebrow .rule { width: 40px; height: 1px; background: var(--ink); opacity: .5; margin-right: 8px; }

.hero__title {
  font-weight: 400;
  font-size: clamp(38px, 4.8vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__title .line > span { display: inline-block; white-space: nowrap; }
.hero__title em { font-style: normal; font-weight: 400; color: var(--em-700); }

.hero__lead {
  max-width: 36ch;
  margin-top: 24px;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 36px; }
.hero__actions .btn { height: 44px; font-size: 13px; }

/* ---- side annotations ---- */
.hero__notes {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0 10px;
}
.note { position: relative; padding: 4px 0 4px 26px; width: 190px; }
.note__rule { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: rgba(17, 23, 20, 0.35); }
.note__rule::before { content: ""; position: absolute; top: 12px; left: -34px; width: 34px; height: 1px; background: rgba(17, 23, 20, 0.35); }
.note__title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--ink);
}
.note__meta { margin-top: 14px; font-size: 10px; line-height: 1.7; letter-spacing: 0.16em; color: var(--ink-2); opacity: .8; }
.note--end .note__meta { margin-top: 0; }
.note__title, .note__meta { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.note.is-swapping .note__title, .note.is-swapping .note__meta { opacity: 0; transform: translateY(6px); }

/* ---- foot ---- */
.hero__foot {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 24px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--gutter) 36px;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 20px; color: var(--ink-2); }
.scroll-cue svg { width: 16px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1; animation: nudge 2.4s var(--ease) infinite; }
.scroll-cue .mono { letter-spacing: 0.2em; font-size: 10.5px; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

.pager { display: flex; gap: 8px; }
.pager__item {
  display: grid;
  gap: 12px;
  width: 64px;
  padding: 8px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  transition: color .3s var(--ease);
}
.pager__item i { display: block; height: 2px; background: rgba(17, 23, 20, 0.14); overflow: hidden; position: relative; }
.pager__item i::after { content: ""; position: absolute; inset: 0; background: var(--em-700); transform: scaleX(0); transform-origin: 0 50%; }
.pager__item:hover, .pager__item.is-active { color: var(--ink); }
.pager__item.is-active span { font-size: 14px; }
.pager__item.is-running i::after { animation: progress var(--slide, 7000ms) linear forwards; }

.hero__mail { justify-self: end; color: var(--ink-2); letter-spacing: 0.14em; font-size: 10.5px; text-transform: none; }
.hero__mail:hover { color: var(--em-700); }

/* =========================================================
   04 Our approach
   ========================================================= */
.eyebrow {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow .mono { color: var(--em-600); }

.approach { padding: clamp(80px, 12vh, 140px) var(--gutter) var(--gutter); }
.approach__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 48px;
}
.approach__head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.approach__title {
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 76px);
  line-height: 1;
  letter-spacing: -0.045em;
}
.approach__title em { font-style: normal; font-weight: 400; color: var(--em-700); }
.approach__lead { color: var(--muted); max-width: 38ch; }

/* =========================================================
   02 Living pod (interactive 3D)
   ========================================================= */
.pod { padding: clamp(80px, 12vh, 140px) var(--gutter) 0; }
.pod__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 40px;
}
.pod__head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.pod__title {
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 76px);
  line-height: 1;
  letter-spacing: -0.045em;
}
.pod__title em { font-style: normal; font-weight: 400; color: var(--em-700); }
.pod__lead { color: var(--muted); max-width: 40ch; }

.pod__stage {
  position: relative;
  height: clamp(520px, 82vh, 860px);
  border-radius: var(--radius);
  overflow: hidden;
  background: #ECEEED; /* matches the WebGL scene background */
  isolation: isolate;
}
/* soft studio vignette over the canvas, under the UI */
.pod__stage::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 95% at 50% 42%, transparent 55%, rgba(17, 23, 20, 0.08) 100%);
}
.pod__canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
.pod__canvas:active { cursor: grabbing; }

/* loading + fallback */
.pod__loading {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  color: var(--muted);
  transition: opacity .6s var(--ease);
}
.pod__loading-bar { position: relative; width: 160px; height: 1px; background: var(--line); overflow: hidden; }
.pod__loading-bar::after {
  content: ""; position: absolute; inset: 0; width: 40%;
  background: var(--em-700);
  animation: loadbar 1.4s var(--ease) infinite;
}
@keyframes loadbar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.pod__stage.is-ready .pod__loading { opacity: 0; pointer-events: none; }

.pod__fallback { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0f1411; }
.pod__stage.is-fallback .pod__fallback { display: block; }
.pod__stage.is-fallback :is(.pod__loading, .pod__hotspots, .pod__views, .pod__toggles, .pod__hint, .pod__info) { display: none; }

/* overlay UI shares one quiet glass surface */
.pod__views, .pod__toggles, .pod__info, .hotspot {
  background: rgba(246, 247, 246, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 30px -18px rgba(17, 23, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.pod__views {
  position: absolute; top: 20px; left: 20px;
  display: flex; gap: 2px; padding: 4px;
  border-radius: 999px;
}
.pod__views button {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.pod__views button:hover { color: var(--em-800); }
.pod__views button.is-active { background: var(--em-800); color: var(--surface); }

.pod__info {
  position: absolute; top: 20px; right: 20px;
  width: min(300px, calc(100% - 40px));
  padding: 18px 20px 20px;
  border-radius: 14px;
}
.pod__info-index { color: var(--em-600); }
.pod__info-title { margin-top: 10px; font-size: 18px; letter-spacing: -0.02em; line-height: 1.2; }
.pod__info-text { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pod__info > * { transition: opacity .35s var(--ease), transform .35s var(--ease); }
.pod__info.is-swapping > * { opacity: 0; transform: translateY(4px); }

.pod__toggles {
  position: absolute; left: 20px; bottom: 20px;
  display: flex; gap: 2px; padding: 4px;
  border-radius: 999px;
}
.toggle {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.toggle:hover { color: var(--em-800); }
.toggle[aria-pressed="true"] { background: var(--em-100); color: var(--em-800); }
.toggle:active { transform: scale(0.97); }

.pod__hint {
  position: absolute; right: 22px; bottom: 30px;
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--muted);
  pointer-events: none;
}
.pod__hint svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.2; }

/* hotspots are positioned from 3D space each frame */
.pod__hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 10px;
  color: var(--em-800);
  pointer-events: auto;
  transition: opacity .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
  will-change: transform;
}
.hotspot::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(246, 247, 246, 0.8);
  animation: pulse 2.6s var(--ease) infinite;
}
.hotspot:hover, .hotspot.is-active { background: var(--em-800); color: var(--surface); }
.hotspot.is-hidden { opacity: 0; pointer-events: none; }
@keyframes pulse { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

/* ---- core approach strip ---- */
.strip {
  display: flex;
  gap: 10px;
  height: clamp(460px, 74vh, 760px);
}

.panel {
  --dur: 6000ms;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--em-800);
  color: var(--surface);
  transition: flex-grow .9s var(--ease);
  isolation: isolate;
}
.panel.is-active { flex-grow: 4.6; }

.panel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: grayscale(1) contrast(1.05);
  transform: scale(1.08);
  transition: filter .9s var(--ease), transform 1.6s var(--ease);
}
.panel.is-active img { filter: grayscale(0.15) saturate(0.85); transform: scale(1); }

/* emerald duotone on resting panels, soft shade on active */
.panel::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--em-800);
  mix-blend-mode: multiply;
  opacity: .78;
  transition: opacity .9s var(--ease);
}
.panel::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6, 41, 31, 0) 45%, rgba(6, 41, 31, 0.72) 100%);
}
.panel.is-active::before { opacity: 0; }
.panel:not(.is-active):hover::before { opacity: .6; }

.panel__index { position: absolute; top: 20px; left: 22px; opacity: .8; }

/* vertical label on resting panels */
.panel__label {
  position: absolute;
  left: 22px;
  bottom: 24px;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transform-origin: 0 100%;
  transform: translateY(0);
  transition: opacity .5s var(--ease) .3s;
}
.panel.is-active .panel__label { opacity: 0; transition: opacity .2s var(--ease); }

.panel__body {
  position: absolute;
  left: 28px; right: 28px; bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px 40px;
  align-items: end;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}
.panel.is-active .panel__body { opacity: 1; transform: none; transition-delay: .35s; }
.panel__title {
  font-size: clamp(24px, 2.3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 400;
}
.panel__text { font-size: 14px; color: rgba(246, 247, 246, 0.78); max-width: 34ch; }

.panel__progress {
  position: absolute; left: 22px; right: 22px; top: 44px;
  height: 1px; background: rgba(246, 247, 246, 0.2);
  opacity: 0; transition: opacity .4s var(--ease);
}
.panel__progress i { display: block; height: 100%; background: var(--em-200); transform: scaleX(0); transform-origin: 0 50%; }
.panel.is-active .panel__progress { opacity: 1; }
.panel.is-running .panel__progress i { animation: progress var(--dur) linear forwards; }
.strip.is-paused .panel__progress i { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }

/* =========================================================
   Entrance motion
   ========================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d) * 90ms + 120ms); }
.reveal-up { transform: translateY(105%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--d) * 90ms + 120ms); }
.is-loaded .reveal { opacity: 1; transform: none; }
.is-loaded .reveal-up { transform: none; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .approach__head, .pod__head { grid-template-columns: 1fr; }
  .hero__notes { display: none; }
  .hero__inner { grid-template-columns: 1fr; }
  .panel__body { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__cta { display: none; }
  .nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0 13px; border-radius: 50%;
    border: 1px solid var(--line);
  }
  .nav__toggle span { display: block; height: 1px; background: var(--ink); }

  .hero__inner { padding-top: 120px; align-items: start; }
  .hero__slide { background-position: 70% center; }
  .hero__wash {
    background:
      linear-gradient(180deg,
        rgba(230, 232, 231, 0.78) 0%,
        rgba(230, 232, 231, 0.6) 50%,
        rgba(230, 232, 231, 0) 78%,
        rgba(230, 232, 231, 0.5) 100%);
  }
  .hero__eyebrow { letter-spacing: 0.14em; margin-bottom: 24px; }
  .hero__eyebrow .rule { display: none; }
  .hero__actions .btn--solid { flex: 1 1 100%; justify-content: space-between; }
  .hero__foot { grid-template-columns: 1fr auto; }
  .hero__mail { display: none; }
  .pager__item { width: 40px; }
  .scroll-cue .mono { display: none; }
  .strip { height: auto; }

  .pod__stage { height: 560px; }
  .pod__views { left: 12px; right: 12px; top: 12px; justify-content: space-between; }
  .pod__views button { padding: 8px 12px; }
  /* card only appears once a point is chosen, so the model gets the whole stage by default */
  .pod__info { top: auto; bottom: 68px; left: 12px; right: 12px; width: auto; padding: 12px 14px 14px; }
  .pod__info:not(.has-spot) { display: none; }
  .pod__info-title { margin-top: 6px; font-size: 16px; }
  .pod__info-text { margin-top: 4px; font-size: 12.5px; line-height: 1.45; }
  .pod__toggles { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
  .toggle { flex: 1; justify-content: center; padding: 0 10px; }
  .pod__hint { display: none; }

  /* strip becomes a vertical accordion */
  .strip { flex-direction: column; min-height: 0; flex: none; gap: 8px; }
  .panel { flex: none; height: 64px; transition: height .8s var(--ease); }
  .panel.is-active { height: 340px; }
  .panel__index { top: 23px; }
  .panel__label { left: 56px; bottom: auto; top: 18px; }
  .panel__progress { top: auto; bottom: 0; left: 0; right: 0; }
  .panel__body { left: 20px; right: 20px; bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
