/* ==========================================================================
   Okavyx — site concept
   Brand system per Okavyx-Website-Style-Guide.md v1.0
   ========================================================================== */

/* ---- Fonts (self-hosted, variable) ------------------------------------- */

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------- */

:root {
  --ink:        #121828;
  --gold:       #E5B103;
  --gold-deep:  #C8930A;
  --night:      #0F0F0F;
  --paper:      #F8F9FB;
  --slate:      #6A6E79;
  --hairline:   #E6E8EC;
  --success:    #2E7D4F;
  --error:      #B3372E;
  --gold-tint:  #FDF6E0;            /* the only tinted surface (Brand Hub v2.0) */

  /* dark-section equivalents */
  --paper-dim:  #C9CDD6;            /* secondary text on night */
  --hairline-dark: rgba(255, 255, 255, 0.10);

  /* AA-safe variants for small text: gold-deep is 2.6:1 on paper, slate 3.8:1 on night */
  --gold-deep-text: #8A6606;        /* small gold text on light, 5.0:1 */
  --slate-on-dark:  #8A8F9A;        /* small grey text on night, 5.9:1 */

  --radius:     8px;
  --radius-lg:  12px;
  --maxw:       1120px;

  --ease:       cubic-bezier(.2, .6, .2, 1);   /* Brand Hub v2.0 motion: settle, don't bounce */

  --font-display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --header-h: 72px;
}

/* ---- Reset / base -------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.625;
  color: var(--ink);
  background: var(--paper);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 var(--s-5);
  color: inherit;
}

/* Fluid, mobile-first scale. The Brand Hub tokens are a fixed desktop identity scale
   with no responsive guidance, so they anchor the SMALL end; desktop keeps real presence. */
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: 2rem;    font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem;  font-weight: 700; line-height: 1.25; }
h4 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }

p { margin: 0 0 var(--s-4); max-width: 68ch; }

.lead { font-size: 1.25rem; line-height: 1.6; }
.small { font-size: 0.875rem; line-height: 1.6; color: var(--slate); }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-dark :focus-visible,
.site-header :focus-visible { outline-color: var(--gold); }

::selection { background: var(--gold); color: var(--ink); }

/* ---- Utilities ------------------------------------------------------------ */

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
@media (max-width: 480px) { .container { padding-inline: 16px; } }

/* Kicker per Brand Hub v2.0: Inter 600 · 11px · +22% tracking · uppercase.
   Gold-deep-text on light (AA-safe; Signal Gold fails small-text contrast), gold on dark. */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep-text);
  display: block;
  margin-bottom: var(--s-5);
}
.on-dark .eyebrow { color: var(--gold); }

.on-dark {
  background: var(--night);
  color: var(--paper);
}
.on-dark p { color: var(--paper-dim); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: #fff; }
.on-dark a {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { left: 0; }

/* ---- Buttons ---------------------------------------------------------------- */

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 250ms var(--ease), transform 250ms var(--ease);
}
.btn-primary:hover { background: var(--gold-deep); }
.btn-primary:active { transform: translateY(1px); }

/* .on-dark a would otherwise outrank .btn-primary and turn the label gold-on-gold */
.on-dark .btn-primary { color: var(--ink); text-decoration: none; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 11px 21px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 250ms var(--ease), color 250ms var(--ease);
}
.btn-secondary:hover { background: var(--ink); color: #fff; }

.on-dark .btn-secondary { color: #fff; border-color: #fff; }
.on-dark .btn-secondary:hover { background: #fff; color: var(--ink); }

/* ---- Scroll progress ---------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--gold);
  z-index: 120;
  pointer-events: none;
}

/* ---- Header --------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 250ms var(--ease), border-color 250ms var(--ease);
}
.site-header.is-scrolled {
  background: var(--night);
  border-bottom-color: var(--hairline-dark);
}

.site-header .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.site-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  /* clear space ≈ height of the "o" */
  padding: 10px 0;
}
.site-header .logo-mark { height: 30px; width: auto; display: block; }
.site-header .logo-word { width: 124px; height: auto; display: block; }

.site-nav { display: flex; gap: var(--s-6); align-items: center; }

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--paper);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
}
/* gold underline that draws on hover */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 250ms var(--ease);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--paper);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 13px 16px;   /* 44px min tap target */
  cursor: pointer;
}
.menu-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--night);
  padding: calc(var(--header-h) + 32px) 24px 32px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li + li { margin-top: var(--s-4); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu .mobile-menu-cta { margin-top: var(--s-7); }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-block; }
}

body.menu-open { overflow: hidden; }

/* ---- Hero -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;   /* top-weight the headline instead of floating it mid-screen */
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* legibility scrim behind the headline — subtle, left weighted */
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(15, 15, 15, 0.65) 0%, rgba(15, 15, 15, 0.3) 45%, rgba(15, 15, 15, 0) 72%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  padding-block: clamp(120px, 18vh, 240px) var(--s-8);
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin-bottom: var(--s-5);
}
.hero h1 .gold { color: var(--gold); }

.hero .lead {
  max-width: 44ch;
  margin-bottom: var(--s-6);
}

/* Hero density: dual CTA + a compact credibility strip, so the hero fills above the fold */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-bottom: var(--s-7);
}

.hero-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5) var(--s-7);
}
.hero-meta li { display: flex; flex-direction: column; }
.hero-meta-k {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--gold);
}
.hero-meta-v {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--slate-on-dark);
  margin-top: 6px;
  max-width: 20ch;
}

/* gold node tooltip */
.node-tip {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(15, 15, 15, 0.85);
  border: 1px solid rgba(229, 177, 3, 0.35);
  border-radius: var(--radius);
  padding: 6px 10px;
  transform: translate(-50%, -140%);
  opacity: 0;
  transition: opacity 250ms var(--ease);
  white-space: nowrap;
}
.node-tip.is-visible { opacity: 1; }

/* scroll cue */
.scroll-cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 28px;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(229, 177, 3, 0) 0%, var(--gold) 100%);
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--night);
  animation: cue-sweep 2.4s ease-in-out infinite;
}
@keyframes cue-sweep {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* Mobile: pack the hero tight under the header, bigger headline, and let the
   section flow to its content height so the page fills instead of a dark void. */
@media (max-width: 640px) {
  .hero { min-height: auto; }
  .hero-content { padding-block: calc(var(--header-h) + var(--s-6)) var(--s-7); }
  .hero h1 { font-size: clamp(2.75rem, 13vw, 3.75rem); max-width: none; }
  .hero-cta { gap: var(--s-3); }
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary { flex: 1 1 auto; text-align: center; }
  .hero-meta { gap: var(--s-4) var(--s-6); }
  .scroll-cue { display: none; }
}

/* ---- Sections (shared rhythm) ------------------------------------------------------- */

.section { padding-block: clamp(64px, 9vw, 96px); }

/* branded gold rule — max one per section */
.gold-rule {
  width: 56px;
  height: 3px;
  background: var(--gold);
  border: 0;
  margin: 0 0 var(--s-5);
}

/* ---- Statement strip -------------------------------------------------------------------- */

.statement { padding-block: clamp(80px, 12vw, 140px); }

.statement-line {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 24ch;
  margin: 0 0 0 auto;   /* pushed right — deliberately off-centre */
  padding-right: clamp(0px, 6vw, 96px);
}

.u-gold-underline {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

/* ---- Services ledger ----------------------------------------------------------------------- */

.services { overflow-x: clip; padding-bottom: clamp(80px, 11vw, 120px); }

.services h2 { max-width: 24ch; margin-bottom: clamp(48px, 7vw, 80px); }

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

.ledger-heading { margin: 0; }

.ledger-row { border-bottom: 1px solid var(--hairline); }

.ledger-toggle {
  display: grid;
  grid-template-columns:
    [num] clamp(90px, 14vw, 200px)
    [title] 1fr
    [icon] 48px;
  align-items: center;
  width: 100%;
  max-width: calc(var(--maxw) + 48px);
  margin-inline: auto;
  padding: clamp(16px, 3vw, 32px) 24px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
}

.ledger-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px #C4C9D4;
  /* bleed past the container edge on purpose */
  margin-left: clamp(-40px, -4vw, -12px);
  transition: color 250ms var(--ease), -webkit-text-stroke-color 250ms var(--ease);
}

/* The ledger number is this section's one gold moment: lights up on hover/open. */
.ledger-toggle:hover .ledger-num,
.ledger-toggle[aria-expanded="true"] .ledger-num {
  color: var(--gold);
  -webkit-text-stroke-color: var(--gold);
}

.ledger-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* plus icon that rotates to a cross */
.ledger-icon {
  position: relative;
  width: 24px;
  height: 24px;
  justify-self: end;
  transition: transform 280ms var(--ease);
}
.ledger-icon::before,
.ledger-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.ledger-icon::before { width: 20px; height: 2px; }
.ledger-icon::after  { width: 2px;  height: 20px; }
.ledger-toggle[aria-expanded="true"] .ledger-icon { transform: rotate(45deg); }
.ledger-toggle:hover .ledger-icon::before,
.ledger-toggle:hover .ledger-icon::after { background: var(--gold-deep); }

.ledger-panel-inner {
  max-width: calc(var(--maxw) + 48px);
  margin-inline: auto;
  padding: 8px 24px clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.ledger-copy { padding-left: clamp(0px, calc(14vw + 10px), 210px); }

.ledger-lede {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--s-3);
}

.ledger-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--night);
}

@media (max-width: 720px) {
  .ledger-toggle { grid-template-columns: [num] 64px [title] 1fr [icon] 32px; }
  .ledger-num { font-size: 2.5rem; -webkit-text-stroke-width: 1px; margin-left: 0; }
  .ledger-panel-inner { grid-template-columns: 1fr; }
  .ledger-copy { padding-left: 0; }
  .ledger-visual { max-width: 420px; }
}

/* expand/collapse animation (grid-rows trick keeps it transform-cheap) */
.ledger-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms var(--ease);
}
.ledger-panel > * { overflow: hidden; }
.ledger-panel.is-open { grid-template-rows: 1fr; }
.ledger-panel[hidden] { display: none; }

/* ---- Why Okavyx --------------------------------------------------------------------------- */

.why {
  padding-block: clamp(80px, 11vw, 128px);
  background:
    linear-gradient(rgba(15, 15, 15, 0.72), rgba(15, 15, 15, 0.9)),
    var(--night) url("../assets/images/why-infrastructure.webp") center / cover no-repeat;
}

.why h2 { font-size: clamp(2rem, 4vw, 3rem); }

.why-lede { max-width: 46ch; margin-bottom: clamp(56px, 8vw, 96px); }

.why-stats {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 72px);
  margin-bottom: clamp(64px, 9vw, 112px);
}

.why-stat {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 40px);
  max-width: 640px;
}
.why-stat--offset { margin-left: auto; }  /* break the grid on purpose */

.why-stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 11vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--gold);
  flex-shrink: 0;
}
.why-stat-mark { color: var(--paper); }

.why-stat-label {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--paper-dim);
  max-width: 26ch;
}

.why-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 64px);
}
@media (max-width: 720px) {
  .why-proof { grid-template-columns: 1fr; }
  .why-stat { flex-direction: column; gap: var(--s-3); }
  .why-stat--offset { margin-left: 0; }
}

.proof-block {
  border-top: 3px solid var(--gold);
  padding-top: var(--s-5);
}
.proof-block h3 { margin-bottom: var(--s-3); }
.proof-block p { margin: 0; }

/* ---- Agents (build-steps accordion) ----------------------------------------------------------- */

.chain {
  border-top: 1px solid var(--hairline-dark);
  padding-block: clamp(80px, 11vw, 128px);
}

.chain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 860px) {
  .chain-grid { grid-template-columns: 1fr; }
}

.chain-intro h2 { max-width: 18ch; }
.chain-intro p { max-width: 44ch; }

/* Desktop only: drop the numbered list to start around the headline line,
   not up level with the eyebrow, so the two columns read as balanced.
   Below 861px the grid is a single column, so this must not apply there. */
@media (min-width: 861px) {
  .chain-layers { margin-top: clamp(2.5rem, 3.5vw, 3.25rem); }
}

/* "Read more" disclosure: collapsed on mobile, forced open (toggle hidden) on desktop */
.chain-more { max-width: 44ch; margin-bottom: var(--s-4); }
.chain-more > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gold);
  padding: var(--s-2) 0;
}
.chain-more > summary::-webkit-details-marker { display: none; }
.chain-more > summary::after {
  content: "+";
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 250ms var(--ease);
}
.chain-more[open] > summary::after { transform: rotate(45deg); }
.chain-more > p { color: var(--paper-dim); margin-top: var(--s-4); }

@media (min-width: 861px) {
  .chain-more > summary { display: none; }
  .chain-more > p:first-of-type { margin-top: 0; }
}

/* CTA into /agents, below the intro copy in the left column. */
.chain-cta { margin-top: var(--s-6); }

/* the vertical gold thread */
.chain-layers {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.chain-layers::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--hairline-dark);
}
/* Travelling data-pulse (position + opacity driven from js/main.js). */
.chain-layers::after {
  content: "";
  position: absolute;
  left: 7px;
  top: var(--pulse-y, -40px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold-pulse, #FFDA55);
  box-shadow: 0 0 10px 2px rgba(255, 218, 85, 0.85);
  opacity: var(--pulse-op, 0);
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}

.chain-layer { position: relative; padding-left: 44px; }
.chain-layer + .chain-layer { margin-top: var(--s-2); }

/* node dot on the thread */
.chain-layer::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--night);
  border: 1.5px solid #5A5E69;
  transition: background-color 250ms var(--ease), border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.chain-layer.is-active::before {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(229, 177, 3, 0.55);
}
/* Brief brighten as the travelling pulse passes a node (decorative, does not
   change the accordion's open/active state). */
.chain-layer.is-lit::before {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 218, 85, 0.7);
}

.chain-toggle {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  width: 100%;
  background: transparent;
  border: 0;
  padding: 12px 0;
  cursor: pointer;
  text-align: left;
  color: var(--paper);
  font: inherit;
}

.chain-num {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  color: var(--slate-on-dark);
}

.chain-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  transition: color 250ms var(--ease);
}
.chain-toggle:hover .chain-name { color: var(--gold); }
.chain-layer.is-active .chain-name { color: var(--gold); }

.chain-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease);
}
.chain-panel > p {
  overflow: hidden;
  margin: 0;
  max-width: 48ch;
  color: var(--paper-dim);
}
.chain-panel.is-open { grid-template-rows: 1fr; }
.chain-panel.is-open > p { padding-bottom: var(--s-4); }
.chain-panel[hidden] { display: none; }

/* ---- Insights ----------------------------------------------------------------------------- */

.insights h2 { margin-bottom: clamp(40px, 6vw, 64px); }

.insight-featured {
  max-width: 62ch;
  margin-bottom: clamp(48px, 7vw, 80px);
}

.insight-kicker {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep-text);
  display: block;
  margin-bottom: var(--s-3);
}

.insight-featured h3 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-4);
}

.insight-featured h3 a,
.insight-item h3 a { text-decoration: none; }
.insight-featured h3 a:hover,
.insight-item h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.insight-featured p { color: var(--slate); }
.insight-featured time { font-size: 0.875rem; color: var(--slate); }

.insight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
}

.insight-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--s-5);
  align-items: baseline;
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--hairline);
}

.insight-item time { font-size: 0.875rem; color: var(--slate); }

.insight-item h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}
.insight-item--lg h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
}
.insight-item p {
  margin: var(--s-2) 0 0;
  color: var(--slate);
  max-width: 56ch;
}

.insight-more { margin-top: var(--s-6); }

@media (max-width: 600px) {
  .insight-item { grid-template-columns: 1fr; gap: var(--s-1); }
}

/* ---- Insights carousel ---------------------------------------------------------------------
   Native scroll + scroll-snap: swipe works on touch, keyboard focus scrolls the
   real scroller (no transform desync), and the browser owns the physics. The
   arrows are a convenience layer that drives scrollBy(); JS only syncs their
   disabled state to the scroll position. */
.insight-carousel {
  display: flex;
  align-items: stretch;
  gap: var(--s-3);
}

.carousel-viewport {
  flex: 1 1 auto;
  overflow-x: auto;
  min-width: 0;
  scroll-snap-type: x mandatory;
  /* the arrows + snap are the paging UI; the scrollbar would double it */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-viewport::-webkit-scrollbar { display: none; }

.carousel-track {
  --cols: 3;
  --gap: 24px;
  display: flex;
  gap: var(--gap);
  border-top: none;
}

/* Card: the stacked (not row) form of an insight item */
.insight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  scroll-snap-align: start;
  padding: var(--s-5);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.insight-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(18, 24, 40, 0.06);
}
.insight-card .insight-kicker { margin-bottom: 0; }
.insight-card .insight-body { display: block; }
.insight-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}
/* Clamp summaries so one long-winded card doesn't set the height for all 12
   (the flex line stretches every card to the tallest). */
.insight-card p {
  margin-top: var(--s-2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
/* Date sits as a footer, pinned to the bottom so it lines up across a row of cards. */
.insight-card time { margin-top: auto; }

/* Whole-card click: the title link stretches to cover the card. Keeps a single
   real <a> for accessibility while making the entire card the hit target. */
.insight-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.insight-card:hover h3 a { text-decoration: none; }

/* Arrows */
.carousel-arrow {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink, currentColor);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.carousel-arrow:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-deep-text);
}
.carousel-arrow:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

/* Nothing to page through (everything fits): drop the arrows. */
.carousel-static .carousel-arrow { display: none; }

/* The arrows are dead weight without JS; native scroll still reaches every card. */
html:not(.js) .carousel-arrow { display: none; }

@media (max-width: 900px) {
  .carousel-track { --cols: 2; }
}
@media (max-width: 600px) {
  /* Touch-first: swipe is the interaction, so the arrows go and the next card
     peeks in from the right edge to invite it. */
  .carousel-track { --cols: 1; --gap: 16px; }
  .insight-carousel { gap: 0; }
  .carousel-arrow { display: none; }
  .insight-card { flex-basis: 86%; }
}

@media (prefers-reduced-motion: reduce) {
  .insight-card { transition: border-color 0.2s ease; }
  .insight-card:hover { transform: none; }
}

/* ---- FAQ ------------------------------------------------------------------------------------ */

.faq { background: var(--gold-tint); border-top: 1px solid var(--hairline); }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; }
}

.faq-intro h2 { max-width: 18ch; }

.faq-list { border-top: 1px solid var(--hairline); }

.faq-item { border-bottom: 1px solid var(--hairline); }

.faq-item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold-deep-text);
  flex-shrink: 0;
  transition: transform 250ms var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item summary:hover .faq-q {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.faq-answer { padding: 0 0 var(--s-5); }
.faq-answer p { max-width: 60ch; }
.faq-answer p:last-child { margin-bottom: 0; }

.faq-steps {
  margin: 0;
  padding-left: 20px;
}
.faq-steps li + li { margin-top: var(--s-2); }

/* ---- Contact ---------------------------------------------------------------------------------- */

.contact { padding-block: clamp(96px, 14vw, 180px); }

.contact h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 15ch;
}

.contact .lead { max-width: 44ch; }

/* Closing CTA band on the homepage (the form itself lives on /contact). */
.cta-band-inner {
  max-width: 46ch;
  margin: 0 auto;
  text-align: center;
}
.cta-band-inner .eyebrow { display: inline-block; }
.cta-band-inner h2 { max-width: 20ch; margin-inline: auto; }
.cta-band-inner .lead { max-width: 46ch; margin-inline: auto; }
.cta-band-actions { margin-top: var(--s-6); }
.cta-band-alt {
  margin-top: var(--s-5);
  font-size: 0.9375rem;
  color: var(--slate-on-dark);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* On the dedicated /contact page the section is the first content, so it needs
   room to clear the fixed header (on the homepage .contact sat mid-page). */
.contact.section { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 72px)); }
.contact-intro h1,
.contact-intro h2 { max-width: 15ch; }
.contact-direct {
  margin-top: var(--s-6);
  font-size: 0.9375rem;
  color: var(--paper-dim);
}

/* ---- Contact form ---- */

.contact-form-wrap {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.5vw, 40px);
}

.field { margin-bottom: var(--s-5); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--paper);
  margin-bottom: var(--s-2);
  padding: 0;
}

/* required-field marker */
.req { color: var(--error); font-weight: 700; }
.form-required-note {
  margin: 0 0 var(--s-5);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--slate-on-dark);
}

.field-hint {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--slate-on-dark);
  letter-spacing: 0;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline-dark);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 250ms var(--ease), background-color 250ms var(--ease);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--slate-on-dark); }

.contact-form input:hover,
.contact-form textarea:hover { border-color: rgba(255, 255, 255, 0.22); }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

/* invalid state only after JS marks it, so native validation styling doesn't flash */
.contact-form .field.is-invalid input,
.contact-form .field.is-invalid textarea { border-color: var(--error); }

/* honeypot — kept in the layout for bots, hidden from people and AT */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile { margin-bottom: var(--s-5); min-height: 65px; }

.contact-submit { margin-top: var(--s-2); }
.contact-submit[disabled] { opacity: 0.6; cursor: progress; }

.form-fineprint {
  margin: var(--s-4) 0 0;
  font-size: 0.8125rem;
  color: var(--slate-on-dark);
}

.form-error {
  margin: 0 0 var(--s-5);
  padding: 12px 14px;
  font-size: 0.9375rem;
  color: #FFD9D3;
  background: rgba(192, 57, 43, 0.16);
  border: 1px solid rgba(192, 57, 43, 0.5);
  border-radius: var(--radius);
}
.form-error[hidden] { display: none; }

.form-confirmation {
  text-align: center;
  padding: clamp(32px, 5vw, 56px) var(--s-5);
}
.form-confirmation[hidden] { display: none; }
.form-confirmation-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--s-5);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50%;
}
.form-confirmation h3 { margin-bottom: var(--s-3); }
.form-confirmation p { margin: 0; color: var(--paper-dim); }

/* ---- Reveal on scroll ----------------------------------------------------------------- */

/* only hide revealables when JS is running (html.js) so content is never lost */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---- Footer ------------------------------------------------------------------------------ */

.site-footer {
  background: var(--night);
  color: var(--paper);
  border-top: 1px solid var(--hairline-dark);
  padding-block: var(--s-8) var(--s-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s-7);
  margin-bottom: var(--s-8);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

.site-footer .logo img { width: 150px; }
.footer-tag {
  margin-top: var(--s-4);
  color: var(--paper-dim);
  max-width: 34ch;
}

.footer-col-title {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li + li { margin-top: var(--s-2); }
.footer-col a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 0.9375rem;
}
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--hairline-dark);
  padding-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--slate-on-dark);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
}
.footer-legal a {
  color: var(--slate-on-dark);
  text-decoration: none;
}
.footer-legal a:hover { color: var(--gold); }

/* ---- Reduced motion ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue { display: none; }
  /* static poster instead of the live canvas */
  .hero-canvas { display: none; }
  .hero { background: var(--night) url("../assets/images/hero-network.webp") center / cover no-repeat; }
  .site-nav a::after { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Retained-page internal links (SEO: de-orphan /ai-services, /it-services, /about) ---- */
.services-more {
  margin: var(--s-7) auto 0;
  padding-top: var(--s-6);
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 1.0625rem;
  color: var(--slate);
}
.services-more a {
  font-weight: 600;
  white-space: nowrap;
}
.why-more {
  margin-top: var(--s-6);
}
