/* ==========================================================================
   Juniper Strategic Solutions — Design System
   Tokens -> Base -> Layout -> Components -> Sections -> Utilities -> Motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Palette — near-black, graphite/slate, paper, one accent (juniper),
     plus a muted metallic used only for hairlines and marks. */
  --ink-950: #06090b;
  --ink-900: #0a0e11;
  --ink-850: #0f1418;
  --ink-800: #141a20;
  --ink-750: #1a2229;
  --ink-700: #212b33;
  --slate-600: #2c3841;
  --slate-500: #3b4954;
  --slate-400: #566671;
  --graphite-300: #7d8c98;
  --graphite-200: #a4b1bb;
  --graphite-100: #c8d1d8;
  --paper-200: #dde3e8;
  --paper-100: #eaeef1;
  --paper-050: #f5f7f9;
  --white: #ffffff;

  --juniper-700: #1f5347;
  --juniper-600: #2b6b5b;
  --juniper-500: #38856f;
  --juniper-400: #4d9d86;
  --juniper-300: #7cbfab;
  --juniper-200: #a9d8c9;

  --metal: #9c8259;
  --metal-soft: #c2ab86;

  /* Semantic — light surface (default) */
  --bg: var(--white);
  --bg-alt: var(--paper-050);
  --bg-elev: var(--white);
  --bg-sunken: var(--paper-100);
  --fg: var(--ink-900);
  --fg-strong: var(--ink-950);
  --fg-muted: var(--slate-400);
  /* graphite-300 only reaches 3.5:1 on white, which fails AA for the small
     mono labels this token is used on. slate-400 clears 4.5:1. */
  --fg-subtle: var(--slate-400);
  --line: var(--paper-200);
  --line-strong: var(--graphite-100);
  --accent: var(--juniper-600);
  --accent-hover: var(--juniper-700);
  --accent-fg: var(--white);
  --accent-soft: rgba(43, 107, 91, 0.09);
  --focus: var(--juniper-500);
  --shadow-sm: 0 1px 2px rgba(10, 14, 17, 0.05);
  --shadow-md: 0 4px 16px -4px rgba(10, 14, 17, 0.1), 0 1px 3px rgba(10, 14, 17, 0.05);
  --shadow-lg: 0 18px 48px -18px rgba(10, 14, 17, 0.28);
  --pattern-opacity: 0.05;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.89rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.09rem);
  --step-1: clamp(1.18rem, 1.11rem + 0.33vw, 1.38rem);
  --step-2: clamp(1.42rem, 1.28rem + 0.62vw, 1.82rem);
  --step-3: clamp(1.72rem, 1.47rem + 1.1vw, 2.44rem);
  --step-4: clamp(2.05rem, 1.64rem + 1.8vw, 3.25rem);
  --step-5: clamp(2.4rem, 1.75rem + 2.9vw, 4.3rem);

  /* Space & shape */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  --radius-sm: 3px;
  --radius: 5px;
  --radius-lg: 8px;

  --container: 1200px;
  --container-narrow: 820px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;
  --dur-slow: 620ms;
}

/* Dark surface — applied by section, and globally in dark mode */
.surface-dark {
  --bg: var(--ink-900);
  --bg-alt: var(--ink-850);
  --bg-elev: var(--ink-800);
  --bg-sunken: var(--ink-950);
  --fg: var(--paper-100);
  --fg-strong: var(--white);
  --fg-muted: var(--graphite-200);
  --fg-subtle: var(--graphite-300);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: var(--juniper-300);
  --accent-hover: var(--juniper-200);
  --accent-fg: var(--ink-950);
  --accent-soft: rgba(124, 191, 171, 0.12);
  --focus: var(--juniper-300);
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px -18px rgba(0, 0, 0, 0.7);
  --pattern-opacity: 0.07;
  color: var(--fg);
  background-color: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink-900);
    --bg-alt: var(--ink-850);
    --bg-elev: var(--ink-800);
    --bg-sunken: var(--ink-950);
    --fg: var(--paper-100);
    --fg-strong: var(--white);
    --fg-muted: var(--graphite-200);
    --fg-subtle: var(--graphite-300);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: var(--juniper-300);
    --accent-hover: var(--juniper-200);
    --accent-fg: var(--ink-950);
    --accent-soft: rgba(124, 191, 171, 0.12);
    --focus: var(--juniper-300);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 48px -18px rgba(0, 0, 0, 0.7);
    --pattern-opacity: 0.07;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: var(--ink-900);
  --bg-alt: var(--ink-850);
  --bg-elev: var(--ink-800);
  --bg-sunken: var(--ink-950);
  --fg: var(--paper-100);
  --fg-strong: var(--white);
  --fg-muted: var(--graphite-200);
  --fg-subtle: var(--graphite-300);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --accent: var(--juniper-300);
  --accent-hover: var(--juniper-200);
  --accent-fg: var(--ink-950);
  --accent-soft: rgba(124, 191, 171, 0.12);
  --focus: var(--juniper-300);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px -18px rgba(0, 0, 0, 0.7);
  --pattern-opacity: 0.07;
  color-scheme: dark;
}

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

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 var(--sp-4);
  color: var(--fg-strong);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.012em; }
h4 { font-size: var(--step-0); letter-spacing: 0; }

p {
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 38%, transparent);
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease),
    text-decoration-color var(--dur) var(--ease);
}

a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

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

ul,
ol {
  margin: 0 0 var(--sp-4);
  padding-left: 1.15rem;
}

li + li {
  margin-top: var(--sp-2);
}

strong {
  font-weight: 640;
  color: var(--fg-strong);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--sp-7) 0;
}

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

::selection {
  background: var(--accent-soft);
  color: var(--fg-strong);
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--juniper-600);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: var(--sp-4);
  color: #fff;
}

.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
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

@media (min-width: 48rem) {
  .container {
    width: min(100% - 4rem, var(--container));
  }
}

.container--narrow {
  width: min(100% - 2.5rem, var(--container-narrow));
}

.section {
  padding-block: clamp(var(--sp-8), 7vw, var(--sp-10));
  position: relative;
}

.section--tight {
  padding-block: clamp(var(--sp-7), 5vw, var(--sp-9));
}

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

.section--dark {
  --bg: var(--ink-900);
  --bg-alt: var(--ink-850);
  --bg-elev: var(--ink-850);
  --bg-sunken: var(--ink-950);
  --fg: var(--paper-100);
  --fg-strong: var(--white);
  --fg-muted: var(--graphite-200);
  --fg-subtle: var(--graphite-300);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: var(--juniper-300);
  --accent-hover: var(--juniper-200);
  --accent-fg: var(--ink-950);
  --accent-soft: rgba(124, 191, 171, 0.13);
  --focus: var(--juniper-300);
  --pattern-opacity: 0.07;
  background-color: var(--bg);
  color: var(--fg);
}

.section + .section--dark,
.section--dark + .section {
  border-top: 0;
}

.grid {
  display: grid;
  gap: var(--sp-5);
}

@media (min-width: 40rem) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 62rem) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid { gap: var(--sp-6); }
}

.split {
  display: grid;
  gap: var(--sp-7);
  align-items: start;
}

@media (min-width: 62rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(var(--sp-7), 6vw, var(--sp-9));
  }
  .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--sticky > :first-child {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-6));
  }
}

/* --------------------------------------------------------------------------
   4. Type components
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.65;
  flex: none;
}

.section-head {
  max-width: 64ch;
  margin-bottom: clamp(var(--sp-6), 4vw, var(--sp-8));
}

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

.section-head--center .eyebrow::before {
  display: none;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--fg-muted);
  letter-spacing: -0.006em;
}

.muted {
  color: var(--fg-muted);
}

.small {
  font-size: var(--step--1);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-fg);
  --btn-line: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 0.78rem 1.5rem;
  border: 1px solid var(--btn-line);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover {
  --btn-bg: var(--accent-hover);
  --btn-line: var(--accent-hover);
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn__arrow {
  transition: transform var(--dur) var(--ease);
}

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

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg-strong);
  --btn-line: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--accent-soft);
  --btn-line: var(--accent);
  --btn-fg: var(--fg-strong);
}

.btn--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  --btn-line: transparent;
  padding-inline: 0;
}

.btn--quiet:hover {
  --btn-bg: transparent;
  --btn-line: transparent;
  box-shadow: none;
  transform: none;
  --btn-fg: var(--accent-hover);
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-4);
  align-items: center;
}

/* Inline "read more" link with rule */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

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

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

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.site-header[data-scrolled="true"] {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--fg-strong);
  flex: none;
  margin-right: auto;
}

.brand:hover {
  color: var(--fg-strong);
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  color: var(--accent);
  transition: transform var(--dur-slow) var(--ease-out);
}

.brand:hover .brand__mark {
  transform: rotate(-90deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.06;
}

.brand__name {
  font-size: 0.98rem;
  font-weight: 660;
  letter-spacing: -0.012em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-top: 2px;
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list li + li {
  margin-top: 0;
}

.nav__link {
  position: relative;
  display: block;
  padding: 0.55rem 0.72rem;
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  font-size: 0.895rem;
  font-weight: 520;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  bottom: 0.28rem;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav__link:hover {
  color: var(--fg-strong);
}

.nav__link:hover::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav__link[aria-current="page"] {
  color: var(--fg-strong);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.icon-btn:hover {
  color: var(--fg-strong);
  background: var(--bg-sunken);
  border-color: var(--line);
}

.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun,
.surface-dark .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon,
.surface-dark .theme-toggle__moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
  :root[data-theme="dark"] .theme-toggle__sun { display: block; }
}

.header-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
}

.nav-toggle__bars {
  position: relative;
  width: 18px;
  height: 12px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.6px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5.2px; }
.nav-toggle__bars span:nth-child(3) { top: 10.4px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5.2px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5.2px) rotate(-45deg);
}

/* Mobile drawer.
   The header sets backdrop-filter, which makes it the containing block for
   fixed-position descendants. A `position: fixed; inset: …` drawer would
   therefore resolve against the 76px header rather than the viewport and
   collapse. Position it against the header explicitly instead. */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  z-index: 99;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: var(--sp-5) 0 var(--sp-8);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease);
}

.mobile-nav[data-open="true"] {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav__list {
  list-style: none;
  margin: 0 0 var(--sp-6);
  padding: 0;
}

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

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-1);
  color: var(--fg);
  font-size: var(--step-1);
  font-weight: 560;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mobile-nav__link[aria-current="page"] {
  color: var(--accent);
}

.mobile-nav__link span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg-subtle);
  letter-spacing: 0.1em;
}

@media (min-width: 64rem) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

body[data-nav-open="true"] {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   7. Geometric motif
   -------------------------------------------------------------------------- */
.motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("../img/pattern-lattice.svg");
  background-size: 168px auto;
  opacity: var(--pattern-opacity);
  z-index: 0;
}

.motif--fade {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}

.motif--right {
  left: auto;
  width: min(58%, 620px);
  -webkit-mask-image: linear-gradient(to left, #000 5%, transparent 95%);
  mask-image: linear-gradient(to left, #000 5%, transparent 95%);
}

.rule-step {
  display: block;
  width: 96px;
  height: 10px;
  color: var(--accent);
  opacity: 0.9;
  margin-bottom: var(--sp-5);
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(var(--sp-8), 10vw, calc(var(--sp-10) + 2rem));
  background:
    radial-gradient(
      120% 90% at 78% 8%,
      rgba(56, 133, 111, 0.16) 0%,
      transparent 62%
    ),
    linear-gradient(180deg, var(--ink-950) 0%, var(--ink-900) 55%, var(--ink-850) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 62ch;
}

.hero h1 {
  margin-bottom: var(--sp-5);
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--graphite-200);
  max-width: 56ch;
  margin-bottom: var(--sp-6);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  list-style: none;
  margin: var(--sp-7) 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  padding-top: var(--sp-5);
}

.hero__tags li {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--graphite-300);
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 100px;
}

/* Page hero (interior pages) */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(var(--sp-7), 7vw, var(--sp-9));
  background:
    radial-gradient(100% 120% at 88% 0%, rgba(56, 133, 111, 0.14) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-950) 0%, var(--ink-850) 100%);
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 68ch;
}

.page-hero h1 {
  font-size: var(--step-4);
  margin-bottom: var(--sp-4);
}

.page-hero .lede {
  color: var(--graphite-200);
  margin-bottom: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 var(--sp-5);
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.breadcrumb li {
  margin: 0;
  color: var(--graphite-300);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--slate-400);
}

.breadcrumb a {
  color: var(--graphite-300);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--juniper-300);
}

/* --------------------------------------------------------------------------
   9. Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 1.35rem;
  width: 2px;
  height: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: height var(--dur-slow) var(--ease-out);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  height: 2rem;
}

.card__icon {
  width: 38px;
  height: 38px;
  margin-bottom: var(--sp-4);
  color: var(--accent);
  flex: none;
}

.card h3 {
  margin-bottom: var(--sp-2);
}

.card p {
  color: var(--fg-muted);
  font-size: 0.945rem;
  margin-bottom: 0;
}

.card p + .link-arrow,
.card ul + .link-arrow {
  margin-top: var(--sp-4);
}

.card__list {
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.card__list li {
  position: relative;
  padding-left: 1.05rem;
  margin-top: var(--sp-2);
}

.card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}

.card--link {
  text-decoration: none;
  color: inherit;
}

.card--link:hover {
  color: inherit;
}

.card--numbered .card__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: var(--sp-4);
  display: block;
}

.card--flush {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: var(--sp-5) 0 0;
}

.card--flush:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line-strong);
}

.card--flush::before {
  display: none;
}

/* Capability list rows */
.rows {
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  gap: var(--sp-2) var(--sp-6);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background-color var(--dur) var(--ease);
}

@media (min-width: 48rem) {
  .row {
    grid-template-columns: 4.5rem minmax(0, 15rem) minmax(0, 1fr);
  }
}

.row__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.row h3 {
  margin: 0;
  font-size: var(--step-1);
}

.row p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   10. Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  gap: var(--sp-5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: var(--sp-6);
}

@media (min-width: 48rem) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-7);
  }
  .stat + .stat {
    border-left: 1px solid var(--line);
    padding-left: var(--sp-7);
  }
}

.stat__value {
  display: block;
  font-size: var(--step-4);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg-strong);
  margin-bottom: var(--sp-3);
}

.stat__value--text {
  font-size: var(--step-2);
  line-height: 1.15;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* --------------------------------------------------------------------------
   11. Feature / value blocks
   -------------------------------------------------------------------------- */
.value-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 48rem) {
  .value-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6) var(--sp-7);
  }
}

.value {
  margin: 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.value h3 {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.value h3 svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: none;
}

.value p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-3);
}

.checklist li {
  position: relative;
  margin: 0;
  padding-left: 1.75rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.36em;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  background: var(--accent-soft);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 0.62em;
  width: 4px;
  height: 7px;
  border-right: 1.6px solid var(--accent);
  border-bottom: 1.6px solid var(--accent);
  transform: rotate(42deg);
}

.checklist strong {
  color: var(--fg-strong);
  display: block;
  font-weight: 600;
}

/* Pill grid (industries) */
.pill-grid {
  display: grid;
  gap: var(--sp-3);
  list-style: none;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pill-grid li {
  margin: 0;
}

.pill {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: 100%;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-size: 0.93rem;
  font-weight: 560;
  color: var(--fg-strong);
  transition: border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.pill svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: none;
}

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(90% 140% at 85% 0%, rgba(56, 133, 111, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-850) 0%, var(--ink-950) 100%);
}

.cta-band__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--sp-5);
  align-items: center;
}

@media (min-width: 62rem) {
  .cta-band__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--sp-8);
  }
}

.cta-band h2 {
  margin-bottom: var(--sp-3);
}

.cta-band p {
  margin: 0;
  color: var(--graphite-200);
  max-width: 56ch;
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */
.form {
  display: grid;
  gap: var(--sp-4);
}

.field {
  display: grid;
  gap: var(--sp-2);
}

.field--row {
  display: grid;
  gap: var(--sp-4);
}

@media (min-width: 40rem) {
  .field--row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.label {
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--fg-strong);
}

.label .req {
  color: var(--accent);
  margin-left: 2px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
  appearance: none;
}

.textarea {
  min-height: 9rem;
  resize: vertical;
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%237d8c98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px;
  padding-right: 2.4rem;
}

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

.input::placeholder,
.textarea::placeholder {
  color: var(--fg-subtle);
}

.field-help {
  font-size: 0.8rem;
  color: var(--fg-subtle);
  margin: 0;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.88rem;
  color: var(--fg-muted);
  cursor: pointer;
}

.checkbox input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.24rem;
  accent-color: var(--accent);
  flex: none;
}

.form-note {
  font-size: 0.82rem;
  color: var(--fg-subtle);
  margin: 0;
}

.form-status {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 0.9rem;
  color: var(--fg);
}

.form-status[hidden] {
  display: none;
}

.form-status--error {
  border-left-color: #b3452f;
  background: rgba(179, 69, 47, 0.08);
}

/* --------------------------------------------------------------------------
   14. Portal / login
   -------------------------------------------------------------------------- */
.portal {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: var(--sp-8);
  background:
    radial-gradient(80% 100% at 15% 0%, rgba(56, 133, 111, 0.16) 0%, transparent 58%),
    linear-gradient(180deg, var(--ink-950) 0%, var(--ink-850) 100%);
}

.portal__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 62rem) {
  .portal__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    gap: var(--sp-9);
  }
}

.portal__panel {
  padding: clamp(var(--sp-5), 4vw, var(--sp-6));
  background: var(--ink-850);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.portal__panel .label {
  color: var(--paper-100);
}

.portal__panel .input {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--paper-050);
}

.portal__panel .input::placeholder {
  color: var(--slate-400);
}

.portal__panel .checkbox {
  color: var(--graphite-200);
}

.portal__panel h2 {
  font-size: var(--step-2);
  margin-bottom: var(--sp-2);
}

.portal__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  align-items: center;
  font-size: 0.85rem;
}

.notice {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: 0.88rem;
  color: var(--fg-muted);
}

.notice svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent);
  margin-top: 2px;
}

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

/* --------------------------------------------------------------------------
   15. Prose (legal pages)
   -------------------------------------------------------------------------- */
.prose h2 {
  font-size: var(--step-2);
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

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

.prose h3 {
  margin-top: var(--sp-5);
}

.prose li {
  color: var(--fg-muted);
}

.prose dl {
  margin: 0 0 var(--sp-4);
}

.prose dt {
  font-weight: 620;
  color: var(--fg-strong);
  margin-top: var(--sp-4);
}

.prose dd {
  margin: var(--sp-1) 0 0;
  color: var(--fg-muted);
}

.toc {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}

.toc h2 {
  font-size: var(--step-0);
  margin: 0 0 var(--sp-3);
  border: 0;
  padding: 0;
  letter-spacing: 0.01em;
}

.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   16. Empty state
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: clamp(var(--sp-7), 8vw, var(--sp-9)) var(--sp-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--sp-4);
  color: var(--accent);
  opacity: 0.8;
}

.empty-state p {
  max-width: 48ch;
  margin-inline: auto;
  color: var(--fg-muted);
}

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink-950);
  color: var(--graphite-200);
  padding-block: var(--sp-8) var(--sp-5);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --line: rgba(255, 255, 255, 0.1);
  --accent: var(--juniper-300);
  --pattern-opacity: 0.05;
}

.site-footer__top {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--sp-6);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 48rem) {
  .site-footer__top {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: var(--sp-7);
  }
}

.site-footer h2,
.site-footer h3 {
  color: var(--white);
}

.footer-brand .brand {
  color: var(--white);
  margin-bottom: var(--sp-4);
}

.footer-brand .brand__sub {
  color: var(--graphite-300);
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--graphite-300);
  max-width: 38ch;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--graphite-300);
  margin-bottom: var(--sp-4);
}

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

.footer-col li {
  margin: 0 0 var(--sp-2);
}

.footer-col a {
  color: var(--graphite-200);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

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

.site-footer__bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-5);
  font-size: 0.8rem;
  color: var(--graphite-300);
}

.site-footer__bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__bottom li {
  margin: 0;
}

.site-footer__bottom a {
  color: var(--graphite-300);
  text-decoration: none;
}

.site-footer__bottom a:hover {
  color: var(--juniper-300);
}

.ownership-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.32rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite-200);
}

.ownership-mark svg {
  width: 12px;
  height: 12px;
  color: var(--juniper-300);
}

/* --------------------------------------------------------------------------
   18. Motion
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .brand:hover .brand__mark {
    transform: none;
  }
}

@media print {
  .site-header,
  .mobile-nav,
  .cta-band,
  .motif,
  .skip-link {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
}
