/* ============================================================
   Next Puzzle — AI × Cybersecurity Advisory
   Editorial serif + monospace, cool bone, deep pine-green accent.
   ============================================================ */

:root {
  /* alternating bands: near-black base + emerald green sections */
  --paper:     #0e120f;   /* near-black — base + "black" sections */
  --green:     #1b4337;   /* emerald — "green" sections */
  --paper-2:   #1a221c;   /* raised panel on black */
  --ink:       #edf0e8;   /* bone text */
  --ink-2:     #b8c5bc;   /* muted bone */
  --muted:     #7e8f84;   /* dim green-grey */
  --line:      rgba(237,240,232,0.14);
  --line-2:    rgba(237,240,232,0.26);

  /* accent — bright emerald on the dark green (var names kept) */
  --rust:      #54b98a;
  --ember:     #74d3a4;
  --rust-deep: #2f7d5b;
  --ticker-text: #74d3a4;

  /* cool mint counterpoint for display italics and ticker marks */
  --counter:   #b9f5d3;
  --cube-1:    #b9f5d3;
  --cube-2:    #54b98a;
  --cube-3:    #edf0e8;
  --cube-4:    #7fc9a8;
  --cube-core: #07130e;
  --cube-missing: #9bdff0;
  --cube-icon: #174f60;

  /* type */
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans:  'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --black: var(--serif);

  --maxw: 1160px;
  --ticker-h: 32px;
  --r: 2px;
  --ease: cubic-bezier(.2,.6,.2,1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper:     #fbfaf4;
  --green:     #eef3e8;
  --paper-2:   #e6eee5;
  --ink:       #173f35;
  --ink-2:     #49655b;
  --muted:     #5b7068;
  --line:      rgba(23,63,53,0.12);
  --line-2:    rgba(23,63,53,0.24);
  --rust:      #267a5a;
  --ember:     #328e69;
  --rust-deep: #126047;
  --ticker-text: #1c6e50;
  --counter:   #126047;
  --cube-1:    #56a985;
  --cube-2:    #267a5a;
  --cube-3:    #173f35;
  --cube-4:    #8bc9ad;
  --cube-core: #dfece5;
  --cube-missing: #e7a92f;
  --cube-icon: #173f35;
}

:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--ticker-h) + 82px); }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .28s var(--ease), color .28s var(--ease);
}
.puzzle-field { position: fixed; inset: calc(var(--ticker-h) + 62px) 0 0; z-index: 3; pointer-events: none; overflow: hidden; }
.float-piece { position: absolute; overflow: visible; color: var(--counter); opacity: var(--piece-opacity, .1); will-change: transform; }
.float-piece path { fill: color-mix(in srgb, var(--counter) 2%, transparent); stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
/* full-bleed section helper: color spans the viewport, content stays centered */
.section, .footer {
  padding-inline: max(clamp(18px, 5vw, 40px), calc((100% - var(--maxw)) / 2));
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--rust); color: #fff; }

/* headings */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.02; }
.ital { font-style: italic; }
em { font-style: italic; }

/* mono utilities */
.kicker, .eyebrow, .entry-ref, .step-num, .nav-links em, .stat b i,
.ticker, .readout, .nav-toggle, .footer-meta {
  font-family: var(--mono);
}

/* ---------- ticker ---------- */
.ticker {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110; height: var(--ticker-h);
  background: var(--paper); color: var(--ticker-text);
  font-size: 11px; letter-spacing: 0.14em; line-height: 1.2;
  overflow: hidden; white-space: nowrap; border-bottom: 1px solid var(--line);
}
.ticker-track { display: flex; width: max-content; height: 100%; animation: marquee 72s linear infinite; }
.ticker-group { display: flex; flex: none; align-items: center; gap: 26px; padding-right: 26px; }
.ticker-track i { color: var(--counter); font-style: normal; }
.ticker span { opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: var(--ticker-h); left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 0 clamp(18px, 4vw, 40px); height: 62px;
  background: transparent;   /* let the green hero show through beneath the ticker */
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s;
}
.nav.scrolled {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-logo {
  width: 34px; height: 34px; flex: 0 0 auto; display: block; object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent); border-radius: 7px;
}
.brand-name { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 30px; }
.nav-services { position: relative; }
.nav-links a { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-2); transition: color .2s; }
.nav-links a em { font-family: var(--mono); font-style: normal; font-size: 0.62rem; color: var(--muted); vertical-align: super; margin-right: 3px; letter-spacing: 0; }
.nav-links a:hover { color: var(--rust); }
.nav-social { display: flex; align-items: center; gap: 8px; margin-left: 4px; padding-left: 20px; border-left: 1px solid var(--line-2); }
.nav-links .nav-social a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink-2); font-family: var(--mono); font-size: 9px; line-height: 1; letter-spacing: .06em; text-transform: uppercase; transition: color .2s, border-color .2s, background-color .2s; }
.nav-links .nav-social a:hover { color: var(--rust); border-color: var(--rust); background: color-mix(in srgb, var(--rust) 8%, transparent); }
.nav-links .nav-social a:focus-visible { outline: 2px solid var(--counter); outline-offset: 3px; }
.services-menu {
  position: absolute; top: calc(100% + 17px); left: 50%; width: 330px; padding: 10px;
  background: color-mix(in srgb, var(--paper) 97%, transparent); border: 1px solid var(--line-2);
  box-shadow: 0 18px 46px rgba(7,25,42,.14); opacity: 0; visibility: hidden;
  transform: translate(-50%, -6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-services:hover .services-menu, .nav-services:focus-within .services-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.services-menu a { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.services-menu a:last-child { border-bottom: 0; }
.services-menu b { font-family: var(--mono); color: var(--rust); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.services-menu span { font-family: var(--sans); color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 8px 12px; font-size: 11px; letter-spacing: 0.1em; cursor: pointer; color: var(--ink); }
.theme-toggle {
  position: relative; flex: 0 0 34px; width: 34px; height: 34px; padding: 0;
  color: var(--ink-2); background: color-mix(in srgb, var(--paper) 12%, transparent);
  border: 1px solid var(--line-2); border-radius: 50%; cursor: pointer;
  transition: color .2s, background .2s, border-color .2s, transform .2s var(--ease);
}
.theme-toggle:hover { color: var(--counter); border-color: currentColor; transform: rotate(8deg); }
.theme-toggle:focus-visible { outline: 2px solid var(--counter); outline-offset: 3px; }
.theme-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; line-height: 1; }
.theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: grid; }

/* ---------- shared layout ---------- */
.section { padding-block: clamp(72px, 11vw, 128px); }
#services {
  position: relative; z-index: 2;
}
.contact { position: relative; z-index: 2; padding-top: clamp(36px, 4vw, 52px); background: var(--paper); }
.thesis { background: var(--green); }   /* alternating band */
.section-head { max-width: 720px; margin-bottom: 60px; }
.kicker {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--rust); margin-bottom: 22px; display: flex; align-items: center; gap: 10px;
}
.kicker::after { content: ""; flex: 0 0 46px; height: 1px; background: var(--line-2); }
.section-head h2 { font-size: clamp(2.2rem, 5.6vw, 4rem); }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.24rem); color: var(--ink-2); margin-top: 20px; max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 13px; letter-spacing: 0.03em; padding: 13px 22px; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer;
  transition: color .22s var(--ease), background-color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--rust); border-color: var(--rust); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-2); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; background: var(--green);
  padding-top: clamp(108px, 12vh, 132px); padding-bottom: clamp(36px, 5vh, 60px);
  padding-inline: max(clamp(18px, 5vw, 40px), calc((100% - var(--maxw)) / 2));
}
.hero > .frame-mark { display: none; }   /* crop-marks don't suit full-bleed bands */
.hero-intro { display: block; }
.hero-copy, .hero-support { min-width: 0; }
.hero-support { display: grid; grid-template-columns: minmax(0, 650px) auto; gap: clamp(28px, 6vw, 80px); align-items: end; margin-top: clamp(24px, 3vw, 38px); }
.eyebrow { font-size: 11px; letter-spacing: 0.17em; color: var(--muted); margin-bottom: 16px; }
.hero-title { font-size: clamp(2.65rem, 4.7vw, 4.25rem); max-width: 23ch; line-height: .94; letter-spacing: -0.025em; }
.hero-title .ital { color: var(--counter); display: inline; }
.section-head h2 .ital, .thesis-copy h2 .ital, .cta h2 .ital { color: var(--counter); }
.hero-deck { font-size: clamp(.97rem, 1.25vw, 1.08rem); line-height: 1.62; color: var(--ink-2); max-width: 54ch; margin-top: 0; }

/* system readout */
.readout {
  margin-top: clamp(22px, 4vh, 42px); border: 1px solid var(--line); border-radius: var(--r);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  padding: 18px 20px; max-width: 620px; font-family: var(--mono); font-size: 12.5px; line-height: 2;
}
.readout p { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 8px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.readout .rk { color: var(--muted); display: inline-block; min-width: 82px; }
.readout .rk::before { content: "▸ "; color: var(--rust); }
.readout-value { overflow: hidden; text-overflow: ellipsis; }
.readout .ok { color: var(--rust); font-style: normal; }
.split-char { display: inline-block; min-width: .61em; transform-origin: 50% 50%; }
.split-char.is-flipping { animation: split-flap .11s steps(1, end); }
@keyframes split-flap {
  0% { opacity: .28; transform: rotateX(72deg) translateY(-2px); }
  50% { opacity: 1; transform: rotateX(0); }
  100% { opacity: .42; transform: rotateX(-72deg) translateY(2px); }
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 12px 22px; border: 1px solid var(--line-2); border-radius: var(--r);
  color: var(--ink); font-family: var(--mono); font-size: 13px; letter-spacing: .03em;
  transition: color .22s var(--ease), background-color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.hero-action-primary { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.hero-action-primary:hover { color: var(--paper); background: var(--rust); border-color: var(--rust); transform: translateY(-2px); }
.hero-action-secondary:hover { background: var(--paper-2); border-color: var(--ink); }
.hero-action:focus-visible { outline: 2px solid var(--counter); outline-offset: 3px; }
/* corner registration / crop marks (puzzle-piece edges) */
.frame-mark { position: absolute; width: 15px; height: 15px; pointer-events: none; }
.frame-mark.tl { top: clamp(110px,15vh,150px); left: 4px; border-top: 1.5px solid var(--rust); border-left: 1.5px solid var(--rust); }
.frame-mark.tr { top: clamp(110px,15vh,150px); right: 4px; border-top: 1.5px solid var(--rust); border-right: 1.5px solid var(--rust); }
.frame-mark.bl { bottom: 30px; left: 4px; border-bottom: 1.5px solid var(--rust); border-left: 1.5px solid var(--rust); }
.frame-mark.br { bottom: 30px; right: 4px; border-bottom: 1.5px solid var(--rust); border-right: 1.5px solid var(--rust); }

/* ---------- stats ---------- */
.stats {
  max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.stat { padding: 30px clamp(14px,2vw,24px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; display: block; }
.stat b i { font-style: normal; font-size: 0.42em; color: var(--rust); margin-left: 2px; }
.stat p { font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--muted); margin-top: 14px; max-width: 24ch; letter-spacing: 0.01em; }

/* ---------- services catalog ---------- */
.service-explorer {
  display: grid; grid-template-columns: minmax(290px, .84fr) minmax(340px, 1.16fr);
  align-items: center; gap: clamp(36px, 7vw, 86px); min-height: 450px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-top: 18px; padding-block: clamp(24px, 3vw, 38px);
}
.cube-column { min-width: 0; text-align: center; }
.cube-stage {
  --cube-size: clamp(205px, 21vw, 258px);
  position: relative; display: grid; place-items: center; width: 100%; min-height: 390px;
  border: 0; padding: 0; color: inherit; background: transparent; cursor: pointer;
  perspective: 1050px; perspective-origin: 50% 44%; isolation: isolate;
}
.cube-stage:focus-visible { outline: 2px solid var(--counter); outline-offset: 7px; border-radius: 4px; }
.cube-aura {
  position: absolute; z-index: -1; width: min(92%, 470px); aspect-ratio: 1;
  background: radial-gradient(circle, color-mix(in srgb, var(--counter) 9%, transparent) 0, transparent 69%);
  transform: translateY(8px); pointer-events: none;
}
.cube-tilt { width: var(--cube-size); height: var(--cube-size); transform-style: preserve-3d; transition: transform .18s ease-out; }
.puzzle-cube {
  position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d;
  transform: rotateX(0) rotateY(0) rotateZ(0); transition: transform .9s cubic-bezier(.22,.8,.2,1);
  will-change: transform;
}
.puzzle-cube::before, .puzzle-cube::after {
  content: ""; position: absolute; inset: -13%; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--ink) 23%, transparent); border-radius: 16px;
  background:
    linear-gradient(90deg, transparent 49.8%, color-mix(in srgb, var(--ink) 11%, transparent) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, color-mix(in srgb, var(--ink) 11%, transparent) 50%, transparent 50.2%);
}
.puzzle-cube::before { transform: translateZ(-72px) rotateZ(2deg); opacity: .6; }
.puzzle-cube::after { transform: translateZ(-124px) rotateZ(-3deg) scale(1.05); opacity: .32; }
.service-explorer[data-active-service="0"] .puzzle-cube { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
.service-explorer[data-active-service="1"] .puzzle-cube { transform: rotateX(0deg) rotateY(90deg) rotateZ(0deg); }
.service-explorer[data-active-service="2"] .puzzle-cube { transform: rotateX(-90deg) rotateY(0deg) rotateZ(0deg); }
.service-explorer[data-active-service="3"] .puzzle-cube { transform: rotateX(0deg) rotateY(180deg) rotateZ(0deg); }
.service-explorer[data-active-service="4"] .puzzle-cube { transform: rotateX(0deg) rotateY(-90deg) rotateZ(0deg); }
.cube-face {
  position: absolute; inset: 0; display: block; overflow: visible;
  background: color-mix(in srgb, var(--paper) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  backface-visibility: hidden;
}
.cube-front  { transform: translateZ(calc(var(--cube-size) / 2)); }
.cube-back   { transform: rotateY(180deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-right  { transform: rotateY(90deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-left   { transform: rotateY(-90deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-top    { transform: rotateX(90deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube-size) / 2)); }
.cube-face svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cube-piece { stroke-width: 1.55; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cube-piece.tone-0 { fill: color-mix(in srgb, var(--cube-1) 8%, transparent); stroke: var(--cube-1); }
.cube-piece.tone-1 { fill: color-mix(in srgb, var(--cube-2) 7%, transparent); stroke: var(--cube-2); }
.cube-piece.tone-2 { fill: color-mix(in srgb, var(--cube-3) 4%, transparent); stroke: color-mix(in srgb, var(--ink) 58%, transparent); }
.cube-piece.tone-3 { fill: color-mix(in srgb, var(--cube-4) 7%, transparent); stroke: var(--cube-4); }
.cube-hole {
  fill: color-mix(in srgb, var(--cube-missing) 78%, transparent); stroke: var(--cube-missing);
  stroke-width: 1.7; stroke-dasharray: 7 5; opacity: 1; vector-effect: non-scaling-stroke;
}
.piece-icon { pointer-events: none; opacity: .38; transition: opacity .35s; }
.piece-icon path {
  fill: none; stroke: var(--cube-icon); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; stroke-dasharray: none; stroke-dashoffset: 0;
}
.piece-icon .icon-detail { stroke-width: 2; }
.service-explorer[data-active-service="0"] .cube-front .piece-icon,
.service-explorer[data-active-service="1"] .cube-left .piece-icon,
.service-explorer[data-active-service="2"] .cube-top .piece-icon,
.service-explorer[data-active-service="3"] .cube-back .piece-icon,
.service-explorer[data-active-service="4"] .cube-right .piece-icon { opacity: 1; }
.service-dots { position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; }
.service-current { display: none; }
.service-dot {
  width: 8px; height: 8px; border: 0; border-radius: 50%; padding: 0;
  background: var(--line-2); cursor: pointer; transition: width .25s var(--ease), background .25s, transform .25s;
}
.service-dot:hover { background: var(--counter); transform: scale(1.25); }
.service-dot.is-active { width: 28px; border-radius: 99px; background: var(--counter); }
.service-dot:focus-visible { outline: 2px solid var(--counter); outline-offset: 4px; }
.cube-hint { margin-top: 17px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.hint-touch { display: none; }
.service-panels { position: relative; min-height: 340px; display: grid; align-items: center; }
.service-panel { animation: service-in .55s var(--ease) both; }
.service-panel .entry-ref { display: block; margin-bottom: 15px; }
.service-panel h3 { max-width: 15ch; font-size: clamp(2.25rem, 4vw, 3.6rem); line-height: .98; }
.service-panel h3 .ital { color: var(--counter); }
.service-panel > p { max-width: 58ch; margin-top: 16px; color: var(--ink-2); font-size: .98rem; line-height: 1.55; }
.service-panel .specs { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 20px; }
@keyframes service-in { from { opacity: 0; } to { opacity: 1; } }

.catalog { border-top: 1px solid var(--line); }
.entry {
  display: grid; grid-template-columns: 110px 1fr; gap: clamp(18px, 4vw, 44px);
  padding: clamp(30px, 4vw, 48px) 0; border-bottom: 1px solid var(--line);
}
.entry-ref { padding-top: 6px; }
.entry-feature { grid-row: span 2; }
.entry-wide { grid-column: 1 / -1; grid-template-columns: 70px 1fr; border-right: 0; }
.entry-ref { font-size: 12px; color: var(--rust); letter-spacing: 0.06em; padding-top: 8px; }
.entry-body h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 14px; }
.entry-body > p { color: var(--ink-2); font-size: 1.02rem; max-width: 54ch; }
.specs { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.specs li { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); padding-left: 20px; position: relative; letter-spacing: 0.01em; }
.specs li::before { content: "+"; position: absolute; left: 0; color: var(--rust); }
.specs-row { flex-direction: row; flex-wrap: wrap; gap: 12px 28px; }

/* ---------- homepage architecture ---------- */
.trust-strip {
  position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-block: 1px solid var(--line);
  padding-inline: max(clamp(18px, 5vw, 40px), calc((100% - var(--maxw)) / 2));
}
.trust-strip span { padding: 20px 16px; border-left: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .11em; text-align: center; text-transform: uppercase; }
.trust-strip span:first-child { border-left: 0; }
.pathways { background: var(--paper); }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.path-card { padding: clamp(28px, 4vw, 46px); border-left: 1px solid var(--line); transition: background .25s, transform .25s; }
.path-card:first-child { border-left: 0; }
.path-card:hover { background: var(--paper-2); transform: translateY(-3px); }
.path-card h3 { margin-top: 24px; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.02; }
.path-card p { margin-top: 18px; color: var(--ink-2); }
.path-card b { display: block; margin-top: 26px; color: var(--rust); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.featured { background: var(--green); }
.solution-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line-2); }
.solution-grid article { display: grid; grid-template-columns: 48px 1fr; gap: 10px 20px; padding: 30px 24px; border-bottom: 1px solid var(--line); }
.solution-grid article:nth-child(odd) { border-right: 1px solid var(--line); }
.solution-grid article > span { grid-row: span 2; color: var(--rust); font-family: var(--mono); font-size: 11px; }
.solution-grid h3 { font-size: clamp(1.65rem, 2.5vw, 2.2rem); }
.solution-grid p { color: var(--ink-2); max-width: 52ch; }
.operating-model { background: var(--paper); }
.model-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); gap: clamp(42px, 8vw, 110px); align-items: end; }
.model-intro { max-width: 760px; }
.model-intro h2 { font-size: clamp(2.5rem, 5vw, 4.2rem); }
.model-readout { width: 100%; max-width: none; margin: 0 0 4px; padding: 13px 14px; font-size: 10px; line-height: 1.9; }
.model-readout p { grid-template-columns: 66px minmax(0, 1fr) auto; gap: 6px; }
.model-readout .rk { min-width: 66px; }
.model-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 56px; border-block: 1px solid var(--line-2); }
.model-steps li { padding: 28px 20px 34px; border-left: 1px solid var(--line); }
.model-steps li:first-child { border-left: 0; }
.model-steps span { font-family: var(--mono); font-size: 10px; color: var(--rust); }
.model-steps b { display: block; margin-top: 18px; font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.model-steps p { margin-top: 12px; color: var(--ink-2); font-size: .9rem; line-height: 1.55; }
.framework-note { margin-top: 28px; max-width: 86ch; color: var(--muted); font-family: var(--mono); font-size: 10.5px; line-height: 1.7; }
.text-link { display: inline-block; margin-top: 30px; color: var(--rust); font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }

/* ---------- approach steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.step { padding: 32px 24px 40px; border-left: 1px solid var(--line); transition: background .25s; }
.step:first-child { border-left: 0; }
.step:hover { background: var(--paper-2); }
.step-num { font-size: 12px; color: var(--rust); letter-spacing: 0.1em; }
.step h3 { font-size: 1.7rem; margin: 20px 0 12px; }
.step p { color: var(--ink-2); font-size: 0.98rem; }

/* ---------- thesis ---------- */
.thesis-copy { max-width: 720px; }
.thesis-copy h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.tenets { margin-top: 34px; display: flex; flex-direction: column; }
.tenets > div { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr; gap: 4px; }
.tenets dt { font-family: var(--serif); font-size: 1.35rem; }
.tenets dd { font-family: var(--mono); font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.pullquote {
  position: relative; padding: 40px 34px; border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--ink); color: var(--paper); align-self: stretch;
}
.pullquote blockquote { font-family: var(--serif); font-size: clamp(1.6rem, 2.7vw, 2.2rem); line-height: 1.24; }
.dropcap {
  font-family: var(--black); font-weight: 600; float: left; font-size: 4.4rem; line-height: 0.74;
  color: var(--ember); margin: 6px 14px 0 0;
}
.pullquote figcaption { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ember); margin-top: 26px; text-transform: uppercase; }

/* ---------- contact ---------- */
.contact { text-align: left; }
.cta {
  /* white form card keeps the light palette on the dark page */
  --paper: #ffffff; --paper-2: #eef0ea;
  --ink: #16201a; --ink-2: #333c36; --muted: #69726b;
  --line: rgba(22,32,26,0.14); --line-2: rgba(22,32,26,0.30);
  --rust: #1c5a40; --ember: #2c8160;
  position: relative; background: #fff; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--r);
  padding: clamp(46px, 7vw, 88px) clamp(24px, 5vw, 64px);
}
[data-theme="light"] .cta {
  --paper: #fbfaf4; --paper-2: #e6eee5;
  --ink: #173f35; --ink-2: #49655b; --muted: #5b7068;
  --line: rgba(23,63,53,.12); --line-2: rgba(23,63,53,.24);
  --rust: #267a5a; --ember: #328e69;
  background: #fbfaf4;
}
[data-theme="light"] .inquiry input,
[data-theme="light"] .inquiry textarea,
[data-theme="light"] .inquiry select { background-color: #fff; }

/* ---------- inquiry form ---------- */
.inquiry { margin-top: 38px; display: flex; flex-direction: column; gap: 20px; max-width: 660px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field .req { color: var(--rust); }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.inquiry input, .inquiry textarea, .inquiry select {
  font-family: var(--sans); font-size: 1rem; color: var(--ink); background: #fff;
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.inquiry select { min-height: 50px; appearance: none; background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: calc(100% - 17px) 21px,calc(100% - 12px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.inquiry textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.inquiry input:focus, .inquiry textarea:focus, .inquiry select:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px rgba(28,90,64,0.16); }
.field.error input, .field.error textarea { border-color: #b5341a; box-shadow: 0 0 0 3px rgba(181,52,26,0.10); }
.field.error select { border-color: #b5341a; }
.optional { color: var(--muted); font-size: 9px; }
.consent { display: flex; align-items: flex-start; gap: 11px; color: var(--ink-2); font-size: .86rem; line-height: 1.5; }
.consent input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--rust); }
.consent a { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; }
.consent.error { color: #b5341a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.form-status { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.form-status.err { color: #b5341a; }
.form-thanks { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--rust); margin-top: 38px; line-height: 1.35; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.cta .lede { margin-bottom: 8px; }
.mailline {
  display: inline-block; margin-top: 34px; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.8rem, 4vw, 3rem); color: var(--rust); border-bottom: 1.5px solid var(--line);
  transition: border-color .25s, letter-spacing .25s;
}
.mailline:hover { border-color: var(--rust); }
.cta .frame-mark { position: absolute; }
.cta .frame-mark.tl { top: 12px; left: 12px; }
.cta .frame-mark.tr { top: 12px; right: 12px; }
.cta .frame-mark.bl { bottom: 12px; left: 12px; }
.cta .frame-mark.br { bottom: 12px; right: 12px; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 2; background: var(--green); padding-block: 54px; }   /* closing band */
.footer-grid { display: grid; grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(120px, .7fr)); gap: 40px; }
.footer-top { display: flex; align-items: center; gap: 10px; }
.footer-name { font-family: var(--serif); font-size: 1.4rem; }
.footer-tag { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 1.15rem; margin-top: 6px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links b { margin-bottom: 5px; color: var(--rust); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.footer-links a { color: var(--ink-2); font-size: .9rem; }
.footer-links a:hover { color: var(--rust); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 30px; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.footer-meta a { color: var(--ink-2); }
.footer-meta a:hover { color: var(--rust); }
.footer-social { display: flex; align-items: center; gap: 8px; }
.footer-social a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 2px; line-height: 1; transition: color .2s, border-color .2s, background-color .2s; }
.footer-social a:hover { border-color: var(--rust); background: color-mix(in srgb, var(--rust) 8%, transparent); }
.footer-social a:focus-visible { outline: 2px solid var(--counter); outline-offset: 3px; }

/* ---------- analytics consent ---------- */
.cookie-banner {
  position: fixed; left: 50%; bottom: 18px; z-index: 200; width: min(720px, calc(100% - 36px));
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding: 18px 20px; color: var(--ink); background: color-mix(in srgb, var(--paper) 96%, transparent);
  border: 1px solid var(--line-2); box-shadow: 0 16px 48px rgba(7,25,42,.18); transform: translateX(-50%);
  backdrop-filter: blur(14px);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner b { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; }
.cookie-banner p { margin-top: 3px; color: var(--ink-2); font-size: .78rem; line-height: 1.45; }
.cookie-banner p a { color: var(--rust); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.cookie-actions button { min-height: 38px; padding: 8px 13px; border: 1px solid var(--line-2); color: var(--ink); background: transparent; font-family: var(--mono); font-size: 10px; cursor: pointer; }
.cookie-actions .cookie-accept { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.cookie-actions button:focus-visible { outline: 2px solid var(--counter); outline-offset: 2px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (min-width: 861px) and (max-width: 1040px) {
  .nav-links { gap: 18px; }
  .nav-social { padding-left: 12px; }
  .nav-links .nav-social a { padding-inline: 7px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 20px; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 26px clamp(18px,5vw,40px);
  }
  .nav-social { margin-left: 0; padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .nav-services > a { display: none; }
  .services-menu { position: static; display: grid; grid-template-columns: 1fr 1fr; width: auto; padding: 0; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; background: transparent; }
  .services-menu a { grid-template-columns: 54px 1fr; padding: 8px 10px 8px 0; }
  .services-menu a:nth-child(4) { border-bottom: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { border-left: 0; }
  .catalog { grid-template-columns: 1fr; }
  .entry, .entry:nth-child(2n) { border-right: 0; }
  .entry-feature { grid-row: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(odd) { border-left: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .thesis-grid { grid-template-columns: 1fr; }
  .hero-support { display: block; margin-top: 24px; }
  .hero-title { max-width: 23ch; }
  .hero-support { max-width: 650px; }
  .service-explorer { grid-template-columns: 1fr; gap: 20px; min-height: 0; }
  .cube-stage { --cube-size: clamp(215px, 43vw, 275px); min-height: clamp(350px, 63vw, 455px); }
  .service-current {
    display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 7px 14px;
    min-height: 30px; margin-top: 8px; color: var(--ink); line-height: 1.25;
  }
  .service-current-ref { color: var(--rust); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
  .service-current-name { font-family: var(--serif); font-size: 1.35rem; }
  .service-dots { margin-top: 14px; }
  .cube-hint { margin-top: 13px; }
  .service-panels { min-height: 360px; max-width: 620px; }
  .path-grid { grid-template-columns: 1fr; }
  .path-card { border-left: 0; border-top: 1px solid var(--line); }
  .path-card:first-child { border-top: 0; }
  .model-steps { grid-template-columns: repeat(2, 1fr); }
  .model-head { grid-template-columns: 1fr; gap: 30px; align-items: start; }
  .model-readout { max-width: 620px; }
  .model-steps li:nth-child(odd) { border-left: 0; }
  .model-steps li { border-bottom: 1px solid var(--line); }
  .model-steps li:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (hover: none), (pointer: coarse) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
}
@media (max-width: 520px) {
  .hero { min-height: auto; padding-top: 108px; padding-bottom: 44px; }
  .eyebrow { margin-bottom: 14px; line-height: 1.5; }
  .hero-title { font-size: clamp(2.25rem, 10vw, 3.15rem); max-width: 19ch; }
  .hero-deck { margin-top: 0; }
  .readout { margin-top: 18px; padding: 11px 12px; line-height: 1.75; }
  .hero-actions { margin-top: 24px; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .step { border-left: 0; border-bottom: 1px solid var(--line); }
  .entry { grid-template-columns: 1fr; }
  .entry-ref { padding-top: 0; }
  .readout { font-size: 11.5px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .readout p { grid-template-columns: 68px minmax(0, 1fr) auto; gap: 5px; }
  .readout .rk { min-width: 68px; }
  .readout .ok { color: var(--rust); }
  .hero-action { flex: 1 1 100%; }
  .field-row { grid-template-columns: 1fr; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-strip span:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .trust-strip span:nth-child(4) { border-top: 1px solid var(--line); }
  .solution-grid { grid-template-columns: 1fr; }
  .solution-grid article:nth-child(odd) { border-right: 0; }
  .model-steps { grid-template-columns: 1fr; }
  .model-steps li, .model-steps li:nth-child(odd) { border-left: 0; }
  .model-steps li:last-child { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .cookie-banner { align-items: stretch; flex-direction: column; gap: 13px; bottom: 10px; }
  .cookie-actions { justify-content: flex-end; }
  .section-head { margin-bottom: 38px; }
  .service-explorer { margin-top: 16px; padding-top: 18px; gap: 14px; }
  .cube-stage { --cube-size: min(58vw, 218px); min-height: clamp(300px, 84vw, 365px); }
  .service-current { margin-top: 0; padding-inline: 10px; }
  .service-current-name { font-size: 1.25rem; }
  .cube-hint { font-size: 9px; }
  .service-panels { min-height: 445px; align-items: start; padding-top: 20px; border-top: 1px solid var(--line); }
  .service-panel h3 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .service-panel .specs { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .hero { position: relative; min-height: auto; }
}
