/* ==========================================================================
   DELT4.ai - base + components
   Plain CSS. No framework, no build step. Layout via Grid and Flexbox.
   Sections are named for the design's blocks so the Stitch design maps 1:1.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img, svg { max-width: 100%; display: block; }
a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

/* --- layout -------------------------------------------------------------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); }
.section--flush { border-top: 0; }

.skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto;
  clip-path: none; background: var(--surface-2); color: var(--ink);
  padding: 12px 16px; border: 1px solid var(--line-strong); z-index: 100;
}

/* --- typography ---------------------------------------------------------- */
h1, h2, h3, h4 { margin: 0 0 var(--sp-4); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: var(--fs-hero); letter-spacing: -0.03em; line-height: 1.04; max-width: 24ch;
     text-wrap: balance; }
h2 { font-size: var(--fs-h2); max-width: 26ch; text-wrap: balance; }
h3 { font-size: var(--fs-h3); line-height: 1.3; margin-bottom: var(--sp-2); }
p  { margin: 0 0 var(--sp-4); color: var(--ink-2); max-width: 66ch; text-wrap: pretty; }
p:last-child, ul:last-child { margin-bottom: 0; }

.lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 58ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--mono); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-soft); margin: 0 0 var(--sp-5);
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; background: var(--accent);
  display: inline-block; flex: none;
}

.label {
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--sp-3);
}
.mono { font-family: var(--mono); font-size: var(--fs-mono); }
.muted { color: var(--ink-3); }
.text-col { max-width: 66ch; }
.strong-line { color: var(--ink); font-weight: 600; }

/* --- navigation ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--sp-6);
  min-height: var(--nav-h);
}
.brand {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 700; letter-spacing: -0.01em; font-size: 1.125rem;
  color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .dot4 { color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--sp-5); }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink-2); font-size: 0.9375rem; text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--accent); }
.nav__cta { margin-left: var(--sp-2); }

.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle__bars { position: relative; width: 18px; height: 2px; background: currentColor; display: block; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

@media (max-width: 900px) {
  .nav {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--sp-4) var(--gutter) var(--sp-6);
    transform: translateY(-120%); transition: transform 220ms ease;
    margin-left: 0;
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { min-height: 52px; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .nav__cta { margin: var(--sp-4) 0 0; }
  .nav-toggle { display: inline-flex; }
}

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 var(--sp-5);
  font: inherit; font-weight: 600; font-size: 0.9375rem; letter-spacing: 0.01em;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--accent-fill); color: #fff; }
.btn--primary:hover {
  background: var(--accent-fill-h); text-decoration: none;
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(255,255,255,0.28); }
.btn--ghost:hover { border-color: var(--ink-2); background: rgba(255,255,255,0.04); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 44px; color: var(--accent-soft); font-weight: 500;
}
.link-arrow::after { content: "→"; transition: transform 180ms ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* --- cards --------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-6);
}
.card:hover { border-color: var(--line-strong); }
.card p { max-width: 46ch; }

/* hairline-separated list - used for restrained blocks (no card chrome) */
.rules { display: grid; gap: 0; }
.rules > * { padding-block: var(--sp-5); border-top: 1px solid var(--line); }
.rules > *:first-child { border-top: 0; padding-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.chips span {
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-2);
}

/* --- hero ---------------------------------------------------------------- */
.hero { padding-block: clamp(4rem, 8vw, 7.5rem) var(--section-y); }
.hero__copy { max-width: 46rem; }
.hero__copy p { max-width: 60ch; }

/* --- product lockup (ZUNOX / CAPACITY INTELLIGENCE) ---------------------- */
.lockup { display: inline-block; }
.lockup__name {
  display: block; font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1; color: var(--ink);
}
.lockup__cat {
  display: block; margin-top: var(--sp-3);
  font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent-soft);
}
/* when a lockup follows an eyebrow, the eyebrow takes its own line: both elements were
   inline-level, so FLAGSHIP PLATFORM and the ZUNOX lockup rendered side by side and read
   as one phrase. The lockup is now block-level so the eyebrow sits above it. */
.eyebrow + .lockup { margin-top: var(--sp-5); display: block; }
.lockup--xl .lockup__name { font-size: clamp(2.25rem, 4.6vw, 4.25rem); }

/* --- diagram ------------------------------------------------------------- */
.diagram {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.5rem);
}
.diagram__head {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  justify-content: space-between; align-items: baseline;
  padding-bottom: var(--sp-4); border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-6);
}

/* The column-label strip only makes sense when the columns sit side by side; on mobile the
   content stacks and each column carries its own label instead. Placed after .diagram__head
   so it wins the cascade. */
@media (max-width: 1023px) { .diagram__head--cols { display: none; } }
.diagram__grid {
  display: grid; gap: var(--sp-5);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: stretch;
}
@media (max-width: 1023px) { .diagram__grid { grid-template-columns: 1fr; } }

.node {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: var(--sp-4);
  display: flex; flex-direction: column; justify-content: center;
  min-height: 92px;
}
.node__tag {
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-soft); display: block; margin-bottom: var(--sp-2);
}
.node__name { color: var(--ink); font-weight: 600; font-size: 0.9375rem; display: block; }
.node__desc { color: var(--ink-3); font-size: 0.875rem; margin: var(--sp-2) 0 0; }
.node--core {
  border-color: var(--accent-line); background: var(--surface-2);
  box-shadow: 0 0 0 6px var(--accent-dim);
  text-align: center; padding: var(--sp-6) var(--sp-5);
  display: flex; flex-direction: column; justify-content: center; gap: var(--sp-3);
}
.node--core .lockup__cat { margin-top: var(--sp-3); }

/* connector rail between columns (visible only when columns are side by side) */
.diagram__flow { position: relative; display: flex; flex-direction: column; }
.diagram__flow .rules { flex: 1; display: grid; grid-auto-rows: 1fr; }

/* Each card carries its own connector into the core panel, so the flow reads per item
   rather than as one line at the column's vertical centre. Desktop only. */
@media (min-width: 1024px) {
  .diagram__flow .node { position: relative; }
  .diagram__flow--in .node::after,
  .diagram__flow--out .node::before {
    content: ""; position: absolute; top: 50%; height: 1px; width: 30px;
    background: var(--accent); opacity: 0.75;
  }
  .diagram__flow--in .node::after  { right: -29px; }
  .diagram__flow--out .node::before { left: -29px; }
  .diagram__flow--in .node > .node__arrow,
  .diagram__flow--out .node > .node__arrow {
    position: absolute; top: 50%; width: 8px; height: 8px;
    border-top: 2px solid var(--accent); border-right: 2px solid var(--accent);
  }
  .diagram__flow--in .node > .node__arrow  { right: -29px; transform: translateY(-50%) rotate(45deg); }
  .diagram__flow--out .node > .node__arrow { left: -13px;  transform: translateY(-50%) rotate(45deg); }
}

/* --- sequence (ACTIVITY → WORK → CAPACITY → COST → OPPORTUNITY) ---------- */
.sequence {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-2);
}
.sequence li { display: flex; align-items: center; gap: var(--sp-3); }
.sequence li::after { content: "→"; color: var(--accent); }
.sequence li:last-child::after { content: ""; }

/* --- questions grid ------------------------------------------------------ */
.questions { columns: 2; column-gap: var(--sp-7); list-style: none; padding: 0; margin: 0; }
.questions li {
  break-inside: avoid; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-size: 0.9375rem;
}
@media (max-width: 760px) { .questions { columns: 1; } }

/* --- assurance statement ------------------------------------------------- */
.statement {
  border-left: 2px solid var(--accent); padding: var(--sp-5) 0 var(--sp-5) var(--sp-6);
  font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.25; color: var(--ink);
  letter-spacing: -0.01em; max-width: 34ch; font-weight: 600;
}

/* --- forms --------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-5); max-width: 40rem; }
.field { display: grid; gap: var(--sp-2); }
.field label { font-size: 0.9375rem; color: var(--ink); font-weight: 500; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.75rem 0.875rem; min-height: 44px; width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field textarea { min-height: 8rem; resize: vertical; }

/* --- reveal animation ---------------------------------------------------- */
/* Progressive enhancement: the hidden state applies ONLY when JS is running, so a JS
   failure can never leave the page blank. Kept short (300ms) and triggered as soon as
   ~10% of a section is in view, so a fast reader never meets empty space. Anything on
   screen at load is marked .is-instant and appears with no fade at all. */
html.js .reveal { opacity: 0; transform: translateY(12px);
                  transition: opacity 300ms ease, transform 300ms ease; }
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal.is-instant { transition: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}


/* an ABN must never break mid-number on a narrow screen */
.abn { white-space: nowrap; }

/* --- footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--sp-7); margin-top: var(--sp-9); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: var(--sp-6); justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }
.site-footer p { color: var(--ink-3); font-size: 0.875rem; }
.footer-zunox { color: var(--ink-3); font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; }

/* --- evidence-layer stage list (inside the core panel) ------------------- */
.pipeline { list-style: none; display: grid; gap: 0; margin: var(--sp-5) 0 0; padding: 0;
            text-align: left; border-top: 1px solid var(--line); }
.pipeline li { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em;
               text-transform: uppercase; color: var(--ink-2);
               padding: 7px 0 7px 16px; position: relative; }
.pipeline li + li { border-top: 1px solid var(--line); }
.pipeline li::before { content: ""; position: absolute; left: 2px; top: 50%;
                       width: 5px; height: 5px; background: var(--accent);
                       transform: translateY(-50%) rotate(45deg); }


/* --- long-form legal pages (reuses existing type tokens, no new palette) -- */
.legal h2 {
  font-size: 1.0625rem; letter-spacing: 0; margin-top: var(--sp-7); margin-bottom: var(--sp-3);
  color: var(--ink);
}
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--ink-2); margin-bottom: var(--sp-4); }
.legal p:last-child { margin-bottom: 0; }

/* --- logo strip (reuses the chips rhythm, no new visual language) ---------- */
/* Logo plate. A bare row of logos with a ragged right edge reads like a template logo bar.
   The site's own language is hairline technical grids and mono labels, so the logos sit in a
   bordered plate with ruled cells: the eyebrow is the plate header, and 15 logos divide exactly
   into 5 columns x 3 rows with no short row. Every logo is scaled to fit its cell. */
.logowall {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.logowall__label {
  margin: 0; padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.logowall__grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
}
.logowall__grid li {
  display: flex; align-items: center; justify-content: center;
  min-height: 108px; padding: var(--sp-5) var(--sp-5);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.logowall__grid li:nth-child(5n + 1) { border-left: 0; }
.logowall__grid li:nth-child(-n + 5) { border-top: 0; }
.logowall__grid img {
  display: block; width: 100%; height: auto;
  opacity: 0.9; transition: opacity 200ms ease;
}
.logowall__grid img:hover { opacity: 1; }

@media (max-width: 900px) {
  .logowall__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logowall__grid li { min-height: 92px; }
  .logowall__grid li:nth-child(5n + 1) { border-left: 1px solid var(--line); }
  .logowall__grid li:nth-child(-n + 5) { border-top: 1px solid var(--line); }
  .logowall__grid li:nth-child(3n + 1) { border-left: 0; }
  .logowall__grid li:nth-child(-n + 3) { border-top: 0; }
  .logowall__grid img { width: 100%; }
}
@media (max-width: 560px) {
  .logowall__grid li { min-height: 78px; padding: var(--sp-4) var(--sp-3); }
  .logowall__grid img { width: 100%; }
}

/* --- engagement steps (same numbered-step language as the core pipeline) --- */
.engage { display: grid; gap: 0; margin-top: var(--sp-6); border-top: 1px solid var(--line); }
.engage__row {
  display: grid; grid-template-columns: minmax(11rem, 15rem) 1fr auto;
  gap: var(--sp-3) var(--sp-6); align-items: baseline;
  padding-block: var(--sp-5); border-bottom: 1px solid var(--line);
}
.engage__step {
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink); position: relative; padding-left: 16px;
}
.engage__step::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: 5px; height: 5px;
  background: var(--accent); transform: translateY(-50%) rotate(45deg);
}
.engage__what { color: var(--ink-2); max-width: 60ch; }
.engage__when {
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}

.engage__total { color: var(--ink-3); font-size: 0.875rem; margin-top: var(--sp-5); }

@media (max-width: 780px) {
  .engage__row { grid-template-columns: 1fr; gap: var(--sp-2); }
  .engage__when { justify-self: start; }
}

/* --- readout panel -------------------------------------------------------- */
.readout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
/* 11 pages stacked would push everything below this section ~22,000px down the page, so the
   document scrolls inside the panel instead. tabindex makes it keyboard-scrollable. */
.readout__pages {
  display: grid; gap: var(--sp-5);
  max-height: min(85vh, 60rem); overflow-y: auto; overscroll-behavior: contain;
  padding-right: var(--sp-3); scrollbar-width: thin;
}
.readout__pages:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.readout__pages img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: calc(var(--radius) - 4px); background: #fff;
}
.readout__note { color: var(--ink-3); font-size: 0.875rem; margin-top: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: center; }

/* links sitting in prose blocks still need an adequate touch target on mobile */
.rules a, .text-col a { display: inline-flex; align-items: center; min-height: 44px; }
