/* =========================================================
   base.css — design tokens, reset, typography, buttons, forms
   Loaded on every page. No inline styles are used anywhere in
   the templates, which keeps the CSP at style-src 'self'.
   ========================================================= */

:root{
  --ink:#0d1b2a;
  --ink-2:#16293d;
  --blue:#1e88e5;
  --blue-dark:#1565c0;
  --blue-soft:#e8f2fd;
  --amber:#ff8f00;
  --amber-dark:#ef6c00;
  --amber-soft:#fff4e0;
  --green:#12805c;
  --green-soft:#e8f6f1;
  --red:#c62828;
  --red-soft:#fdecea;

  --text:#132133;
  --text-2:#4a5a6e;
  --text-3:#7a8798;
  --line:#e2e8f0;
  --line-2:#ccd6e0;
  --bg:#ffffff;
  --bg-soft:#f5f8fb;
  --bg-tint:#eef4fa;

  --radius:14px;
  --radius-sm:10px;
  --radius-lg:20px;
  --maxw:1200px;
  --section-y:clamp(56px,7vw,96px);
  --font:"Inter","Segoe UI",-apple-system,BlinkMacSystemFont,"Helvetica Neue","PingFang SC","Microsoft YaHei",sans-serif;
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  --ease:cubic-bezier(.22,1,.36,1);
  --shadow-sm:0 1px 2px rgba(13,27,42,.06),0 1px 3px rgba(13,27,42,.05);
  --shadow:0 12px 30px -14px rgba(13,27,42,.28);
  --shadow-lg:0 30px 60px -30px rgba(13,27,42,.42);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;overflow-x:clip}
body{
  margin:0;
  font-family:var(--font);
  font-size:16px;
  line-height:1.65;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
body.no-scroll{overflow:hidden}

img,svg,video{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{margin:0;line-height:1.2;letter-spacing:-.018em;font-weight:700}
p{margin:0}
ul,ol,dl{margin:0;padding:0;list-style:none}
table{border-collapse:collapse;width:100%}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
input,select,textarea{font:inherit;color:inherit}
figure{margin:0}

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

.skip-link{
  position:absolute;left:-9999px;top:0;z-index:200;
  background:#fff;color:var(--text);padding:12px 18px;border-radius:0 0 10px 0;
  box-shadow:var(--shadow);
}
.skip-link:focus{left:0}

.wrap{width:100%;max-width:var(--maxw);margin-inline:auto;padding-inline:clamp(18px,4vw,32px)}
.section{padding-block:var(--section-y)}
.section--tight{padding-block:clamp(24px,3vw,40px)}
.section--soft{background:var(--bg-soft);border-block:1px solid var(--line)}
.section--ink{background:var(--ink);color:#e8eef5}

.eyebrow{
  display:inline-flex;align-items:center;gap:9px;
  font-size:.76rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  color:var(--blue);margin-bottom:12px;
}
.eyebrow::before{content:"";width:24px;height:2px;background:currentColor;border-radius:2px}
h2{font-size:clamp(1.55rem,3.4vw,2.3rem)}
h3{font-size:1.08rem}
.lead{color:var(--text-2);font-size:clamp(.98rem,1.6vw,1.08rem);max-width:70ch}
.section-head{max-width:740px;margin-bottom:clamp(30px,4vw,48px)}
.section-head .lead{margin-top:12px}
.section-head--center{margin-inline:auto;text-align:center}
.section-head--center .lead{margin-inline:auto}

.prose{max-width:76ch}
.prose p + p{margin-top:1em}
.prose h2{margin-bottom:.6em}
.prose--outro{
  border-left:3px solid var(--amber);padding-left:20px;color:var(--text-2);
}

/* ---------------- buttons ---------------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  padding:13px 22px;border-radius:10px;font-weight:650;font-size:.95rem;
  border:1px solid transparent;cursor:pointer;text-align:center;
  transition:transform .22s var(--ease),background .2s,box-shadow .22s,border-color .2s,color .2s;
}
/**
 * Sprite icons are referenced as <svg class="icon"><use href="/icons.svg#i-x">.
 * They need an explicit box, otherwise the SVG defaults to 300x150 and the
 * whole layout is wrecked.
 */
.icon{
  width:20px;
  height:20px;
  flex:none;
  fill:none;
  stroke:currentColor;
  vertical-align:middle;
}
.btn .icon{width:17px;height:17px;flex:none}
.btn--primary{background:var(--blue);color:#fff;box-shadow:0 10px 24px -14px rgba(30,136,229,.8)}
.btn--primary:hover{background:var(--blue-dark);transform:translateY(-2px)}
.btn--amber{background:var(--amber);color:#fff;box-shadow:0 10px 24px -14px rgba(255,143,0,.8)}
.btn--amber:hover{background:var(--amber-dark);transform:translateY(-2px)}
.btn--outline{border-color:var(--line-2);background:#fff;color:var(--text)}
.btn--outline:hover{border-color:var(--blue);color:var(--blue);transform:translateY(-2px)}
.btn--ghost-light{border-color:rgba(255,255,255,.32);color:#fff}
.btn--ghost-light:hover{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.6)}
.btn--danger{background:var(--red);color:#fff}
.btn--danger:hover{background:#a51f1f}
.btn--sm{padding:9px 15px;font-size:.86rem}
.btn--block{width:100%}
.btn[disabled]{opacity:.55;pointer-events:none}

.icon{width:20px;height:20px;flex:none}

/* ---------------- forms ---------------- */
.form-grid{display:grid;gap:14px;grid-template-columns:repeat(2,minmax(0,1fr))}
.field{display:grid;gap:6px;min-width:0}
.field--full{grid-column:1 / -1}
.field label{font-size:.84rem;font-weight:620;color:var(--text-2)}
.field .req{color:var(--red)}
.field input,.field select,.field textarea{
  width:100%;padding:11px 13px;border:1px solid var(--line-2);border-radius:9px;
  background:#fff;font-size:.94rem;transition:border-color .2s,box-shadow .2s;
}
.field textarea{resize:vertical;min-height:110px}
.field input::placeholder,.field textarea::placeholder{color:#a7b3c0}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(30,136,229,.14);
}
.form-actions{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.form-note{grid-column:1 / -1;font-size:.8rem;color:var(--text-3)}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---------------- flash messages ---------------- */
.flash{padding:14px 16px;border-radius:var(--radius-sm);font-size:.92rem;margin-bottom:18px}
.flash p{margin-top:6px}
.flash--ok{background:var(--green-soft);border:1px solid #b7e0d0;color:#0d6b4c}
.flash--err{background:var(--red-soft);border:1px solid #f5c6c2;color:#a5211a}
.flash a{text-decoration:underline;font-weight:650}

/* ---------------- misc utilities ---------------- */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.stack-sm > * + *{margin-top:10px}
.muted{color:var(--text-3)}
.nowrap{white-space:nowrap}

@media (max-width:640px){
  .form-grid{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}
}
