/* ==========================================================================
   SomaTech — somatech.cloud
   Design system + components. Handcrafted CSS, no framework.
   Order: tokens · reset · type · layout · nav · buttons · components · footer
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Font — self-hosted Inter (variable, latin subset)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Dark base */
  --deep: #0a0d14;
  --deep-2: #0d111b;
  --deep-3: #111725;
  --d-border: rgba(255, 255, 255, 0.09);
  --d-border-2: rgba(255, 255, 255, 0.15);
  --d-surface: rgba(255, 255, 255, 0.028);
  --d-surface-2: rgba(255, 255, 255, 0.05);

  /* Light base */
  --white: #ffffff;
  --soft: #f7f8fa;
  --soft-2: #eff1f5;
  --border: #e4e7ec;
  --border-2: #d3d8e0;

  /* Ink */
  --ink: #0a0d14;
  --ink-2: #3d4552;
  --ink-3: #667085;

  /* On dark */
  --on-d: #ffffff;
  --on-d-2: #a9b2c4;
  --on-d-3: #7c8598;

  /* Accent */
  --acc: #2563eb;
  --acc-dk: #1d4ed8;
  --acc-lt: #7da6ff;
  --acc-2: #6d5dfb;
  --acc-2-lt: #a99bff;

  /* Geometry */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --sec-y: clamp(56px, 6.4vw, 88px);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: 0.22s var(--ease);
}

/* --------------------------------------------------------------------------
   3. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  overflow-x: hidden;
}

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

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

ul,
ol {
  padding: 0;
  list-style: none;
}

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

/* Focus — always visible, never removed */
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: 4px;
}

.sec--dark :focus-visible,
.site-head :focus-visible,
.site-foot :focus-visible {
  outline-color: var(--acc-lt);
}

::selection {
  background: rgba(37, 99, 235, 0.22);
}

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 1.24rem + 3.3vw, 3.25rem);
  letter-spacing: -0.032em;
}

h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.25rem);
  letter-spacing: -0.028em;
}

h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.016em;
}

h4 {
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

/* Eyebrow — the recurring technical label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--acc);
  flex: none;
}

/* Every dark surface, not just `.sec--dark`: the hero, page headers, CTA band
   and 404 are dark too, and the light-context ink would fail AA on them. */
:is(.sec--dark, .hero, .phead, .cta, .nf) .eyebrow {
  color: var(--on-d-3);
}

:is(.sec--dark, .hero, .phead, .cta, .nf) .eyebrow::before {
  background: var(--acc-lt);
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 60ch;
}

:is(.sec--dark, .hero, .phead, .cta, .nf) .lead {
  color: var(--on-d-2);
}

.muted {
  color: var(--ink-3);
  font-size: 0.9375rem;
}

:is(.sec--dark, .hero, .phead, .cta, .nf) .muted {
  color: var(--on-d-3);
}

/* Inline text link */
.tlink {
  color: var(--acc);
  font-weight: 550;
  border-bottom: 1px solid rgba(37, 99, 235, 0.3);
  transition: border-color var(--t);
}

.tlink:hover {
  border-bottom-color: var(--acc);
}

.sec--dark .tlink {
  color: var(--acc-lt);
  border-bottom-color: rgba(125, 166, 255, 0.32);
}

.sec--dark .tlink:hover {
  border-bottom-color: var(--acc-lt);
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 820px;
}

.sec {
  padding-block: var(--sec-y);
  position: relative;
}

.sec--soft {
  background: var(--soft);
  border-block: 1px solid var(--border);
}

.sec--dark {
  background: var(--deep);
  color: var(--on-d-2);
}

/* Keep content above the decorative .grid-bg layer */
.sec--dark > .wrap {
  position: relative;
  z-index: 1;
}

.sec--dark h1,
.sec--dark h2,
.sec--dark h3,
.sec--dark h4 {
  color: var(--on-d);
}

.sec--dark strong {
  color: var(--on-d);
}

.sec--tight {
  padding-block: clamp(48px, 6vw, 72px);
}

/* Section header block */
.sec-head {
  max-width: 660px;
  margin-bottom: clamp(32px, 4.5vw, 52px);
}

.sec-head .eyebrow {
  margin-bottom: 16px;
}

.sec-head h2 + p {
  margin-top: 14px;
}

.sec-head--split {
  max-width: none;
  display: grid;
  gap: 20px;
  align-items: end;
  grid-template-columns: 1fr;
}

@media (min-width: 880px) {
  .sec-head--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
    gap: 48px;
  }

  .sec-head--split > p {
    padding-bottom: 4px;
  }
}

/* Skip link */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--acc);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  transition: top 0.18s var(--ease);
}

.skip:focus {
  top: 12px;
}

/* Technical background grid — used on dark sections */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--d-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--d-border) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(
    ellipse 90% 70% at 50% 0%,
    #000 5%,
    transparent 72%
  );
  mask-image: radial-gradient(
    ellipse 90% 70% at 50% 0%,
    #000 5%,
    transparent 72%
  );
}

/* --------------------------------------------------------------------------
   6. Header / nav
   -------------------------------------------------------------------------- */
/* Opaque at rest so it blends into the dark hero / page header that always
   sits directly beneath it — a translucent bar here would composite against
   the white body and read as grey. Glass only once content scrolls under it. */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep);
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
}

.site-head.is-stuck {
  background: rgba(10, 13, 20, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--d-border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  padding-block: 9px; /* lifts the tap target to 44px */
  color: var(--on-d);
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.026em;
  white-space: nowrap;
}

.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.brand__tld {
  color: var(--on-d-3);
  font-weight: 500;
  transition: color var(--t);
}

.brand:hover .brand__tld {
  color: var(--acc-lt);
}

/* Desktop links */
.nav__links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav__link {
  position: relative;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--on-d-2);
  transition: color var(--t), background var(--t);
}

.nav__link:hover {
  color: var(--on-d);
  background: var(--d-surface-2);
}

.nav__link[aria-current='page'] {
  color: var(--on-d);
}

.nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--acc-lt);
}

/* Child selector keeps this above `.btn { display: inline-flex }`, which is
   defined later in the file and would otherwise win on equal specificity. */
.nav > .nav__cta {
  display: none;
}

/* Mobile toggle */
.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-right: -8px;
  border-radius: 10px;
  border: 1px solid var(--d-border);
  color: var(--on-d);
  transition: background var(--t), border-color var(--t);
}

.nav__toggle:hover {
  background: var(--d-surface-2);
  border-color: var(--d-border-2);
}

.nav__toggle span {
  position: relative;
  display: block;
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t), background var(--t);
}

.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t), top var(--t);
}

.nav__toggle span::before {
  top: -5.5px;
}

.nav__toggle span::after {
  top: 5.5px;
}

.nav__toggle[aria-expanded='true'] span {
  background: transparent;
}

.nav__toggle[aria-expanded='true'] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded='true'] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Mobile drawer */
.nav__panel {
  position: fixed;
  inset: 64px 0 auto 0;
  z-index: 99;
  background: var(--deep);
  border-bottom: 1px solid var(--d-border);
  box-shadow: 0 18px 40px rgba(5, 7, 12, 0.5);
  padding: 12px var(--gutter) 24px;
  display: grid;
  gap: 2px;
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}

.nav__panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.nav__panel a {
  padding: 13px 4px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--on-d-2);
  border-bottom: 1px solid var(--d-border);
}

.nav__panel a[aria-current='page'] {
  color: var(--acc-lt);
}

.nav__panel .btn {
  margin-top: 18px;
  padding: 11px 20px;
  border-bottom: 0;
  justify-content: center;
  color: #fff;
}

@media (min-width: 940px) {
  .nav {
    height: 68px;
  }

  .nav__links {
    display: inline-flex;
  }

  .nav > .nav__cta {
    display: inline-flex;
  }

  .nav__toggle,
  .nav__panel {
    display: none;
  }

  .nav__links {
    margin-right: 6px;
  }
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t), color var(--t),
    transform var(--t);
}

.btn svg {
  flex: none;
  transition: transform var(--t);
}

.btn:hover svg {
  transform: translateX(2.5px);
}

.btn--primary {
  background: var(--acc);
  color: #fff;
  box-shadow: 0 1px 2px rgba(10, 13, 20, 0.16);
}

.btn--primary:hover {
  background: var(--acc-dk);
}

.btn--sm {
  min-height: 38px;
  padding: 8px 15px;
  font-size: 0.8125rem;
}

/* Ghost on dark */
.btn--ghost {
  border-color: var(--d-border-2);
  color: var(--on-d);
  background: var(--d-surface);
}

.btn--ghost:hover {
  background: var(--d-surface-2);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Ghost on light */
.btn--line {
  border-color: var(--border-2);
  color: var(--ink);
  background: var(--white);
}

.btn--line:hover {
  border-color: var(--ink-3);
  background: var(--soft);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--deep);
  color: var(--on-d-2);
  overflow: hidden;
  padding-block: clamp(56px, 7vw, 92px) clamp(56px, 7vw, 96px);
  border-bottom: 1px solid var(--d-border);
}

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      620px 340px at 18% 4%,
      rgba(37, 99, 235, 0.2),
      transparent 68%
    ),
    radial-gradient(
      560px 380px at 88% 28%,
      rgba(109, 93, 251, 0.16),
      transparent 66%
    );
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero__inner {
  display: grid;
  gap: clamp(44px, 6vw, 64px);
  align-items: center;
  grid-template-columns: 1fr;
}

.hero h1 {
  color: var(--on-d);
  margin-top: 20px;
  max-width: 15ch;
}

.hero__sub {
  margin-top: 20px;
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--on-d-2);
  max-width: 52ch;
}

.hero .btn-row {
  margin-top: 32px;
}

/* Small meta line under the CTAs */
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--d-border);
  font-size: 0.8125rem;
  color: var(--on-d-3);
}

.hero__meta b {
  color: var(--on-d-2);
  font-weight: 550;
}

@media (min-width: 1000px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 56px;
  }
}

/* --------------------------------------------------------------------------
   9. Architecture diagram (hero SVG)
   -------------------------------------------------------------------------- */
.arch {
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  height: auto;
}

.arch__box {
  fill: none;
  stroke: var(--d-border-2);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.arch__tab {
  fill: var(--deep);
  stroke: var(--d-border-2);
  stroke-width: 1;
}

.arch__legend {
  fill: var(--on-d-3);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.arch__chip {
  fill: rgba(255, 255, 255, 0.032);
  stroke: var(--d-border);
  stroke-width: 1;
}

.arch__chip--acc {
  fill: rgba(37, 99, 235, 0.13);
  stroke: rgba(125, 166, 255, 0.42);
}

.arch__tier {
  fill: var(--on-d-3);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.arch__label--acc {
  fill: var(--acc-lt);
}

.arch__name {
  fill: #e8ecf4;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.arch__name--sm {
  font-size: 11px;
}

.arch__wire {
  fill: none;
  stroke: var(--d-border-2);
  stroke-width: 1;
}

.arch__flow {
  fill: none;
  stroke: var(--acc-lt);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 5 165;
  opacity: 0.9;
  animation: archflow 3.4s linear infinite;
}

.arch__flow--b {
  animation-delay: 0.5s;
}

.arch__flow--c {
  animation-delay: 1.1s;
}

.arch__flow--d {
  animation-delay: 1.7s;
}

@keyframes archflow {
  from {
    stroke-dashoffset: 170;
  }

  to {
    stroke-dashoffset: 0;
  }
}

.arch__pulse {
  fill: var(--acc-lt);
  animation: archpulse 3s var(--ease) infinite;
}

@keyframes archpulse {
  0%,
  100% {
    opacity: 0.25;
  }

  50% {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   10. Capability strip
   -------------------------------------------------------------------------- */
.strip {
  border-block: 1px solid var(--border);
  background: var(--white);
}

.strip__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.strip__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  border-bottom: 1px solid var(--border);
}

.strip__item:nth-child(odd) {
  padding-left: 0;
  padding-right: 14px;
  border-right: 1px solid var(--border);
}

.strip__item:nth-child(even) {
  padding-left: 18px;
}

.strip__item:last-child:nth-child(odd) {
  border-right: 0;
}

.strip__item svg {
  color: var(--acc);
  flex: none;
}

@media (min-width: 760px) {
  .strip__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .strip__item,
  .strip__item:nth-child(odd),
  .strip__item:nth-child(even) {
    padding: 20px 16px;
    border-bottom: 0;
    border-right: 1px solid var(--border);
    justify-content: center;
  }

  .strip__item:last-child {
    border-right: 0;
  }
}

/* --------------------------------------------------------------------------
   11. Cards
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  grid-template-columns: 1fr;
}

.card {
  background: var(--white);
  padding: clamp(24px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  transition: background var(--t);
}

.card:hover {
  background: #fcfdff;
}

.card__ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--acc);
  margin-bottom: 18px;
}

.card h3 {
  margin-bottom: 9px;
}

.card p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.card__link {
  margin-top: 14px;
  padding-block: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--acc);
  align-self: flex-start;
}

.card__link svg {
  transition: transform var(--t);
}

.card:hover .card__link svg {
  transform: translateX(3px);
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1060px) {
  .cards--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   12. Delivery rail (process)
   -------------------------------------------------------------------------- */
.rail {
  /* Themed via custom properties so the same component works on dark or light */
  --rail-line: var(--d-border);
  --rail-line-2: var(--d-border-2);
  --rail-num: var(--on-d-3);
  --rail-text: var(--on-d-2);
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

.rail--lt {
  --rail-line: var(--border);
  --rail-line-2: var(--border-2);
  --rail-num: var(--acc);
  --rail-text: var(--ink-2);
}

.rail__step {
  position: relative;
  padding: 26px 0 26px 46px;
  border-top: 1px solid var(--rail-line);
}

.rail__step:last-child {
  border-bottom: 1px solid var(--rail-line);
}

.rail__num {
  position: absolute;
  left: 0;
  top: 26px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--rail-num);
}

.rail__step::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 52px;
  bottom: -1px;
  width: 1px;
  background: linear-gradient(var(--rail-line-2), transparent);
}

.rail__step:last-child::after {
  display: none;
}

.rail__step h3 {
  font-size: 1rem;
  margin-bottom: 7px;
}

.rail__step p {
  font-size: 0.9375rem;
  color: var(--rail-text);
  max-width: 46ch;
}

@media (min-width: 900px) {
  .rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--rail-line);
  }

  .rail__step {
    padding: 30px 26px 8px 0;
    border-top: 0;
  }

  .rail__step:last-child {
    border-bottom: 0;
  }

  .rail__num {
    position: static;
    display: block;
    margin-bottom: 16px;
  }

  .rail__step::after {
    left: 0;
    top: 0;
    bottom: auto;
    width: 100%;
    height: 1px;
    background: var(--rail-line-2);
    transform: scaleX(0.34);
    transform-origin: left;
    transition: transform 0.5s var(--ease);
  }

  .rail__step:last-child::after {
    display: block;
  }

  .rail.is-in .rail__step::after {
    transform: scaleX(1);
  }

  .rail.is-in .rail__step:nth-child(2)::after {
    transition-delay: 0.09s;
  }

  .rail.is-in .rail__step:nth-child(3)::after {
    transition-delay: 0.18s;
  }

  .rail.is-in .rail__step:nth-child(4)::after {
    transition-delay: 0.27s;
  }
}

/* --------------------------------------------------------------------------
   13. Principle rows
   -------------------------------------------------------------------------- */
.principles {
  display: grid;
  gap: 0 56px;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border);
}

.principle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 19px 0;
  border-bottom: 1px solid var(--border);
}

.principle svg {
  flex: none;
  margin-top: 1px;
  color: var(--acc);
}

.principle h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.principle p {
  font-size: 0.875rem;
  color: var(--ink-3);
  line-height: 1.55;
}

@media (min-width: 820px) {
  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   14. Tech groups / chips
   -------------------------------------------------------------------------- */
.tgroups {
  display: grid;
  gap: 1px;
  background: var(--d-border);
  border: 1px solid var(--d-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  grid-template-columns: 1fr;
}

.tgroup {
  background: var(--deep-2);
  padding: 24px clamp(20px, 2.6vw, 28px) 26px;
}

.tgroup h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-d-3);
  margin-bottom: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--d-border-2);
  background: var(--d-surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: #dce3ef;
  letter-spacing: -0.006em;
  transition: border-color var(--t), background var(--t);
}

.chip:hover {
  border-color: rgba(125, 166, 255, 0.45);
  background: rgba(37, 99, 235, 0.1);
}

/* Light variant */
.chip--lt {
  border-color: var(--border);
  background: var(--white);
  color: var(--ink-2);
}

.chip--lt:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.05);
}

@media (min-width: 700px) {
  .tgroups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .tgroups--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   15. Layered stack diagram (technology page)
   -------------------------------------------------------------------------- */
.stack {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}

.layer {
  display: grid;
  gap: 6px 28px;
  padding: 22px clamp(18px, 2.4vw, 28px);
  border-bottom: 1px solid var(--border);
  grid-template-columns: 1fr;
  position: relative;
}

.layer:last-child {
  border-bottom: 0;
}

.layer:nth-child(even) {
  background: var(--soft);
}

.layer__id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.layer__n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  border: 1px solid var(--border-2);
  background: var(--white);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--acc);
  letter-spacing: 0.02em;
}

.layer__id h3 {
  font-size: 0.9375rem;
}

.layer__body p {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: 12px;
  max-width: 56ch;
}

@media (min-width: 840px) {
  .layer {
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
    padding-block: 24px;
  }
}

/* Wide: description and technology chips sit side by side, so the row reads
   like a spec table instead of leaving the right half empty. */
@media (min-width: 1100px) {
  .layer__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    gap: 12px 32px;
    align-items: start;
  }

  .layer__body p {
    margin-bottom: 0;
  }
}

/* Small uppercase section label */
.label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.sec--dark .label {
  color: var(--on-d-3);
}

.path + .label {
  margin-top: 30px;
}

/* Request path — horizontal flow of hairline-joined nodes */
.path {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  padding: 4px 0;
}

.path__node {
  flex: 1 1 148px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--d-border);
  border-radius: var(--r);
  background: var(--d-surface);
  position: relative;
}

.path__node b {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--on-d);
  letter-spacing: -0.012em;
  margin-bottom: 3px;
}

.path__node span {
  font-size: 0.75rem;
  color: var(--on-d-3);
  line-height: 1.45;
  display: block;
}

.path__node::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--d-border-2);
}

.path__node:last-child::after {
  display: none;
}

@media (max-width: 719px) {
  .path__node::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   16. Services page sections
   -------------------------------------------------------------------------- */
.svc {
  padding-block: clamp(40px, 5vw, 60px);
  border-top: 1px solid var(--border);
}

.svc:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.svc__grid {
  display: grid;
  gap: clamp(24px, 3.6vw, 48px);
  grid-template-columns: 1fr;
}

.svc__head h2 {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.65rem);
  margin-bottom: 12px;
}

.svc__head p {
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 46ch;
}

.svc__idx {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--acc);
  margin-bottom: 12px;
}

.svc__cols {
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr;
}

.svc__col h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

@media (min-width: 620px) {
  .svc__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  .svc__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

/* Checked list */
.ticks {
  display: grid;
  gap: 9px;
}

.ticks li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  line-height: 1.5;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  border: 1.5px solid var(--acc);
}

.sec--dark .ticks li {
  color: var(--on-d-2);
}

.sec--dark .ticks li::before {
  border-color: var(--acc-lt);
}

/* --------------------------------------------------------------------------
   17. Identity block (about / contact)
   -------------------------------------------------------------------------- */
.ident {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}

.ident__row {
  display: grid;
  gap: 2px 24px;
  padding: 16px clamp(18px, 2.4vw, 26px);
  border-bottom: 1px solid var(--border);
  grid-template-columns: 1fr;
}

.ident__row:last-child {
  border-bottom: 0;
}

.ident__row dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}

.ident__row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--ink);
  line-height: 1.55;
}

.ident__row dd a:hover {
  color: var(--acc);
}

.ident__row dd address {
  font-style: normal;
}

@media (min-width: 620px) {
  .ident__row {
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: baseline;
  }
}

/* Contact tiles */
.tiles {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.tile {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--white);
  padding: clamp(22px, 2.8vw, 30px);
  display: flex;
  flex-direction: column;
}

.tile__ico {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--acc);
  margin-bottom: 18px;
}

.tile h2,
.tile h3 {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.tile__big {
  align-self: flex-start;
  padding-block: 9px;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.026em;
  color: var(--ink);
  line-height: 1.3;
}

.tile__big:hover {
  color: var(--acc);
}

.tile address {
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-2);
}

.tile p {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-top: 10px;
}

@media (min-width: 760px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   18. Legal / prose pages
   -------------------------------------------------------------------------- */
.prose h2 {
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  font-size: 0.9375rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.prose p {
  font-size: 0.9375rem;
  line-height: 1.72;
  margin-bottom: 14px;
  max-width: 72ch;
}

.prose ul {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  max-width: 72ch;
}

.prose li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.prose li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-2);
}

.prose a {
  color: var(--acc);
  font-weight: 550;
}

.prose a:hover {
  text-decoration: underline;
}

/* Page header for interior pages */
.phead {
  position: relative;
  background: var(--deep);
  color: var(--on-d-2);
  overflow: hidden;
  padding-block: clamp(48px, 6vw, 76px);
  border-bottom: 1px solid var(--d-border);
}

.phead__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    700px 300px at 12% 0%,
    rgba(37, 99, 235, 0.17),
    transparent 70%
  );
}

.phead .wrap {
  position: relative;
  z-index: 1;
}

.phead h1 {
  color: var(--on-d);
  margin-top: 18px;
  max-width: 18ch;
}

.phead p {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--on-d-2);
  max-width: 54ch;
}

/* Scoped past `.phead p`, which is defined above and is more specific. */
.phead .phead__updated {
  margin-top: 22px;
  font-size: 0.8125rem;
  color: var(--on-d-3);
}

/* Breadcrumb */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--on-d-3);
  margin-bottom: 4px;
}

.crumb a {
  padding-block: 5px;
}

.crumb a:hover {
  color: var(--on-d-2);
}

.crumb__sep {
  opacity: 0.45;
}

.crumb__cur {
  color: var(--on-d-2);
}

/* Anchor index (services page contents) */
.anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(32px, 4vw, 44px);
}

/* --------------------------------------------------------------------------
   19. CTA band
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: var(--on-d-2);
  border-top: 1px solid var(--d-border);
}

.cta__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    760px 300px at 50% 118%,
    rgba(37, 99, 235, 0.24),
    transparent 70%
  );
}

.cta .wrap {
  position: relative;
  z-index: 1;
}

.cta__inner {
  display: grid;
  gap: 28px;
  align-items: center;
  grid-template-columns: 1fr;
  padding-block: clamp(52px, 6.5vw, 84px);
}

.cta h2 {
  color: var(--on-d);
  max-width: 20ch;
}

.cta p {
  margin-top: 14px;
  font-size: 1rem;
  color: var(--on-d-2);
  max-width: 50ch;
}

@media (min-width: 900px) {
  .cta__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 56px;
  }
}

/* --------------------------------------------------------------------------
   20. Footer
   -------------------------------------------------------------------------- */
.site-foot {
  background: var(--deep-2);
  color: var(--on-d-3);
  border-top: 1px solid var(--d-border);
  font-size: 0.875rem;
}

.foot__main {
  display: grid;
  gap: 36px;
  padding-block: clamp(44px, 5vw, 60px);
  grid-template-columns: 1fr;
}

.foot__brand .brand {
  margin-bottom: 16px;
}

.foot__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--on-d-3);
  max-width: 34ch;
  margin-bottom: 20px;
}

.foot__contact {
  font-style: normal;
  line-height: 1.65;
  color: var(--on-d-3);
  font-size: 0.8125rem;
}

.foot__contact a {
  color: var(--on-d-2);
  font-weight: 550;
}

.foot__contact a:hover {
  color: var(--acc-lt);
}

.foot__col h2 {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--on-d);
  margin-bottom: 14px;
}

.foot__col ul {
  display: grid;
  gap: 10px;
}

.foot__col a {
  color: var(--on-d-3);
  transition: color var(--t);
}

.foot__col a:hover {
  color: var(--on-d);
}

.foot__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
  padding-block: 20px;
  border-top: 1px solid var(--d-border);
  font-size: 0.75rem;
  color: var(--on-d-3);
}

.foot__ident {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.foot__ident b {
  color: var(--on-d-2);
  font-weight: 550;
}

@media (min-width: 700px) {
  .foot__main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }

  .foot__brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .foot__main {
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: 48px;
  }

  .foot__brand {
    grid-column: auto;
  }
}

/* --------------------------------------------------------------------------
   21. 404
   -------------------------------------------------------------------------- */
.nf {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: var(--on-d-2);
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 128px);
  padding-block: clamp(64px, 11vh, 112px);
  text-align: center;
}

/* Slim footer variant used by the 404 page */
.site-foot--slim .foot__legal {
  border-top: 0;
  justify-content: center;
  text-align: center;
}

.nf .wrap {
  position: relative;
  z-index: 1;
}

/* Scoped past `.nf p` below, which would otherwise win on specificity. */
.nf .nf__code {
  margin: 0 0 18px;
  font-size: clamp(3.25rem, 2rem + 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--on-d);
}

.nf h1 {
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.75rem);
  color: var(--on-d);
}

.nf p {
  margin: 14px auto 0;
  max-width: 44ch;
  color: var(--on-d-2);
}

.nf .btn-row {
  margin-top: 32px;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   22. Reveal animation
   -------------------------------------------------------------------------- */
/* Content is visible by default. The `js` class is set by a tiny inline script
   in <head>, so the hidden state only applies when scripting is available.
   The animation is a pure-CSS failsafe: if main.js never loads, or the observer
   never fires, every element reveals itself anyway. `.is-in` cancels it and
   hands back to the transition, so the normal path is unaffected. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  animation: reveal-failsafe 0.4s var(--ease) 6s forwards;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes reveal-failsafe {
  to {
    opacity: 1;
    transform: none;
  }
}

.js .reveal[data-d='1'] {
  transition-delay: 0.07s;
}

.js .reveal[data-d='2'] {
  transition-delay: 0.14s;
}

.js .reveal[data-d='3'] {
  transition-delay: 0.21s;
}

/* --------------------------------------------------------------------------
   23. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .arch__flow {
    display: none;
  }

  .rail__step::after {
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   24. Utilities
   -------------------------------------------------------------------------- */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-l {
  margin-top: clamp(32px, 4vw, 48px);
}

.mt-m {
  margin-top: 26px;
}
