/* ============================================================
   SENTRIX ROBOTICS — DESIGN SYSTEM
   #000000 base · #EDEDED text · #00FC35 signal (rationed)
   Space Grotesk display · JetBrains Mono data
   Sharp corners. 1px hairlines. No shadows. No glass.
   ============================================================ */

/* ------------------------------------------------------------
   SORA — self-hosted. Only 400 and 700 are used anywhere in the
   sheet, so only those two faces ship. OTF (CFF) rather than the
   TTFs: same glyphs, roughly half the bytes.
   ------------------------------------------------------------ */
@font-face {
  font-family: 'Sora';
  src: url('assets/sora/Sora-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sora';
  src: url('assets/sora/Sora-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000000;
  --text: #EDEDED;
  --text-2: #8A8A8A;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-2: rgba(255, 255, 255, 0.16);
  --signal: #00FC35;

  /* One family throughout. --data is no longer monospaced, so anything that
     shows changing digits needs tabular figures — see .mono below. */
  --display: 'Sora', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Sora', 'Helvetica Neue', Arial, sans-serif;

  --gutter: 24px;
  --nav-h: 72px;
  --maxw: 1440px;

  /* One rail for everything: navbar, HUD, scene copy and the DOM sections all
     start on the same vertical line, whatever the viewport width. */
  --rail: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
}

@media (min-width: 768px) {
  :root { --gutter: 48px; --nav-h: 80px; }
}

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

html {
  background: var(--black);
  -webkit-text-size-adjust: 100%;
}
html:not(.is-ready) { overflow: hidden; }

body {
  font-family: var(--display);
  color: var(--text);
  background: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.mono {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* Sora is proportional. Without tabular figures the HUD clock — which
     reflows 9 digits every 120ms — visibly jitters. */
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------
   FILM GRAIN — 2.5%, animated, kills banding on black
   ------------------------------------------------------------ */
body::after {
  content: '';
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  animation: grain 0.9s steps(1) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(-3%, -4%); }
  25%  { transform: translate(-8%, 2%); }
  37%  { transform: translate(3%, -6%); }
  50%  { transform: translate(-2%, 7%); }
  62%  { transform: translate(6%, 3%); }
  75%  { transform: translate(-7%, -2%); }
  87%  { transform: translate(4%, 5%); }
  100% { transform: translate(0, 0); }
}

/* ------------------------------------------------------------
   BOOT CURTAIN
   ------------------------------------------------------------ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease 0.1s;
}
#loader.is-done { opacity: 0; pointer-events: none; }

.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.loader__mark {
  font-size: 13px;
  letter-spacing: 0.42em;
  color: var(--text);
}
.loader__note {
  font-size: 10px;
  color: var(--text-2);
}
.loader__line {
  position: relative;
  width: 220px;
  height: 1px;
  background: var(--hair);
  overflow: hidden;
}
.loader__line::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: var(--signal);
  animation: sweep 1.15s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-105%); }
  100% { transform: translateX(255%); }
}

/* ------------------------------------------------------------
   PARALLAX CANVAS
   ------------------------------------------------------------ */
#canvas-host {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--black);
  overflow: hidden;
}
#canvas-host canvas { display: block; width: 100%; height: 100%; }

/* ------------------------------------------------------------
   NAVBAR
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--rail);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.nav.is-solid {
  background: var(--black);
  border-bottom-color: var(--hair);
}

.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__mark { height: 22px; width: auto; }
.nav__word {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.22em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
}
.nav__link {
  position: relative;
  font-size: 11px;
  color: var(--text-2);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.nav__link:hover { color: var(--text); border-bottom-color: var(--hair-2); }

.nav__link.is-active { color: var(--signal); border-bottom-color: var(--signal); }
.nav__link.is-active:hover { color: var(--signal); border-bottom-color: var(--signal); }

/* Thin vertical separator before the CTA */
.nav__separator {
  display: block;
  width: 1px;
  height: 20px;
  background: var(--hair-2);
}

/* Contact CTA button in the navbar */
.nav__cta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 18px;
  color: var(--black);
  background: var(--signal);
  border: 1px solid var(--signal);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav__cta:hover {
  background: transparent;
  color: var(--signal);
}

/* Hamburger (mobile only) */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 42;
}
.nav__burger-line {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
/* Animate to X on open */
.nav__burger.is-open .nav__burger-line:first-child {
  transform: translateY(3.75px) rotate(45deg);
}
.nav__burger.is-open .nav__burger-line:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ---- Mobile nav ---- */
@media (max-width: 720px) {
  .nav__burger { display: flex; }

  .nav__links {
    position: fixed;
    top: 0; right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: calc(var(--nav-h) + 28px) var(--gutter) 40px;
    background: #0A0A0A;
    border-left: 1px solid var(--hair);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 41;
  }
  .nav__links.is-open { transform: translateX(0); }

  .nav__link {
    font-size: 13px;
    padding: 16px 0;
    width: 100%;
    border-bottom: 1px solid var(--hair);
  }

  .nav__separator {
    width: 100%;
    height: 1px;
    margin: 8px 0;
    background: transparent;
  }

  .nav__cta {
    margin-top: 8px;
    font-size: 11px;
    padding: 14px 24px;
    width: 100%;
    text-align: center;
  }
}

/* ------------------------------------------------------------
   HUD
   ------------------------------------------------------------ */
.hud {
  position: fixed;
  inset: 0;
  z-index: 35;
  pointer-events: none;
}

/* top chrome scrim — keeps nav + scene label readable over bright plates (S4) */
.hud::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: calc(var(--nav-h) + 72px);
  background: linear-gradient(180deg, rgba(0,0,0,0.74) 0%, rgba(0,0,0,0.38) 48%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.hud__label,
.hud__clock {
  position: absolute;
  top: calc(var(--nav-h) + 6px);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-2);
}
.hud__label { left: var(--rail); }
.hud__clock { right: var(--rail); text-transform: none; }

.hud::before,
.hud__label,
.hud__clock,
.hud__rail { transition: opacity 0.5s ease; }
.hud.is-dim::before,
.hud.is-dim .hud__label,
.hud.is-dim .hud__clock,
.hud.is-dim .hud__rail { opacity: 0; }

.hud__rail {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 1px;
  background: var(--hair);
}
.hud__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
}

@media (max-width: 560px) {
  .hud__clock { display: none; }
}

/* ------------------------------------------------------------
   SCROLL CUE — the only affordance in a scroll-driven first view
   ------------------------------------------------------------ */
.cue {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 36;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--text-2);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cue.is-on { opacity: 1; transform: translate(-50%, 0); }

.cue__line {
  position: relative;
  width: 1px;
  height: 42px;
  background: var(--hair);
  overflow: hidden;
}
.cue__line::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  background: var(--text-2);
  animation: cue-run 1.9s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
@keyframes cue-run {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(300%); }
  100% { transform: translateY(300%); }
}

/* ------------------------------------------------------------
   SCENE STAGE — pinned overlays over the canvas
   ------------------------------------------------------------ */
.stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0;
  visibility: hidden;
  will-change: opacity;
  background-size: cover;
  background-position: center;
}

/* legibility scrim — pure black, direction follows the layout */
.scene::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scene--left::before {
  background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.78) 26%, rgba(0,0,0,0.42) 52%, rgba(0,0,0,0) 78%);
}
.scene--right::before {
  background: linear-gradient(270deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.78) 26%, rgba(0,0,0,0.42) 52%, rgba(0,0,0,0) 78%);
}
.scene--bottom::before {
  background: linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.34) 55%, rgba(0,0,0,0) 80%);
}

/* padding lives on the scene so max-width is the real text column */
.scene {
  padding: calc(var(--nav-h) + 40px) var(--rail) 72px;
}

.scene__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
}

.scene--left  { align-items: center; justify-content: flex-start; }
.scene--right { align-items: center; justify-content: flex-end; }
.scene--bottom {
  align-items: flex-end;
  justify-content: flex-start;
  padding-bottom: clamp(64px, 11vh, 120px);
}
.scene--bottom .scene__inner { max-width: 940px; }

/* No in-scene eyebrow: the HUD label is the instrument layer that names the
   scene, so repeating it above the headline is redundant. */
.scene__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 4.8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin-bottom: 26px;
  text-wrap: balance;
}
.scene__title em {
  font-style: normal;
  color: var(--signal);
}

.scene__body {
  font-size: clamp(14px, 1.05vw, 18px);
  line-height: 1.72;
  color: var(--text-2);
  max-width: 46ch;
}

.scene__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* Hero backed-by strip */
.hero-backers {
  margin-top: clamp(40px, 6vh, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--hair);
}
.hero-backers__label {
  display: block;
  font-size: 10px;
  color: var(--text-2);
  margin-bottom: 18px;
}
.hero-backers__logos {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.5vw, 48px);
  flex-wrap: wrap;
}
.hero-backers__logos img {
  height: clamp(20px, 2.6vw, 32px);
  width: auto;
  opacity: 0.55;
  transition: opacity 0.25s ease;
}
.hero-backers__logos img:hover { opacity: 0.9; }

[data-anim] { will-change: transform, opacity; }

/* pillars (S4) */
.pillars {
  margin-top: 30px;
  border-top: 1px solid var(--hair);
  max-width: 760px;
}
.pillars li {
  display: grid;
  grid-template-columns: 34px minmax(0, 210px) 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.pillars__no { color: var(--text-2); }
.pillars__key { color: var(--text); }
.pillars__val { color: var(--text-2); text-transform: none; letter-spacing: 0.04em; }

@media (max-width: 640px) {
  .pillars li {
    grid-template-columns: 28px 1fr;
    row-gap: 6px;
  }
  .pillars__val { grid-column: 2; }
}


/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 22px;
  cursor: pointer;
  color: var(--black);
  background: var(--text);
  border: 1px solid var(--text);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--signal); border-color: var(--signal); color: var(--black); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--hair-2);
}
.btn--ghost:hover {
  background: transparent;
  color: var(--signal);
  border-color: var(--signal);
}

/* ------------------------------------------------------------
   POST-CANVAS DOM
   ------------------------------------------------------------ */
#post-canvas {
  position: relative;
  z-index: 20;
  background: var(--black);
  border-top: 1px solid var(--hair);
}

.section { padding: clamp(88px, 14vh, 160px) 0; }

.section__head { margin-bottom: clamp(48px, 7vh, 88px); }
.section__kicker {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 20px;
}
.section__title {
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 22ch;
}


.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
@media (min-width: 820px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card { background: var(--black); }

.card__slot {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--hair);
  background-color: #070707;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  background-position: center center;
  overflow: hidden;
}
.card__slot img { width: 100%; height: 100%; object-fit: cover; }

/* corner ticks — instrument framing, not decoration */
.card__slot::before,
.card__slot::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--hair-2);
}
.card__slot::before { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.card__slot::after { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

.card__ph {
  position: relative;
  font-size: 9px;
  color: #4A4A4A;
  padding: 6px 10px;
  border: 1px solid var(--hair);
  background: rgba(0, 0, 0, 0.6);
}

.card__meta { padding: 20px; }
.card__fig {
  display: block;
  font-size: 10px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.card__cap {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  max-width: 38ch;
}

/* ------------------------------------------------------------
   TEAM — same specimen-plate language as the gallery, portrait crop
   ------------------------------------------------------------ */
.card__slot--portrait { aspect-ratio: 4 / 5; }

/* LinkedIn overlay on portrait cards */
.person__linkedin {
  display: flex;         /* overrides default <a> inline */
  text-decoration: none;
  cursor: pointer;
}
.person__linkedin img {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.person__linkedin:hover img { transform: scale(1.04); }

.person__li-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--black);
  background: var(--signal);
  padding: 5px 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.person__linkedin:hover .person__li-badge,
.person__linkedin:focus-visible .person__li-badge {
  opacity: 1;
  transform: translateY(0);
}

.person__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.person__role {
  font-size: 10px;
  color: var(--text-2);
}

/* ------------------------------------------------------------
   BACKED BY — spec list, hairline rows, no logo soup
   ------------------------------------------------------------ */
.backers { border-top: 1px solid var(--hair); }
.backer {
  display: grid;
  grid-template-columns: 40px 150px minmax(0, 240px) 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--hair);
}
.backer__no { font-size: 11px; color: var(--text-2); }

/* The supplied logos are all dark-ink-on-white artwork, so they were baked
   down to white-on-transparent marks (assets/backed-by/mono/). Held at 0.9
   so they sit at roughly --text brightness instead of glaring pure white. */
.backer__mark {
  display: flex;
  align-items: center;
  height: 46px;
}
.backer__mark img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
}

.backer__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 1.5vw, 20px);
  letter-spacing: -0.015em;
}
.backer__kind {
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  justify-self: end;
  text-align: right;
}

@media (max-width: 720px) {
  .backer {
    grid-template-columns: 40px 28px 1fr;
    row-gap: 8px;
  }
  .backer__kind { grid-column: 3; justify-self: start; text-align: left; }
}

/* reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }
.card:nth-child(2)[data-reveal] { transition-delay: 0.09s; }
.card:nth-child(3)[data-reveal] { transition-delay: 0.18s; }

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.footer {
  padding: clamp(56px, 9vh, 96px) 0 40px;
  border-top: 1px solid var(--hair);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--hair);
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__mark { height: 18px; width: auto; }
.footer__word { font-weight: 700; font-size: 14px; letter-spacing: 0.22em; }

.footer__links { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 40px); }
.footer__link {
  font-size: 11px;
  color: var(--text-2);
  transition: color 0.2s ease;
}
.footer__link:hover { color: var(--signal); }

.footer__copy {
  margin-top: 30px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #5A5A5A;
}

/* ------------------------------------------------------------
   GALLERY — main page CTA + full gallery page
   ------------------------------------------------------------ */

/* "View Full Gallery" CTA below the 3-card preview */
.gallery-cta {
  margin-top: clamp(28px, 4vh, 48px);
  display: flex;
  justify-content: flex-end;
}

/* Back-to-home link on gallery.html */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.2s ease;
  margin-bottom: clamp(32px, 5vh, 56px);
}
.back-link:hover { color: var(--signal); }
.back-link::before { content: '←'; font-size: 11px; }

/* Count badge beside kicker */
.gallery-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-2);
  margin-left: 16px;
}

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  margin-bottom: clamp(40px, 6vh, 72px);
}
.filter-btn {
  flex: 1 1 auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 13px 18px;
  color: var(--text-2);
  background: var(--black);
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.filter-btn:hover { color: var(--text); }
.filter-btn.is-active {
  color: var(--signal);
  background: rgba(0, 252, 53, 0.04);
}

/* Full gallery grid (same hairline system as the main grid) */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-card { background: var(--black); }
.gallery-card.is-hidden { display: none; }

/* Subtle zoom on hover */
.gallery-card .card__slot { overflow: hidden; }
.gallery-card .card__slot img {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-card:hover .card__slot img { transform: scale(1.04); }

/* Category tag — signal green, rationed */
.card__category {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 8px;
}

/* Card title — used on gallery page cards */
.card__title {
  font-weight: 700;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.3;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
  color: var(--text);
}

/* Gallery page — hero padding accounts for fixed nav */
.gallery-hero-section {
  padding-top: calc(var(--nav-h) + clamp(56px, 10vh, 110px));
  padding-bottom: clamp(48px, 7vh, 88px);
}

/* ------------------------------------------------------------
   CONTACT MODAL
   ------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  width: calc(100% - 48px);
  max-width: 520px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #0A0A0A;
  border: 1px solid var(--hair-2);
  padding: clamp(28px, 4vh, 48px) clamp(24px, 3vw, 40px);
  transform: translateY(16px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.is-open .modal__panel { transform: translateY(0); }

.modal__head {
  margin-bottom: 28px;
  padding-right: 32px;
}
.modal__kicker {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--signal);
  margin-bottom: 12px;
}
.modal__title {
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.modal__close {
  position: absolute;
  top: clamp(20px, 3vh, 36px);
  right: clamp(20px, 3vw, 36px);
  background: none;
  border: 1px solid var(--hair-2);
  color: var(--text-2);
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.modal__close:hover { color: var(--text); border-color: var(--text); }

/* Form fields */
.modal__form { display: flex; flex-direction: column; gap: 20px; }

.form__field { display: flex; flex-direction: column; gap: 8px; }
.form__label {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--text-2);
}
.form__input {
  font-family: var(--display);
  font-size: 14px;
  color: var(--text);
  background: var(--black);
  border: 1px solid var(--hair-2);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease;
}
.form__input::placeholder { color: #4A4A4A; }
.form__input:focus { border-color: var(--signal); }

.form__textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* Honeypot trap — must look absent, not display:none (bots detect that) */
.form__hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.form__submit {
  align-self: flex-start;
  margin-top: 4px;
  cursor: pointer;
}
.form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form__error {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #ff5a5a;
  padding: 10px 14px;
  border: 1px solid rgba(255, 90, 90, 0.3);
  background: rgba(255, 90, 90, 0.06);
}

/* Ensure [hidden] always wins over any display property */
[hidden] { display: none !important; }

/* Success screen */
#contact-success-view {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(12px, 3vh, 28px) 0;
}
.success__icon {
  margin-bottom: 24px;
}
.success__kicker {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--signal);
  margin-bottom: 14px;
}
.success__title {
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.success__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 38ch;
  margin-bottom: 32px;
}
.success__close { cursor: pointer; }

/* ------------------------------------------------------------
   NO-WEBGL FALLBACK
   ------------------------------------------------------------ */
.no-webgl .scene { background-color: #000; }
.no-webgl .scene::before { background-color: rgba(0, 0, 0, 0.4); }

/* ------------------------------------------------------------
   REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .loader__line::after { animation: none; width: 100%; }
  [data-reveal] { transition-duration: 0.01ms; opacity: 1; transform: none; }
}
