/*
Theme Name: KYC Civic
Description: Neutral, accessible civic theme for Know Your Candidate. Every colour, font and size is a CSS variable in :root below - change them to re-theme.
Version: 2.0.0
Text Domain: kyc-civic
*/

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-weight:200 800;font-display:swap;src:url("assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2")}
@font-face{font-family:"Public Sans";font-style:normal;font-weight:100 900;font-display:swap;src:url("assets/fonts/public-sans-latin-wght-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Public Sans";font-style:normal;font-weight:100 900;font-display:swap;src:url("assets/fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* ---------- Tokens ---------- */
:root{
  --kyc-primary:#2a74c9;      /* Ballot blue: actions, marks. White text on it passes AA (4.7:1) */
  --kyc-primary-dark:#1d5aa6; /* Deep blue: hover, links on white */
  --kyc-accent:#ffffff;       /* White accent for use ON blue or dark surfaces */
  --kyc-accent-ink:#1d5aa6;   /* Accent for use on white surfaces */
  --kyc-ink:#0f2338;          /* Headlines, footer ground */
  --kyc-text:#243447;
  --kyc-muted:#566879;
  --kyc-line:#d5dde7;
  --kyc-ground:#f3f6fa;       /* Page ground */
  --kyc-soft:#f3f6fa;
  --kyc-tint:#e6effa;         /* Light blue wash */
  --kyc-surface:#ffffff;
  --kyc-ok:#1e7e46;
  --kyc-bad:#b3261e;
  --kyc-radius:8px;
  --kyc-font:"Public Sans",system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --kyc-display:"Bricolage Grotesque","Public Sans",system-ui,sans-serif;
  --kyc-max:72rem;
  --kyc-header:4.5rem;
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--kyc-header) + 1rem)}
body{margin:0;font-family:var(--kyc-font);font-size:1.0625rem;line-height:1.6;color:var(--kyc-text);background:var(--kyc-ground);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img,svg{max-width:100%}
a{color:var(--kyc-primary-dark);text-underline-offset:.18em}a:hover{color:var(--kyc-ink)}
h1,h2,h3,h4{font-family:var(--kyc-display);color:var(--kyc-ink);line-height:1.12;letter-spacing:-.015em;font-weight:700;margin:0 0 .6em;text-wrap:balance}
h1{font-size:clamp(2.4rem,1.2rem + 4.6vw,4.4rem);line-height:1.02;letter-spacing:-.03em;font-weight:760}
h2{font-size:clamp(1.65rem,1.2rem + 1.6vw,2.4rem)}
h3{font-size:1.3rem}
h4{font-size:1.05rem}
p{margin:0 0 1em}
:focus-visible{outline:3px solid color-mix(in srgb,var(--kyc-primary) 55%,transparent);outline-offset:2px;border-radius:4px}
::selection{background:var(--kyc-tint)}
.kyc-container{max-width:var(--kyc-max);margin:0 auto;padding:0 1.5rem}
.skip-link{position:absolute;left:-999px;top:0}.skip-link:focus{left:1rem;top:1rem;background:#fff;padding:.6rem 1rem;z-index:200;border-radius:6px;box-shadow:0 2px 10px rgb(15 35 56 / .25)}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:100;background:rgb(255 255 255 / .94);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--kyc-line)}
.site-header__inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:var(--kyc-header)}
.site-title{display:flex;align-items:center;line-height:0;border-radius:6px}
.site-title img{height:42px;width:auto;display:block}
.nav-toggle{display:none;align-items:center;gap:.5rem;background:#fff;border:1px solid var(--kyc-line);border-radius:8px;padding:.5rem .8rem;font:inherit;font-weight:600;color:var(--kyc-ink);cursor:pointer}
.nav-toggle__bars{width:18px;height:12px;background:linear-gradient(var(--kyc-ink) 0 0) top/100% 2px no-repeat,linear-gradient(var(--kyc-ink) 0 0) center/100% 2px no-repeat,linear-gradient(var(--kyc-ink) 0 0) bottom/100% 2px no-repeat}
.site-nav ul{display:flex;align-items:center;gap:.25rem;list-style:none;margin:0;padding:0}
.site-nav a{display:block;color:var(--kyc-text);text-decoration:none;font-weight:550;font-size:.98rem;padding:.55rem .9rem;border-radius:8px}
.site-nav a:hover{background:var(--kyc-ground);color:var(--kyc-ink)}
.site-nav .current-menu-item>a,.site-nav .current_page_item>a{color:var(--kyc-primary-dark);background:var(--kyc-tint)}
.site-nav a[href$="/claim/"]{background:var(--kyc-primary);color:#fff;margin-left:.5rem;padding:.6rem 1.1rem;font-weight:650}
.site-nav a[href$="/claim/"]:hover{background:var(--kyc-primary-dark);color:#fff}

/* ---------- Page background: a map of South Africa ---------- */
.page-map{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.page-map__svg{position:absolute;right:max(2vw,calc((100vw - 90rem) / 2));top:calc(var(--kyc-header) + 3vh);width:min(62vw,56rem);height:auto;max-height:calc(100vh - var(--kyc-header) - 4vh);overflow:visible}
.pm-sa{fill:#dde9f8;stroke:#9dbbe0;stroke-width:2;vector-effect:non-scaling-stroke;stroke-linejoin:round;fill-opacity:0;stroke-dasharray:1;stroke-dashoffset:1;animation:pm-draw 2.6s .15s cubic-bezier(.5,.1,.2,1) forwards,pm-fill 1.2s 1.6s ease-out forwards}
.pm-neighbour{fill:none;stroke:#c9d9ec;stroke-width:1.5;vector-effect:non-scaling-stroke;stroke-dasharray:4 5}
@keyframes pm-draw{to{stroke-dashoffset:0}}
@keyframes pm-fill{to{fill-opacity:1}}

/* ---------- Hero (home) ---------- */
.hero{position:relative;padding:clamp(2.5rem,5vw,4.5rem) 0 clamp(2.5rem,4vw,4rem)}
.hero__copy{max-width:41rem;margin-bottom:2.25rem}
.hero h1{margin-bottom:.35em;max-width:12ch}
.hero__lede{font-size:clamp(1.1rem,1rem + .5vw,1.3rem);color:var(--kyc-text);max-width:34rem;margin:0}

/* ---------- Sections ---------- */
.section{padding:clamp(3rem,6vw,5.5rem) 0}
.section--white{background:rgb(255 255 255 / .84);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);border-top:1px solid var(--kyc-line)}
.for-candidates__grid{display:grid;gap:clamp(2rem,5vw,5rem);grid-template-columns:1.05fr .95fr;align-items:center}
.for-candidates h2{max-width:20ch}
.for-candidates__lede{font-size:1.15rem;max-width:30rem}
.cta-row{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1.75rem}
.steps{list-style:none;margin:0;padding:0;counter-reset:step}
.steps li{position:relative;counter-increment:step;padding:0 0 1.75rem 4rem;min-height:3rem}
.steps li:last-child{padding-bottom:0}
.steps li::before{content:counter(step);position:absolute;left:0;top:0;width:2.75rem;height:2.75rem;border-radius:50%;background:var(--kyc-primary);color:#fff;display:grid;place-items:center;font:700 1.15rem/1 var(--kyc-display)}
.steps li:not(:last-child)::after{content:"";position:absolute;left:1.3rem;top:3.1rem;bottom:.35rem;width:2px;background:var(--kyc-line)}
.steps strong{display:block;font-family:var(--kyc-display);font-size:1.2rem;color:var(--kyc-ink);margin-bottom:.15rem}
.steps span{color:var(--kyc-muted)}

/* ---------- Buttons (theme-level, shared) ---------- */
.kyc-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;background:var(--kyc-primary);color:#fff;border:2px solid var(--kyc-primary);border-radius:var(--kyc-radius);padding:.7rem 1.3rem;font:650 1rem/1.2 var(--kyc-font);cursor:pointer;text-decoration:none;transition:background-color .15s,border-color .15s,color .15s}
.kyc-button:hover{background:var(--kyc-primary-dark);border-color:var(--kyc-primary-dark);color:#fff}
.kyc-button--ghost{background:transparent;color:var(--kyc-primary-dark);border-color:var(--kyc-primary)}
.kyc-button--ghost:hover{background:var(--kyc-tint);color:var(--kyc-primary-dark);border-color:var(--kyc-primary-dark)}

/* ---------- Inner pages ---------- */
.page-head{padding:clamp(2rem,4vw,3.25rem) 0 .5rem}
.page-head h1{font-size:clamp(2rem,1.2rem + 3vw,3.2rem);margin:0}
.page-main{padding:0 0 4rem}
.page-main .entry{max-width:52rem;padding-top:1rem}
.entry>*:first-child{margin-top:0}
.entry h2{margin-top:2em}
.page-main .entry--wide{max-width:none}
.entry .kyc-card h2,.entry .kyc-card h3{margin-top:0}

/* ---------- Footer ---------- */
.site-footer{background:var(--kyc-ink);color:#c3d1e1;padding:clamp(2.5rem,5vw,4rem) 0 2rem;margin-top:0;font-size:.97rem}
.site-footer a{color:#fff;text-decoration-color:rgb(255 255 255 / .35)}.site-footer a:hover{text-decoration-color:#fff;color:#fff}
.site-footer__grid{display:grid;gap:2.5rem;grid-template-columns:1.6fr 1fr 1fr}
.kyc-footer-logo{height:38px;width:auto;margin-bottom:1rem;display:block}
.site-footer__about{max-width:26rem;margin:0}
.site-footer h2{font:650 1rem/1.3 var(--kyc-display);color:#fff;letter-spacing:0;margin:0 0 .8rem}
.site-footer ul{list-style:none;padding:0;margin:0;display:grid;gap:.45rem}
.site-footer__legal{margin-top:2.5rem;padding-top:1.25rem;border-top:1px solid rgb(255 255 255 / .14);font-size:.88rem;color:#9fb2c8;display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  .nav-toggle{display:inline-flex}
  .site-nav{position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid var(--kyc-line);box-shadow:0 14px 24px rgb(15 35 56 / .08);display:none;padding:.75rem 1.5rem 1.25rem}
  .site-nav.is-open{display:block}
  .site-nav ul{flex-direction:column;align-items:stretch;gap:.15rem}
  .site-nav a{padding:.8rem .9rem}
  .site-nav a[href$="/claim/"]{margin:.5rem 0 0;text-align:center}
  .for-candidates__grid{grid-template-columns:1fr}
  .site-footer__grid{grid-template-columns:1fr 1fr}.site-footer__grid>:first-child{grid-column:1/-1}
  .page-map__svg{right:-34vw;top:calc(var(--kyc-header) + 6vh);width:132vw;max-height:none}
}
@media (max-width:560px){
  .kyc-container{padding:0 1.1rem}
  .site-title img{height:36px}
  .site-footer__grid{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.001ms!important;animation-delay:0s!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}
