/* ============================================================
   Xryft — AI & Automation Studio
   Palette from the logo mark:
   orange #E97A1E · ember #CE4708 · rust #A63A0D · clay #C2653C
   ============================================================ */

:root {
  --orange: #E97A1E;
  --ember: #CE4708;
  --ember-text: #C24207; /* darker ember for small text: 4.5:1+ on white and all tints */
  --ember-deep: #B03D07;
  --rust: #A63A0D;
  --clay: #C2653C;
  --ink: #201209;
  --ink-70: rgba(32, 18, 9, 0.72);
  --ink-50: rgba(32, 18, 9, 0.62);
  --paper: #FFFFFF;
  --tint: #FFF8F2;
  --tint-deep: #FDEFE3;
  --hairline: #F1DFD0;
  --hairline-strong: #E8CDB6;

  --font-display: "Bricolage Grotesque", "Archivo", sans-serif;
  --font-body: "Archivo", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --container: 1240px;
  --radius-card: 20px;
  --radius-panel: 28px;
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* warm layered shadows — light falls from above, shadows are rust, never gray */
  --shadow-rest: 0 1px 2px rgba(166, 58, 13, 0.05), 0 10px 24px -18px rgba(166, 58, 13, 0.14);
  --shadow-lift: 0 1px 2px rgba(166, 58, 13, 0.07), 0 10px 20px -10px rgba(166, 58, 13, 0.10), 0 28px 48px -20px rgba(206, 71, 8, 0.16);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
}
.skip-link:focus { left: 12px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 { font-size: clamp(36px, 4.8vw, 62px); line-height: 1.02; letter-spacing: -0.028em; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
p, summary, dt { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember-text);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember-text);
  margin-right: 10px;
  vertical-align: 1px;
}
.eyebrow-light { color: #FFB27A; }
.eyebrow-light::before { background: #FFB27A; }

/* editorial spine: sections carry a running index 01–06; the hero eyebrow keeps
   the dot as the system's origin point */
main { counter-reset: sec; }
.section .eyebrow { counter-increment: sec; }
.section .eyebrow::before {
  content: "0" counter(sec);
  content: "0" counter(sec) / "";
  display: inline-block;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: var(--ink-50);
  margin-right: 12px;
  padding-right: 12px;
  border-right: 1px solid var(--hairline-strong);
  vertical-align: 0;
}
.section-dark .eyebrow::before {
  color: rgba(255, 255, 255, 0.72);
  border-right-color: rgba(255, 255, 255, 0.25);
}

.section-sub {
  max-width: 34em;
  margin-top: 16px;
  font-size: 18px;
  color: var(--ink-70);
}

/* split editorial head (sections 01 & 04): standfirst shares the h2 baseline */
.section-head.section-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-areas: "eyebrow eyebrow" "title sub";
  align-items: end;
  column-gap: 64px;
}
.section-head--split .eyebrow { grid-area: eyebrow; }
.section-head--split h2 { grid-area: title; }
.section-head--split .section-sub {
  grid-area: sub;
  margin: 0 0 6px;
  max-width: 40ch;
  justify-self: end;
}

.text-link {
  color: var(--ember-text);
  font-weight: 500;
  border-bottom: 1px solid var(--hairline-strong);
  transition: border-color 0.2s var(--ease-out);
}
.text-link:hover { border-color: var(--ember); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  transition:
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    filter 0.25s var(--ease-out),
    transform 0.2s var(--ease-out);
}
.btn-lg { padding: 16px 30px; font-size: 16.5px; }
.btn-arrow { display: inline-block; }
@keyframes arrow-through {
  0% { transform: translateX(0); opacity: 1; }
  45% { transform: translateX(150%); opacity: 0; }
  50% { transform: translateX(-150%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.btn:hover .btn-arrow { animation: arrow-through 0.5s cubic-bezier(0.65, 0, 0.35, 1); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 0.08s; }

.btn-primary {
  background: linear-gradient(180deg, var(--ember) 0%, #C24207 60%, var(--ember-deep) 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(166, 58, 13, 0.35),
    0 8px 20px -10px rgba(206, 71, 8, 0.55);
}
.btn-primary:hover {
  filter: brightness(0.93);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(166, 58, 13, 0.3),
    0 12px 28px -10px rgba(206, 71, 8, 0.55);
}

.btn-ghost {
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ember); color: var(--ember); }

.btn-light {
  background: #fff;
  color: var(--rust);
  box-shadow: 0 10px 24px -10px rgba(80, 26, 4, 0.5);
}
.btn-light:hover { background: var(--tint-deep); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease-out);
}
.nav.is-scrolled {
  box-shadow: 0 1px 0 var(--hairline), 0 10px 28px -18px rgba(166, 58, 13, 0.16);
}
.js .nav-inner > * {
  opacity: 0;
  transform: translateY(-8px);
  animation: fade-drop 0.5s var(--ease-out-expo) forwards;
}
.js .nav-inner > :nth-child(2) { animation-delay: 0.08s; }
.js .nav-inner > :nth-child(3) { animation-delay: 0.16s; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-70);
  transition: color 0.2s var(--ease-out);
}
.nav-links a:hover { color: var(--ember); }
/* hover indicator: the brand's node-dot, not a generic underline */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ember);
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out-expo);
}
.nav-links a:hover::after { opacity: 1; transform: translate(-50%, 0); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 28px 24px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.97);
}
.mobile-menu a {
  padding: 12px 0;
  font-size: 17px;
  font-weight: 500;
}
.mobile-menu .btn { justify-content: center; margin-top: 10px; }
.mobile-menu.is-open { display: flex; }

/* ---------- entrance keyframes ---------- */
@keyframes rise-in { to { transform: translateY(0); } }
@keyframes fade-rise { to { opacity: 1; transform: translateY(0); } }
@keyframes fade-drop { to { opacity: 1; transform: none; } }
@keyframes blur-in { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes panel-in { to { opacity: 1; transform: none; } }
@keyframes edge-draw { to { stroke-dashoffset: 0; } }
@keyframes node-pop { to { opacity: 1; transform: scale(1); } }
@keyframes status-in { to { opacity: 1; clip-path: inset(0 -2% 0 0); } }

/* ---------- hero ---------- */
.hero {
  padding: 168px 0 96px;
  overflow: hidden;
  background:
    radial-gradient(1000px 620px at 74% 34%, rgba(233, 122, 30, 0.09), rgba(233, 122, 30, 0.03) 45%, transparent 70%),
    radial-gradient(700px 480px at 6% 90%, rgba(194, 101, 60, 0.05), transparent 65%),
    #fff;
}

/* entrance: read (copy) -> assemble (schematic) -> alive (pulses) — all gated on .js */
.js .hero-copy .eyebrow {
  opacity: 0;
  transform: translateY(8px);
  animation: fade-rise 0.5s var(--ease-out-expo) forwards;
}
.hline {
  display: block;
  overflow: hidden;
  padding: 0.1em 0.05em 0.24em;
  margin: -0.1em -0.05em -0.24em;
}
.js .hline-in {
  display: block;
  transform: translateY(112%);
  animation: rise-in 0.75s var(--ease-out-expo) forwards;
}
.js .hline:nth-child(1) .hline-in { animation-delay: 0.06s; }
.js .hline:nth-child(2) .hline-in { animation-delay: 0.15s; }
.js .hero-sub {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(5px);
  animation: blur-in 0.65s var(--ease-out-expo) 0.28s forwards;
}
/* from-only keyframe + backwards fill: after the entrance ends no fill-forward
   pins transform/opacity, so hover lift and active press keep working */
@keyframes btn-enter { from { opacity: 0; transform: translateY(10px); } }
.js .hero-actions .btn {
  animation: btn-enter 0.55s var(--ease-out-expo) backwards;
}
.js .hero-actions .btn:nth-child(1) { animation-delay: 0.42s; }
.js .hero-actions .btn:nth-child(2) { animation-delay: 0.49s; }
.js .hero-note {
  opacity: 0;
  animation: fade-in 0.45s ease-out 0.58s forwards;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.hero-title {
  font-size: clamp(54px, 7.4vw, 108px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 96;
  margin-bottom: 28px;
}
.hero-title em {
  font-style: normal;
  color: var(--ember);
  position: relative;
  display: inline-block;
}
/* the em-word is wired into the schematic: same edge language, same pulse cadence */
.em-underline {
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none;
}
.em-underline path {
  stroke: var(--orange);
  stroke-opacity: 0.55;
  stroke-width: 5;
  stroke-linecap: round;
}
.js .em-underline path {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: edge-draw 0.9s var(--ease-out) 0.85s forwards;
}
.em-underline .pulse { fill: var(--ember); }
.hero-sub {
  font-size: 19px;
  color: var(--ink-70);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}
.hero-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-50);
}

/* hero panel — the automation schematic, treated as a lit object.
   Background layers, top to bottom: dot grid / ambient hub glow / base tint / gradient hairline (border-box). */
.hero-panel {
  border: 1px solid transparent;
  background:
    radial-gradient(circle, rgba(233, 122, 30, 0.11) 1px, transparent 1.5px) 0 0 / 22px 22px padding-box,
    radial-gradient(420px 360px at 62% 44%, rgba(233, 122, 30, 0.10), transparent 70%) padding-box,
    linear-gradient(180deg, #FFF9F4 0%, #FFF4EA 100%) padding-box,
    linear-gradient(180deg, #F9EBDC 0%, var(--hairline) 30%, var(--hairline-strong) 70%, rgba(233, 122, 30, 0.5) 100%) border-box;
  border-radius: var(--radius-panel);
  padding: 28px 22px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 2px rgba(166, 58, 13, 0.05),
    0 14px 32px -18px rgba(166, 58, 13, 0.14),
    0 40px 72px -32px rgba(166, 58, 13, 0.20);
}
.js .hero-panel {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  animation: panel-in 0.8s var(--ease-out-expo) 0.12s forwards;
}
.hero-graph { width: 100%; height: auto; }

.hero-graph .edge {
  stroke: var(--clay);
  stroke-opacity: 0.4;
  stroke-width: 1.75;
  fill: none;
}
/* boot sequence: edges draw in, nodes pop, hub ignites */
.js .hero-graph .edge {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: edge-draw 0.65s cubic-bezier(0.65, 0, 0.35, 1) var(--d, 0s) forwards;
}
.js .hero-graph .gnode {
  opacity: 0;
  transform: scale(0.92);
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pop 0.45s var(--ease-back) var(--d, 0s) forwards;
}
.js .hero-graph .hub-core {
  opacity: 0;
  transform: scale(0.7);
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pop 0.55s var(--ease-back) 0.95s forwards;
}
.js .hero-graph .hub-ring { opacity: 0; }
.js .hero-graph .hub-label {
  opacity: 0;
  animation: fade-in 0.6s ease-out 1.2s forwards;
}
.js .hero-graph .hub-glow {
  opacity: 0;
  animation: fade-in 1s ease-out 1.1s forwards;
}

.hero-graph .gnode rect {
  fill: #fff;
  stroke: var(--hairline-strong);
  stroke-width: 1;
}
.hero-graph .gnode text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  fill: var(--ink);
}
.hero-graph .dot-orange { fill: var(--orange); }
.hero-graph .dot-rust { fill: var(--rust); }

.hero-graph .hub-ring {
  fill: none;
  stroke: var(--clay);
  stroke-opacity: 0.35;
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
  transform-origin: 352px 280px;
  animation: hub-spin 40s linear infinite;
}
.js .hero-graph .hub-ring {
  animation: fade-in 0.6s ease-out 1.05s forwards, hub-spin 40s linear 1.05s infinite;
}
.hero-graph .hub-bg {
  fill: url(#hubFace);
  stroke: var(--hairline-strong);
  stroke-width: 1;
}
.hero-graph .hub-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  fill: var(--ember-text);
  text-anchor: middle;
}
@keyframes hub-spin {
  to { transform: rotate(360deg); }
}

.hero-graph .pulse { fill: var(--ember); }
.hero-graph .pulse-out { fill: var(--orange); }
.hero-graph .pulse-halo { fill: #E97A1E; opacity: 0.22; }
.hero-graph .pulse-halo-out { fill: #E97A1E; opacity: 0.18; }

.hero-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-50);
  min-height: 20px;
}
.js .hero-status {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: status-in 0.5s var(--ease-out-expo) 2.05s forwards;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  flex-shrink: 0;
  animation: status-blink 2.4s ease-in-out infinite;
}

/* pause control for the schematic (WCAG 2.2.2) + offscreen idle state */
.hero-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink-50);
}
.hero-toggle:hover,
.hero-toggle:focus-visible { color: var(--ember-text); }
.hero-toggle .icon-play { display: none; }
.hero-toggle[aria-pressed="true"] .icon-pause { display: none; }
.hero-toggle[aria-pressed="true"] .icon-play { display: block; }
.hero.is-still .hub-ring,
.hero.is-still .status-dot { animation-play-state: paused; }
@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- marquee ---------- */
.marquee {
  position: relative;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
}
.marquee-clip {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
}
.marquee:hover .marquee-track,
.marquee.is-paused .marquee-track,
.marquee.is-idle .marquee-track { animation-play-state: paused; }
.marquee-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: var(--paper);
  color: var(--ink-50);
}
.marquee-toggle:hover,
.marquee-toggle:focus-visible { color: var(--ember-text); }
.marquee-toggle .icon-play { display: none; }
.marquee-toggle[aria-pressed="true"] .icon-pause { display: none; }
.marquee-toggle[aria-pressed="true"] .icon-play { display: block; }
.marquee-list {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee-list li {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-50);
  white-space: nowrap;
  padding: 0 22px;
  position: relative;
}
.marquee-list li::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.4;
  transform: translateY(-50%);
}
@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */
.section { padding: 112px 0; }
.section-tint {
  background: linear-gradient(180deg, #FFFCF9 0%, var(--tint) 140px, var(--tint) calc(100% - 140px), #FFFCF9 100%);
}
.section-head { max-width: 720px; margin-bottom: 64px; }

.section-dark {
  position: relative;
  background:
    radial-gradient(1100px 540px at 18% -8%, rgba(233, 122, 30, 0.13), transparent 60%),
    radial-gradient(900px 620px at 88% 112%, rgba(140, 47, 8, 0.35), transparent 65%),
    var(--ink);
  color: #fff;
}
/* glowing horizon hairline where white meets ink */
.section-dark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 122, 30, 0.45) 50%, transparent);
}
.section-dark .section-sub { color: rgba(255, 255, 255, 0.65); }

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-rest);
  transition: border-color 0.3s var(--ease-out), transform 0.35s var(--ease-out-expo), box-shadow 0.3s var(--ease-out);
}
.service-card:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
/* hover reward: the node relay fires once, signal travelling dot to dot */
@keyframes relay { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.4); } }
.service-card:hover .service-mark span { animation: relay 0.55s var(--ease-out) both; }
.service-card:hover .service-mark span:nth-child(2) { animation-delay: 0.09s; }
.service-card:hover .service-mark span:nth-child(3) { animation-delay: 0.18s; }
.service-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}
.service-mark span {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
}
/* connectors between the dots — a miniature of the logo's node-and-strut motif */
.service-mark span:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% + 2px);
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--clay);
  opacity: 0.45;
}
.service-mark span:nth-child(2) { background: var(--ember); }
.service-mark span:nth-child(3) { background: var(--rust); }
.service-card p { color: var(--ink-70); font-size: 15.5px; }
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 8px;
}
.service-tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--rust);
  background: var(--tint);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 11px;
  box-shadow: inset 0 1px 2px rgba(166, 58, 13, 0.06);
}

/* ---------- automations: a numbered catalogue of buildable workflows ---------- */
.auto-list {
  border-top: 1px solid var(--hairline);
  counter-reset: wf;
}
.auto-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
}
.auto-row::before {
  counter-increment: wf;
  content: counter(wf, decimal-leading-zero);
  content: counter(wf, decimal-leading-zero) / "";
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ink-50);
  align-self: start;
  padding-top: 5px;
}
.auto-info h3 { margin-bottom: 8px; }
.auto-info p { color: var(--ink-70); font-size: 15.5px; max-width: 460px; }

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.flow .chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(166, 58, 13, 0.10);
}
.flow i {
  font-style: normal;
  color: var(--clay);
  font-size: 13px;
}
/* the automation's outcome emits light */
.flow .flow-step:last-child .chip {
  background: var(--ember);
  border-color: var(--ember);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px -4px rgba(206, 71, 8, 0.5);
}
/* on reveal, the pipeline executes once, left to right */
.js .auto-row .flow > * {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
}
.js .auto-row .flow > :nth-child(1) { transition-delay: 0.15s; }
.js .auto-row .flow > :nth-child(2) { transition-delay: 0.21s; }
.js .auto-row .flow > :nth-child(3) { transition-delay: 0.27s; }
.js .auto-row .flow > :nth-child(4) { transition-delay: 0.33s; }
.js .auto-row .flow > :nth-child(5) { transition-delay: 0.39s; }
.js .auto-row.is-visible .flow > * { opacity: 1; transform: none; }

/* ---------- process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.process-card {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)) padding-box,
    linear-gradient(180deg, rgba(255, 178, 122, 0.30), rgba(255, 255, 255, 0.07) 40%, rgba(255, 255, 255, 0.05)) border-box;
  border-radius: var(--radius-card);
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 40px -24px rgba(0, 0, 0, 0.5);
}
.process-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}
.process-card h3 { color: #fff; }
.process-card > p:nth-of-type(2) { color: rgba(255, 255, 255, 0.68); font-size: 15px; }
.process-meta {
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.work-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(170deg, #fff 70%, var(--tint) 100%);
  box-shadow: var(--shadow-rest);
  transition: border-color 0.3s var(--ease-out), transform 0.35s var(--ease-out-expo), box-shadow 0.3s var(--ease-out);
}
.work-card:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}
.work-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
}
.work-card > p:nth-of-type(2) { color: var(--ink-70); font-size: 15.5px; }
.work-stack {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-50);
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 72px;
  align-items: start;
}
.about-copy h2 { margin-bottom: 24px; }
.about-copy p { color: var(--ink-70); margin-bottom: 16px; max-width: 540px; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stat {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px 22px;
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  box-shadow: var(--shadow-rest);
}
.stat dd {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ember);
}
.stat dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-70);
  line-height: 1.5;
}

/* ---------- faq ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: start;
}
.faq-head { margin-bottom: 0; position: sticky; top: 110px; }

.faq-list {
  border-top: 1px solid var(--hairline);
}
.faq-item {
  border-bottom: 1px solid var(--hairline);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s var(--ease-out), padding-left 0.25s var(--ease-out-expo);
}
.faq-item summary:hover { padding-left: 10px; }
.faq-item[open] p { animation: faq-open 0.4s var(--ease-out-expo); }
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--ember); }

.faq-icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: var(--ember);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease-out);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-item p {
  padding: 0 40px 24px 4px;
  color: var(--ink-70);
  font-size: 16px;
  max-width: 58ch;
}

/* ---------- cta band ---------- */
.cta-section { padding-top: 40px; }
/* a top-lit ember slab that casts warm light onto the page below */
.cta-band {
  background: radial-gradient(120% 150% at 50% -30%, #F08A33 0%, var(--ember) 42%, var(--rust) 75%, #7E2B07 100%);
  border-radius: var(--radius-panel);
  padding: 80px 40px;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    inset 0 -60px 120px -60px rgba(60, 18, 2, 0.22),
    0 24px 48px -24px rgba(166, 58, 13, 0.35),
    0 48px 96px -48px rgba(206, 71, 8, 0.30);
}
.cta-mark { margin-bottom: 28px; }
.cta-band h2 { margin-bottom: 18px; font-size: clamp(38px, 5.2vw, 66px); }
.cta-band > p {
  color: #fff;
  max-width: 480px;
  margin-bottom: 36px;
}
.cta-band :focus-visible { outline-color: #fff; }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.cta-mail {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease-out);
}
.cta-mail:hover { border-color: #fff; }

/* ---------- grain: tooth on exactly three surfaces (hero panel, process, CTA) ---------- */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.05;
}
.section-dark.grain::after,
.cta-band.grain::after {
  opacity: 0.09;
  mix-blend-mode: soft-light;
}

/* ---------- footer ---------- */
.footer {
  background: var(--tint);
  border-top: 1px solid var(--hairline);
  padding: 72px 0 0;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand p {
  margin-top: 18px;
  color: var(--ink-70);
  font-size: 15px;
  max-width: 340px;
}
.footer-brand .footer-loc {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-50);
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 6px;
}
.footer-col a {
  font-size: 15px;
  color: var(--ink-70);
  width: fit-content;
  transition: color 0.2s var(--ease-out);
}
.footer-col a:hover { color: var(--ember); }

/* the colophon finale: light falls across the letterforms, baseline cropped at the page edge */
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(120px, 19.8vw, 282px);
  line-height: 0.76;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
  text-align: center;
  background: linear-gradient(180deg, #F4E0CB 0%, #EFD5BC 45%, #E3BC93 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  margin: 40px 0 -0.09em;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-50);
}
.footer-legal a { color: var(--ink-50); }
.footer-legal a:hover { color: var(--ember); }

/* ---------- reveal on scroll ----------
   Hidden state is gated on .js (set by script.js) so content
   stays visible when JavaScript is unavailable. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* section heads reveal as a three-beat cascade (eyebrow / h2 / sub) —
   the same rhythm as the hero entrance, one motion language sitewide */
.js .section-head[data-reveal] {
  transform: none;
  transition: opacity 0.4s linear;
}
.js .section-head[data-reveal] > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease-out-expo), transform 0.65s var(--ease-out-expo);
}
.js .section-head[data-reveal] > h2 { transition-delay: 0.09s; }
.js .section-head[data-reveal] > .section-sub { transition-delay: 0.18s; }
.js .section-head.is-visible > * {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 140px; }
  .hero-panel { max-width: 640px; margin: 0 auto; }
  .services-grid, .work-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .faq-head { position: static; }
  .section-head--split { display: block; }
  .section-head--split .section-sub { margin-top: 16px; max-width: 34em; }
}

/* the full nav (brand + 5 links + CTA) needs ~760px — collapse it early */
@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .container { padding: 0 20px; }

  h2 br { display: none; }

  .hero { padding: 120px 0 64px; }
  .hero-title { font-size: clamp(46px, 13vw, 64px); }
  .hero-sub { font-size: 17px; }
  .hero-panel { padding: 18px 12px 10px; }

  .services-grid, .work-grid, .process-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .stat dd { font-size: 36px; }

  .auto-row { grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
  .auto-row::before { display: none; }
  .flow { justify-content: flex-start; }

  .cta-band { padding: 60px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .section-head[data-reveal] > *,
  .js .auto-row .flow > * { opacity: 1; transform: none; }
  /* entrance states resolve instantly to their final, visible frame */
  .js .hero-copy .eyebrow,
  .js .hline-in,
  .js .hero-sub,
  .js .hero-actions .btn,
  .js .hero-note,
  .js .hero-panel,
  .js .nav-inner > * {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none !important;
  }
  .js .hero-graph .edge { stroke-dashoffset: 0; animation: none !important; }
  .js .hero-graph .gnode,
  .js .hero-graph .hub-core,
  .js .hero-graph .hub-ring,
  .js .hero-graph .hub-label,
  .js .hero-graph .hub-glow {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
  .js .em-underline path { stroke-dashoffset: 0; animation: none !important; }
  .js .hero-status { opacity: 1; clip-path: none; animation: none !important; }
  .marquee-track { animation: none; }
  .marquee-toggle,
  .hero-toggle { display: none; }
  .hero-graph .pulse,
  .hero-graph .pulse-g,
  .em-underline .pulse { display: none; }
}
