/* eDesigno shared styles. Direction: DESIGN.md v3 (ENERGY 3 / RHYTHM 3 / MOTION 3).
   Palette: black, white and one label-sticker yellow. Every text/background pair is measured with
   .claude/skills/antislop-human/contrast-check.py. Dark mode follows the visitor's system setting. */
@view-transition { navigation: auto; }
@property --v { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  --paper: #f1f2ee; --card: #ffffff; --ink: #0b0b0c; --ink-2: #3a3b3d; --muted: #63656a; --line: #d9dad5; --field: #85878b;
  --brand: #ffd60a; --on-brand: #0b0b0c; --brand-text: #0b0b0c; --brand-soft: #fff5b8; --focus: #0b0b0c;
  --good: #1a7346; --warn: #8f4d00; --bad: #b3261e; --bad-soft: #fbe9e6; --accent: #1a7346; --accent-soft: #e2f1e8;
  --band: #0b0b0c; --band-card: #18181a;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --radius: 22px; --radius-sm: 12px; --ease: cubic-bezier(.2, .8, .2, 1);
  --lift: 0 2px 4px rgba(11,11,12,.05), 0 24px 60px rgba(11,11,12,.14);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0b0c; --card: #161617; --ink: #f1f2ee; --ink-2: #cdcfc9; --muted: #9a9c97; --line: #2a2b2d; --field: #76787c;
    --brand-text: #ffd60a; --brand-soft: #2b2600; --focus: #ffd60a;
    --good: #5fd39a; --warn: #f5b84a; --bad: #ff8a80; --bad-soft: #3a1512; --accent: #5fd39a; --accent-soft: #12301f;
    --band: #161617; --band-card: #202123; --lift: 0 2px 4px rgba(0,0,0,.5), 0 24px 60px rgba(0,0,0,.6);
  }
}
/* Ink bands: full-bleed dark sections in both themes. Tokens are re-pointed so every component inside adapts. */
.band {
  --paper: var(--band); --card: var(--band-card); --ink: #f1f2ee; --ink-2: #d6d8d2; --muted: #a3a59f; --line: #333437; --field: #76787c;
  --brand-text: #ffd60a; --brand-soft: #2b2600; --focus: #ffd60a; --good: #5fd39a; --warn: #f5b84a; --bad: #ff8a80; --bad-soft: #3a1512;
  --accent: #5fd39a; --accent-soft: #12301f;
  background: var(--band); color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body { margin: 0; font-family: var(--display); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; font-optical-sizing: auto; overflow-x: clip; }
img, svg, canvas { max-width: 100%; }
/* Links: ink underline at rest, yellow highlighter on hover. */
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { background: var(--brand); color: var(--on-brand); text-decoration-color: transparent; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
h1 em, h2 em, h3 em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.wrap { max-width: 1168px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
section[id], div[id] { scroll-margin-top: 84px; }
/* A yellow label with black print: step numbers, plan names. */
.tag { display: inline-block; font-family: var(--mono); font-size: 12.5px; font-weight: 500; line-height: 1.5; letter-spacing: 0;
  background: var(--brand); color: var(--on-brand); padding: 1px 7px; border-radius: 5px; }

/* Interaction affordances (antislop R-39) */
a[href], button, summary, select, label[for],
label:has(> input[type="checkbox"], > input[type="radio"]),
input[type="checkbox"], input[type="radio"], input[type="submit"], [role="button"] { cursor: pointer; }
:disabled, [aria-disabled="true"] { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -80px; z-index: 60; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 8px; color: var(--paper); background: var(--ink); }

/* Buttons. Yellow always carries black text (13.9:1) and an ink edge so it reads on white. Hover wipes to ink. */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius-sm); border: 2px solid var(--ink); font-family: inherit; font-size: 16px;
  font-weight: 650; line-height: 1.2; text-decoration: none; text-align: center; --wipe: var(--ink); --wipe-text: var(--paper); }
.btn::before { content: ""; position: absolute; inset: -1px; z-index: -1; background: var(--wipe); transform: translate3d(0, 102%, 0); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--brand); color: var(--wipe-text); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: transparent; color: var(--wipe-text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; }
.btn-block { width: 100%; }
@media (prefers-color-scheme: dark) { .btn-primary { border-color: var(--brand); } .btn-primary:hover { border-color: var(--ink); } }
.band .btn-primary { border-color: var(--brand); }
.band .btn-primary:hover { border-color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn { transition: color .3s var(--ease), border-color .3s var(--ease); }
  .btn::before { transition: transform .45s var(--ease); }
}

/* Header: wordmark, links, one action, icon menu on small screens, scroll progress line. */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink);
  transform-origin: 0 50%; transform: scaleX(var(--page-p, 0)); }
.motion .site-header { transition: transform .5s var(--ease); }
.motion .site-header.away { transform: translateY(-102%); }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.wordmark { font-weight: 800; font-size: 27px; letter-spacing: -0.045em; color: var(--ink); text-decoration: none;
  min-height: 48px; display: inline-flex; align-items: center; margin-right: auto; }
.wordmark:hover { color: var(--ink); background: none; }
.wordmark span { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; font-size: 1.08em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--ink); background: var(--line); }
/* The page you are on is marked with the highlighter, like the key word in a headline. */
.site-nav a[aria-current="page"] { color: var(--on-brand); background: var(--brand); }
.nav-cta { min-height: 44px; padding: 9px 18px; font-size: 15px; }
/* Menu button: two bars that cross into an X. It has an accessible name ("Menu"). The icon-only look is the owner's choice. */
.menu-btn { display: none; width: 48px; height: 48px; padding: 0; background: transparent; border: 1.5px solid var(--field); border-radius: var(--radius-sm);
  color: var(--ink); position: relative; }
.menu-btn:hover { border-color: var(--ink); }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 27px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 22.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 22.5px; transform: rotate(-45deg); }
@media (prefers-reduced-motion: no-preference) { .menu-btn span { transition: top .3s var(--ease), transform .3s var(--ease); } }
@media (max-width: 899px) {
  .menu-btn { display: block; }
  /* Full-screen menu with large links */
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; height: calc(100dvh - 69px); overflow-y: auto; background: var(--paper);
    padding: 20px 16px 40px; visibility: hidden; opacity: 0; }
  .site-nav.open { visibility: visible; opacity: 1; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a { width: 100%; min-height: 76px; padding: 0 4px; border-radius: 0; font-size: clamp(34px, 10vw, 52px); font-weight: 700;
    letter-spacing: -0.045em; color: var(--ink); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
  /* Visible at once when opening (so it can take focus); hidden only after the fade when closing. */
  .motion .site-nav { transition: opacity .3s linear, visibility 0s linear .3s; }
  .motion .site-nav.open { transition: opacity .3s linear, visibility 0s; }
  .motion .site-nav li { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity .5s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms + .05s); }
  .motion .site-nav.open li { opacity: 1; transform: none; }
}
@media (max-width: 380px) { .nav-cta { padding: 9px 12px; font-size: 14px; } .wordmark { font-size: 24px; } }

/* Forms: visible labels, 3:1 field borders */
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type="text"], input[type="email"], input[type="url"], input:not([type]), textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--field); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); font-family: inherit; font-size: 16px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
input[type="checkbox"] { accent-color: var(--brand-text); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: 14px; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; }
.hint { font-weight: 400; color: var(--muted); }
.form-msg { margin-top: 12px; font-size: 15px; }
.form-msg.err { color: var(--bad); }
.form-msg.ok { color: var(--good); }
.loading { display: none; align-items: center; gap: 12px; color: var(--muted); font-family: var(--mono); font-size: 13px; margin-top: 14px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Surfaces: flat by default. Only the focal element lifts. */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.focal { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--lift); }

/* Identity motif: audit score ring + bar rows */
.score { display: flex; gap: 20px; align-items: center; }
.ring { --c: var(--ink); width: 104px; height: 104px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--line) 0); }
.motion .ring { transition: --v 1.5s var(--ease); }
.ring b { width: 80px; height: 80px; border-radius: 50%; background: var(--card); display: grid; place-items: center;
  font-family: var(--mono); font-size: 28px; font-weight: 500; letter-spacing: -0.04em; }
.bars { display: grid; gap: 9px; flex: 1; min-width: 0; }
.bar { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.bar > div { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; transform-origin: 0 50%; }
.motion .bar i { transform: scaleX(0); transition: transform 1.1s var(--ease) calc(var(--i, 0) * 90ms + .2s); }
.motion .in .bar i, .motion .bars.in .bar i { transform: none; }

/* Redaction motif: black bars that decode into real values */
.redact { font-family: var(--mono); background: var(--ink); color: var(--ink); border-radius: 3px; padding: 0 .2em; user-select: none; }

/* ---------- Motion states. Applied only under html.motion (set in <head> when the visitor allows motion and JS runs).
   Without it, everything below renders in its finished state. ---------- */
.motion [data-reveal] { opacity: 0; transform: translate3d(0, 34px, 0); transition: opacity .9s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s); }
.motion [data-reveal="scale"] { transform: scale(.94) translate3d(0, 20px, 0); }
.motion [data-reveal="left"] { transform: translate3d(-40px, 0, 0); }
.motion [data-reveal="right"] { transform: translate3d(40px, 0, 0); }
.motion [data-reveal].in { opacity: 1; transform: none; }
.motion [data-stagger] > * { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .8s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.motion [data-stagger].in > * { opacity: 1; transform: none; }
/* Word and letter rise for headlines */
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .1em .08em .16em 0; margin: -.1em -.08em -.16em 0; }
.w > span { display: inline-block; }
.motion [data-split] .w > span { transform: translate3d(0, 115%, 0) rotate(5deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 60ms + var(--d, 0s)); }
.motion [data-split].in .w > span { transform: none; }
/* Highlighter: a yellow marker stroke drawn across an emphasised word once it has risen */
.mark { background: linear-gradient(var(--brand), var(--brand)) no-repeat 0 62% / 100% 82%; color: var(--on-brand); padding: 0 .1em 0 .05em; border-radius: .06em; }
.motion [data-split] .mark { background-size: 0% 82%; color: inherit; transition: background-size .9s var(--ease) .9s, color .2s linear 1s; }
.motion [data-split].in .mark { background-size: 100% 82%; color: var(--on-brand); }
/* Rules that draw themselves */
.rule { height: 1px; background: var(--ink); transform-origin: 0 50%; }
.motion .rule { transform: scaleX(0); transition: transform 1.4s var(--ease) var(--d, 0s); }
.motion .in > .rule, .motion .rule.in { transform: none; }
/* Disclosure panels open smoothly where the browser supports it */
@media (prefers-reduced-motion: no-preference) {
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    details::details-content { height: 0; overflow: clip; transition: height .5s var(--ease), content-visibility .5s allow-discrete; }
    details[open]::details-content { height: auto; }
  }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 8px; color: var(--ink-2); }
