/* ════════════════════════════════════════════════════════════════
   SuperCat DS — Marketing footer  ·  .kfoot
   ────────────────────────────────────────────────────────────────
   ▸ Class prefix: `.kfoot` = "kit footer"
   ▸ Site-wide marketing footer. Brand block · column groups ·
     theme-aware. Modern editorial layout — wordmark left, three
     link columns, fine print at the bottom rule.
   ▸ Framework-agnostic. Theme-reactive through tokens — no extra
     CSS needed for dark mode (just flip [data-theme]).
   ────────────────────────────────────────────────────────────────
   API

     <footer class="kfoot">
       <div class="kfoot-shell">
         <div class="kfoot-lead">
           <a class="kfoot-brand" href="/" aria-label="SuperCat — home">
             <svg class="kfoot-brand-logo" viewBox="0 0 237 28">…wordmark…</svg>
           </a>
           <p class="kfoot-tag">One brand. Two products. One foundation.</p>
           <div class="kfoot-meta">
             <span class="kfoot-meta-dot" aria-hidden="true"></span>
             <span class="kfoot-meta-text">All systems normal · v3.0</span>
           </div>
         </div>

         <nav class="kfoot-cols" aria-label="Footer">
           <div class="kfoot-col">
             <h3 class="kfoot-eyebrow">System</h3>
             <ul class="kfoot-list">
               <li><a class="kfoot-link" href="/ds/reference.html">Reference</a></li>
               <li><a class="kfoot-link" href="/ds/tokens/design-tokens.json">Tokens</a></li>
             </ul>
           </div>
           …more columns…
         </nav>

         <div class="kfoot-cta">
           <h3 class="kfoot-cta-title">Ready to ship?</h3>
           <p class="kfoot-cta-copy">Spin up the design tokens in your stack in under a minute.</p>
           <a class="kb kb-md kb-primary" href="/app/dashboard.html">Open App</a>
         </div>
       </div>

       <div class="kfoot-rule">
         <span class="kfoot-rule-mark" aria-hidden="true">
           <svg viewBox="0 0 41 28"><use href="#i-mark"/></svg>
         </span>
         <p class="kfoot-rule-copy">
           © 2026 SuperCat Solutions
         </p>
         <ul class="kfoot-rule-links">
           <li><a href="/privacy">Privacy</a></li>
           <li><a href="/terms">Terms</a></li>
           <li><a href="/security">Security</a></li>
         </ul>
       </div>
     </footer>

   Tokens consumed:
     --surface-{page,2,card}     --text-{primary,body,muted,faint}
     --color-{gold,crimson}      --border-{subtle,default}
     --space-N                   --radius-{md,lg,xl}
     --font-{sans,mono}          --text-* size ramp
     --shadow-1                  --duration-base   --ease-out
   ════════════════════════════════════════════════════════════════ */


:where(.kfoot) {
  --kfoot-pad-y:      clamp(56px, 7vw, 104px);
  /* Horizontal padding matches the marketing-nav outer padding so the
     footer content aligns with the nav pill at every viewport.
     --kfoot-max is computed from --kfoot-pad-x so the inner content area
     stays at 1480px under BOTH box-sizing modes (browser content-box AND
     Tailwind/shadcn border-box). .kfoot-shell sets box-sizing: border-box
     explicitly below to lock it down regardless of consumer reset. */
  --kfoot-pad-x:      clamp(12px, 2.4vw, 28px);
  --kfoot-max:        calc(1480px + 2 * var(--kfoot-pad-x));
  --kfoot-gap-col:    clamp(32px, 4vw, 64px);
  --kfoot-gap-link:   var(--space-2);

  /* Footer is ALWAYS dark — same character as the .vn marketing nav.
     These are absolute values (not theme tokens) so the surface stays
     consistent across light + dark page themes. */
  --kfoot-bg:         #131211;
  --kfoot-bg-elev:    #1F1E1C;
  --kfoot-fg:         color-mix(in oklch, #EBE6D7 86%, transparent);
  --kfoot-fg-strong:  #EBE6D7;
  --kfoot-fg-muted:   color-mix(in oklch, #EBE6D7 60%, transparent);
  --kfoot-fg-faint:   color-mix(in oklch, #EBE6D7 38%, transparent);
  --kfoot-border:     color-mix(in oklch, #EBE6D7 10%, transparent);
}

.kfoot {
  display: block;
  position: relative;
  width: 100%;
  background: var(--kfoot-bg);
  color: var(--kfoot-fg);
  font-family: var(--font-sans);
}

/* Editorial top-edge — a thin gold hairline that matches the brand
   spike on the wordmark. On the dark surface the gold pops crisper. */
.kfoot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0,
    color-mix(in oklch, var(--color-gold) 70%, transparent) 30%,
    color-mix(in oklch, var(--color-gold) 70%, transparent) 70%,
    transparent 100%);
}


/* ── Shell — three-column flex with brand at left, CTA at right ── */

.kfoot-shell {
  box-sizing: border-box;            /* see token block: keeps content 1480 under any reset */
  max-width: var(--kfoot-max);
  margin: 0 auto;
  padding: var(--kfoot-pad-y) var(--kfoot-pad-x) clamp(28px, 3vw, 44px);
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr;
  gap: var(--kfoot-gap-col);
  align-items: start;
}
@media (max-width: 960px) {
  .kfoot-shell {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}


/* ── Brand lead block ──────────────────────────────────────────── */

.kfoot-lead {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}
.kfoot-brand {
  display: inline-block;
  color: var(--kfoot-fg-strong);
  text-decoration: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.kfoot-brand:hover { opacity: 0.7; }
.kfoot-brand:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-crimson) 22%, transparent);
  border-radius: var(--radius-sm);
}
.kfoot-brand-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
}
/* Color logo — letters take currentColor (cream), mark stays gold.
   These rules use bare class selectors because descendant selectors
   don't reliably penetrate the <use> shadow tree across browsers;
   global rules in reference.css already cover this for the rest of
   the system, but the footer pins `color` to its cream foreground so
   `.logo-word { fill: currentColor }` resolves correctly here. */
.kfoot-brand-logo { color: var(--kfoot-fg-strong); }

.kfoot-tag {
  margin: 0;
  /* Use the system sans (matches nav + body) — no fallback serif. */
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  line-height: 1.4;
  letter-spacing: var(--tracking-tighter);
  color: var(--kfoot-fg-strong);
  max-width: 32ch;
}

.kfoot-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--kfoot-fg-muted);
}
.kfoot-meta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-moss, #6F8C5A);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-moss, #6F8C5A) 18%, transparent);
}


/* ── Link columns ──────────────────────────────────────────────── */

.kfoot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.kfoot-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.kfoot-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--kfoot-fg-muted);
}
.kfoot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--kfoot-gap-link);
}
.kfoot-link {
  color: var(--kfoot-fg);
  text-decoration: none;
  font-size: var(--text-sm);
  line-height: 1.5;
  display: inline-block;
  transition: color var(--duration-base) var(--ease-out);
}
.kfoot-link:hover { color: var(--kfoot-fg-strong); }
.kfoot-link:focus-visible {
  outline: 0;
  color: var(--kfoot-fg-strong);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-crimson) 22%, transparent);
  border-radius: var(--radius-sm);
}
.kfoot-link[data-new]::after {
  content: "New";
  display: inline-block;
  margin-left: var(--space-2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-crimson);
  color: var(--text-on-crimson);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
  position: relative;
  top: -1px;
}


/* ── CTA panel (right side on desktop) ─────────────────────────── */

.kfoot-cta {
  border-radius: var(--radius-xl);
  padding: clamp(20px, 2vw, 28px);
  background: var(--kfoot-bg-elev);
  border: 1px solid var(--kfoot-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-start;
}
.kfoot-cta-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-tighter);
  color: var(--kfoot-fg-strong);
}
.kfoot-cta-copy {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--kfoot-fg);
}


/* ── Bottom rule (legal + secondary links) ─────────────────────── */

.kfoot-rule {
  max-width: var(--kfoot-max);
  margin: 0 auto;
  padding: var(--space-5) var(--kfoot-pad-x);
  border-top: 1px dashed var(--kfoot-border);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.kfoot-rule-mark {
  display: inline-flex;
  align-items: center;
  width: 24px;
  color: var(--color-gold);
  flex-shrink: 0;
}
.kfoot-rule-mark svg {
  width: 100%;
  height: auto;
  display: block;
  fill: currentColor;
}
.kfoot-rule-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--kfoot-fg-muted);
  flex: 1 1 auto;
  min-width: 220px;
}
.kfoot-rule-copy a {
  color: var(--kfoot-fg);
  text-decoration: none;
  border-bottom: 1px solid var(--kfoot-border);
  transition: color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
}
.kfoot-rule-copy a:hover {
  color: var(--kfoot-fg-strong);
  border-color: var(--kfoot-fg-strong);
}
.kfoot-rule-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.kfoot-rule-links a {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--kfoot-fg-muted);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out);
}
.kfoot-rule-links a:hover { color: var(--kfoot-fg-strong); }

/* Footer is intentionally theme-agnostic — same dark editorial surface
   in both light + dark page themes (matches the .vn marketing nav). */
