/* ============================================================
   SANBOTICS® — V2
   Carbon / Bone / Signal Ember — precision robotics lab
   ============================================================ */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #161618;
  --ink: #e8e4dc;
  --ink-dim: rgba(232, 228, 220, 0.55);
  --ink-faint: rgba(232, 228, 220, 0.28);
  --line: rgba(232, 228, 220, 0.12);
  --line-soft: rgba(232, 228, 220, 0.06);
  --ember: #ff4d00;
  --ember-soft: rgba(255, 77, 0, 0.14);
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --gutter: clamp(1.25rem, 4vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

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

::selection {
  background: var(--ember);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #2a2a2d;
  border: 3px solid var(--bg);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ember);
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* touch feedback — hover states never fire on coarse pointers */
@media (hover: none) {
  .footer-col a:active,
  .footer-bar a:active,
  .link-underline:active,
  .nav-links a:active,
  .contact-email:active {
    color: var(--ember);
  }

  .link-underline:active::after,
  .contact-email:active::after {
    transform: scaleX(1);
  }

  .btn:active {
    color: var(--bg);
    border-color: var(--ember);
  }

  .btn:active::before {
    transform: translateY(0);
  }

  .work-card:active .wv-art {
    transform: scale(1.12);
  }
}

ul,
ol {
  list-style: none;
}

button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 1px dashed var(--ember);
  outline-offset: 4px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* expanded industrial display voice */
.hero-title,
.sec-title,
.contact-title,
.service-name,
.work-name,
.step-name,
.stat-num,
.nav-logo,
.footer-logo,
.menu-links a,
.pre-count,
.marquee-group span {
  font-family: var(--font-sans);
  font-stretch: 125%;
  font-weight: 840;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  line-height: 0.92;
}

/* ---------- grain ---------- */
.noise {
  position: fixed;
  inset: -100%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.7s steps(4) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- custom cursor ---------- */
.cursor {
  display: none;
}

body.has-cursor,
body.has-cursor a,
body.has-cursor button {
  cursor: none;
}

body.has-cursor .cursor {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  pointer-events: none;
}

.cursor-dot {
  position: fixed;
  top: -3px;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
}

.cursor-ring {
  position: fixed;
  top: -22px;
  left: -22px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink-faint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
    margin 0.35s var(--ease-out), border-color 0.35s, background-color 0.35s;
}

.cursor-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--bg);
  opacity: 0;
  transition: opacity 0.25s;
}

.cursor.is-hover .cursor-ring {
  width: 64px;
  height: 64px;
  margin: -10px 0 0 -10px;
  border-color: var(--ember);
}

.cursor.is-label .cursor-ring {
  width: 84px;
  height: 84px;
  margin: -20px 0 0 -20px;
  background: var(--ember);
  border-color: var(--ember);
}

.cursor.is-label .cursor-label {
  opacity: 1;
}

.cursor.is-label .cursor-dot {
  opacity: 0;
}

/* ---------- preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--gutter);
  /* failsafe: if JS never runs, get out of the way */
  animation: pre-failsafe 0.6s ease 6s forwards;
}

@keyframes pre-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.pre-top {
  display: flex;
  justify-content: space-between;
  color: var(--ink-dim);
}

.pre-top sup {
  color: var(--ember);
}

.pre-status {
  color: var(--ink-faint);
}

.pre-count {
  align-self: flex-end;
  font-size: clamp(5rem, 18vw, 14rem);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pre-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--line-soft);
}

.pre-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--ember);
}

/* ---------- webgl canvas ---------- */
#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 2;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem var(--gutter);
  transition: transform 0.5s var(--ease-io), background-color 0.4s,
    border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(10, 10, 11, 0.75);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}

.nav.is-hidden {
  transform: translateY(-110%);
}

.nav-logo {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.nav-logo sup,
.footer-logo sup {
  color: var(--ember);
  font-size: 0.55em;
  font-stretch: 100%;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
}

.nav-links a {
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  transition: color 0.3s;
}

.nav-idx {
  color: var(--ember);
  font-size: 0.55rem;
  margin-right: 0.4em;
  vertical-align: super;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-io);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-clock {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px 2px;
}

.menu-btn span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-io), opacity 0.3s;
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ---------- menu overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.menu-links a {
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1.05;
  color: var(--ink);
  width: fit-content;
}

.menu-links a .mono {
  color: var(--ember);
  font-size: 0.8rem;
  margin-right: 1rem;
  vertical-align: super;
}

.menu-links a:active {
  color: var(--ember);
}

.menu-foot {
  position: absolute;
  bottom: var(--gutter);
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--ink-dim);
}

/* ---------- buttons & links ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 1em 1.9em;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s, border-color 0.4s;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ember);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-io);
}

.btn:hover::before {
  transform: translateY(0);
}

.btn:hover {
  color: var(--bg);
  border-color: var(--ember);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.btn-small {
  padding: 0.75em 1.4em;
  font-size: 0.65rem;
}

.btn-arrow {
  transition: transform 0.35s var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.link-underline {
  position: relative;
  color: var(--ink-dim);
  transition: color 0.3s;
}

.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 0.45s var(--ease-io);
}

.link-underline:hover {
  color: var(--ember);
}

.link-underline:hover::after {
  transform: scaleX(1);
}

/* ---------- shared section bits ---------- */
section {
  position: relative;
  padding: clamp(6rem, 12vw, 11rem) var(--gutter);
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  color: var(--ink-dim);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.sec-head span:first-child {
  color: var(--ember);
}

.sec-head-line {
  flex: 0 1 120px;
  height: 1px;
  background: var(--line);
}

.sec-title {
  font-size: clamp(2.8rem, 7.5vw, 7.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
}

.sec-title em,
.contact-title em {
  font-style: italic;
  font-weight: 500;
  font-stretch: 100%;
  color: var(--ember);
}

/* line-reveal wrappers */
.rl {
  display: block;
  overflow: hidden;
  padding-block: 0.06em; /* keep descenders/ascenders unclipped */
}

.rl-i {
  display: block;
  will-change: transform;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 7rem;
  overflow: hidden;
}

/* faint lab grid */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 30%, transparent 75%);
  pointer-events: none;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 1.1rem;
  margin-bottom: clamp(1.5rem, 4vh, 3.5rem);
}

.hero-meta-mid {
  color: var(--ember);
}

.hero-title {
  position: relative;
  font-size: min(12.4vw, 14.5rem);
  line-height: 0.9;
  white-space: nowrap;
  margin-left: -0.04em;
}

.hero-title .char {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.05em;
  margin-bottom: -0.05em;
}

.hero-title .char-i {
  display: inline-block;
  transition: transform 0.3s var(--ease-out), color 0.3s;
}

.hero-title .char:hover .char-i {
  transform: translateY(-5%);
  color: var(--ember);
}

.hero-reg {
  font-size: 0.18em;
  color: var(--ember);
  vertical-align: top;
  display: inline-block;
  margin: 0.35em 0 0 0.25em;
  font-stretch: 100%;
  font-weight: 600;
}

.hero-sub {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
  margin-top: clamp(2rem, 5vh, 4.5rem);
}

.hero-tagline {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  font-weight: 420;
  line-height: 1.45;
  color: var(--ink-dim);
  text-wrap: balance;
}

.hero-tagline em {
  font-style: normal;
  color: var(--ink);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-shrink: 0;
}

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--ink-faint);
  margin-top: clamp(3rem, 8vh, 6rem);
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.scroll-line {
  display: inline-block;
  width: 56px;
  height: 1px;
  background: var(--ink-faint);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ember);
  animation: scroll-sweep 2.2s var(--ease-io) infinite;
}

@keyframes scroll-sweep {
  0% { transform: translateX(-101%); }
  55% { transform: translateX(0); }
  100% { transform: translateX(101%); }
}

.cross {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ember);
  opacity: 0.55;
  pointer-events: none;
}

.cross-1 { top: 16%; left: 6%; }
.cross-2 { top: 22%; right: 9%; }
.cross-3 { bottom: 24%; left: 12%; }
.cross-4 { bottom: 14%; right: 6%; }

/* ============================================================
   MARQUEE — full-bleed ember band
   ============================================================ */
.marquee {
  position: relative;
  z-index: 3;
  background: var(--ember);
  color: var(--bg);
  overflow: hidden;
  padding: 1.3rem 0;
  transform: rotate(-1.2deg) scale(1.02);
  border-block: 1px solid var(--bg);
}

.marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2.5rem;
  padding-right: 2.5rem;
}

.marquee-group span {
  font-size: clamp(1.5rem, 3.2vw, 3rem);
  white-space: nowrap;
}

.marquee-group i {
  font-style: normal;
  font-size: 1.2rem;
}

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto-text {
  font-size: clamp(1.7rem, 4.2vw, 3.6rem);
  font-weight: 560;
  line-height: 1.18;
  letter-spacing: -0.015em;
  max-width: 60ch;
  text-wrap: balance;
}

.manifesto-text .w {
  display: inline-block;
}

.manifesto-foot {
  display: flex;
  gap: 2rem;
  align-items: baseline;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}

.manifesto-foot .mono {
  color: var(--ember);
  flex-shrink: 0;
}

.manifesto-foot p {
  max-width: 38rem;
  color: var(--ink-dim);
  font-size: 1rem;
}

/* ============================================================
   SERVICES — inverted hover rows
   ============================================================ */
.service-list {
  border-bottom: 1px solid var(--line);
}

.service-row {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: 5rem 1.1fr 1fr 3rem;
  align-items: center;
  gap: 2.5rem;
  padding: clamp(1.8rem, 3.4vw, 3rem) clamp(0.5rem, 1.5vw, 1.5rem);
  border-top: 1px solid var(--line);
}

.service-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease-io);
}

.service-row:hover::before {
  transform: scaleY(1);
}

.service-idx {
  color: var(--ember);
  transition: color 0.35s;
}

.service-name {
  font-size: clamp(1.7rem, 3.4vw, 3.3rem);
  transition: color 0.35s, transform 0.5s var(--ease-io);
}

.service-desc {
  color: var(--ink-dim);
  font-size: 0.98rem;
  max-width: 34rem;
  transition: color 0.35s;
}

.service-tags {
  display: block;
  margin-top: 0.7rem;
  color: var(--ink-faint);
  transition: color 0.35s;
}

.service-arrow {
  font-size: 1.6rem;
  justify-self: end;
  transition: color 0.35s, transform 0.5s var(--ease-io);
}

.service-row:hover .service-name {
  color: var(--bg);
  transform: translateX(0.6rem);
}

.service-row:hover .service-desc {
  color: rgba(10, 10, 11, 0.72);
}

.service-row:hover .service-tags {
  color: rgba(10, 10, 11, 0.5);
}

.service-row:hover .service-idx,
.service-row:hover .service-arrow {
  color: var(--ember);
}

.service-row:hover .service-arrow {
  transform: translateX(0.4rem) rotate(-45deg);
}

/* ============================================================
   WORK — pinned horizontal track
   ============================================================ */
.work {
  position: relative;
  padding: 0;
}

.work-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 5vh, 4rem) 0;
}

/* JS-driven horizontal scroll: CSS `position: sticky` holds the frame steady on
   the compositor (no position:fixed repaints, no transform-pin jitter on touch),
   while GSAP scrubs the track sideways. JS sets the exact heights to match the
   horizontal travel; the 100svh here is just a pre-JS fallback. */
html.motion .work-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.work-head {
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
}

.work-head .sec-head {
  grid-column: 1 / -1;
  margin-bottom: 1.5rem;
}

.work-head .sec-title {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 6vw, 6rem);
}

.work-hint {
  color: var(--ink-faint);
  padding-bottom: 0.8rem;
}

.work-track {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3rem);
  width: max-content;
  padding: clamp(1.2rem, 3vh, 2.2rem) var(--gutter) 0;
  will-change: transform;
}

.work-card {
  position: relative;
  width: clamp(310px, 34vw, 520px);
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
}

.work-visual {
  aspect-ratio: 16 / 10;
  max-height: 36vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

.wv-art {
  width: 100%;
  height: 100%;
  transform: scale(1.06);
  transition: transform 0.8s var(--ease-out);
  will-change: transform;
}

.work-card:hover .wv-art {
  transform: scale(1.12);
}

/* CSS-art project visuals — no image assets */
.wv-1 {
  background:
    radial-gradient(circle at 32% 38%, rgba(255, 77, 0, 0.9), rgba(255, 77, 0, 0) 42%),
    repeating-radial-gradient(circle at 32% 38%, transparent 0 16px, rgba(232, 228, 220, 0.08) 16px 17px),
    radial-gradient(rgba(232, 228, 220, 0.16) 1px, transparent 1.5px),
    #0d0d10;
  background-size: auto, auto, 22px 22px, auto;
}

.wv-2 {
  background:
    linear-gradient(118deg, transparent 38%, rgba(255, 77, 0, 0.85) 50%, transparent 62%),
    repeating-linear-gradient(45deg, rgba(232, 228, 220, 0.07) 0 2px, transparent 2px 18px),
    linear-gradient(180deg, #131316, #0c0c0e);
}

.wv-3 {
  background:
    radial-gradient(circle 7px at 68% 30%, var(--ember) 98%, transparent),
    repeating-radial-gradient(circle at 50% 58%, transparent 0 34px, rgba(232, 228, 220, 0.12) 34px 35px),
    radial-gradient(circle at 50% 58%, rgba(232, 228, 220, 0.07), transparent 60%),
    #0d0d10;
}

.wv-4 {
  background:
    linear-gradient(var(--ember), var(--ember)) 25% 40% / 36px 36px no-repeat,
    linear-gradient(rgba(255, 77, 0, 0.45), rgba(255, 77, 0, 0.45)) 62% 65% / 36px 36px no-repeat,
    linear-gradient(rgba(232, 228, 220, 0.22), rgba(232, 228, 220, 0.22)) 80% 28% / 36px 36px no-repeat,
    repeating-linear-gradient(0deg, rgba(232, 228, 220, 0.08) 0 1px, transparent 1px 37px),
    repeating-linear-gradient(90deg, rgba(232, 228, 220, 0.08) 0 1px, transparent 1px 37px),
    #0d0d10;
}

.wv-5 {
  background:
    repeating-linear-gradient(0deg, rgba(10, 10, 11, 0.35) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 50% 115%, #ffb38a 0%, #ff4d00 28%, #6b1f00 52%, #0d0d10 72%),
    #0d0d10;
}

.work-info {
  padding: 1.6rem 1.5rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
}

.work-meta {
  color: var(--ink-faint);
}

.work-name {
  font-size: clamp(1.9rem, 2.6vw, 2.7rem);
}

.work-desc {
  color: var(--ink-dim);
  font-size: 0.94rem;
  line-height: 1.55;
}

.work-stat {
  color: var(--ember);
  border: 1px solid var(--ember-soft);
  background: var(--ember-soft);
  padding: 0.45em 0.9em;
  border-radius: 99px;
}

.work-card-cta {
  background: transparent;
  border: 1px dashed var(--line);
  transition: border-color 0.4s;
}

.work-card-cta:hover {
  border-color: var(--ember);
}

.work-cta-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.6rem;
  height: 100%;
  padding: 2.2rem;
}

.work-cta-inner .mono {
  color: var(--ink-faint);
}

.work-cta-inner .work-name {
  color: var(--ink-dim);
  transition: color 0.4s;
}

.work-card-cta:hover .work-name {
  color: var(--ink);
}

/* progressive-enhancement fallback: without JS-driven motion the pinned
   horizontal track can't be scrolled, so stack the cards vertically instead.
   Covers no-GSAP, reduced-motion and pre-paint states at every width. */
html:not(.motion) .work {
  min-height: 0;
  padding-block: clamp(6rem, 12vw, 11rem);
}

html:not(.motion) .work-track {
  flex-direction: column;
  width: auto;
  align-items: stretch;
}

html:not(.motion) .work-card {
  width: 100%;
}

html:not(.motion) .work-hint {
  display: none;
}

/* ============================================================
   PROCESS — sticky stacking deck
   ============================================================ */
.steps {
  display: grid;
  gap: 2.2rem;
  counter-reset: step;
}

.step {
  --veil: 0%;
  position: sticky;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: clamp(1.8rem, 4vw, 3.2rem);
  min-height: 54vh;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transform-origin: center top;
  will-change: transform;
}

/* dimming veil: stays opaque (no see-through ghosting), driven by --veil */
.step::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: rgb(10 10 11 / var(--veil, 0%));
  pointer-events: none;
}

.step:nth-child(1) { top: calc(12vh + 0rem); }
.step:nth-child(2) { top: calc(12vh + 1.6rem); }
.step:nth-child(3) { top: calc(12vh + 3.2rem); }
.step:nth-child(4) { top: calc(12vh + 4.8rem); }

.step-top {
  display: flex;
  justify-content: space-between;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 1.1rem;
}

.step-top span:first-child {
  color: var(--ember);
}

.step-name {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.step-desc {
  color: var(--ink-dim);
  max-width: 44rem;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.6;
}

.step-out {
  margin-top: auto;
  color: var(--ink-dim);
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 5.5rem);
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}

.stat-num {
  font-size: clamp(2.6rem, 5.5vw, 5.5rem);
  font-variant-numeric: tabular-nums;
}

.stat-num em {
  font-style: normal;
  color: var(--ember);
  font-size: 0.55em;
}

.stat-label {
  color: var(--ink-dim);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-title {
  font-size: clamp(2.6rem, 8.6vw, 9.5rem);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.contact-title .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink-dim);
}

.contact-email {
  width: fit-content;
  font-family: var(--font-sans);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 3.4rem);
  letter-spacing: -0.02em;
  position: relative;
  transition: color 0.35s;
}

.contact-email::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--ember);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.5s var(--ease-io);
}

.contact-email:hover {
  color: var(--ember);
}

.contact-email:hover::after {
  transform: scaleX(1);
}

.contact-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.contact-meta p {
  max-width: 34rem;
  color: var(--ink-dim);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 3;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 5rem) var(--gutter) 1.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}

.footer-logo {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--ink-dim);
  max-width: 22rem;
  font-size: 0.95rem;
}

.footer-head {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: var(--ink-dim);
  font-size: 0.95rem;
  transition: color 0.3s, transform 0.3s var(--ease-out);
}

.footer-col a:hover {
  color: var(--ember);
  transform: translateX(4px);
}

/* external-link arrow — inline SVG so mobile never swaps in the emoji glyph */
.arrow-ne {
  width: 0.66em;
  height: 0.66em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: square;
  display: inline-block;
  margin-left: 0.3em;
}

.footer-sys {
  color: var(--ink-dim);
  gap: 0.9rem;
}

.sys-ok i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3dd68c;
  margin-right: 0.6em;
  box-shadow: 0 0 8px rgba(61, 214, 140, 0.8);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
}

.footer-bar a:hover {
  color: var(--ember);
}

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  right: var(--gutter);
  bottom: 1.2rem;
  z-index: 80;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  transition: opacity 0.35s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .hero-meta-mid,
  .hero-foot-right {
    display: none;
  }

  /* the wordmark repeats in the hero — shrink the nav copy so it reads
     as a quiet header mark, not a second headline */
  .nav-logo {
    font-size: 0.82rem;
  }

  .hero {
    /* spread content across the full viewport instead of bunching at center:
       meta tucks under the nav, scroll hint pins to the bottom */
    justify-content: flex-start;
    padding-top: 6.5rem;
    padding-bottom: 1.5rem;
  }

  .hero-title {
    font-size: 11.6vw;
  }

  .hero-sub {
    margin-top: clamp(2.5rem, 9vh, 5rem);
  }

  .hero-foot {
    margin-top: auto;
  }

  /* thin mono links sit over the particle field — full ink for legibility */
  .hero-cta .link-underline {
    color: var(--ink);
  }

  .hero-meta {
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  .hero-sub {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .hero-cta {
    flex-wrap: wrap;
    gap: 1.4rem;
  }

  .cross-2,
  .cross-3 {
    display: none;
  }

  .marquee {
    padding: 1rem 0;
  }

  .manifesto-foot {
    flex-direction: column;
    gap: 1rem;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .service-idx {
    order: -1;
  }

  .service-arrow {
    display: none;
  }

  /* work keeps the sticky horizontal track on mobile — cards sized so the
     next one peeks in, signalling the sideways scroll */
  .work-head {
    grid-template-columns: 1fr;
  }

  .work-card {
    width: clamp(248px, 80vw, 360px);
  }

  .work-hint {
    padding-bottom: 0;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    padding-inline: 0;
  }

  .contact-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bar-mid {
    order: 3;
    width: 100%;
  }

  .hud {
    display: none;
  }

  .nav-clock {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav .btn-small {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .footer-col a {
    padding-block: 0.2rem;
  }

  .step {
    min-height: 0;
  }

  .step:nth-child(1) { top: calc(9vh + 0rem); }
  .step:nth-child(2) { top: calc(9vh + 1rem); }
  .step:nth-child(3) { top: calc(9vh + 2rem); }
  .step:nth-child(4) { top: calc(9vh + 3rem); }

  .stats {
    grid-template-columns: 1fr;
    gap: 1.7rem;
  }

  .work-info {
    padding: 1.3rem 1.2rem 1.5rem;
  }

  .work-cta-inner {
    padding: 1.8rem 1.4rem;
  }

  .sec-head {
    gap: 0.9rem;
  }

  .sec-head-line {
    flex-basis: 60px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .preloader {
    display: none;
  }

  .noise {
    animation: none;
  }
}
