/* =========================================================================
   agents.vaal.co.ug — VAAL Referral Partner Programme
   Self-contained. Does not reference ../shared/ (Pages root is agents/).

   Order of this file:
     1. Fonts
     2. Design-system tokens (subset)
     3. Page tokens + base
     4. Design-system components (subset: vbtn / vaal-field / eyebrow / numeric)
     5. Page components
     6. Motion
   ========================================================================= */


/* =========================================================================
   1. FONTS — Montserrat variable, self-hosted. latin + latin-ext only.
   The woff2 files carry an fvar weight axis (100–900), so one @font-face per
   subset covers every weight the page uses (500 / 600 / 700 / 800).
   ========================================================================= */

/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/montserrat-latin-ext.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;
}

/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/montserrat-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* =========================================================================
   2. DESIGN-SYSTEM TOKENS — only what the shipped components consume.
   ========================================================================= */

:root {
  --vaal-yellow:  #FFDD00;
  --vaal-black:   #000000;
  --vaal-white:   #FFFFFF;

  --font-sans:    'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  --ls-wider:     0.1em;
  --dur-fast:     160ms;

  /* Light-surface semantics — the component defaults. The page overrides
     these per-block where it sits on a dark surface. */
  --fg-1:         #000000;
  --fg-3:         #808080;
  --line:         #D9D9D9;
}


/* =========================================================================
   3. PAGE TOKENS + BASE
   ========================================================================= */

:root {
  --gold: #FFDD00; --ink: #000000; --paper: #FFFFFF; --mist: #F5F5F5; --coal: #1A1A1A;
  --hair: rgba(255,255,255,0.14); --hair-soft: rgba(255,255,255,0.08);
  --text-1: #FFFFFF; --text-2: rgba(255,255,255,0.72); --text-3: rgba(255,255,255,0.60);
  --shell: min(980px,100%); --pad: clamp(20px,5vw,56px);
  --sect-y: clamp(64px,9vw,120px);
  --spine: clamp(30px,7vw,68px);
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  margin: 0;
  background: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-1);
  text-rendering: optimizeLegibility;
}

/* Design-system base type. The page's component classes override font-size,
   weight and colour, but inherit these line-heights and tracking. */
h1 {
  font-weight: 700; font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.02; letter-spacing: -0.02em; color: var(--fg-1); margin: 0;
}
h2 {
  font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15; letter-spacing: -0.02em; color: var(--fg-1); margin: 0;
}
h3 {
  font-weight: 600; font-size: 2rem;
  line-height: 1.15; letter-spacing: -0.02em; color: var(--fg-1); margin: 0;
}
p {
  font-weight: 400; font-size: 1rem;
  line-height: 1.65; color: var(--fg-1); margin: 0;
}

a { color: var(--text-1); text-decoration: none; }
a:hover { color: var(--gold); }

img { max-width: 100%; }

input, select, textarea { color-scheme: dark; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.page { max-width: 100%; overflow-x: hidden; background: var(--ink); }
.shell { width: var(--shell); margin: 0 auto; }

#skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background: var(--gold); color: #000;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 18px;
}
#skip:focus { left: 8px; top: 8px; color: #000; }

[hidden] { display: none !important; }


/* =========================================================================
   4. DESIGN-SYSTEM COMPONENTS (subset, verbatim values)
   ========================================================================= */

/* --- Buttons --------------------------------------------------------------- */
.vbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 26px;
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 700;
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.vbtn.is-compact { height: 38px; padding: 0 18px; font-size: 11px; }

/* Primary — yellow */
.vbtn--primary { background: var(--vaal-yellow); color: #000; border-color: var(--vaal-yellow); }
.vbtn--primary:hover { background: #000; color: var(--vaal-yellow); border-color: #000; }

.vbtn[disabled] { color: var(--fg-3); border-color: var(--line); background: transparent; cursor: not-allowed; }

/* --- Eyebrow --------------------------------------------------------------- */
.vaal-eyebrow-comp {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700;
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--fg-1);
}
.vaal-eyebrow-comp.is-marked::before {
  content: "";
  width: 24px; height: 4px;
  background: var(--vaal-yellow);
}
.vaal-eyebrow-comp.is-light { color: #fff; }
.vaal-eyebrow-comp.is-yellow { color: var(--vaal-yellow); }

/* --- Form field ------------------------------------------------------------ */
.vaal-field { display: flex; flex-direction: column; gap: 10px; }
.vaal-field__label {
  font-size: 11px; font-weight: 700;
  letter-spacing: var(--ls-wider); text-transform: uppercase;
  color: var(--fg-1);
}
.vaal-field__input {
  height: 48px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-1);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.vaal-field__input::placeholder { color: var(--fg-3); }
.vaal-field__input:focus { outline: none; border-color: #000; box-shadow: inset 0 -3px 0 var(--vaal-yellow); }
.vaal-field__textarea { height: auto; padding: 14px 16px; resize: vertical; line-height: 1.55; }

/* --- Numeric --------------------------------------------------------------- */
.vaal-numeric {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}


/* =========================================================================
   5. PAGE COMPONENTS
   ========================================================================= */

/* --- Header ---------------------------------------------------------------- */
.site-header {
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
  padding: 12px var(--pad);
  position: sticky; top: 0; z-index: 30;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark { width: 38px; height: auto; display: block; flex: none; }
.brand__region {
  font-size: 9.5px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-3);
}

/* --- Hero ------------------------------------------------------------------ */
.hero { padding: clamp(56px,10vw,124px) var(--pad) clamp(36px,6vw,64px); position: relative; }
.hero__inner { display: flex; flex-direction: column; gap: clamp(24px,3.4vw,34px); }
.hero__title {
  font-weight: 800; font-size: clamp(34px,7.2vw,74px); line-height: 1;
  letter-spacing: -0.04em; text-transform: uppercase; color: #fff;
  max-width: 15ch; text-wrap: balance;
}
.hero-rule {
  display: block; height: 3px; width: clamp(96px,18vw,190px);
  background: var(--gold); transform-origin: left;
  animation: ruleDraw 820ms cubic-bezier(0.32,0.08,0.24,1) 420ms both;
}
.hero__lede {
  font-weight: 500; font-size: clamp(18px,2.8vw,27px); line-height: 1.35;
  letter-spacing: -0.01em; color: var(--text-2);
}
.hero__actions { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.cta-hero {
  align-self: flex-start; height: 58px; padding: 0 32px;
  animation: glowPulse 2800ms cubic-bezier(0.32,0.08,0.24,1) 1s 2;
}
.hero__hint {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--text-3);
}

.gold-strong { font-weight: 700; color: var(--gold); }
.gold { color: var(--gold); }

/* --- Spine ----------------------------------------------------------------- */
.spine-wrap { padding: 0 var(--pad) var(--sect-y); }
#spine {
  position: relative; padding-left: var(--spine);
  display: flex; flex-direction: column; gap: clamp(48px,7vw,88px);
}
.spine__track {
  position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--hair-soft);
}
#spinefill {
  position: absolute; left: 0; top: 0; width: 1px; height: 0;
  background: linear-gradient(180deg, rgba(255,221,0,0.15), var(--gold));
  transition: height 120ms linear;
}

.rung { display: flex; flex-direction: column; gap: 16px; }
.rung.is-step { gap: 10px; }
.rung.is-benefits { gap: 20px; }
.rung.is-toolkit { gap: 18px; }

/* --- Section type ---------------------------------------------------------- */
.copy-lg {
  font-weight: 500; font-size: clamp(16px,2.2vw,20px);
  line-height: 1.45; color: var(--text-3);
}
.figure-xl {
  font-weight: 800; font-size: clamp(30px,5.6vw,56px);
  line-height: 1.02; letter-spacing: -0.04em; color: #fff;
}
.note {
  border-top: 3px solid var(--gold); background: var(--coal);
  padding: clamp(20px,2.6vw,30px); max-width: 52ch; margin-top: 10px;
}
.copy { font-size: 15.5px; line-height: 1.7; color: var(--text-2); }
.copy.is-44 { max-width: 44ch; }
.copy.is-48 { max-width: 48ch; }

.step-num {
  font-weight: 800; font-size: clamp(44px,8.4vw,88px); line-height: 1;
  letter-spacing: -0.05em; color: rgba(255,255,255,0.14);
}
.step-num.is-gold { color: var(--gold); }
.step-title {
  font-weight: 700; font-size: clamp(21px,2.9vw,29px);
  letter-spacing: -0.02em; color: #fff;
}

.sect-title {
  font-weight: 800; font-size: clamp(25px,4vw,40px); line-height: 1.08;
  letter-spacing: -0.035em; color: #fff;
}
.sect-title.is-24 { max-width: 24ch; }
.sect-title.is-sm { font-size: clamp(23px,3.6vw,35px); line-height: 1.1; max-width: 26ch; }

.lead-gold { font-weight: 700; font-size: clamp(16px,2.2vw,20px); color: var(--gold); }

.sect-cta {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,221,0,0.35);
  transition: border-color 200ms, gap 200ms;
}
.sect-cta:hover { color: var(--gold); border-bottom-color: var(--gold); gap: 16px; }
.sect-cta.mt-6 { margin-top: 6px; }
.sect-cta.mt-12 { margin-top: 12px; }

/* --- Benefits list --------------------------------------------------------- */
.benefits { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.benefit {
  padding: 20px 0; border-bottom: 1px solid var(--hair-soft);
  display: flex; flex-direction: column; gap: 7px;
  transition: background var(--dur-fast);
}
.benefit:hover { background: rgba(255,255,255,0.02); }
.benefit__title { font-weight: 700; font-size: 16px; color: #fff; }
.benefit__copy { font-size: 14.5px; line-height: 1.65; color: var(--text-2); }

/* --- Toolkit --------------------------------------------------------------- */
.toolkit { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); }
.toolkit__chip {
  border: 1px solid var(--hair); background: var(--coal);
  padding: 16px 18px; font-weight: 600; font-size: 14.5px; color: #fff;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.toolkit__chip:hover { border-color: var(--gold); color: var(--gold); }
.toolkit__note { font-weight: 700; font-size: 15.5px; color: #fff; margin: 6px 0 0; }

/* --- Register -------------------------------------------------------------- */
#register {
  background: var(--coal); border-top: 1px solid var(--hair);
  padding: var(--sect-y) var(--pad);
}
.register__inner {
  width: min(680px,100%); margin: 0 auto;
  display: flex; flex-direction: column; gap: clamp(24px,3.2vw,36px);
}
.register__head { display: flex; flex-direction: column; gap: 14px; }
.register__title {
  font-weight: 800; font-size: clamp(27px,4.8vw,46px); line-height: 1.04;
  letter-spacing: -0.04em; color: #fff;
}

.success {
  border-top: 3px solid var(--gold); background: var(--ink);
  padding: clamp(24px,3.4vw,36px);
  display: flex; flex-direction: column; gap: 12px;
}
.success__title { font-weight: 700; font-size: 20px; line-height: 1.3; color: #fff; }
.success__copy { font-size: 15px; line-height: 1.7; color: var(--text-2); }

.reg-form {
  display: flex; flex-direction: column; gap: 22px;
  background: var(--ink); border: 1px solid var(--hair);
  padding: clamp(22px,3.2vw,38px);
}
/* Dark-surface overrides for the light-default field component. */
.reg-form .vaal-field__label { color: #fff; }
.reg-form .vaal-field__input {
  background: var(--coal); border-color: var(--hair); color: #fff;
}
/* --fg-3 (#808080) is a LIGHT-surface token. The component default carries it
   onto this dark form, where it lands at ~4.5:1 against --coal — a token
   misapplication, not an authored design decision. Corrected to ~7.3:1.
   Do not "restore" this to the component default. */
.reg-form .vaal-field__input::placeholder { color: rgba(255,255,255,0.6); }

.label-optional { font-weight: 600; color: var(--text-3); }

.field-err { font-size: 12.5px; font-weight: 600; color: var(--gold); }
.field-err.is-terms { margin-top: -14px; }

.phone-row { display: flex; }
.dial { width: 108px; padding: 0 10px; flex: none; }
.phone-input { border-left: 0; flex: 1; min-width: 0; }

.seg-group { display: flex; gap: 12px; }
.seg {
  flex: 1; height: 52px; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
  transition: background 200ms cubic-bezier(0.32,0.08,0.24,1), color 200ms, border-color 200ms;
}
.seg[aria-pressed="true"] {
  background: var(--gold); color: #000; border-color: var(--gold);
}

.terms {
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  border-top: 1px solid var(--hair); padding-top: 22px;
}
.terms__box { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.terms__copy { font-size: 13.5px; line-height: 1.65; color: var(--text-2); }

.turnstile-slot {
  border: 1px dashed rgba(255,255,255,0.24);
  min-height: 66px; display: flex; align-items: center;
  padding: 0 16px; background: var(--coal);
}
.turnstile-slot__label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-3);
}

.form-error { border-left: 3px solid var(--gold); background: var(--coal); padding: 14px 18px; }
.form-error__text { font-size: 13.5px; font-weight: 600; color: #fff; }

.reg-form__submit { width: 100%; height: 58px; }
.reg-form__submit[disabled] { color: var(--text-3); border-color: var(--hair); background: transparent; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--hair); padding: 18px var(--pad); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
}
/* The lockup SVG is the full 89x81 brand block; the window crops it to the
   wordmark strip so the yellow square is not repeated in the footer. */
.footer-lockup { display: block; width: 62px; height: 20px; overflow: hidden; flex: none; opacity: .9; }
.footer-lockup img { display: block; width: 72px; height: 65px; max-width: none; margin: -39px 0 0 -5px; }
.site-footer__tag { font-size: 11.5px; letter-spacing: .06em; color: var(--text-3); }

/* --- Sticky action bar ----------------------------------------------------- */
#stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(10,10,10,0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--hair);
  padding: 12px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  transform: translateY(110%);
  transition: transform 380ms cubic-bezier(0.32,0.08,0.24,1);
}
#stickybar.is-on { transform: none; }
.stickybar__text {
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-3);
}


/* =========================================================================
   6. MOTION
   ========================================================================= */

body[data-anim-ready] [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 620ms cubic-bezier(0.32,0.08,0.24,1),
              transform 620ms cubic-bezier(0.32,0.08,0.24,1);
}
body[data-anim-ready] [data-reveal].is-in { opacity: 1; transform: none; }

[data-rung] { position: relative; }
[data-rung]::before {
  content: ""; position: absolute; left: calc(-1 * var(--spine)); top: 24px;
  width: 9px; height: 9px;
  background: var(--gold); border: 1px solid var(--gold);
  transform: translateX(-5px) rotate(45deg) scale(1);
  box-shadow: 0 0 0 6px rgba(255,221,0,0.10);
  transition: transform 520ms cubic-bezier(0.32,0.08,0.24,1),
              background 520ms, border-color 520ms, box-shadow 520ms;
}
body[data-anim-ready] [data-rung]:not(.is-in)::before {
  background: var(--ink); border-color: rgba(255,255,255,0.35);
  transform: translateX(-5px) rotate(45deg) scale(.5);
  box-shadow: none;
}

@keyframes ruleDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,221,0,0); }
  50%      { box-shadow: 0 0 34px 0 rgba(255,221,0,0.35); }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  [data-rung]::before {
    background: var(--gold); border-color: var(--gold);
    transform: translateX(-5px) rotate(45deg) scale(1);
  }
  .hero-rule, .cta-hero { animation: none; }
  #stickybar { transition: none; }
}
