/* ==========================================================================
   The AI Implementation Brief · Issue 01
   Orchestrator dark brand world: near-black field, warm white type,
   gold reserved for the masthead, section titles, single emphases
   and the primary call to action.
   ========================================================================== */

:root {
  --bg: #070707;
  --bg-alt: #0c0c0b;
  --panel: #111110;
  --panel-key: #15140f;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);
  --text: #f3f0ea;     /* headings and emphasis */
  --body: #c9c5bd;     /* running text */
  --muted: #8f8b84;    /* labels, secondary */
  --gold: #d4af37;
  --gold-hi: #e2c35a;

  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body-font: "Open Sans", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 1rem/1.7 var(--body-font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
p, li { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
p + p { margin-top: 0.9em; }

.thin { font-weight: 300; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; background: var(--gold); color: #000;
  font: 600 0.85rem/1 var(--display); text-decoration: none;
}
.skip-link:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.topbar { border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.topbar__logo { display: inline-flex; align-items: center; min-height: 44px; }
.topbar__logo img { height: 18px; width: auto; }

/* --------------------------------------------------------------------------
   Hero: masthead, headline, lede, contents
   -------------------------------------------------------------------------- */
.hero { padding-block: clamp(36px, 5vw, 64px) clamp(44px, 5.5vw, 72px); }

.mast { border-top: 1px solid var(--line-2); padding-top: 18px; }
.mast__title {
  font: 600 clamp(0.95rem, 1.7vw, 1.2rem)/1.3 var(--display);
  letter-spacing: 0.26em;
  color: var(--gold);
}
.mast__meta {
  display: flex; flex-wrap: wrap; gap: 6px 0;
  margin-top: 10px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font: 600 0.66rem/1.4 var(--display); letter-spacing: 0.2em; color: var(--muted);
}
.mast__meta li + li::before { content: "·"; padding-inline: 12px; color: var(--line-2); }
@media (max-width: 560px) {
  .mast__meta { column-gap: 18px; }
  .mast__meta li + li::before { content: none; }
}

.hero__title {
  margin-top: clamp(28px, 4vw, 44px);
  font: 600 clamp(2.5rem, 6.4vw, 5.4rem)/1 var(--display);
  letter-spacing: -0.035em;
  color: #fff;
  max-width: 18ch;
}
.hero__title .thin { display: block; color: var(--text); }

.lede {
  display: grid; gap: 24px;
  margin-top: clamp(28px, 3.5vw, 40px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) {
  .lede { grid-template-columns: 1fr 1fr; gap: 48px; }
}
.lede__pair { font: 300 clamp(1.4rem, 2.6vw, 2rem)/1.3 var(--display); color: var(--text); }
.lede__pair em { font-style: normal; font-weight: 500; color: var(--gold); }
.lede__body { font-size: 1.05rem; max-width: 34em; }
.lede__strong { font: 600 1.1rem/1.4 var(--display); color: var(--text); }

.contents { margin-top: clamp(28px, 3.5vw, 40px); }
.contents__label { font: 600 0.66rem/1.3 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.contents ol { display: grid; grid-template-columns: 1fr; }
@media (min-width: 560px) { .contents ol { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
@media (min-width: 900px) { .contents ol { grid-template-columns: repeat(4, 1fr); } }
.contents a {
  display: flex; align-items: baseline; gap: 12px;
  min-height: 48px; padding-block: 12px;
  border-top: 1px solid var(--line);
  font: 500 0.9rem/1.3 var(--display); color: var(--text);
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s;
}
.contents a span { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); }
.contents a:hover { color: #fff; border-color: var(--line-2); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.sec { padding-block: clamp(44px, 5vw, 64px); border-top: 1px solid var(--line); }
.sec--alt { background: var(--bg-alt); }
.sec__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: clamp(24px, 3vw, 32px); }
.sec__head::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }
.sec__n { font: 300 clamp(2rem, 3.4vw, 2.8rem)/1 var(--display); letter-spacing: -0.03em; color: var(--text); }
.sec__title { font: 600 0.78rem/1.3 var(--display); letter-spacing: 0.24em; color: var(--gold); }

/* 01 Framework */
.stages { display: grid; gap: 22px; }
.stage {
  position: relative;
  padding: 18px 20px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.stage + .stage::before { /* connector into this stage */
  content: ""; position: absolute; left: 28px; top: -18px;
  width: 9px; height: 9px;
  border: solid var(--muted); border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.stage__n { display: block; font: 300 2rem/1 var(--display); color: var(--muted); }
.stage__t { margin-top: 12px; font: 700 0.8rem/1.2 var(--display); letter-spacing: 0.18em; color: var(--text); }
.stage__d { margin-top: 6px; font-size: 0.98rem; line-height: 1.55; }
.stage--key { background: var(--panel-key); border-top: 2px solid var(--gold); }
.stage--key .stage__n { color: var(--text); }
.where { display: none; }
@media (min-width: 760px) {
  .stages { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .stage + .stage { border-left: 0; }
  .stage + .stage::before { left: -6px; top: 50%; margin-top: -5px; border-width: 1px 1px 0 0; background: var(--panel); }
  .stage--key + .stage::before, .stage + .stage--key::before { background: var(--panel-key); }
  .where {
    display: grid; grid-template-columns: repeat(3, 1fr);
    margin-top: 14px;
    font: 600 0.62rem/1.3 var(--display); letter-spacing: 0.18em; text-transform: uppercase;
  }
  .where span { padding: 8px 6px 0; border: 1px solid var(--line-2); border-bottom: 0; text-align: center; color: var(--muted); }
  .where__most { grid-column: 1 / 3; margin-right: 12px; }
  .where__gain { grid-column: 3; color: var(--text) !important; }
}
.note { margin-top: 24px; max-width: 40em; padding-left: 20px; border-left: 1px solid var(--line-2); font-size: 1.05rem; }
.note__strong { font: 500 1.1rem/1.5 var(--display); color: var(--text); }

/* 02 Instead of / Build */
.swap__head { display: none; }
.swap__row { display: grid; gap: 8px; padding-block: 18px; border-top: 1px solid var(--line); }
.swap__row:last-child { border-bottom: 1px solid var(--line); }
.swap__row p { margin: 0; }
.swap__k { display: block; margin-bottom: 4px; font: 600 0.62rem/1.3 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.swap__to .swap__k { color: var(--text); }
.swap__from { font-size: 1rem; line-height: 1.6; color: var(--muted); }
.swap__to { font: 500 clamp(1.02rem, 1.6vw, 1.15rem)/1.5 var(--display); color: var(--text); }
.swap__arrow { width: 1px; height: 16px; margin-left: 4px; background: var(--line-2); position: relative; }
.swap__arrow::after {
  content: ""; position: absolute; left: -4px; bottom: 0;
  width: 8px; height: 8px; border: solid var(--line-2); border-width: 0 1px 1px 0; transform: rotate(45deg);
}
@media (min-width: 760px) {
  .swap__head {
    display: grid; grid-template-columns: 1fr 72px 1.3fr;
    padding-bottom: 10px;
    font: 600 0.64rem/1.3 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  }
  .swap__head span:last-child { grid-column: 3; color: var(--text); }
  .swap__row { grid-template-columns: 1fr 72px 1.3fr; align-items: start; gap: 0; padding-block: 20px; }
  .swap__k { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .swap__arrow { align-self: center; width: auto; height: 1px; margin: 0 18px; }
  .swap__arrow::after { left: auto; right: 0; bottom: auto; top: -4px; border-width: 1px 1px 0 0; }
}

/* Feature statement */
.statement { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
.statement__k { font: 600 0.72rem/1.3 var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.statement__q {
  margin-top: 14px; max-width: 22ch;
  font: 600 clamp(2rem, 4.8vw, 4rem)/1.06 var(--display);
  letter-spacing: -0.03em; color: #fff;
  text-wrap: balance;
}
.statement__q em { font-style: normal; color: var(--gold); }

/* 03 System map: one frame, products as segments of a single band,
   each wired down onto the Custom Implementation layer they all share */
.system { position: relative; border: 1px solid var(--line-2); background: var(--bg-alt); }
.system__label {
  position: absolute; top: -9px; left: 24px;
  padding-inline: 10px; background: var(--bg);
  font: 700 0.62rem/1.3 var(--display); letter-spacing: 0.26em; color: var(--muted);
}
.system__products { display: grid; grid-template-columns: 1fr; }
@media (min-width: 360px) { .system__products { grid-template-columns: 1fr 1fr; } }
.mod {
  display: grid; grid-template-columns: auto 1fr; align-items: center; align-content: start; column-gap: 10px;
  padding: 18px 20px 6px;
  border-bottom: 1px solid var(--line);
}
.mod > :not(.mod__mark):not(.mod__name) { grid-column: 1 / -1; }
.mod:last-child { border-bottom: 0; }
.mod__mark { height: 22px; width: auto; }
.mod__name { font: 700 0.82rem/1.2 var(--display); letter-spacing: 0.2em; color: var(--text); }
.mod__d { margin-top: 8px; font-size: 0.92rem; line-height: 1.45; }
.mod__link {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  min-height: 44px; padding-top: 2px;
  font: 500 0.76rem/1.3 var(--display); color: var(--body);
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.mod__link:hover { color: #fff; text-decoration-color: currentColor; }

/* Connectors: one central drop on narrow screens, one per product on wide */
.system__bus {
  height: 24px;
  background: linear-gradient(var(--line-2), var(--line-2)) 50% 0 / 1px 100% no-repeat;
}
.system__base {
  position: relative;
  padding: 18px 20px;
  background: var(--panel);
  border-top: 1px solid var(--line-2);
}
.system__base::before { /* junction nodes where connectors land on the shared layer */
  content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 7px;
  background: radial-gradient(circle, var(--text) 2.5px, transparent 3px) 50% 50% / 7px 7px no-repeat;
}
.system__base-t { font: 700 0.78rem/1.2 var(--display); letter-spacing: 0.22em; color: var(--text); }
.system__caps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.system__caps li { padding: 8px 12px; border: 1px solid var(--line-2); font: 500 0.84rem/1 var(--display); color: var(--text); }

@media (min-width: 360px) {
  .mod:nth-child(odd) { border-right: 1px solid var(--line); }
  .mod:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 760px) {
  .system__base { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
  .system__caps { margin-top: 0; }
}
@media (min-width: 900px) {
  .system__products { grid-template-columns: repeat(4, 1fr); }
  .mod { border-bottom: 0; border-right: 1px solid var(--line); }
  .mod:last-child { border-right: 0; }
  .system__bus {
    background:
      linear-gradient(var(--line-2), var(--line-2)) 12.5% 0 / 1px 100% no-repeat,
      linear-gradient(var(--line-2), var(--line-2)) 37.5% 0 / 1px 100% no-repeat,
      linear-gradient(var(--line-2), var(--line-2)) 62.5% 0 / 1px 100% no-repeat,
      linear-gradient(var(--line-2), var(--line-2)) 87.5% 0 / 1px 100% no-repeat;
  }
  .system__base::before {
    background:
      radial-gradient(circle, var(--text) 2.5px, transparent 3px) 12.5% 50% / 7px 7px no-repeat,
      radial-gradient(circle, var(--text) 2.5px, transparent 3px) 37.5% 50% / 7px 7px no-repeat,
      radial-gradient(circle, var(--text) 2.5px, transparent 3px) 62.5% 50% / 7px 7px no-repeat,
      radial-gradient(circle, var(--text) 2.5px, transparent 3px) 87.5% 50% / 7px 7px no-repeat;
  }
}

/* 04 One idea */
.idea { max-width: 52em; }
.idea__dont {
  font: 400 clamp(1.1rem, 2vw, 1.4rem)/1.4 var(--display); color: var(--muted);
  text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgba(255,255,255,0.35);
}
.idea__ask { margin-top: 12px; font: 500 clamp(1.6rem, 3.4vw, 2.6rem)/1.18 var(--display); letter-spacing: -0.02em; color: #fff; }
.idea__ask span { font-weight: 600; color: var(--gold); }
.idea__support { margin-top: 14px; font-size: 1.05rem; }

/* Closing */
.close { padding-block: clamp(52px, 7vw, 88px); border-top: 1px solid var(--line); }
.close__line { font: 700 clamp(1.6rem, 4.2vw, 3.1rem)/1.15 var(--display); letter-spacing: 0.05em; color: #fff; max-width: 26ch; }
.close__line::after { content: ""; display: block; width: 64px; height: 2px; margin-top: 20px; background: var(--line-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 15px 26px;
  border: 1px solid transparent; border-radius: 2px;
  font: 600 0.78rem/1.3 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  text-align: center; text-decoration: none;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.btn--gold { background: var(--gold); color: #0a0a0a; }
.btn--gold:hover { background: var(--gold-hi); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.btn--ghost:hover { background: #fff; color: #0a0a0a; border-color: #fff; }
@media (max-width: 520px) {
  .btn-row { flex-direction: column; }
  .btn { width: 100%; }
}

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 26px 28px; }
.foot__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.foot__t { font: 600 0.72rem/1.3 var(--display); letter-spacing: 0.24em; color: var(--text); }
.foot__s { margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.foot__logo { display: inline-flex; padding: 8px; margin-right: -8px; }
.foot__logo img { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   Motion: optional enhancement only
   -------------------------------------------------------------------------- */
/* Content always renders in place. Only sections still below the fold when
   script.js runs get a short settle, so nothing depends on JavaScript. */
@media (prefers-reduced-motion: no-preference) {
  .reveal.is-pending .wrap { transform: translateY(12px); }
  .reveal.is-settling .wrap { transition: transform 0.8s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
