/* ΔSoC — site styles (v12)
   Navy + green palette (from the original OptiE documents). Change tokens here only.
   Two card styles only: .card (left bar, evidence) and outline cards (everything else). */

:root {
  --navy: #1f2a6b;
  --green: #0f7a58;
  --green-bright: #16a374;
  --tint: #f4f6fb;
  --line: #e3e7f0;
  --text: #1f2a6b;
  --body: #3d4459;
  --muted: #5b6175;     /* ≥ 4.9:1 on tint */
  --white: #ffffff;
  --short: #b93d0b;     /* ΔSoC < 0 */
  --over: #8a5a0b;      /* ΔSoC > 0, ≥ 5:1 on tint */
  --radius: 10px;
  --wrap: 1080px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--white); color: var(--body); font: 400 18px/1.6 "Inter", system-ui, sans-serif; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 700; max-width: 26ch; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.nt { text-transform: none; letter-spacing: .02em; }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  background: var(--green); color: var(--white); border: 0; border-radius: 8px;
  padding: 14px 28px; font: 600 1.05rem/1 "Inter", sans-serif; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #0c6649; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: .95rem; }
.btn-block { width: 100%; }
.link { color: var(--navy); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.link:hover { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand img { height: 28px; width: auto; }
.nav { display: flex; gap: 8px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--navy); font-weight: 500; font-size: .98rem; padding: 12px 10px; }
.nav a:hover { color: var(--green); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang button { border: 0; background: var(--white); color: var(--muted); font: 600 .85rem/1 "Inter", sans-serif; min-width: 44px; min-height: 44px; padding: 0 10px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

/* Section intros */
.kicker { color: var(--green); font-weight: 700; font-size: .9rem; letter-spacing: .02em; margin-bottom: 12px; }
.section h2 { margin-bottom: 36px; }
#approach h2 { max-width: none; }

/* Hero */
.hero { padding: 88px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.delta { color: var(--green); }
.subtitle { font-size: clamp(1.25rem, 2.3vw, 1.65rem); font-weight: 600; color: var(--green); margin-top: 16px; line-height: 1.3; }
.formula { margin-top: 18px; font-size: 1.1rem; }
.formula strong { color: var(--navy); }
.cta-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 32px; }
.hero-motto { margin-top: 56px; padding-bottom: 28px; border-bottom: 1px solid var(--line); text-align: center; font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 800; color: var(--navy); letter-spacing: -0.01em; }

/* ΔSoC gauge (outline card) */
.gauge { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 24px; background: var(--white); box-shadow: 0 8px 30px rgba(31,42,107,.06); display: grid; gap: 18px; }
.gauge-title { font-size: .95rem; font-weight: 700; color: var(--navy); }
.g-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.dval { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.g-say { font-weight: 600; font-size: .95rem; color: var(--navy); text-align: right; }
.bar { position: relative; height: 22px; border-radius: 6px; background: var(--tint); border: 1px solid var(--line); overflow: hidden; }
.fill { position: absolute; inset: 0 auto 0 0; border-radius: 5px 0 0 5px; }
.margin { position: absolute; top: 0; bottom: 0; left: 60%; width: 10%; background: repeating-linear-gradient(135deg, rgba(31,42,107,.18) 0 4px, transparent 4px 8px); }
.need { position: absolute; top: -2px; bottom: -2px; left: 60%; width: 3px; background: var(--navy); }
.is-short .dval { color: var(--short); } .is-short .fill { background: var(--short); }
.is-zero .dval { color: var(--green); } .is-zero .fill { background: var(--green); }
.is-over .dval { color: var(--over); } .is-over .fill { background: #c99a3c; }
.g-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .88rem; color: var(--muted); padding-top: 4px; border-top: 1px solid var(--line); }
.g-legend span { display: inline-flex; align-items: center; gap: 8px; padding-top: 10px; }
.lg-need::before { content: ""; width: 3px; height: 16px; background: var(--navy); }
.lg-margin::before { content: ""; width: 18px; height: 14px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, rgba(31,42,107,.25) 0 4px, transparent 4px 8px); }

/* Sections */
.section { padding: 88px 0; }
.section-tint { background: var(--tint); }

/* Evidence cards (left bar) */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--green); border-radius: 4px var(--radius) var(--radius) 4px; padding: 28px 26px; }
.card-label { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
.card h3 { margin: 18px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.card p:last-child { font-size: 1rem; }
.metric { font-size: clamp(1.8rem, 2.9vw, 2.4rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; color: var(--navy); }
.metric-cap { font-size: .95rem; font-style: italic; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.sources { margin-top: 16px; font-size: .875rem; color: var(--muted); line-height: 1.55; }
.band { margin-top: 32px; text-align: center; font-size: 1.1rem; }
.band strong, .data-note strong, .partner strong { color: var(--navy); }

/* Approach: outline cards + navy circles */
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.phase { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 700; margin-bottom: 14px; }
.phase .card-label { font-size: .95rem; margin-bottom: 2px; }
.phase-tag { font-size: .9rem; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.phase h3 { margin-bottom: 8px; }
.phase p:last-child { font-size: 1rem; }
.rule { margin-top: 20px; background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--navy); border-radius: 4px var(--radius) var(--radius) 4px; padding: 22px 26px; }
.rule .card-label { color: var(--navy); }
.rule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; font-size: 1.05rem; }
.rule strong { color: var(--navy); font-size: 1.15rem; margin: 0 8px; white-space: nowrap; }
.rule-k { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); min-width: 96px; }
.rule-note { margin-top: 12px; font-size: .95rem; color: var(--muted); }
.data-note { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 1.05rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.about-grid h2 { margin-bottom: 16px; }
.lede-dark { font-size: 1.15rem; }
.partner { margin-top: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.partner p:not(.card-label) { font-size: 1rem; margin-bottom: 8px; }
.founder { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.founder-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--navy); color: var(--white); font-weight: 800; font-size: 1.3rem; }
.founder-name { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.founder-role { color: var(--green); font-weight: 600; }
.timeline { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 16px; }
.timeline li { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid var(--line); font-size: .98rem; }
.timeline strong { color: var(--navy); }

/* Quote */
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.quote-grid h2 { margin-bottom: 16px; }
.form { display: grid; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 8px 30px rgba(31,42,107,.06); }
.field { display: grid; gap: 6px; font-size: .95rem; font-weight: 600; color: var(--navy); }
.field input, .field textarea { font: inherit; font-weight: 400; font-size: 1rem; color: var(--body); min-height: 48px; padding: 12px 14px; border: 1px solid #b9c0d3; border-radius: 8px; width: 100%; background: var(--white); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--green-bright); border-color: var(--green-bright); }
.consent { font-size: .9rem; color: var(--muted); }
.consent a { color: var(--navy); font-weight: 600; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.85); padding: 48px 0 32px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px 40px; }
.footer-grid img { height: 26px; width: auto; }
.footer-motto { margin-top: 12px; font-weight: 600; color: var(--white); }
.footer-col { display: grid; gap: 6px; align-content: start; }
.footer-col a { color: var(--white); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-h { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.65); }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; color: rgba(255,255,255,.65); font-size: .88rem; }

/* Sticky mobile CTA */
.sticky-cta { display: none; }

/* Thanks / privacy */
.thanks { padding: 120px 0; text-align: center; }
.thanks h1 { margin: 0 auto 16px; font-size: clamp(2rem, 4vw, 2.8rem); }
.thanks p { margin-bottom: 32px; }
.doc { padding: 72px 0 96px; max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 24px; }
.doc h2 { font-size: 1.3rem; margin: 32px 0 8px; }
.doc p, .doc li { font-size: 1rem; margin-bottom: 8px; }
.todo { background: #fff4d6; padding: 0 4px; border-radius: 3px; }

@media (max-width: 980px) {
  .phases { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav, .header-cta { display: none; }
  .lang { margin-left: auto; }
  .cards, .quote-grid, .about-grid, .hero-grid, .rule-grid { grid-template-columns: 1fr; }
  .hero-grid, .about-grid, .quote-grid { gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .sticky-cta {
    display: flex; align-items: center; justify-content: center; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    min-height: 52px; border-radius: 10px; background: var(--green); color: var(--white); font-weight: 700; text-decoration: none;
    box-shadow: 0 8px 24px rgba(15,122,88,.35); transition: transform .2s ease, opacity .2s ease;
  }
  .sticky-cta.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
  body { padding-bottom: 76px; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .hero { padding: 48px 0 44px; }
  .section { padding: 60px 0; }
  .phases { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
  .hero-motto { margin-top: 36px; padding-bottom: 20px; }
  .rule strong { margin: 0 6px 0 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sticky-cta { transition: none; } }
