:root {
  --bg: #f5f4f1;
  --ink: #0e0e0e;
  --ink-2: #3a3a3a;
  --muted: #7a7873;
  --line: rgba(14, 14, 14, 0.12);
  --tile: #e7e5e0;
  --invert-bg: #0e0e0e;
  --invert-ink: #f5f4f1;

  --font: "aktiv-grotesk", "Aktiv Grotesk", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 3.2vw, 44px);
  --pad-l: max(var(--gutter), env(safe-area-inset-left));
  --pad-r: max(var(--gutter), env(safe-area-inset-right));
  --gap: 10px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--pad-r) 0 var(--pad-l);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.wordmark {
  font-weight: 700; text-transform: uppercase; text-decoration: none;
  font-size: clamp(17px, 1.9vw, 26px); letter-spacing: -0.01em; line-height: 1;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: clamp(12px, 1.8vw, 26px); font-size: 14px; }
.nav a { text-decoration: none; }
.nav-link { position: relative; padding: 4px 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav-link.is-current::after { transform: scaleX(1); }
@media (hover: hover) { .nav-link:hover::after { transform: scaleX(1); } }

.icon-link { display: inline-flex; width: 20px; height: 20px; }
.icon-link svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-link svg.solid, .icon-link .fill { fill: currentColor; stroke: none; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; padding: 0 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500;
  text-decoration: none; transition: transform .25s var(--ease), opacity .2s;
}
@media (hover: hover) { .pill:hover { transform: translateY(-1px); } }
.pill:active { opacity: .85; }
.pill-lg { height: 48px; padding: 0 30px; font-size: 15px; }
.pill-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

/* Mobile menu */
.menu-btn { display: none; position: relative; width: 44px; height: 44px; margin-right: -10px; }
.menu-btn span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor;
  transition: transform .4s var(--ease);
}
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--pad-r) max(32px, env(safe-area-inset-bottom)) var(--pad-l);
  background: var(--bg);
  opacity: 0; transition: opacity .35s var(--ease);
}
.menu.open { opacity: 1; }
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 4px; }
.menu nav a {
  font-size: clamp(40px, 12vw, 64px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1;
  text-decoration: none; padding: 4px 0;
  transform: translateY(12px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.menu.open nav a { transform: none; opacity: 1; }
.menu.open nav a:nth-child(2) { transition-delay: .04s; }
.menu.open nav a:nth-child(3) { transition-delay: .08s; }
.menu-social { display: flex; gap: 24px; }
.menu-social .icon-link { width: 26px; height: 26px; }

/* ---------- Intro ---------- */
.intro { padding: clamp(40px, 9vw, 140px) var(--pad-r) clamp(32px, 5vw, 72px) var(--pad-l); }
.intro-title {
  margin: 0; max-width: 15.5em;
  font-weight: 500; font-size: clamp(34px, 6.2vw, 96px);
  line-height: 0.98; letter-spacing: -0.035em;
}
.intro-title .amp { font-weight: 400; }
.disciplines { list-style: none; margin: clamp(24px, 3vw, 40px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.disciplines li {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2);
}

/* ---------- Work: switch ---------- */
.work { padding: 0 var(--pad-r) clamp(64px, 8vw, 120px) var(--pad-l); }
.work-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 0; margin-bottom: 8px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.switch {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px; border-radius: 999px; background: var(--tile);
}
.switch-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 999px; background: var(--ink);
  transition: transform .5s var(--ease);
}
.switch[data-active="motion"] .switch-thumb { transform: translateX(100%); }
.switch-btn {
  position: relative; z-index: 1; min-width: 120px; height: 48px; padding: 0 26px;
  border-radius: 999px; font-size: 16px; font-weight: 500; letter-spacing: -0.01em;
  transition: color .35s var(--ease);
}
.switch-btn[aria-selected="true"] { color: var(--bg); }
.work-hint { margin: 0; font-size: 13px; color: var(--muted); }

.panel { animation: panelIn .6s var(--ease) both; }
.panel[hidden] { display: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Justified grid (every row fills the width) ---------- */
.grid { display: flex; flex-direction: column; gap: 28px; }
.grid .row { display: flex; gap: var(--gap); width: 100%; }
.tile { position: relative; margin: 0; flex: 0 0 auto; min-width: 0; }
.tile-link { display: block; text-decoration: none; cursor: pointer; text-align: left; width: 100%; }
.tile-media { position: relative; overflow: hidden; background: var(--tile); }
.tile-media img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.015);
  transition: opacity .7s var(--ease), transform 1.2s var(--ease);
}
.tile-media img.loaded { opacity: 1; transform: none; }
.tile-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 9px; font-size: 12.5px; line-height: 1.35; }
.tile-title { font-weight: 500; }
.tile-role { color: var(--muted); display: block; font-weight: 400; }
.tile-arrow { flex: none; opacity: 0; transform: translateX(-4px); transition: opacity .3s, transform .4s var(--ease); }
.tile-link:focus-visible .tile-arrow { opacity: 1; transform: none; }
@media (hover: hover) {
  .tile-link:hover .tile-media img.loaded { transform: scale(1.03); }
  .tile-link:hover .tile-arrow { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */
.section-title { margin: 0; font-weight: 500; font-size: clamp(32px, 4vw, 56px); letter-spacing: -0.03em; line-height: 1; }
.section-lede { margin: 0; max-width: 34em; color: var(--ink-2); font-size: 15px; }

.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px 40px;
  padding: clamp(56px, 8vw, 120px) var(--pad-r) clamp(56px, 8vw, 120px) var(--pad-l);
  border-top: 1px solid var(--line);
}
.contact address { margin-top: 24px; font-style: normal; font-size: 14px; }
.contact address a { text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s; }
.contact address a:hover { border-color: var(--ink); }
.contact-form { display: grid; gap: 22px; max-width: 640px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 8px 0 10px; border-radius: 0; resize: vertical; -webkit-appearance: none; appearance: none;
  transition: border-color .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field.invalid input, .field.invalid textarea { border-bottom-color: #b3261e; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form-status { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Equipment page ---------- */
.page-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 40px; align-items: end;
  padding: clamp(40px, 8vw, 120px) var(--pad-r) clamp(32px, 4vw, 56px) var(--pad-l);
}
.page-title { margin: 0; font-weight: 500; font-size: clamp(40px, 6.2vw, 96px); letter-spacing: -0.035em; line-height: 0.98; }
.page-head .section-lede a { color: var(--ink); }
.kit {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px;
  padding: 0 var(--pad-r) clamp(64px, 8vw, 120px) var(--pad-l);
}
.kit h2 {
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.kit h2:not(:first-child) { margin-top: 32px; }
.kit ul { list-style: none; margin: 0; padding: 0; }
.kit li { font-size: 14px; padding: 4px 0; line-height: 1.4; }
.kit li span { color: var(--muted); font-size: 12px; margin-left: 4px; white-space: nowrap; }
.kit li.pkg { font-weight: 500; padding: 6px 0; }
.kit li.pkg ul { margin-top: 4px; }
.kit li.pkg ul li { font-weight: 400; color: var(--ink-2); padding: 2px 0 2px 14px; position: relative; }
.kit li.pkg ul li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 6px; height: 1px; background: var(--muted); }
.page-cta {
  display: flex; justify-content: center;
  margin: 0 var(--pad-r) clamp(56px, 7vw, 100px) var(--pad-l); padding-top: 40px; border-top: 1px solid var(--line);
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: 48px var(--pad-r) max(40px, env(safe-area-inset-bottom)) var(--pad-l);
  background: var(--invert-bg); color: var(--invert-ink); font-size: 13px;
}
.site-footer p { margin: 0 0 6px; }
.site-footer .muted { color: #8d8b86; }
.footer-social { display: flex; gap: 20px; }
.footer-social .icon-link { opacity: .85; transition: opacity .2s; }
.footer-social .icon-link:hover { opacity: 1; }

/* ---------- Project sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  transform: translateY(100%); transition: transform .65s var(--ease);
}
.sheet.open { transform: none; }
.sheet-bar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: var(--header-h); padding: 0 var(--pad-r) 0 var(--pad-l);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.sheet-back { justify-self: start; font-size: 14px; min-height: 44px; }
.sheet-title { margin: 0; font-size: 15px; font-weight: 500; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-close { justify-self: end; }
.sheet-body { padding: 24px var(--pad-r) max(40px, env(safe-area-inset-bottom)) var(--pad-l); }
.sheet-body .grid { gap: var(--gap); }
.sheet-next { margin-top: clamp(48px, 7vw, 96px); padding-top: 28px; border-top: 1px solid var(--line); }
.next-project { display: grid; gap: 6px; text-align: left; }
.next-project .muted { font-size: 13px; }
.next-title { font-size: clamp(28px, 4.4vw, 64px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; transition: opacity .25s; }
@media (hover: hover) { .next-project:hover .next-title { opacity: .6; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80; height: 100vh; height: 100dvh;
  display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 64px 1fr 56px; align-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: rgba(10, 10, 10, .97); color: #f5f4f1;
  opacity: 0; transition: opacity .35s var(--ease);
  touch-action: pan-y pinch-zoom;
}
.lightbox.open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lb-close { grid-column: 3; grid-row: 1; justify-self: end; margin-right: var(--gutter); font-size: 13px; min-height: 44px; }
.lb-stage { grid-column: 2; grid-row: 2; margin: 0; height: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; animation: fadeIn .45s var(--ease); }
.lb-arrow { grid-row: 2; font-size: 22px; width: 64px; height: 64px; opacity: .7; transition: opacity .2s; }
.lb-arrow:hover { opacity: 1; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-caption { grid-column: 1 / -1; grid-row: 3; margin: 0; text-align: center; font-size: 12.5px; color: #a9a7a2; padding: 0 var(--gutter); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: 24px; padding: 80px var(--pad-r) 80px var(--pad-l); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --header-h: 60px; --gap: 6px; }
  .wordmark { font-size: 18px; }
  .nav .nav-link, .nav .icon-link { display: none; }
  .nav { gap: 10px; }
  .menu-btn { display: inline-block; }
  .pill { height: 36px; padding: 0 16px; font-size: 13px; }
  .pill-lg { height: 50px; padding: 0 32px; font-size: 15px; }
  .work-bar { padding: 10px 0; margin-bottom: 4px; }
  .switch { width: 100%; }
  .switch-btn { min-width: 0; height: 44px; padding: 0 12px; font-size: 15px; }
  .work-hint { display: none; }
  .grid { gap: 22px; }
  .contact, .page-head { grid-template-columns: 1fr; }
  .contact-form .row { grid-template-columns: 1fr; }
  .page-cta .pill { width: 100%; }
  .sheet-title { display: none; }
  .sheet-bar { grid-template-columns: 1fr auto; }
  .sheet-close { grid-column: 2; }
  .lightbox { grid-template-columns: 0 1fr 0; grid-template-rows: 56px 1fr 72px; }
  .lb-arrow { position: absolute; bottom: max(8px, env(safe-area-inset-bottom)); width: 56px; height: 56px; }
  .lb-prev { left: var(--gutter); }
  .lb-next { right: var(--gutter); }
  .lb-caption { padding: 0 72px; }
  .lb-close { grid-column: 2; }
}
@media (max-width: 560px) {
  .kit { grid-template-columns: 1fr; gap: 8px; }
  .kit h2:not(:first-child) { margin-top: 28px; }
  .kit > div + div h2:first-child { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
