/* ==========================================================================
   SOFTIV — Engineering the software behind ambitious businesses
   Design system + component styles
   Palette per approved visual system (spec A2/A3).
   Accent #F07D00 sampled from the approved Softiv logo artwork.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg-charcoal: #0f1115;
  --bg-slate: #161a22;
  --bg-off-black: #0b0d12;
  --bg-elevated: #1b202a;

  /* Text */
  --text-primary: #f5f7fa;
  --text-secondary: #b0b7c3;
  --text-muted: #7d8694;

  /* Lines */
  --border-subtle: #2a303b;
  --border-strong: #39414f;

  /* Accent — sampled from approved Softiv logo */
  --color-accent: #f07d00;
  --color-accent-soft: #ff9425;
  --color-accent-deep: #c96500;
  --accent-tint-06: rgba(240, 125, 0, 0.06);
  --accent-tint-12: rgba(240, 125, 0, 0.12);
  --accent-tint-20: rgba(240, 125, 0, 0.2);
  --accent-tint-40: rgba(240, 125, 0, 0.4);

  /* Logo grey — used for restrained secondary marks */
  --brand-grey: #9d9d9c;

  /* Geometry */
  --radius-card: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Rhythm */
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --section-y-tight: clamp(3.5rem, 6vw, 5.5rem);

  /* Type */
  --font-heading: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-mid: 320ms;
  --dur-slow: 420ms;

  /* Elevation */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --header-h: 76px;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background-color: var(--bg-charcoal);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem); /* 17–19px */
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Decorative .glow elements deliberately bleed past the layout edges.
     Clip them horizontally so they can never produce a sideways scroll. */
  overflow-x: hidden;
}

/* `clip` does the same job without creating a scroll container, which keeps
   position:sticky working inside .split--sticky. Falls back to hidden above. */
@supports (overflow-x: clip) {
  body {
    overflow-x: clip;
  }
}

body.is-locked {
  overflow: hidden;
}

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

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.75rem); /* up to 76px */
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.25;
}

h4 {
  font-size: 1.0625rem;
  line-height: 1.35;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent-soft);
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
}

li {
  margin-bottom: 0.4em;
}

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

hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 2.5rem 0;
}

::selection {
  background: var(--accent-tint-40);
  color: var(--text-primary);
}

/* Focus — visible orange ring that never relies on colour alone (offset + width) */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--color-accent);
  color: #12141a;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
  color: #12141a;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: 1360px;
}

/* `clip` (not `hidden`) contains the decorative .glow bleed without creating a
   scroll container, so position:sticky inside .split--sticky keeps working. */
.section {
  position: relative;
  padding-block: var(--section-y);
  overflow: clip;
}

.section--tight {
  padding-block: var(--section-y-tight);
}

.section--slate {
  background: var(--bg-slate);
}

.section--offblack {
  background: var(--bg-off-black);
}

.section--hairline {
  border-top: 1px solid var(--border-subtle);
}

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

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

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

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.stack > * + * {
  margin-top: 1.25rem;
}

.measure {
  max-width: 62ch;
}

.measure-tight {
  max-width: 48ch;
}

.text-center {
  text-align: center;
}

.center-x {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   4. Decorative geometry (grid motif + accent glow)
   -------------------------------------------------------------------------- */
.grid-motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 78%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.5;
  background: radial-gradient(circle, rgba(240, 125, 0, 0.5), transparent 68%);
}

.glow--hero {
  width: min(760px, 90vw);
  height: 520px;
  top: -180px;
  right: -140px;
  opacity: 0.42;
}

.glow--soft {
  width: min(560px, 80vw);
  height: 380px;
  left: -180px;
  bottom: -160px;
  opacity: 0.16;
}

.rule-accent {
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border: 0;
  margin: 0 0 1.5rem;
}

/* --------------------------------------------------------------------------
   5. Eyebrows, section headers, badges
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 1.25rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--color-accent);
  flex: none;
}

.eyebrow--plain::before {
  display: none;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 4vw, 3.75rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.section-head--split {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
  }

  .section-head--split > *:last-child {
    padding-bottom: 0.35rem;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.badge--accent {
  border-color: var(--accent-tint-40);
  background: var(--accent-tint-06);
  color: var(--color-accent-soft);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex: none;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-py: 0.9rem;
  --btn-px: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: var(--btn-py) var(--btn-px);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-mid) var(--ease-out);
}

.btn svg {
  flex: none;
  transition: transform var(--dur-mid) var(--ease-out);
}

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

.btn--primary {
  background: var(--color-accent);
  color: #14161c;
  box-shadow: 0 0 0 0 rgba(240, 125, 0, 0);
}

.btn--primary:hover {
  background: var(--color-accent-soft);
  color: #14161c;
  box-shadow: 0 10px 30px -14px rgba(240, 125, 0, 0.85);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-soft);
  background: var(--accent-tint-06);
}

.btn--sm {
  --btn-py: 0.7rem;
  --btn-px: 1.15rem;
  font-size: 0.875rem;
}

.btn--lg {
  --btn-py: 1.05rem;
  --btn-px: 2rem;
  font-size: 1rem;
}

.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.btn-row--center {
  justify-content: center;
}

/* Inline text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
}

.link-arrow svg {
  transition: transform var(--dur-mid) var(--ease-out);
}

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

/* --------------------------------------------------------------------------
   7. Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 13, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-mid) var(--ease-out),
    border-color var(--dur-mid) var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(11, 13, 18, 0.94);
  border-bottom-color: var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding-block: 0.5rem;
}

.brand img {
  height: 34px;
  width: auto;
}

.nav-desktop {
  display: none;
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li {
  margin: 0;
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  transition: color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link[aria-current="page"] {
  color: var(--text-primary);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.05rem;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.nav-link .chev {
  transition: transform var(--dur-fast) var(--ease-out);
}

.nav-link[aria-expanded="true"] {
  color: var(--text-primary);
}

.nav-link[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}

/* Mega menu
   Anchored to the header rather than to its trigger: centring a 760px panel on
   the Services item pushed it off the left edge between roughly 1080-1300px.
   Centring it in the header keeps it on screen at every supported width. */
/* Needs to outrank `.nav-list > li { position: relative }`, which is more
   specific than a bare `.has-mega` and silently won. */
.nav-list > li.has-mega {
  position: static;
}

.mega {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, -6px);
  width: min(760px, calc(100vw - 3rem));
  background: var(--bg-slate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out),
    transform var(--dur-mid) var(--ease-out), visibility var(--dur-mid);
}

.mega.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-grid li {
  margin: 0;
}

.mega-item {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.mega-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border-subtle);
}

.mega-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

/* Direct child only: as a descendant selector this also matched the .ai-badge
   nested inside <strong> and forced it to display:block, stretching it to the
   full column width. */
.mega-item > span {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.mega-item .ai-badge {
  margin-left: 0.45rem;
  padding: 0.12rem 0.42rem;
  font-size: 0.5625rem;
  letter-spacing: 0.11em;
  vertical-align: 0.1em;
}

.mega-item:hover strong {
  color: var(--color-accent-soft);
}

.mega-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 1080px) {
  .nav-desktop {
    display: flex;
    justify-content: center;
  }
}

/* Mobile nav */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--dur-mid) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Declared after the base rule so it reliably wins at desktop widths */
@media (min-width: 1080px) {
  .nav-toggle {
    display: none;
  }
}

/* Small phones: the brand, the CTA and the menu button together exceeded a
   320px viewport. Everything shrinks a step rather than dropping the CTA,
   which the spec requires to stay reachable without scrolling. */
@media (max-width: 400px) {
  :root {
    --gutter: 1rem;
    --header-h: 66px;
  }

  .header-inner {
    gap: 0.6rem;
  }

  .brand img {
    height: 26px;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .header-actions .btn {
    --btn-px: 0.8rem;
    font-size: 0.8125rem;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
    padding: 0 9px;
  }
}

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: var(--bg-off-black);
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem var(--gutter) 3rem;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-mid) var(--ease-out),
    transform var(--dur-mid) var(--ease-out), visibility var(--dur-mid);
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* CTA sits at the top of the mobile sheet — reachable without scrolling */
.mobile-cta {
  margin-bottom: 1.5rem;
}

.mobile-list {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  border-top: 1px solid var(--border-subtle);
}

.mobile-list li {
  margin: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-list > li > a,
.mobile-disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  padding: 1.05rem 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.mobile-disclosure .chev {
  color: var(--color-accent);
  transition: transform var(--dur-fast) var(--ease-out);
}

.mobile-disclosure[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.mobile-panel {
  display: none;
  padding: 0 0 1rem 0.25rem;
  list-style: none;
  margin: 0;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel li {
  border: 0;
}

.mobile-panel a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.mobile-panel a:hover {
  color: var(--color-accent);
}

.mobile-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-off-black);
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid var(--border-subtle);
}

.hero > .container {
  position: relative;
  z-index: 2;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 1000px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero .accent-word {
  color: var(--color-accent);
}

.hero-lede {
  font-size: clamp(1.0625rem, 0.5vw + 1rem, 1.25rem);
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 2rem;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-muted);
  list-style: none;
  padding-left: 0;
}

.hero-proof li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-proof li:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

/* Hero page variant for interior pages */
.hero--page {
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.75rem, 5vw, 4.5rem);
}

.hero--page h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.6rem);
}

.hero--page .hero-lede {
  max-width: 64ch;
}

/* Abstract engineering visual (geometric, no illustration) */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hv-ring {
  fill: none;
  stroke: var(--border-subtle);
  stroke-width: 1;
}

.hv-ring--accent {
  stroke: var(--accent-tint-40);
  stroke-dasharray: 5 9;
  transform-origin: 200px 200px;
  animation: hv-spin 46s linear infinite;
}

.hv-plate {
  fill: rgba(255, 255, 255, 0.018);
  stroke: var(--border-subtle);
  stroke-width: 1;
}

/* Solid centre plate so the pulse never bleeds through behind the logo mark */
.hv-core {
  fill: var(--bg-off-black);
}

/* The four capability spokes take turns being highlighted. Keeping a single
   spoke permanently accented read as "only Web is active"; rotating the cue
   keeps the restrained one-highlight-at-a-time rule while showing all four
   as equally live. Each spoke sets --i to stagger its turn. */
.hv-spoke-line {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
  stroke-dasharray: 131; /* spoke length: 92√2 ≈ 130.1 */
  stroke-dashoffset: 0;
  animation: hv-spoke-line 13s linear infinite;
  animation-delay: calc(var(--i) * 3.25s);
}

.hv-spoke-node {
  fill: var(--bg-off-black);
  stroke: var(--border-strong);
  stroke-width: 1.5;
  animation: hv-spoke-node 13s linear infinite;
  animation-delay: calc(var(--i) * 3.25s);
}

.hv-spoke-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  fill: var(--text-muted);
  text-transform: uppercase;
  animation: hv-spoke-label 13s linear infinite;
  animation-delay: calc(var(--i) * 3.25s);
}

@keyframes hv-spoke-line {
  0% {
    stroke-dashoffset: 131;
    stroke: var(--color-accent);
    stroke-width: 1.5;
    opacity: 0;
  }
  3% {
    opacity: 1;
  }
  14% {
    stroke-dashoffset: 0;
    stroke: var(--color-accent);
    stroke-width: 1.5;
    opacity: 1;
  }
  24%,
  100% {
    stroke-dashoffset: 0;
    stroke: var(--border-strong);
    stroke-width: 1;
    opacity: 1;
  }
}

@keyframes hv-spoke-node {
  0%,
  6% {
    fill: var(--bg-off-black);
    stroke: var(--border-strong);
  }
  14%,
  20% {
    fill: var(--color-accent);
    stroke: var(--color-accent);
  }
  30%,
  100% {
    fill: var(--bg-off-black);
    stroke: var(--border-strong);
  }
}

@keyframes hv-spoke-label {
  0%,
  8% {
    fill: var(--text-muted);
  }
  15%,
  20% {
    fill: var(--color-accent-soft);
  }
  32%,
  100% {
    fill: var(--text-muted);
  }
}

.hv-pulse {
  fill: var(--color-accent);
  opacity: 0.28;
  transform-origin: center;
  animation: hv-pulse 3.2s ease-out infinite;
}

.hv-mark {
  opacity: 0.9;
}

@keyframes hv-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes hv-pulse {
  0% {
    transform: scale(0.65);
    opacity: 0.35;
  }
  70% {
    transform: scale(2.1);
    opacity: 0;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumbs li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 2.2vw, 1.9rem);
  background: var(--bg-slate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color var(--dur-mid) var(--ease-out),
    transform var(--dur-mid) var(--ease-out), background-color var(--dur-mid) var(--ease-out);
}

/* The single controlled orange cue: a top edge that lights on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent 70%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}

.card:hover,
.card:focus-within {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card:hover::before,
.card:focus-within::before {
  transform: scaleX(1);
}

.section--slate .card {
  background: var(--bg-charcoal);
}

.card h3 {
  margin-bottom: 0.65rem;
}

.card p {
  font-size: 0.9688rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.card-index {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: 1.1rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--accent-tint-06);
  color: var(--color-accent);
  margin-bottom: 1.15rem;
  flex: none;
  transition: border-color var(--dur-mid) var(--ease-out),
    background-color var(--dur-mid) var(--ease-out);
}

.card:hover .card-icon {
  border-color: var(--accent-tint-40);
  background: var(--accent-tint-12);
}

.card-foot {
  margin-top: auto;
  padding-top: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
}

.card-tags li {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}

/* Whole-card link */
.card--link .card-title-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Flat list card (no lift) for dense content */
.card--flat:hover {
  transform: none;
}

/* --------------------------------------------------------------------------
   10. Technology strip
   -------------------------------------------------------------------------- */
/* Separators are drawn by each cell's own 1px shadow bleeding into the gap,
   not by a container background showing through. That way an odd number of
   groups leaves empty cells transparent instead of painting grey blocks. */
.tech-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1px;
  background: transparent;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.tech-group {
  background: var(--bg-charcoal);
  padding: 1.5rem;
  box-shadow: 0 0 0 1px var(--border-subtle);
}

.section--slate .tech-group {
  background: var(--bg-slate);
}

.tech-group h3 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tech-list li {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.tech-list li:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   11. Process timeline
   -------------------------------------------------------------------------- */
/* Each step carries its own top rule, so wrapped rows stay visually anchored
   and the orange hover line reads as an edge rather than a stray mark. */
.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 0 clamp(1.5rem, 3vw, 2.75rem);
}

.process-step {
  position: relative;
  border-top: 1px solid var(--border-subtle);
  padding: 1.9rem 0 2.4rem;
}

.process-step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--dur-slow) var(--ease-out);
}

.process-step:hover::before {
  width: 100%;
}

.process-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--border-strong);
  margin-bottom: 1rem;
  transition: color var(--dur-mid) var(--ease-out);
}

.process-step:hover .process-num {
  color: var(--color-accent);
}

.process-step h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.5rem;
}

.process-step p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   12. Feature rows / split content
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .split--sticky > *:first-child {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
  }

  .split--narrow-left {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

/* Definition rows — used for capability / need→solution tables */
.deflist {
  border-top: 1px solid var(--border-subtle);
}

.defrow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.defrow:hover {
  background: rgba(255, 255, 255, 0.012);
}

@media (min-width: 760px) {
  .defrow {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    padding-inline: 0.5rem;
  }
}

.defrow dt,
.defrow .dt {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

/* Keep the accent restrained: term links read as headings until hovered */
.defrow dt a {
  color: inherit;
}

.defrow dt a:hover,
.defrow:hover dt a {
  color: var(--color-accent);
}

.defrow dd,
.defrow .dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Checklist */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.85rem;
  font-size: 0.9688rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--color-accent);
  border-radius: 2px;
  transform: rotate(45deg);
}

.checklist li strong {
  color: var(--text-primary);
}

/* Stat-free "signal" tiles (no invented metrics — qualitative only) */
.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.signal {
  background: var(--bg-charcoal);
  padding: 1.6rem 1.4rem;
}

.section--slate .signal {
  background: var(--bg-slate);
}

.signal h3 {
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}

.signal p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.signal-mark {
  color: var(--color-accent);
  margin-bottom: 0.9rem;
}

/* --------------------------------------------------------------------------
   13. Accordion
   -------------------------------------------------------------------------- */
.accordion {
  border-top: 1px solid var(--border-subtle);
}

.acc-item {
  border-bottom: 1px solid var(--border-subtle);
}

.acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.35rem 0.25rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--dur-fast) var(--ease-out);
}

.acc-trigger:hover {
  color: var(--color-accent-soft);
}

.acc-icon {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  transition: border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  background: var(--text-primary);
  transform: translate(-50%, -50%);
  transition: transform var(--dur-mid) var(--ease-out);
}

.acc-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.acc-trigger[aria-expanded="true"] .acc-icon {
  border-color: var(--color-accent);
  background: var(--accent-tint-12);
}

.acc-trigger[aria-expanded="true"] .acc-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}

.acc-panel.is-open {
  grid-template-rows: 1fr;
}

.acc-panel > div {
  overflow: hidden;
}

.acc-body {
  padding: 0 0.25rem 1.6rem;
  max-width: 72ch;
  font-size: 0.9688rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   14. Tabs (industries / markets)
   -------------------------------------------------------------------------- */
.tabs-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: thin;
}

.tab-btn {
  flex: none;
  padding: 0.6rem 1.05rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.tab-btn[aria-selected="true"] {
  color: #14161c;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.tab-panel[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   15. Stage ladder (SME digital foundation)
   -------------------------------------------------------------------------- */
.ladder {
  counter-reset: stage;
  display: grid;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.ladder-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  padding: 1.6rem 1.5rem;
  background: var(--bg-charcoal);
  transition: background-color var(--dur-mid) var(--ease-out);
}

.section--slate .ladder-step {
  background: var(--bg-slate);
}

.ladder-step:hover {
  background: var(--bg-elevated);
}

@media (min-width: 860px) {
  .ladder-step {
    grid-template-columns: 190px minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
    padding: 1.75rem;
  }
}

.ladder-label {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ladder-label span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.ladder-need {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.ladder-offer {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* --------------------------------------------------------------------------
   16. Callouts / notes
   -------------------------------------------------------------------------- */
.callout {
  position: relative;
  padding: 1.4rem 1.5rem 1.4rem 1.75rem;
  background: var(--accent-tint-06);
  border: 1px solid var(--accent-tint-20);
  border-radius: var(--radius-card);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.callout strong {
  color: var(--text-primary);
}

.note {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Partnership block */
.partner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  background: var(--bg-slate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

@media (min-width: 880px) {
  .partner {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 3rem;
  }
}

.partner-mark {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.partner-mark em {
  color: var(--color-accent);
  font-style: normal;
}

/* --------------------------------------------------------------------------
   17. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--bg-off-black);
  border-top: 1px solid var(--border-subtle);
  padding-block: clamp(4rem, 8vw, 7rem);
}

.cta-band > .container {
  position: relative;
  z-index: 2;
}

.cta-band h2 {
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  max-width: 20ch;
}

.cta-band .measure {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.cta-inner {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

@media (min-width: 940px) {
  .cta-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
  }
}

/* --------------------------------------------------------------------------
   18. Forms
   -------------------------------------------------------------------------- */
.form-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--bg-slate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.field .req {
  color: var(--color-accent);
  margin-left: 0.15rem;
}

.field .hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-charcoal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23b0b7c3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--border-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--accent-tint-20);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Error state uses border + icon-free text message, not colour alone */
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #ff6b5a;
  box-shadow: 0 0 0 3px rgba(255, 107, 90, 0.15);
}

.field-error {
  display: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #ff8a7c;
  line-height: 1.5;
}

.field.has-error .field-error {
  display: block;
}

.field-error::before {
  content: "Error: ";
  font-weight: 700;
}

.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}

/* 24px minimum to satisfy WCAG 2.2 AA target size (2.5.8) */
.checkbox input[type="checkbox"] {
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.checkbox label {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.form-status {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.form-status:empty {
  margin-top: 0;
}

.form-success {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--accent-tint-40);
  background: var(--accent-tint-06);
  border-radius: var(--radius-card);
  color: var(--text-secondary);
}

.form-success strong {
  display: block;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.form-fail {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 107, 90, 0.4);
  background: rgba(255, 107, 90, 0.08);
  border-radius: var(--radius-sm);
  color: #ffb3a8;
}

/* --------------------------------------------------------------------------
   19. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-off-black);
  border-top: 1px solid var(--border-subtle);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: 0.9375rem;
}

.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 900px) {
  .footer-top {
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 1.25rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 38ch;
}

.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-bottom li {
  margin: 0;
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   20. Scroll reveal
   -------------------------------------------------------------------------- */
/* Content is hidden only when JavaScript is confirmed running (the `js` class
   is set by an inline script in the head). If the script fails or is blocked,
   nothing is ever hidden and the page stays fully readable. */
[data-reveal] {
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* --------------------------------------------------------------------------
   21. Back-to-top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--bg-slate);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur-mid) var(--ease-out),
    transform var(--dur-mid) var(--ease-out), visibility var(--dur-mid),
    border-color var(--dur-fast) var(--ease-out);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   22. Motion preferences (spec A5 / N1)
   -------------------------------------------------------------------------- */
@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 [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hv-ring--accent,
  .hv-pulse,
  .hv-spoke-line,
  .hv-spoke-node,
  .hv-spoke-label {
    animation: none;
  }

  /* No rotation to convey equality, so every spoke is shown live at rest. */
  .hv-spoke-line {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    stroke: var(--border-strong);
  }

  .hv-spoke-node {
    fill: var(--color-accent);
    stroke: none;
  }
}

/* --------------------------------------------------------------------------
   23. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .mobile-nav,
  .to-top,
  .cta-band {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }
}

/* ==========================================================================
   24. MOTION & AI LAYER
   Added for the detail-page release. Everything here degrades to a static,
   fully readable page: motion is opt-in via the `js` class and every effect
   is switched off under prefers-reduced-motion (see section 22 and the
   overrides at the end of this file).
   ========================================================================== */

/* --------------------------------------------------------------------------
   24.1 Particle field (particles.js)
   The canvas sits behind content in hero sections. Pointer events stay off
   except where the grab interaction is wanted.
   -------------------------------------------------------------------------- */
.particles-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms var(--ease-out);
}

.particles-layer.is-ready {
  opacity: 1;
}

.particles-layer canvas,
.particles-layer .particles-js-canvas-el {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Fade the field out toward the text column so copy never fights the dots */
.particles-layer--masked {
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 70% 45%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 75% at 70% 45%, #000 25%, transparent 80%);
}

.hero > .container,
.cta-band > .container,
.section > .container {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   24.2 Scroll progress
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  z-index: 200;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--color-accent-deep), var(--color-accent), var(--color-accent-soft));
  will-change: transform;
}

/* --------------------------------------------------------------------------
   24.3 Cursor spotlight on cards
   JS writes --mx/--my as percentages; the overlay follows the pointer.
   -------------------------------------------------------------------------- */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-mid) var(--ease-out);
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    var(--accent-tint-12),
    transparent 62%
  );
}

.card:hover::after,
.card:focus-within::after {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   24.4 Tilt
   -------------------------------------------------------------------------- */
.js [data-tilt] {
  transform-style: preserve-3d;
  transition: transform 260ms var(--ease-out);
}

.js [data-tilt] > * {
  transform: translateZ(18px);
}

/* --------------------------------------------------------------------------
   24.5 Headline word reveal
   -------------------------------------------------------------------------- */
.js .reveal-text .rt-line {
  display: block;
  overflow: hidden;
}

.js .reveal-text .rt-word {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  transition: transform 720ms var(--ease-out), opacity 620ms var(--ease-out);
  transition-delay: var(--rt-delay, 0ms);
}

.js .reveal-text.is-revealed .rt-word {
  transform: translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   24.6 Marquee
   -------------------------------------------------------------------------- */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 1.1rem;
  border-block: 1px solid var(--border-subtle);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee-slide var(--marquee-duration, 46s) linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding-right: clamp(1.5rem, 3vw, 2.75rem);
  flex: none;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}

.marquee-item:hover {
  color: var(--text-primary);
}

.marquee-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
}

.marquee-item[data-ai]::before {
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--accent-tint-40);
}

@keyframes marquee-slide {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* --------------------------------------------------------------------------
   24.7 AI emphasis
   AI is the capability we most want recognised, so it gets a dedicated
   treatment — used sparingly so the orange stays meaningful.
   -------------------------------------------------------------------------- */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-tint-40);
  background: linear-gradient(120deg, var(--accent-tint-12), transparent 70%);
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  line-height: 1;
  white-space: nowrap;
}

.ai-badge svg {
  flex: none;
}

.js .ai-badge svg {
  animation: ai-twinkle 3.6s ease-in-out infinite;
}

@keyframes ai-twinkle {
  0%, 100% { opacity: 0.65; transform: scale(0.92) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.08) rotate(8deg); }
}

/* Gradient wordmark for "AI" inside headings */
.ai-word {
  background: linear-gradient(96deg, var(--color-accent-soft), var(--color-accent) 45%, #ffb765);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-size: 220% 100%;
}

.js .ai-word {
  animation: ai-sheen 7s ease-in-out infinite;
}

@keyframes ai-sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* AI feature panel */
.ai-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-tint-20);
  border-radius: var(--radius-card);
  background:
    radial-gradient(900px circle at 12% 0%, var(--accent-tint-06), transparent 60%),
    var(--bg-slate);
  padding: clamp(1.75rem, 3.5vw, 3rem);
}

.ai-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.7;
}

/* Orbiting AI node diagram */
.ai-orbit {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  margin-inline: auto;
}

.ai-orbit svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ai-orbit-ring {
  fill: none;
  stroke: var(--border-subtle);
  stroke-width: 1;
}

.ai-orbit-ring--dash {
  stroke: var(--accent-tint-40);
  stroke-dasharray: 4 8;
  transform-origin: 150px 150px;
}

.js .ai-orbit-ring--dash {
  animation: hv-spin 38s linear infinite;
}

.js .ai-orbit-ring--dash-rev {
  animation: hv-spin 52s linear infinite reverse;
}

.ai-orbit-core {
  fill: var(--bg-off-black);
  stroke: var(--accent-tint-40);
  stroke-width: 1.5;
}

.ai-orbit-chip {
  fill: var(--bg-charcoal);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.ai-orbit-label {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  fill: var(--text-secondary);
  text-transform: uppercase;
}

.ai-orbit-core-label {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  fill: var(--color-accent);
}

.ai-flow {
  stroke: var(--color-accent);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 3 7;
  opacity: 0.8;
}

.js .ai-flow {
  animation: ai-dash 2.4s linear infinite;
}

@keyframes ai-dash {
  to { stroke-dashoffset: -20; }
}

/* --------------------------------------------------------------------------
   24.8 Detail page furniture
   -------------------------------------------------------------------------- */

/* Sticky in-page navigation */
.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 60;
  background: rgba(11, 13, 18, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.subnav-inner {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 0.6rem;
}

.subnav-inner::-webkit-scrollbar {
  display: none;
}

.subnav a {
  flex: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.subnav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.subnav a.is-active {
  color: var(--color-accent-soft);
  border-color: var(--accent-tint-40);
  background: var(--accent-tint-06);
}

/* Outcome / deliverable list with animated left rail */
.rail {
  position: relative;
  padding-left: 2.25rem;
  list-style: none;
  margin: 0;
}

.rail::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-subtle);
}

.rail::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  width: 1px;
  height: 0;
  background: linear-gradient(180deg, var(--color-accent), transparent);
  transition: height 1400ms var(--ease-out);
}

.rail.is-visible::after {
  height: calc(100% - 16px);
}

.rail li {
  position: relative;
  margin-bottom: 1.4rem;
  font-size: 0.9688rem;
  line-height: 1.65;
}

.rail li::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-charcoal);
  transition: border-color var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out);
}

.rail li:hover::before {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--accent-tint-12);
}

.rail li strong {
  display: block;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

/* Problem / outcome pairing */
.pair {
  display: grid;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.pair-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem 2rem;
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.pair-row:last-child {
  border-bottom: 0;
}

.pair-row:hover {
  background: rgba(255, 255, 255, 0.015);
}

@media (min-width: 800px) {
  .pair-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

.pair-problem {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9688rem;
  line-height: 1.5;
  padding-left: 1.4rem;
}

.pair-problem::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--border-strong);
  transform: rotate(45deg);
}

.pair-row:hover .pair-problem::before {
  background: var(--color-accent);
}

.pair-outcome {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* Related links */
.related-list {
  display: grid;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.related-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 1.4rem;
  background: var(--bg-charcoal);
  font-family: var(--font-heading);
  font-size: 0.9688rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background-color var(--dur-fast) var(--ease-out),
    padding-left var(--dur-mid) var(--ease-out);
}

.section--slate .related-item {
  background: var(--bg-slate);
}

.related-item:hover {
  background: var(--bg-elevated);
  color: var(--color-accent-soft);
  padding-left: 1.75rem;
}

.related-item svg {
  flex: none;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-mid) var(--ease-out);
}

.related-item:hover svg {
  opacity: 1;
  transform: translateX(0);
}

/* Section watermark numeral */
.watermark {
  position: absolute;
  right: clamp(1rem, 4vw, 4rem);
  top: clamp(1rem, 3vw, 3rem);
  font-family: var(--font-heading);
  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: rgba(255, 255, 255, 0.022);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   24.9 Reduced motion — switch the whole layer off
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .particles-layer {
    display: none;
  }

  .scroll-progress {
    display: none;
  }

  .marquee-track {
    animation: none;
    width: auto;
    flex-wrap: wrap;
  }

  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .js .reveal-text .rt-word {
    transform: none;
    opacity: 1;
  }

  .js [data-tilt] {
    transform: none !important;
  }

  .card::after {
    display: none;
  }

  .rail::after {
    transition: none;
  }

  .js .ai-badge svg,
  .js .ai-word,
  .js .ai-flow,
  .js .ai-orbit-ring--dash,
  .js .ai-orbit-ring--dash-rev {
    animation: none;
  }
}

/* ==========================================================================
   25. SPLASH / PRELOADER
   Shown only while `is-loading` is on <html>, which an inline head script sets.
   If that script never runs (JS off or blocked) the overlay is never displayed,
   so it can never trap the page behind it.
   ========================================================================== */
.preloader {
  display: none;
}

.is-loading .preloader {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--bg-off-black);
  opacity: 1;
  visibility: visible;
  transition: opacity 620ms var(--ease-out), visibility 620ms;
}

/* Same geometric grid the hero uses, so the splash feels part of the site */
.is-loading .preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 10%, transparent 75%);
}

.is-loading .preloader::after {
  content: "";
  position: absolute;
  width: min(560px, 80vw);
  height: 340px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  background: radial-gradient(circle, rgba(240, 125, 0, 0.55), transparent 68%);
  pointer-events: none;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* let clicks through while it fades out */
}

.preloader-logo,
.preloader-bar,
.preloader-word {
  position: relative;
  z-index: 1;
}

.preloader-logo {
  width: clamp(140px, 34vw, 184px);
  height: auto;
  animation: splash-pulse 1.9s ease-in-out infinite;
}

.preloader-bar {
  position: relative;
  width: clamp(130px, 42vw, 168px);
  height: 2px;
  background: var(--border-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar i {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  animation: splash-slide 1.15s ease-in-out infinite;
}

.preloader-word {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@keyframes splash-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(240, 125, 0, 0.28));
  }
  50% {
    transform: scale(1.045);
    filter: drop-shadow(0 0 26px rgba(240, 125, 0, 0.55));
  }
}

@keyframes splash-slide {
  from {
    transform: translateX(-140%);
  }
  to {
    transform: translateX(340%);
  }
}

/* Lock scrolling only for the moment the splash is up */
.is-loading,
.is-loading body {
  overflow: hidden;
}

/* The splash is decorative motion: never shown to reduced-motion visitors.
   The head script also bails early, so this is belt and braces. */
@media (prefers-reduced-motion: reduce) {
  .preloader,
  .is-loading .preloader {
    display: none !important;
  }

  .is-loading,
  .is-loading body {
    overflow: visible;
  }
}
