/* GovIDE website — styles. Tokens follow 2-design.md §2. */
:root {
  --ink: #0B1F33;
  --ink-soft: #41566B;
  --paper: #FFFFFF;
  --mist: #F3F6F9;
  --accent: #0E9F8E;
  --accent-dark: #0B7F72;
  --gold: #C9A227;
  --gold-text: #8A6D0F;
  --line: #DCE3EA;
  --on-dark: #FFFFFF;
  --on-dark-soft: #B8C7D6;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(11, 31, 51, .08);
  --nav-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 18px; line-height: 28px; color: var(--ink); background: var(--paper); overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0 0 16px; letter-spacing: -0.02em; }
h1 { font-size: 48px; line-height: 56px; font-weight: 800; }
h2 { font-size: 32px; line-height: 40px; font-weight: 700; }
h3 { font-size: 20px; line-height: 28px; font-weight: 700; }
p { margin: 0 0 16px; }
a { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 16px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }

.mono-label { display: inline-block; font-family: var(--mono); font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); margin-right: 10px; }
.mono-label--muted { color: var(--ink-soft); }
.mono-label--gold { color: var(--gold-text); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 600 16px/1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn--primary { background: var(--accent-dark); color: #fff; }
.btn--primary:hover { background: #096A5F; }
.btn--outline-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; margin-bottom: 16px; }
.badge--demonstrated { background: var(--accent-dark); color: #fff; }
.badge--design { background: #E3E8EE; color: var(--ink-soft); }
.badge--planned { border: 1.5px solid var(--gold); color: var(--gold-text); background: #fff; }
.badge--example { position: absolute; top: 16px; right: 16px; margin: 0; background: #FFF5D6; color: var(--gold-text); border: 1px solid var(--gold); }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.nav.is-scrolled { box-shadow: var(--shadow); border-color: var(--line); }
.nav__inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

.wordmark { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; }
.wordmark__check { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 15px; }
.wordmark__gov { color: var(--ink); margin-left: 2px; }
.wordmark__ide { color: var(--accent); margin-left: -6px; }
.wordmark--sm { font-size: 18px; }
.wordmark--sm .wordmark__check { width: 22px; height: 22px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: var(--on-dark); padding: 96px 0; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero__sub { font-size: 20px; line-height: 30px; color: var(--on-dark-soft); max-width: 600px; }
.gap { margin: 28px 0 32px; padding: 16px 20px; border-left: 3px solid var(--accent); background: rgba(14, 159, 142, .1); border-radius: 0 var(--radius) var(--radius) 0; color: var(--on-dark-soft); max-width: 600px; }
.gap .mono-label { display: block; color: #4FD1C1; margin-bottom: 6px; }
.gap strong { color: #fff; font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.evidence-card { position: relative; margin: 0; background: #fff; color: var(--ink); border-radius: 16px; padding: 28px 24px 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.evidence-card__title { font-weight: 700; font-size: 20px; margin: 4px 0 18px; }
.evidence-card__list { list-style: none; margin: 0 0 16px; padding: 0; }
.evidence-card__list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 22px; }
.evidence-card__meta { margin-left: auto; font: 500 12px/1 var(--mono); color: var(--ink-soft); white-space: nowrap; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 13px; flex: none; }
.is-done .tick { background: #D7F3EF; color: var(--accent-dark); }
.is-missing .tick { background: #FDECEC; color: #B42318; }
.is-missing .evidence-card__meta { color: #B42318; }
.evidence-card__summary { font-weight: 600; font-size: 15px; background: var(--mist); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.evidence-card figcaption { font-size: 13px; line-height: 18px; color: var(--ink-soft); font-style: italic; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--mist { background: var(--mist); }
.section--dark { background: var(--ink); color: var(--on-dark); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head p { color: var(--ink-soft); }

/* Chain */
.chain { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; }
.chain__step { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.chain__step:not(:first-child)::before { content: "→"; position: absolute; left: -6px; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--accent-dark); font-size: 13px; line-height: 1; z-index: 2; }
.chain__who { font-weight: 700; }
.chain__says { color: var(--ink-soft); font-size: 16px; line-height: 22px; }
.chain__kind { margin-top: auto; padding-top: 8px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.chain__step--govide { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: var(--shadow); }
.chain__step--govide .chain__says { color: var(--on-dark-soft); }
.chain__step--govide .chain__kind { color: #4FD1C1; }
.chain__caption { margin-top: 24px; font-weight: 600; color: var(--accent-dark); }

/* Tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.tier { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.tier p { color: var(--ink-soft); margin: 0; font-size: 16px; line-height: 26px; }
.tier--featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.tier--planned { background: #FCFBF6; border-style: dashed; border-color: #E2D6A8; }

.beforeafter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 32px; }
.beforeafter p { margin: 6px 0 0; font-size: 16px; line-height: 24px; }

.demo { margin-bottom: 24px; }
.demo__placeholder { aspect-ratio: 16 / 9; max-height: 520px; width: 100%; border-radius: 16px; background: var(--ink); color: var(--on-dark-soft); display: grid; place-content: center; justify-items: center; gap: 8px; }
.demo__play { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); color: rgba(255, 255, 255, .4); font-size: 26px; padding-left: 4px; }
.demo__placeholder p { margin: 0; font-weight: 500; }

.vscode-strip { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-weight: 500; margin: 0; }
.vscode-strip__icon { width: 28px; height: 28px; color: #007ACC; flex: none; }

/* In use */
.casestudy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.stat { background: var(--mist); border-radius: var(--radius); padding: 28px 24px; }
.stat__num { display: block; font-size: 44px; line-height: 52px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.stat__label { color: var(--ink-soft); }
.casestudy__caption { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-style: italic; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 32px; }
.quote { margin: 0; padding: 24px; border-left: 3px solid var(--accent); background: var(--mist); border-radius: 0 var(--radius) var(--radius) 0; }
.quote footer { font-size: 15px; color: var(--ink-soft); }
.measured { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.measured ul { list-style: none; margin: 0; padding: 0; }
.measured li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 26px; }
.measured li:first-child { border-top: 0; padding-top: 0; }
.measured .mono-label { display: block; margin-bottom: 4px; }

/* Region */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 2px; background: #E2D6A8; }
.timeline li { position: relative; padding-top: 48px; }
.timeline__q { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); font: 600 13px/1 var(--mono); color: var(--gold-text); }
.timeline li p { margin: 0; font-size: 16px; line-height: 24px; }
.timeline__caption { margin: 24px 0 8px; font-size: 15px; color: var(--ink-soft); font-style: italic; }
.vision { margin: 0; font-weight: 500; max-width: 760px; }

/* Funding points */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.point { padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.point p { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 26px; }
.point__num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #D7F3EF; color: var(--accent-dark); font-weight: 700; margin-bottom: 16px; }

/* Contact */
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact__intro p { color: var(--on-dark-soft); }
.contact__email .mono-label { display: block; color: #4FD1C1; margin-bottom: 4px; }
.contact__email a { color: #fff; font-weight: 600; font-size: 18px; }
.form { background: #fff; color: var(--ink); border-radius: 16px; padding: 28px 24px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; line-height: 20px; }
.field input, .field select, .field textarea { font: 400 16px/24px var(--font); color: var(--ink); padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 159, 142, .2); }
.field.is-invalid input, .field.is-invalid select { border-color: #B42318; }
.field__error { color: #B42318; font-size: 13px; line-height: 18px; }
.form__status { margin: 12px 0 0; font-size: 15px; font-weight: 500; }
.form__status.is-ok { color: var(--accent-dark); }
.form__status.is-error { color: #B42318; }

/* Footer */
.footer { padding: 28px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer a { color: var(--ink-soft); }

/* Reveal animation (respects reduced motion) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Section animations: workflow chain + product (subtle) ---------- */
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes arrowIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes evidenceGlow {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 0 0 6px rgba(14, 159, 142, .22), var(--shadow); }
}
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .18); }
  50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

/* Workflow chain: steps arrive one by one, arrows follow, GovIDE step glows twice */
.js .chain .chain__step { opacity: 0; }
.js .chain.is-visible .chain__step { animation: stepIn .5s ease-out both; }
.js .chain .chain__step:not(:first-child)::before { opacity: 0; }
.js .chain.is-visible .chain__step:not(:first-child)::before { animation: arrowIn .4s ease-out both; }
.js .chain.is-visible .chain__step:nth-child(1) { animation-delay: 0ms; }
.js .chain.is-visible .chain__step:nth-child(2) { animation-delay: 180ms; }
.js .chain.is-visible .chain__step:nth-child(2)::before { animation-delay: 300ms; }
.js .chain.is-visible .chain__step:nth-child(3) { animation: stepIn .5s ease-out 360ms both, evidenceGlow 1.6s ease-in-out 1s 2; }
.js .chain.is-visible .chain__step:nth-child(3)::before { animation-delay: 480ms; }
.js .chain.is-visible .chain__step:nth-child(4) { animation-delay: 540ms; }
.js .chain.is-visible .chain__step:nth-child(4)::before { animation-delay: 660ms; }
.js .chain.is-visible .chain__step:nth-child(5) { animation-delay: 720ms; }
.js .chain.is-visible .chain__step:nth-child(5)::before { animation-delay: 840ms; }

/* Product: tier cards stagger in, lift slightly on hover */
.js .tiers .tier:nth-child(2) { transition-delay: 120ms; }
.js .tiers .tier:nth-child(3) { transition-delay: 240ms; }
.tier { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.tier:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(11, 31, 51, .10); }
.tier--featured:hover { box-shadow: 0 12px 32px rgba(14, 159, 142, .18); }

/* Product: before / today / planned strip reveals left to right */
.js .beforeafter > div { opacity: 0; }
.js .beforeafter.is-visible > div { animation: stepIn .45s ease-out both; }
.js .beforeafter.is-visible > div:nth-child(2) { animation-delay: 160ms; }
.js .beforeafter.is-visible > div:nth-child(3) { animation-delay: 320ms; }

/* Product: demo play button breathes gently */
.demo__play { animation: ringPulse 2.8s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .js .chain .chain__step, .js .chain .chain__step::before, .js .beforeafter > div { opacity: 1; animation: none !important; }
  .demo__play { animation: none; }
  .tier, .tier:hover { transition: none; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: 1fr; }
  .evidence-card { display: none; }
  .tiers, .points, .casestudy { grid-template-columns: repeat(2, 1fr); }
  .chain { grid-template-columns: 1fr; gap: 20px; }
  .chain__step:not(:first-child)::before { content: "↓"; left: 50%; top: -10px; transform: translate(-50%, -50%); }  .contact { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links { position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 16px; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 639px) {
  body { font-size: 16px; line-height: 26px; }
  h1 { font-size: 34px; line-height: 42px; }
  h2 { font-size: 26px; line-height: 34px; }
  .hero, .section { padding: 64px 0; }
  .container { padding: 0 16px; }
  .hero__sub { font-size: 17px; line-height: 27px; }
  .hero__actions .btn { width: 100%; }
  .tiers, .points, .casestudy, .beforeafter, .form__row { grid-template-columns: 1fr; }
  .form__row { gap: 0; }
  .timeline { grid-template-columns: 1fr; gap: 24px; }
  .timeline::before { left: 18px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .timeline li { padding: 6px 0 0 56px; min-height: 38px; }
  .stat__num { font-size: 36px; line-height: 44px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
