/* ==========================================================================
   Lewis-John Smith — site styles
   Direction: warm-paper engineering editorial. Serif display, mono annotation,
   one vermilion signal colour. Double-bezel enclosures throughout.
   ========================================================================== */

:root {
  --paper: #F3EFE6;
  --paper-hi: #FBF9F4;
  --paper-lo: #E9E3D6;
  --ink: #17150F;
  --ink-2: #4B463C;
  --ink-3: #7E7769;
  --signal: #D9480F;
  --signal-soft: rgba(217, 72, 15, 0.12);
  --live: #3F8F5A;

  --hair: rgba(23, 21, 15, 0.09);
  --hair-strong: rgba(23, 21, 15, 0.16);
  --hair-inv: rgba(243, 239, 230, 0.12);

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(6rem, 13vw, 10rem);
  --r: 2rem;
  --bez: 0.375rem;

  /* z-index layers */
  --z-menu: 30;
  --z-nav: 40;
  --z-grain: 50;

  color-scheme: light;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
em { font-style: italic; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

/* Film grain: fixed, non-interactive, never on a scroller */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.wrap {
  width: 100%;
  max-width: 82rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: calc(var(--z-nav) + 1);
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  transition: transform 0.5s var(--ease);
}
.skip:focus { transform: translateY(5rem); }

/* ---------- Type ---------- */
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-wrap: balance;
}
.h2 em, .hero__title em, .contact__title em, .statement__quote em { color: var(--signal); }
.h3 {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(23, 21, 15, 0.04);
  box-shadow: inset 0 0 0 1px var(--hair);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 1.75rem;
}
.eyebrow .mono { font-size: inherit; color: var(--ink-3); letter-spacing: inherit; }
.eyebrow--inv { background: rgba(243, 239, 230, 0.06); box-shadow: inset 0 0 0 1px var(--hair-inv); color: rgba(243, 239, 230, 0.75); }

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}
.dot--live { background: var(--live); position: relative; }
.dot--live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2.4s var(--ease-out) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.6; }
  80%, 100% { transform: scale(3.2); opacity: 0; }
}

/* ---------- Double bezel ---------- */
.bezel {
  background: rgba(23, 21, 15, 0.035);
  box-shadow: inset 0 0 0 1px var(--hair);
  padding: var(--bez);
  border-radius: var(--r);
}
.core {
  background: var(--paper-hi);
  border-radius: calc(var(--r) - var(--bez));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(23, 21, 15, 0.03),
    0 30px 60px -36px rgba(60, 45, 20, 0.18);
}
.bezel--inv { background: rgba(243, 239, 230, 0.04); box-shadow: inset 0 0 0 1px var(--hair-inv); }
.bezel--inv > .core {
  background: #201D17;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 40px 80px -40px rgba(0, 0, 0, 0.5);
}

/* ---------- Buttons ---------- */
.btn {
  --h: 3.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  height: var(--h);
  padding: 0 0.375rem 0 1.5rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.6s var(--ease), background-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn__icon {
  width: calc(var(--h) - 0.75rem);
  height: calc(var(--h) - 0.75rem);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.6s var(--ease);
}
.btn__icon svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover .btn__icon { transform: translate(3px, -1px) scale(1.06); }

.btn--ink { background: var(--ink); color: var(--paper); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 24px -14px rgba(23, 21, 15, 0.6); }
.btn--ink .btn__icon { background: rgba(243, 239, 230, 0.12); }
.btn--ink:hover { background: #2A261D; }
.btn--ghost { background: rgba(23, 21, 15, 0.04); box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--ink); }
.btn--ghost .btn__icon { background: rgba(23, 21, 15, 0.06); }
.btn--ghost:hover { background: rgba(23, 21, 15, 0.07); }
.btn--ghost:hover .btn__icon { transform: translateY(3px) scale(1.06); }
.btn--paper { background: var(--paper); color: var(--ink); box-shadow: inset 0 -1px 0 rgba(23, 21, 15, 0.1); }
.btn--paper .btn__icon { background: var(--ink); color: var(--paper); }
.btn--paper:hover { background: #fff; }
.btn--sm { --h: 2.6rem; font-size: 0.85rem; padding-left: 1.1rem; gap: 0.6rem; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-weight: 500;
  font-size: 0.95rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.6s var(--ease);
}
.link svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.6s var(--ease); }
.link:hover svg { transform: translate(2px, -2px); }

/* ---------- Floating island nav ---------- */
.nav {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  display: flex;
  justify-content: center;
  padding-inline: var(--gutter);
  pointer-events: none;
}
.nav__pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  max-width: 100%;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(251, 249, 244, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 16px 40px -24px rgba(60, 45, 20, 0.35);
  transition: transform 0.8s var(--ease), box-shadow 0.8s var(--ease);
}
.nav__mark { display: flex; align-items: center; gap: 0.65rem; padding-right: 0.6rem; }
.nav__mono {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: none;
}
.nav__name { font-weight: 500; font-size: 0.9rem; letter-spacing: -0.01em; white-space: nowrap; }
.nav__links { display: none; gap: 0.1rem; }
.nav__links a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--ink-2);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.nav__links a:hover { background: rgba(23, 21, 15, 0.05); color: var(--ink); }
.nav__cta { display: none; }

.burger {
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  margin-left: auto;
  border-radius: 50%;
  border: 0;
  background: rgba(23, 21, 15, 0.06);
  cursor: pointer;
  transition: background-color 0.5s var(--ease);
}
.burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.05rem;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.7s var(--ease);
}
.burger span:nth-child(1) { transform: translate(-50%, -4px); }
.burger span:nth-child(2) { transform: translate(-50%, 3px); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translate(-50%, 0) rotate(-45deg); }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .burger { display: none; }
  .nav__name { display: none; }
  .nav__mark { padding-right: 0.4rem; }
}

/* ---------- Full-screen menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  align-items: flex-end;
  background: rgba(243, 239, 230, 0.86);
  -webkit-backdrop-filter: blur(36px);
  backdrop-filter: blur(36px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.7s var(--ease), visibility 0s; }
.menu__inner {
  width: 100%;
  padding: 7rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2.5rem);
}
.menu__label { color: var(--ink-3); margin-bottom: 1.5rem; }
.menu__list li { overflow: hidden; }
.menu__list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.35rem;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.9s var(--ease), opacity 0.9s var(--ease);
}
.menu__list .mono { color: var(--ink-3); min-width: 1.6rem; }
.menu__word {
  font-family: var(--serif);
  font-size: clamp(3.25rem, 15vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.menu__word em { color: var(--signal); }
.menu.is-open .menu__list a { transform: none; opacity: 1; }
.menu.is-open .menu__list li:nth-child(1) a { transition-delay: 0.1s; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: 0.15s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: 0.2s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: 0.25s; }
.menu__foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  color: var(--ink-2);
  text-transform: none;
  background: linear-gradient(var(--hair-strong), var(--hair-strong)) top / 100% 1px no-repeat;
  opacity: 0;
  transition: opacity 0.9s var(--ease) 0.3s;
}
.menu.is-open .menu__foot { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(env(safe-area-inset-top, 0px) + 7.5rem);
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(5.5rem, 14svh, 7.5rem));
  padding-bottom: 2.5rem;
  isolation: isolate;
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--hair) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 0%, transparent 75%);
  opacity: 0.7;
}
.hero__wrap {
  display: grid;
  gap: 3.5rem;
  align-items: center;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.3rem, 7.4vw, 7rem);
  font-size: clamp(3.3rem, min(7.4vw, 12.5svh), 7rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.hero__title em { display: block; }
/* Spacing tightens on short screens so the CTA stays above the fold */
.hero__copy .eyebrow { margin-bottom: clamp(1rem, 3.2svh, 1.75rem); }
.hero__lede {
  margin-top: 2rem;
  margin-top: clamp(1.25rem, 3.5svh, 2rem);
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.5rem; margin-top: clamp(1.5rem, 4.5svh, 2.5rem); }
.hero__figure { width: 100%; max-width: 36rem; justify-self: center; }
.hero__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  color: var(--ink-3);
  background: linear-gradient(var(--hair-strong), var(--hair-strong)) top / 100% 1px no-repeat;
  background-origin: content-box;
}
.hero__foot span { position: relative; }
@media (min-width: 768px) {
.hero__foot span + span::before {
  content: "";
  position: absolute;
  left: -0.95rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-3);
}
}

@media (min-width: 1024px) {
  .hero__wrap { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
  .hero__copy { align-self: start; }
  .hero__figure { justify-self: end; transform: rotate(1.5deg); }
}

/* Figure card */
.fig { padding: 1.25rem; }
.fig__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--ink-3); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(63, 143, 90, 0.1);
  color: #2F6E44;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.diagram { width: 100%; height: auto; margin-block: 1.25rem 1rem; overflow: visible; }
.diagram__zones { fill: rgba(23, 21, 15, 0.018); stroke: var(--hair-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.diagram__wires { fill: none; stroke: var(--hair-strong); stroke-width: 1.25; }
.diagram__wires .is-retiring { stroke-dasharray: 3 3; }
.diagram__flow { fill: none; stroke: var(--signal); stroke-width: 1.75; stroke-linecap: round; stroke-dasharray: 3 70; }
.diagram__flow use { animation: flow 2.8s linear infinite; }
.diagram__flow use:nth-child(3n+1) { animation-delay: -0.4s; }
.diagram__flow use:nth-child(3n+2) { animation-delay: -1.3s; animation-duration: 3.4s; }
.diagram__flow use:nth-child(4n) { animation-delay: -2.1s; animation-duration: 3.1s; }
.diagram__flow use:nth-child(5n) { animation-delay: -0.9s; animation-duration: 3.6s; }
@keyframes flow { to { stroke-dashoffset: -73; } }
.diagram__nodes rect { fill: var(--paper); stroke: var(--hair-strong); stroke-width: 1; }
.diagram__nodes text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: var(--ink-2);
  text-anchor: middle;
}
.diagram__nodes .is-key rect { fill: var(--ink); stroke: var(--ink); }
.diagram__nodes .is-key text { fill: var(--paper); }
.diagram__nodes .is-store rect { fill: var(--paper-lo); }
.diagram__nodes .is-tag rect { fill: var(--paper-lo); stroke: var(--hair); }
.diagram__nodes .is-tag text { font-size: 8.5px; fill: var(--ink-3); }
.diagram__nodes .is-retiring rect { stroke-dasharray: 3 3; }
.diagram__nodes .is-retiring text { fill: var(--ink-3); }
.diagram__labels text {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  fill: var(--ink-3);
  stroke: var(--paper-hi);
  stroke-width: 6px;
  stroke-linejoin: round;
  paint-order: stroke;
}
.diagram__labels .is-note { font-size: 7.5px; letter-spacing: 0.06em; }
.diagram__badge rect { fill: var(--paper-hi); stroke: var(--signal); stroke-width: 0.75; }
.diagram__badge text { font-size: 6.5px; letter-spacing: 0.08em; fill: var(--signal); stroke: none; text-anchor: middle; }

.fig__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.375rem;
}
.fig__stats div {
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.fig__stats dt { font-size: 0.6rem; color: var(--ink-3); }
.fig__stats dd { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2rem); line-height: 1.1; margin-top: 0.25rem; }
.fig__stats small { font-family: var(--mono); font-size: 0.65rem; color: var(--ink-3); margin-left: 0.15rem; }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section__head { margin-bottom: clamp(3rem, 7vw, 5.5rem); }
.section__head--split { display: grid; gap: 1.5rem; align-items: end; }
.section__note { max-width: 24rem; color: var(--ink-2); }
@media (min-width: 900px) {
  .section__head--split { grid-template-columns: 1fr auto; gap: 4rem; }
}

/* ---------- Services bento ---------- */
.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card {
  height: 100%;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  color: var(--ink-2);
}
.card p { max-width: 38rem; }
.card .h3 { color: var(--ink); }
.card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.card__idx { color: var(--ink-3); }
.card__lead {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.3vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0.35rem 0 0.9rem;
}
.tag {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(23, 21, 15, 0.05);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tag--inv { background: rgba(243, 239, 230, 0.1); color: rgba(243, 239, 230, 0.8); }

.card--feature .card__body { margin-top: auto; }
.card__art { margin: 0 0 2.5rem; padding: 1.25rem; border-radius: 1.25rem; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.card__art svg { width: 100%; height: auto; }
.art-lines { fill: none; stroke: var(--hair-strong); stroke-width: 1.25; }
.art-lines rect:first-child { fill: var(--signal-soft); stroke: rgba(217, 72, 15, 0.35); }
.art-text { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; fill: var(--ink-2); text-anchor: middle; }
.card__list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.5rem; }
.card__list li { padding: 0.35rem 0.75rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--ink-2); font-size: 0.65rem; }

.bars { display: flex; align-items: flex-end; gap: 0.35rem; height: 4.5rem; margin-bottom: 2rem; }
.bars span {
  flex: 1;
  height: 100%;
  border-radius: 4px 4px 2px 2px;
  background: var(--paper-lo);
  transform-origin: bottom;
  transform: scaleY(var(--s, 1));
  transition: transform 1.2s var(--ease);
}
.bars span:nth-child(1) { --s: 0.95; } .bars span:nth-child(2) { --s: 0.88; }
.bars span:nth-child(3) { --s: 1; }    .bars span:nth-child(4) { --s: 0.9; }
.bars span:nth-child(5) { --s: 0.62; background: var(--ink-3); }
.bars span:nth-child(6) { --s: 0.4; background: var(--signal); }
.bars span:nth-child(7) { --s: 0.3; background: var(--signal); }
.bars span:nth-child(8) { --s: 0.26; background: var(--signal); }
.bars span:nth-child(9) { --s: 0.24; background: var(--signal); }
.bars span:nth-child(10) { --s: 0.22; background: var(--signal); }
.js [data-reveal]:not(.is-in) .bars span { transform: scaleY(0.05); }
.bars span:nth-child(2) { transition-delay: 0.05s; } .bars span:nth-child(3) { transition-delay: 0.1s; }
.bars span:nth-child(4) { transition-delay: 0.15s; } .bars span:nth-child(5) { transition-delay: 0.2s; }
.bars span:nth-child(6) { transition-delay: 0.25s; } .bars span:nth-child(7) { transition-delay: 0.3s; }
.bars span:nth-child(8) { transition-delay: 0.35s; } .bars span:nth-child(9) { transition-delay: 0.4s; }
.bars span:nth-child(10) { transition-delay: 0.45s; }

.stack-line { display: flex; align-items: center; gap: 0.6rem; margin-top: auto; padding-top: 2rem; color: var(--ink-3); }
.stack-line span { padding: 0.35rem 0.7rem; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); font-size: 0.65rem; }
.stack-line i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair-strong), var(--signal), var(--hair-strong)); }

.card--ink { background: var(--ink); color: rgba(243, 239, 230, 0.7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 60px -30px rgba(23, 21, 15, 0.5); }
.card--ink .h3, .card--ink .card__lead { color: var(--paper); }
.card--ink .card__idx { color: rgba(243, 239, 230, 0.45); }
.card--ink .h3 { margin-top: auto; }
.card--split { display: grid; gap: 1.5rem; }
.card--split > div:first-child { display: flex; flex-direction: column; }
.card--split > div:first-child .h3 { margin-top: auto; }

@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__arch { grid-column: 1 / -1; }
  .card--split { grid-column: auto; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(12, 1fr); gap: 1.25rem; }
  .bento__arch { grid-column: 1 / 8; grid-row: 1 / 3; }
  .bento__perf { grid-column: 8 / 13; grid-row: 1; }
  .bento__build { grid-column: 8 / 13; grid-row: 2; }
  .bento__cto { grid-column: 1 / 6; grid-row: 3; }
  .bento__adv { grid-column: 6 / 13; grid-row: 3; }
  .card--split { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .card--split > div:last-child { align-self: end; }
  .bento__cto .card { min-height: 20rem; }
}

/* ---------- Statement ---------- */
.statement { padding-top: calc(var(--section) * 0.6); }
.statement__quote {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 22ch;
  text-wrap: balance;
}
.stats {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
.stats__item {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  padding-block: 1.5rem;
  background: linear-gradient(var(--hair-strong), var(--hair-strong)) top / 100% 1px no-repeat;
}
.stats dt { color: var(--ink-3); }
.stats dd {
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats sup { font-size: 0.4em; vertical-align: top; position: relative; top: 0.25em; color: var(--signal); margin-left: 0.05em; }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

/* ---------- Approach ---------- */
.approach { display: grid; gap: 3.5rem; }
.approach__intro { margin-top: 1.5rem; max-width: 26rem; color: var(--ink-2); }
.steps { counter-reset: s; }
.step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding-block: 2rem;
  background: linear-gradient(var(--hair-strong), var(--hair-strong)) top / 100% 1px no-repeat;
}
.step:last-child { padding-bottom: 0; }
.step__n { color: var(--signal); padding-top: 0.35rem; }
.step .h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.75rem); letter-spacing: -0.01em; line-height: 1; margin-bottom: 0.75rem; }
.step p { color: var(--ink-2); max-width: 34rem; }
@media (min-width: 1024px) {
  .approach { grid-template-columns: 5fr 7fr; gap: 6rem; align-items: start; }
  .approach__head { position: sticky; top: 8rem; }
  .step { grid-template-columns: 5rem 1fr; padding-block: 2.75rem; }
}

/* ---------- Toolkit spec sheet ---------- */
.spec { padding: 0.5rem clamp(1.25rem, 3vw, 2.25rem); }
.spec__row {
  display: grid;
  gap: 0.9rem;
  padding-block: 1.5rem;
}
.spec__row + .spec__row { background: linear-gradient(var(--hair), var(--hair)) top / 100% 1px no-repeat; }
.spec__cat { color: var(--ink-3); padding-top: 0.55rem; }
.spec__items { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.spec__items li {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hair), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 450;
  color: var(--ink);
  transition: transform 0.6s var(--ease), background-color 0.6s var(--ease);
}
.spec__items li:hover { transform: translateY(-2px); background: #fff; }
@media (min-width: 768px) {
  .spec__row { grid-template-columns: 14rem 1fr; gap: 2rem; padding-block: 1.75rem; }
}

/* ---------- Contact (inverted) ---------- */
.contact {
  background: var(--ink);
  color: var(--paper);
  border-radius: clamp(1.75rem, 4vw, 3rem) clamp(1.75rem, 4vw, 3rem) 0 0;
  padding-top: var(--section);
  margin-top: calc(var(--section) * 0.4);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.contact::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 60rem;
  height: 60rem;
  right: -20rem;
  top: -30rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 72, 15, 0.22), transparent 60%);
  pointer-events: none;
}
.contact__wrap { display: grid; gap: 3.5rem; align-items: start; }
.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  max-width: 11ch;
}
.contact__title em { display: block; color: #F07A45; }
.contact__lede { margin-top: 1.75rem; max-width: 28rem; color: rgba(243, 239, 230, 0.68); }

.email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  max-width: 100%;
}
.email__addr {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.7s var(--ease);
}
.email__addr:hover { background-size: 100% 1px; }
.email__copy {
  flex: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: rgba(243, 239, 230, 0.08);
  box-shadow: inset 0 0 0 1px var(--hair-inv);
  transition: transform 0.6s var(--ease), background-color 0.6s var(--ease);
}
.email__copy:hover { background: rgba(243, 239, 230, 0.14); }
.email__copy:active { transform: scale(0.94); }
.email__copy svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.email__copy .i-check { opacity: 0; transform: scale(0.5); color: #7FD39B; }
.email__copy.is-copied .i-copy { opacity: 0; transform: scale(0.5); }
.email__copy.is-copied .i-check { opacity: 1; transform: none; }

.form { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(243, 239, 230, 0.6); }
.field input, .field textarea {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 1rem;
  border: 0;
  background: rgba(243, 239, 230, 0.05);
  box-shadow: inset 0 0 0 1px var(--hair-inv);
  font-size: 1rem;
  color: var(--paper);
  resize: vertical;
  transition: box-shadow 0.5s var(--ease), background-color 0.5s var(--ease);
}
.field textarea { min-height: 8rem; }
.field input::placeholder, .field textarea::placeholder { color: rgba(243, 239, 230, 0.35); }
.field input:focus, .field textarea:focus {
  outline: none;
  background: rgba(243, 239, 230, 0.08);
  box-shadow: inset 0 0 0 1px rgba(240, 122, 69, 0.7), 0 0 0 4px rgba(217, 72, 15, 0.15);
}
.field.is-invalid input, .field.is-invalid textarea { box-shadow: inset 0 0 0 1px rgba(240, 122, 69, 0.9); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 0.25rem; }
.form__status { color: rgba(243, 239, 230, 0.5); text-transform: none; letter-spacing: 0.02em; }

@media (min-width: 1024px) {
  .contact__wrap { grid-template-columns: 1.05fr 0.95fr; gap: 5rem; }
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  margin-top: var(--section);
  padding-top: 1.75rem;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 2rem);
  color: rgba(243, 239, 230, 0.5);
  background: linear-gradient(var(--hair-inv), var(--hair-inv)) top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.footer__top { transition: color 0.5s var(--ease); }
.footer__top:hover { color: var(--paper); }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 3.5rem, 0);
  filter: blur(10px);
  transition:
    opacity 1s var(--ease-out),
    transform 1.2s var(--ease),
    filter 1s var(--ease-out);
}
.js .hero__figure[data-reveal] { transform: translate3d(0, 3.5rem, 0) rotate(0deg); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
@media (min-width: 1024px) {
  .js .hero__figure[data-reveal].is-in { transform: rotate(1.5deg); }
}
.js [data-delay="1"] { transition-delay: 0.08s; }
.js [data-delay="2"] { transition-delay: 0.16s; }
.js [data-delay="3"] { transition-delay: 0.24s; }
.js [data-delay="4"] { transition-delay: 0.32s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .diagram__flow { display: none; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 6rem var(--gutter); }
.lost .hero__title { margin-inline: auto; }
.lost p { color: var(--ink-2); margin: 1.5rem auto 2.5rem; max-width: 28rem; }

.nowrap { white-space: nowrap; }
