/* ==========================================================================
   Cennoryx - corporate site stylesheet
   Tokens -> base -> layout -> components -> sections -> utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand - deep navy is the primary corporate color */
  --navy-900: #04122b;
  --navy-800: #071c3f;
  --navy-700: #0b2a5b;
  --navy-600: #123a78;

  /* Royal blue - growth and movement */
  --blue-600: #1546c4;
  --blue-500: #1d5ce0;
  --blue-400: #4b83ef;
  --blue-100: #dde8fd;

  /* Restrained teal accent */
  --teal-600: #0b8b7d;
  --teal-500: #10a396;

  /* Neutrals */
  --ink-900: #0a1524;
  --ink-700: #26364d;
  --ink-500: #4d5f78;
  --ink-400: #5d6e87;
  --line: #e3eaf3;
  --line-strong: #cfdaea;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --surface-3: #eef3f9;

  /* Semantic */
  --bg: var(--surface);
  --text: var(--ink-900);
  --text-muted: var(--ink-500);

  /* Typography - system stack: no third-party font requests, no layout shift */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;

  --step--1: clamp(0.813rem, 0.79rem + 0.11vw, 0.875rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  --step-1:  clamp(1.125rem, 1.07rem + 0.27vw, 1.3rem);
  --step-2:  clamp(1.35rem, 1.24rem + 0.55vw, 1.7rem);
  --step-3:  clamp(1.65rem, 1.42rem + 1.15vw, 2.4rem);
  --step-4:  clamp(2.05rem, 1.6rem + 2.25vw, 3.4rem);
  --step-5:  clamp(2.4rem, 1.6rem + 4vw, 4.4rem);

  /* Space and layout */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  /* Form */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(4, 18, 43, 0.06),
               0 2px 8px rgba(4, 18, 43, 0.04);
  --shadow-md: 0 2px 4px rgba(4, 18, 43, 0.05),
               0 12px 32px -8px rgba(4, 18, 43, 0.12);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 260ms;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

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

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

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--navy-900);
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--navy-700); }

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

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

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

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

::selection { background: var(--blue-100); color: var(--navy-900); }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--alt { background: var(--surface-2); }
.section--line { border-top: 1px solid var(--line); }

.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--text-muted); font-size: var(--step-1); margin-top: 1.1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 1.25rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: linear-gradient(90deg, var(--teal-500), var(--blue-500));
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.75rem 1.15rem;
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --------------------------------------------------------------------------
   4. Brand lockup - CENNORYX over a smaller "Global"
   -------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand__mark { width: 2.35rem; height: 2.35rem; flex: none; }

/* "Global" sits smaller and right-aligned beneath the wordmark, as in the logo */
.brand__text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }

.brand__name {
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  color: var(--navy-900);
}

.brand__sub {
  margin-top: 0.3em;
  font-size: 0.615rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.brand--inverse .brand__name { color: #fff; }
.brand--inverse .brand__sub { color: var(--blue-400); }

/* --------------------------------------------------------------------------
   5. Header and navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.site-header[data-scrolled="true"] {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 16px rgba(4, 18, 43, 0.05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.25rem); }

.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
  padding-block: 0.4rem;
  position: relative;
  transition: color 180ms var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.05rem;
  width: 100%;
  height: 1.5px;
  background: var(--blue-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}

.nav__link:hover { color: var(--navy-900); }
.nav__link:hover::after { transform: scaleX(1); }

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

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--navy-900);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: currentColor;
  transition: transform 200ms var(--ease), opacity 120ms var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; }
.nav-toggle__bars::before { transform: translateY(-0.35rem); }
.nav-toggle__bars::after { transform: translateY(0.35rem); }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; position: relative; }

  .nav {
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav[hidden] { display: none; }

  .nav__link {
    padding-block: 0.95rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }

  .header-actions > .btn { display: none; }
}

/* --------------------------------------------------------------------------
   6. Buttons and inline links
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--navy-800);
  --btn-fg: #fff;
  --btn-border: var(--navy-800);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.82em 1.5em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  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(--navy-900);
  --btn-border: var(--navy-900);
  color: #fff;
  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(--navy-800);
  --btn-border: var(--line-strong);
}
.btn--ghost:hover {
  --btn-bg: var(--surface-2);
  --btn-border: var(--navy-800);
  color: var(--navy-900);
  box-shadow: none;
}

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--navy-900);
  --btn-border: #fff;
}
.btn--light:hover {
  --btn-bg: var(--blue-100);
  --btn-border: var(--blue-100);
  color: var(--navy-900);
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-border: rgba(255, 255, 255, 0.32);
}
.btn--outline-light:hover {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-border: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 600;
  text-decoration: none;
  color: var(--blue-600);
}
.link-arrow svg { transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(4rem, 9vw, 8rem) clamp(4rem, 8vw, 7rem);
  background:
    radial-gradient(ellipse 90% 60% at 82% 0%, rgba(29, 92, 224, 0.07), transparent 62%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 78%);
  overflow: hidden;
}

.hero__inner { position: relative; z-index: 1; max-width: 60rem; }

.hero h1 { max-width: 19ch; }

.hero__lede {
  max-width: 54ch;
  margin-top: clamp(1.5rem, 2.6vw, 2rem);
  font-size: var(--step-1);
  color: var(--ink-700);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(2rem, 3.4vw, 2.75rem);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.25rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-400);
}

.hero__meta li { display: inline-flex; align-items: center; gap: 0.5em; }
.hero__meta li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal-500);
}

/* --------------------------------------------------------------------------
   8. Mission band
   -------------------------------------------------------------------------- */

.mission {
  background: var(--navy-900);
  color: #fff;
  background-image:
    radial-gradient(ellipse 70% 90% at 88% 0%, rgba(29, 92, 224, 0.3), transparent 60%),
    radial-gradient(ellipse 60% 80% at 4% 100%, rgba(16, 163, 150, 0.16), transparent 62%);
}

.mission__inner { max-width: 56rem; }

/* On navy grounds the eyebrow needs the lighter blue to clear AA contrast */
.mission .eyebrow,
.contact .eyebrow { color: var(--blue-400); }
.mission blockquote {
  margin: 0;
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -0.018em;
  color: #fff;
  text-wrap: balance;
}
.mission cite {
  display: block;
  margin-top: 1.75rem;
  font-size: var(--step--1);
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   9. Split content (About) - heading in the left column, body in the right
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  align-items: start;
}

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

  /* Optical alignment: pull the body text up level with the heading, past the
     cap height rather than the line box. */
  .split > .prose { margin-top: 0.35rem; }
}

/* Only spaced when it directly follows a heading in the same column, as in the
   partnerships section. In .split the prose is its own column and needs none. */
h2 + .prose { margin-top: clamp(1.5rem, 2.4vw, 1.75rem); }
.prose p { color: var(--ink-700); }

/* --------------------------------------------------------------------------
   10. Capability cards
   -------------------------------------------------------------------------- */

/* Explicit steps rather than auto-fit: four cards must never orphan as 3 + 1 */
.cards {
  display: grid;
  gap: clamp(1rem, 1.6vw, 1.5rem);
  grid-template-columns: minmax(0, 1fr);
}

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

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 2.4vw, 2.15rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-500), var(--teal-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 420ms var(--ease);
}

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

.card__icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(140deg, var(--surface-3), var(--blue-100));
  color: var(--navy-700);
}
.card__icon svg { width: 1.4rem; height: 1.4rem; }

.card h3 { font-size: var(--step-1); margin-bottom: 0.65rem; }
.card p { color: var(--text-muted); font-size: 0.975rem; }

/* --------------------------------------------------------------------------
   11. Principles
   -------------------------------------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  border-top: 1px solid var(--line);
}

.principle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: clamp(1.75rem, 2.8vw, 2.4rem) clamp(0rem, 2vw, 2rem)
           clamp(1.75rem, 2.8vw, 2.4rem) 0;
  border-bottom: 1px solid var(--line);
}

.principle__num {
  font-size: var(--step--1);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--blue-500);
  padding-top: 0.28em;
}

.principle h3 { font-size: var(--step-1); margin-bottom: 0.45rem; }
.principle p { color: var(--text-muted); font-size: 0.975rem; }

/* --------------------------------------------------------------------------
   12. Growth stages
   -------------------------------------------------------------------------- */

.stages {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.stage { position: relative; padding-top: 2.25rem; }

.stage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-strong);
}

.stage::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 4px var(--surface-2);
}

.stage__label {
  display: block;
  margin-bottom: 0.7rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.stage h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.stage p { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   13. Partnerships
   -------------------------------------------------------------------------- */

.partner-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

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

.partner-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.partner-list li:first-child { border-top: 1px solid var(--line); }

.partner-list svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  margin-top: 0.3rem;
  color: var(--teal-600);
}

.partner-list strong { display: block; color: var(--navy-900); font-weight: 600; }
.partner-list span { color: var(--text-muted); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   14. Contact
   -------------------------------------------------------------------------- */

.contact {
  background: var(--navy-900);
  color: #fff;
  background-image:
    radial-gradient(ellipse 60% 100% at 12% 0%, rgba(29, 92, 224, 0.26), transparent 58%),
    radial-gradient(ellipse 55% 90% at 92% 92%, rgba(16, 163, 150, 0.14), transparent 60%);
}

.contact h2 { color: #fff; max-width: 20ch; }
.contact__lede {
  max-width: 48ch;
  margin-top: 1.35rem;
  font-size: var(--step-1);
  color: rgba(255, 255, 255, 0.72);
}

.contact__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: end;
}

@media (min-width: 900px) {
  .contact__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}

.contact__cta { margin-top: clamp(1.75rem, 3vw, 2.25rem); }

.contact__details { display: grid; gap: 1.6rem; margin: 0; }

.contact__details div { display: grid; gap: 0.3rem; }
.contact__details dt {
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.contact__details dd { margin: 0; font-size: var(--step-1); color: #fff; }
.contact__address { font-style: normal; line-height: 1.45; }
.contact__details a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.4); }
.contact__details a:hover { color: var(--blue-400); }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--navy-800);
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.94rem;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.footer-top {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-brand p {
  max-width: 34ch;
  margin-top: 1.35rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.94rem;
}

.footer-col h2 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.15rem;
}

.footer-col ul { display: grid; gap: 0.7rem; }

.footer-col a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 180ms var(--ease);
}
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.2em; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-legal a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   16. Interior pages (legal, 404)
   -------------------------------------------------------------------------- */

.page-hero {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 4vw, 3.5rem);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 { font-size: var(--step-4); max-width: 22ch; }
.page-hero__meta { margin-top: 1.25rem; color: var(--ink-400); font-size: var(--step--1); }

.legal { max-width: var(--container-narrow); }
.legal h2 {
  font-size: var(--step-2);
  margin-top: clamp(2.75rem, 5vw, 3.75rem);
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 6rem;
}
.legal h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { font-size: var(--step-1); margin-top: 2rem; margin-bottom: 0.6rem; }
.legal p, .legal li { color: var(--ink-700); }
.legal ul { margin: 0 0 1.15em; padding-left: 1.35rem; }
.legal li { list-style: disc; margin-bottom: 0.5rem; padding-left: 0.35rem; }
.legal li::marker { color: var(--blue-400); }

.legal-note {
  margin-top: 3rem;
  padding: 1.35rem 1.5rem;
  background: var(--surface-2);
  border-left: 3px solid var(--blue-400);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.95rem;
  color: var(--ink-500);
}

.toc {
  margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
  padding: 1.5rem 1.75rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc h2 {
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}
.toc ol { display: grid; gap: 0.55rem; counter-reset: toc; }
.toc li { counter-increment: toc; list-style: none; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  margin-right: 0.75rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--ink-400);
}
.toc a { text-decoration: none; font-weight: 500; }
.toc a:hover { text-decoration: underline; }

.error-page {
  display: grid;
  place-items: center;
  min-height: 60vh;
  text-align: center;
  padding-block: var(--section-y);
}
.error-page__code {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 1.25rem;
}
.error-page p {
  max-width: 46ch;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: var(--step-1);
}
.error-page .btn { margin-top: 2rem; }

/* --------------------------------------------------------------------------
   17. Motion - gentle reveal only, off when reduced motion is preferred
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms var(--ease), transform 620ms var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* Stagger is set here rather than with inline style attributes, which the
   site content security policy (style-src 'self') would block. */
.split > [data-reveal]:nth-child(2),
.partner-grid > [data-reveal]:nth-child(2),
.contact__grid > [data-reveal]:nth-child(2) { --reveal-delay: 120ms; }

.cards > [data-reveal]:nth-child(2) { --reveal-delay: 90ms; }
.cards > [data-reveal]:nth-child(3) { --reveal-delay: 180ms; }
.cards > [data-reveal]:nth-child(4) { --reveal-delay: 270ms; }

.principles > [data-reveal]:nth-child(2) { --reveal-delay: 70ms; }
.principles > [data-reveal]:nth-child(3) { --reveal-delay: 140ms; }
.principles > [data-reveal]:nth-child(4) { --reveal-delay: 210ms; }
.principles > [data-reveal]:nth-child(5) { --reveal-delay: 280ms; }
.principles > [data-reveal]:nth-child(6) { --reveal-delay: 350ms; }

.stages > [data-reveal]:nth-child(2) { --reveal-delay: 110ms; }
.stages > [data-reveal]:nth-child(3) { --reveal-delay: 220ms; }

@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;
  }
}

/* --------------------------------------------------------------------------
   18. Utilities
   -------------------------------------------------------------------------- */

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

.measure { max-width: 62ch; }
.text-muted { color: var(--text-muted); }

@media print {
  .site-header, .site-footer, .nav-toggle { display: none !important; }
  .hero::after { display: none !important; }
  body { color: #000; background: #fff; }
}
