@charset "UTF-8";
/* ============================================================
   NEXES — main stylesheet
   Machined metal in dark space. One idea per section.
   ============================================================ */

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

/* Native smooth scrolling ONLY when Lenis is not driving the scroll —
   CSS smooth-behavior turns Lenis's per-frame scrollTo into animated
   scrolls and the two fight in a main-thread feedback loop. */
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }

body {
  background-color: var(--void);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* isometric Y-lattice texture (seamless cube-corner tile) — machined,
     ~5% visible. Stronger variants layer in the hero and contact sections. */
  background-image: var(--y-lattice);
  background-size: var(--y-size);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }

/* anchor targets never hide under the fixed nav */
[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-hi);
  line-height: var(--lh-tight);
  text-wrap: balance;
}

p { text-wrap: pretty; }
a { color: var(--rim); text-decoration: none; }
a:hover { color: var(--flare); }

::selection { background: var(--iris); color: var(--flare); }

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

.skip-link {
  position: fixed; top: -100%; left: var(--space-3);
  z-index: var(--z-skip);
  padding: .6em 1.2em;
  background: var(--mesh); color: var(--text-hi);
  font-family: var(--font-mono); font-size: var(--fs-sm);
  transition: top var(--dur-fast);
}
.skip-link:focus { top: var(--space-3); }

/* ---------- utilities ---------- */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section { padding-block: var(--space-7); position: relative; }
/* carbon sections are opaque, so they carry their own lattice layer */
.section--carbon {
  background-color: var(--carbon);
  background-image: var(--y-lattice);
  background-size: var(--y-size);
}
/* hero + contact read slightly stronger */
#contact { background-image: var(--y-lattice-strong); }

/* machine annotation label: // 01 — SERVICES */
.kicker {
  display: flex; align-items: center; gap: .75em;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--violet-text);
  margin-bottom: var(--space-3);
}
.kicker::before { content: "//"; color: var(--iris); }
.kicker::after {
  content: ""; flex: 0 1 6rem; height: 1px;
  background: linear-gradient(90deg, var(--iris-35), transparent);
}

.section-head { margin-bottom: var(--space-6); max-width: 46rem; }
.section-head h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.section-head p { font-size: var(--fs-md); color: var(--text-mid); }

.mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-mono); text-transform: uppercase; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* terminal caret while a kicker types itself in */
.kicker .kicker__type { white-space: pre-wrap; }
.kicker.is-typing .kicker__type::after {
  content: "\25AE";  /* ▮ block caret, escaped — see encoding note above */
  color: var(--rim);
  animation: caret-blink .7s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* spun-metal headline fill */
.metal-text {
  background: var(--grad-metal-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* moving specular sheen on hero H1 */
.sheen { position: relative; }
.sheen::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 42%, var(--flare) 50%, transparent 58%);
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen-sweep 7s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes sheen-sweep {
  0%, 55% { background-position: 130% 0; }
  85%, 100% { background-position: -60% 0; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .85em 1.7em;
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-sm); letter-spacing: .06em; text-transform: uppercase;
  clip-path: polygon(var(--chamfer-sm) 0, 100% 0, 100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%, 0 100%, 0 var(--chamfer-sm));
  cursor: pointer; border: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
  will-change: transform;
}
.btn-metal {
  background: var(--grad-steel);
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(228, 222, 255, .35);
  box-shadow: var(--shadow-cta);
}
.btn-metal:hover { box-shadow: var(--shadow-cta-hover); }
.btn-ghost {
  background: linear-gradient(var(--carbon), var(--carbon)) padding-box, var(--grad-card-edge) border-box;
  border: 1px solid transparent;
  color: var(--text-hi);
}
.btn-ghost:hover { color: var(--flare); background: linear-gradient(var(--mesh), var(--mesh)) padding-box, var(--grad-card-edge) border-box; }

/* ---------- nav ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  transition: background var(--dur-med), border-color var(--dur-med), backdrop-filter var(--dur-med);
  border-bottom: 1px solid transparent;
}
.site-nav.is-scrolled {
  background: var(--glass-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--iris-35);
}
.site-nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  height: var(--nav-h);
}
.site-nav__brand { display: inline-flex; align-items: center; gap: .7em; }
.site-nav__brand img { width: 34px; height: 34px; border-radius: 6px; }
.site-nav__brand span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: .22em; color: var(--text-hi);
}
.site-nav__links { display: flex; gap: clamp(1rem, 2.5vw, 2.2rem); list-style: none; padding: 0; }
.site-nav__links a {
  position: relative;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: var(--track-mono); text-transform: uppercase;
  color: var(--text-mid); padding-block: .4em;
}
.site-nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--rim);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.site-nav__links a:hover, .site-nav__links a.is-active { color: var(--flare); }
.site-nav__links a:hover::after, .site-nav__links a.is-active::after {
  transform: scaleX(1); transform-origin: left;
}
.site-nav .btn { padding: .6em 1.2em; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--iris-35);
  width: 42px; height: 42px; align-items: center; justify-content: center;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.nav-toggle svg { stroke: var(--text-hi); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--glass-menu);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--iris-35);
    padding: var(--space-3) var(--gutter) var(--space-4);
    display: none;
  }
  .site-nav__links.is-open { display: flex; }
  .site-nav__links a { display: block; padding: .8em 0; font-size: var(--fs-sm); }
  .site-nav__cta { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  padding-block: 0 clamp(3rem, 8vh, 6rem);
}
/* stronger Y-lattice behind the hero; sits under the (transparent) 3D canvas */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--y-lattice-strong);
  background-size: var(--y-size);
}
.hero__canvas {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero__canvas.is-live { opacity: 1; }
@media (max-width: 767px) { .hero__canvas.is-live { opacity: .72; } }
.hero__canvas canvas { width: 100%; height: 100%; }

/* static fallback: logo + spun sheen */
.hero__static {
  position: absolute; inset: 0; z-index: 0;
  display: none; align-items: center; justify-content: center;
}
.hero--static .hero__static { display: flex; }
.hero__static img {
  width: min(52vh, 74vw); height: auto;
  filter: drop-shadow(0 0 80px rgba(124, 108, 255, .3));
}
.hero__static::after {
  content: ""; position: absolute;
  width: min(52vh, 74vw); aspect-ratio: 1;
  background: conic-gradient(from 0deg, transparent 78%, rgba(228,222,255,.14) 86%, transparent 94%);
  animation: spin-sheen 14s linear infinite;
  pointer-events: none;
}
@keyframes spin-sheen { to { transform: rotate(1turn); } }

.hero__glow {
  position: absolute; inset: auto 0 0 0; height: 40vh; z-index: 1;
  /* steeled violet — desaturated for this large fill */
  background: radial-gradient(60% 100% at 50% 100%, rgba(108, 111, 168, .18), transparent 70%);
  pointer-events: none;
}

.hero__content { position: relative; z-index: 2; }
.hero__content .kicker { margin-bottom: var(--space-4); }
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: .01em;
  margin-bottom: var(--space-4);
  max-width: 12ch;
}
.hero__sub {
  font-size: var(--fs-md); color: var(--text-mid);
  max-width: 34rem; margin-bottom: var(--space-5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.hero__scrollcue {
  position: absolute; right: var(--gutter); bottom: clamp(3rem, 8vh, 6rem); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .8em;
  color: var(--text-low);
}
.hero__scrollcue span { writing-mode: vertical-rl; }
.hero__scrollcue::after {
  content: ""; width: 1px; height: 3.5rem;
  background: linear-gradient(var(--rim), transparent);
  animation: cue-drop 2.2s var(--ease-out) infinite;
}
@keyframes cue-drop {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  56% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (max-width: 640px) { .hero__scrollcue { display: none; } }

/* ---------- cards (shared machined language) ---------- */
.card {
  position: relative;
  background: linear-gradient(var(--graphite), var(--graphite)) padding-box, var(--grad-card-edge) border-box;
  border: 1px solid transparent;
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
  transition: transform var(--dur-fast) var(--ease-out);
}
/* cursor-following edge light */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  padding: 1px; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -20%), var(--rim), transparent 72%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.card:hover::before, .card:focus-within::before { opacity: 1; }

/* ---------- services ---------- */
.services-grid {
  display: grid; gap: var(--space-3);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .services-grid { grid-template-columns: 1fr; } }

.service-card { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); min-height: 15rem; overflow: hidden; }

/* idle ambient corner-light — a dim violet pool drifting near the top edge.
   Transform/opacity only; killed by the global reduced-motion block. */
.service-card::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  top: -55%; right: -35%; width: 90%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(185, 175, 255, .1), transparent 72%);
  animation: corner-drift 16s var(--ease-out) infinite alternate;
}
.service-card:nth-child(3n+2)::after { animation-delay: -5s; }
.service-card:nth-child(3n)::after { animation-delay: -11s; }
@keyframes corner-drift {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .7; }
  to   { transform: translate3d(-38%, 26%, 0) scale(1.25); opacity: 1; }
}
.service-card > * { position: relative; z-index: 1; }
.service-card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.service-card__icon {
  width: 44px; height: 44px; padding: 10px;
  color: var(--rim);
  background: var(--violet-12);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.service-card__index { color: var(--text-low); }
.service-card h3 { font-size: var(--fs-lg); }
.service-card p { font-size: var(--fs-sm); color: var(--text-mid); }

/* ---------- pipeline set-piece (pinned; JS scrubs it to completion) ---------- */
/* the section becomes a viewport-height panel with its content centered, so
   when JS pins it at the top of the screen the whole loop stays fully visible */
#process {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--space-5);
}
.no-motion #process { min-height: 0; padding-block: var(--space-7); }

.pipeline-svg { width: 100%; height: auto; margin-top: var(--space-4); }
.pipeline-svg .trace {
  stroke: var(--iris); stroke-width: 1.5; fill: none; opacity: .5;
}
.pipeline-svg .wire {
  stroke: url(#wire-grad); stroke-width: 2.5; fill: none;
  filter: drop-shadow(0 0 6px rgba(124, 108, 255, .8));
}
.pipeline-svg .node-ring { fill: var(--graphite); stroke: var(--iris); stroke-width: 1.5; }
.pipeline-svg .node-core { fill: var(--steel-0); transition: fill .4s; }
.pipeline-svg .node.is-lit .node-ring { stroke: var(--rim); filter: drop-shadow(0 0 10px rgba(185,175,255,.7)); }
.pipeline-svg .node.is-lit .node-core { fill: var(--rim); }
.pipeline-svg .node-label {
  font-family: var(--font-display); font-weight: 600; font-size: 21px;
  fill: var(--text-hi); text-anchor: middle; letter-spacing: .08em;
}
.pipeline-svg .node-sub {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em;
  fill: var(--text-low); text-anchor: middle;
}
.pipeline-svg .node.is-lit .node-sub { fill: var(--violet-text); }
.pipeline-svg .pulse { fill: var(--flare); filter: drop-shadow(0 0 8px var(--rim)); }
.pipeline-status {
  margin-top: var(--space-3);
  color: var(--text-low); min-height: 1.5em;
}
.pipeline-status .ok { color: var(--violet-text); }

/* reduced-motion / no-JS: show the finished system */
.no-motion .pipeline-svg .node .node-ring { stroke: var(--rim); }
.no-motion .pipeline-svg .node .node-core { fill: var(--rim); }
.no-motion .pipeline-svg .pulse { display: none; }

/* ---------- work ---------- */
.work-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (max-width: 780px) { .work-grid { grid-template-columns: 1fr; } }

.project-card { display: flex; flex-direction: column; }
.project-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.project-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: filter .8s;
  filter: saturate(.9);
}
.project-card:hover .project-card__media img { filter: saturate(1.1); }
/* scroll parallax (JS) owns transform when motion is on; without motion,
   fall back to the classic hover zoom */
.no-motion .project-card__media img { transition: transform .8s var(--ease-out), filter .8s; }
.no-motion .project-card:hover .project-card__media img { transform: scale(1.045); }
.project-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.project-card__meta { display: flex; justify-content: space-between; color: var(--text-low); }
.project-card h3 { font-size: var(--fs-lg); }
.project-card h3 a { color: inherit; }
.project-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.project-card p { font-size: var(--fs-sm); flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: .5em; padding: 0; list-style: none; margin-top: var(--space-2); }
.chips li {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em;
  color: var(--rim); background: var(--violet-12);
  border: 1px solid var(--iris-35);
  padding: .25em .8em;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

/* ---------- testimonials ---------- */
.testimonials { max-width: 50rem; margin-inline: auto; text-align: center; }
.carousel { position: relative; min-height: 17rem; }
.carousel__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility .7s;
  display: flex; flex-direction: column; gap: var(--space-4); justify-content: center;
}
.carousel__slide.is-current { opacity: 1; visibility: visible; }
.carousel__slide blockquote {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--fs-lg); line-height: var(--lh-snug); color: var(--text-hi);
}
/* quotation marks as escapes — literal curly quotes break when a proxy or
   misconfigured server decodes this file as Windows-1252 */
.carousel__slide blockquote::before { content: "\201C"; color: var(--violet); }
.carousel__slide blockquote::after { content: "\201D"; color: var(--violet); }
.carousel__who { color: var(--text-low); }
.carousel__who strong { color: var(--rim); font-weight: 500; }
.carousel__controls {
  display: flex; align-items: center; justify-content: center; gap: var(--space-3);
  margin-top: var(--space-4);
}
.carousel__btn {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--graphite); border: 1px solid var(--iris-35); color: var(--text-mid);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  cursor: pointer; transition: color var(--dur-fast), border-color var(--dur-fast);
}
.carousel__btn:hover { color: var(--flare); border-color: var(--rim); }
.carousel__dots { display: flex; gap: .2em; }
/* 24px transparent hit area (WCAG 2.5.8 AA) around an 8px diamond marker */
.carousel__dot {
  width: 24px; height: 24px; padding: 0; border: none; cursor: pointer;
  background: none; display: inline-grid; place-items: center;
}
.carousel__dot::before {
  content: ""; width: 8px; height: 8px;
  background: var(--iris); transform: rotate(45deg);
  transition: background var(--dur-fast), box-shadow var(--dur-fast);
}
.carousel__dot.is-current::before { background: var(--rim); box-shadow: 0 0 8px rgba(185,175,255,.8); }

/* ---------- lab (blog preview + list) ---------- */
.lab-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .lab-grid { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; }
.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.045); }
.post-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.post-card__meta { display: flex; justify-content: space-between; color: var(--text-low); }
.post-card__meta .cat { color: var(--violet-text); }
.post-card h3 { font-size: var(--fs-md); }
.post-card h3 a { color: inherit; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.post-card p { font-size: var(--fs-sm); flex: 1; }

.section-foot { margin-top: var(--space-5); text-align: center; }

/* ---------- contact ---------- */
/* 3D orb — a full-bleed background layer BEHIND the section content.
   Never occupies layout space, never intercepts the pointer; the section's
   height comes from the form. Kept dim so labels/inputs hold AA contrast. */
.contact-orb {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  opacity: .38;
}
.contact-orb canvas, .contact-orb__static {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.contact-orb__static { padding: 4vh 8vw; }
.contact-orb canvas { opacity: 0; transition: opacity 1s ease; }
.contact-orb.is-live canvas { opacity: 1; }
.contact-orb.is-live .contact-orb__static { display: none; }
@media (max-width: 860px) { .contact-orb { display: none; } }

.contact-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-6);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: var(--space-5); } }
.contact-lede h2 { font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.contact-lede p { font-size: var(--fs-md); max-width: 28rem; }
.contact-direct { margin-top: var(--space-5); display: grid; gap: var(--space-2); }
.contact-direct a { display: inline-flex; gap: .7em; align-items: center; color: var(--text-mid); }
.contact-direct a:hover { color: var(--flare); }
.contact-direct svg { color: var(--violet); flex: none; }

.contact-form { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: .45em; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-low); }
.field input, .field select, .field textarea {
  background: var(--carbon);
  border: 1px solid var(--iris-35);
  color: var(--text-hi);
  padding: .8em 1em;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--rim); background: var(--graphite);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23B9AFFF' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 12px 8px;
  background-position: right 1em center;
  background-repeat: no-repeat;
  padding-right: 2.6em;
}
.field .error { color: #FF9FB2; font-size: var(--fs-xs); font-family: var(--font-mono); }
.contact-form .btn { justify-self: start; grid-column: 1 / -1; }
@media (max-width: 560px) { .contact-form { grid-template-columns: 1fr; } }

.form-success {
  grid-column: 1 / -1;
  padding: var(--space-5);
  text-align: center; display: grid; gap: var(--space-2); justify-items: center;
}
.form-success[hidden] { display: none; }
.form-success h3 { font-size: var(--fs-lg); }
.form-success .mono { color: var(--violet); }

/* honeypot — off-canvas AND visibility:hidden so it never reaches the
   page's rendered text (innerText, reader modes, find-in-page); the field
   stays in the DOM for markup-parsing bots */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; visibility: hidden;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--iris-18);
  padding-block: var(--space-5);
  background-color: var(--carbon);
  background-image: var(--y-lattice);
  background-size: var(--y-size);
  position: relative; overflow: hidden;
}
/* barely-there drifting violet mist over the footer weave */
.site-footer::before {
  content: ""; position: absolute; inset: -60% -25%; pointer-events: none;
  background:
    radial-gradient(38% 55% at 26% 55%, rgba(124, 108, 255, .055), transparent 70%),
    radial-gradient(30% 45% at 72% 45%, rgba(185, 175, 255, .04), transparent 70%);
  animation: footer-drift 30s ease-in-out infinite alternate;
}
@keyframes footer-drift {
  from { transform: translate3d(-5%, -2%, 0); }
  to   { transform: translate3d(5%, 3%, 0); }
}
.site-footer > .container { position: relative; }
.site-footer__grid {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  align-items: center; justify-content: space-between;
}
.site-footer__brand { display: inline-flex; align-items: center; gap: .7em; }
.site-footer__brand img { width: 30px; height: 30px; border-radius: 5px; }
.site-footer__brand span { font-family: var(--font-display); font-weight: 700; letter-spacing: .22em; color: var(--text-hi); }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: var(--space-3); list-style: none; padding: 0; }
.site-footer nav a { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-low); }
.site-footer nav a:hover { color: var(--rim); }
.site-footer__social { display: flex; gap: var(--space-2); }
.site-footer__social a { color: var(--text-low); } .site-footer__social a:hover { color: var(--rim); }
.site-footer__legal { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; color: var(--text-low); font-size: var(--fs-xs); font-family: var(--font-mono); letter-spacing: .06em; }
.site-footer__legal a { color: var(--text-mid); }
.site-footer__legal a:hover { color: var(--rim); }

/* ---------- page hero (detail pages) ---------- */
.page-hero { padding-block: calc(4.25rem + var(--space-6)) var(--space-5); }
.page-hero h1 { font-size: var(--fs-2xl); max-width: 22ch; margin-bottom: var(--space-3); }
.page-hero .lede { font-size: var(--fs-md); max-width: 40rem; }
.breadcrumb { margin-bottom: var(--space-4); color: var(--text-low); }
.breadcrumb a { color: var(--text-low); } .breadcrumb a:hover { color: var(--rim); }

/* ---------- case study ---------- */
.case-hero-img { clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer)); }
.case-hero-img img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.case-meta {
  display: grid; grid-template-columns: repeat(3, auto); gap: var(--space-5);
  padding-block: var(--space-4); margin-block: var(--space-5);
  border-block: 1px solid var(--iris-18);
}
@media (max-width: 640px) { .case-meta { grid-template-columns: 1fr; gap: var(--space-3); } }
.case-meta dt { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-mono); text-transform: uppercase; color: var(--text-low); margin-bottom: .4em; }
.case-meta dd { margin: 0; color: var(--text-hi); }

.case-body { display: grid; gap: var(--space-6); max-width: 46rem; }
.case-section h2 { font-size: var(--fs-xl); margin-bottom: var(--space-3); }
.case-section h2 .num { color: var(--violet-text); font-family: var(--font-mono); font-size: .5em; vertical-align: super; margin-right: .8em; letter-spacing: .1em; }
.case-section p { color: var(--text-mid); font-size: var(--fs-md); }

.case-gallery { display: grid; gap: var(--space-3); grid-template-columns: 1fr 1fr; margin-top: var(--space-6); }
@media (max-width: 640px) { .case-gallery { grid-template-columns: 1fr; } }
.case-gallery figure { clip-path: polygon(var(--chamfer-sm) 0, 100% 0, 100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%, 0 100%, 0 var(--chamfer-sm)); }
.case-gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.related { margin-top: var(--space-7); }
.related h2 { font-size: var(--fs-xl); margin-bottom: var(--space-4); }

/* ---------- blog ---------- */
.blog-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

.prose { max-width: 42rem; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { font-size: var(--fs-xl); margin-top: 1.8em; }
.prose h3 { font-size: var(--fs-lg); margin-top: 1.5em; }
.prose p, .prose li { font-size: var(--fs-md); color: var(--text-mid); }
.prose strong { color: var(--text-hi); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .5em; }
.prose blockquote {
  border-left: 2px solid var(--violet); padding-left: 1.2em;
  color: var(--text-hi); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--mesh); color: var(--rim);
  padding: .15em .45em; border-radius: 4px;
}
.prose pre {
  background: var(--carbon);
  border: 1px solid var(--iris-18);
  border-left: 2px solid var(--violet);
  padding: var(--space-4);
  overflow-x: auto;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.prose pre code { background: none; padding: 0; color: var(--text-hi); font-size: var(--fs-sm); }
.prose hr { border: none; height: 1px; background: var(--iris-18); }

.post-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); color: var(--text-low); margin-bottom: var(--space-4); }
.post-meta .cat { color: var(--violet-text); }
.post-cover { margin-block: var(--space-5); clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer)); }
.post-cover img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }

/* ---------- error pages ---------- */
.error-page {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: var(--space-3); padding: var(--gutter);
}
.error-page .code {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(6rem, 20vw, 12rem); line-height: 1;
}
.error-page h1 { font-size: var(--fs-xl); }
.error-page p { color: var(--text-mid); max-width: 30rem; }
.error-page .btn { margin-top: var(--space-3); }

/* ---------- reveal defaults (JS enhances) ---------- */
[data-reveal] { opacity: 1; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .sheen::after { animation: none; display: none; }
  .hero__static::after { animation: none; display: none; }
}
