/* ================================================================
   KENZLY — dark theme layer (Kenzly Design System, claude.ai/design
   project "Kenzly Design System", id 7a2da353-…-adbc2f2557bd).
   Monochrome / machined: near-black canvas, silver chrome text,
   hairline borders, flat elevation. Currently linked by index.html
   only — the future shared base once other pages adopt this
   direction. Values are copied from the DS's tokens/*.css and its
   ui_kits/website/*.jsx composition (which is the more concrete
   source where the two ever disagreed — e.g. the JSX composes
   sections with 32px gutters even though spacing.css lists 24px).
   ================================================================ */

/* ── Self-hosted fonts (latin subset, OFL) — no third-party round trip
   before first paint; Poppins 400 is also preloaded in each page. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/poppins-300.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; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/poppins-400.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; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/poppins-500.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; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plexmono-400.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; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plexmono-500.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; }

/* ── tokens/colors.css (dark) ─────────────────────────────────── */
:root {
  color-scheme: dark;
  --live-rgb: 108 140 255;
  /* app-window frame around product screenshots */
  --frame-bg: #111317; --frame-bar: #181B20; --frame-line: rgba(255, 255, 255, 0.08); --frame-dot: #343942;
  --shadow-shot: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 12px 28px -16px rgba(0, 0, 0, .6);
  --shadow-soft: rgba(0, 0, 0, .45);
  --surface-page:   #08090A;
  --surface-card:   #0F1113;
  --surface-raised: #16181B;
  --surface-inset:  #1E2125;
  --surface-hover:  #282B30;

  --text-primary:   #F2F3F5;
  --text-secondary: #C0C5CC;
  --text-muted:     #969CA5;
  --text-faint:     #7E848D;
  --text-on-chrome: #000000;

  --border-faint:  rgba(255, 255, 255, 0.06);
  --border-hairline: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-bright: rgba(255, 255, 255, 0.32);

  --k-chrome:      linear-gradient(180deg, #FFFFFF 0%, #E4E7EB 30%, #A7ADB6 60%, #6B7079 100%);
  --k-chrome-soft: linear-gradient(180deg, #E9EBEE 0%, #B9BEC6 100%);
  --k-chrome-flat: #C4C9D0;

  --k-ok:         #4ADE80; --k-ok-dim:     rgba(74, 222, 128, 0.14);
  --k-warn:       #FBBF24; --k-warn-dim:   rgba(251, 191, 36, 0.14);
  --k-danger:     #F87171; --k-danger-dim: rgba(248, 113, 113, 0.14);
  --k-live:       #6C8CFF; --k-live-dim:   rgba(108, 140, 255, 0.14);

  --focus-ring: rgba(108, 140, 255, 0.55);

  /* ── tokens/typography.css ── */
  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body:    'Poppins', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
  --font-brand:   'Poppins', system-ui, sans-serif;

  /* No bold anywhere on the site, wordmark included: the two heavy steps
     are flattened to regular at the token so every existing usage drops
     with them. Hierarchy comes from size and colour instead of weight. */
  --fw-light: 300; --fw-regular: 400; --fw-medium: 500; --fw-semibold: 400; --fw-bold: 400;

  --fs-display-xl: 76px; --fs-display-l: 56px; --fs-display-m: 40px;
  --fs-h1: 32px; --fs-h2: 24px; --fs-h3: 20px;
  --fs-body-lg: 18px; --fs-body: 16px; --fs-body-sm: 14px;
  --fs-caption: 13px; --fs-eyebrow: 12px; --fs-micro: 11px;

  --lh-tight: 1.02; --lh-snug: 1.14; --lh-normal: 1.5; --lh-relaxed: 1.65;

  --ls-display: -0.03em; --ls-tight: -0.015em; --ls-normal: 0;
  --ls-wide: 0.08em; --ls-eyebrow: 0.18em; --ls-brand: 0.24em;

  /* ── tokens/spacing.css ── */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

  --section-y:     72px;   /* tightened from the DS's 96px default — felt too far apart section-to-section */
  --container-max: 1200px;
  --gutter:        32px;   /* matches the DS composition's section side padding */
  /* 32px a side eats a fifth of a 320px screen; narrowed below. */

  /* ── tokens/effects.css ── */
  --radius-xs: 6px; --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px; --radius-xl: 28px; --radius-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms; --dur: 220ms; --dur-slow: 420ms;
  --blur: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  --shadow-xl: 0 40px 100px -30px rgba(0, 0, 0, 0.85);
  --edge-top:  inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --edge-full: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  --glow-chrome: 0 0 60px rgba(226, 230, 235, 0.10);
  --glow-live:   0 0 0 1px rgba(108, 140, 255, 0.35), 0 0 24px rgba(108, 140, 255, 0.18);
}

@media (max-width: 420px) { :root { --gutter: 20px; } }

/* ================================================================
   base.css
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-display);
  line-height: var(--lh-snug);
}
/* The UA stylesheet bolds these regardless of the tokens above; emphasis
   is carried by colour, not weight. */
strong, b, th { font-weight: var(--fw-regular); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::selection { background: rgba(108, 140, 255, 0.3); color: var(--text-primary); }

.k-container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }

.k-chrome-text {
  background: var(--k-chrome);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Without this, a chrome-text element that wraps (or that contains
     multiple stacked lines) shows ONE gradient sliced across the whole
     block — line 1 reads bright white, the last line reads muddy gray.
     Cloning the background per line-fragment gives every line its own
     full white-to-graphite sheen instead. */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  /* Tenue glow behind the metal — a soft halo, not a neon outline. */
  filter: drop-shadow(0 0 14px rgba(230, 235, 240, 0.16)) drop-shadow(0 0 32px rgba(200, 210, 220, 0.08));
}

/* Line-icon utility — sizes to the parent's font-size so the same SVG
   markup works inside a 12px tag, a 22px step number, or a 24px
   feature-card icon tile without per-context overrides. */
.k-icon { width: 1em; height: 1em; flex-shrink: 0; display: block; }

.k-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--text-faint);
}

@keyframes k-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Reveal-on-scroll — same IntersectionObserver JS as before, DS-calm timing */
.rev, .rev-l, .rev-r {
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.rev   { transform: translateY(16px); }
.rev-l { transform: translateX(-20px); }
.rev-r { transform: translateX(20px); }
.rev.on, .rev-l.on, .rev-r.on { opacity: 1; transform: none; }

/* ── Accessibility ─────────────────────────────────────────────── */
.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 1000;
  padding: .6rem 1.1rem; border-radius: var(--radius-md);
  background: var(--k-chrome); color: var(--text-on-chrome);
  font-size: .82rem; font-weight: var(--fw-semibold); text-decoration: none;
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity var(--dur), transform var(--dur);
}
.skip-link:focus-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: var(--radius-xs); }

@media (prefers-reduced-motion: reduce) {
  .rev { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ================================================================
   components/brand/Wordmark.jsx → .k-wordmark
   ================================================================ */
.k-wordmark {
  display: inline-flex; flex-direction: column; align-items: center;
  font-family: var(--font-brand); text-transform: uppercase; line-height: 1;
}
.k-wordmark__main {
  font-weight: var(--fw-bold); letter-spacing: 0.06em;
  background: var(--k-chrome); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 10px rgba(230, 235, 240, 0.16));
}
.k-wordmark__sub { margin-top: 3px; font-weight: var(--fw-light); letter-spacing: var(--ls-brand); color: var(--text-muted); }
.k-wordmark--sm .k-wordmark__main { font-size: 18px; }
.k-wordmark--sm .k-wordmark__sub  { font-size: 8px; margin-top: 2px; }
.k-wordmark--md .k-wordmark__main { font-size: 28px; }
.k-wordmark--md .k-wordmark__sub  { font-size: 11px; }
.k-wordmark--xl .k-wordmark__main { font-size: 84px; }
.k-wordmark--xl .k-wordmark__sub  { font-size: 26px; margin-top: 8px; }

/* ================================================================
   Hero.jsx → SiteNav() → .k-nav
   ================================================================ */
.k-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--border-faint);
}
.k-nav__links { display: flex; align-items: center; gap: 28px; }
.k-nav__links a {
  font-family: var(--font-body); font-size: 14px; color: var(--text-muted);
  transition: color var(--dur) var(--ease-out);
}
.k-nav__links a:hover, .k-nav__links a.active { color: var(--text-primary); }
.k-nav__burger {
  display: none; background: none; border: 1px solid var(--border-hairline); cursor: pointer;
  color: var(--text-primary); border-radius: var(--radius-sm); padding: .5rem .6rem; line-height: 0;
}
#mob-menu {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface-card); border-bottom: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-lg);
  flex-direction: column; gap: .3rem; padding: 1rem var(--gutter) 1.4rem;
}
#mob-menu.open { display: flex; }
#mob-menu a {
  color: var(--text-muted); font-size: .95rem; padding: .7rem .4rem;
  border-radius: var(--radius-sm); transition: color var(--dur);
}
#mob-menu a:hover { color: var(--text-primary); }
/* The generic #mob-menu a colour out-ranks .k-btn--primary and left the
   CTA's label muted grey on the chrome fill. */
#mob-menu a.k-btn--primary, #mob-menu a.k-btn--primary:hover { color: var(--text-on-chrome); }
#mob-menu .mob-label {
  margin-top: .4rem; padding: .2rem .4rem;
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--ls-wide);
  text-transform: uppercase; color: var(--text-faint);
}
#mob-menu .mob-sub { padding-left: 1.2rem; }

/* "Industrias" dropdown — one entry per niche page. Opens on click
   (scripts/site.js) and, on hover-capable pointers, on hover too. */
.k-nav__drop { position: relative; }
.k-nav__drop-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; color: var(--text-muted);
  transition: color var(--dur) var(--ease-out);
}
.k-nav__drop-btn svg { width: 12px; height: 12px; transition: transform var(--dur) var(--ease-out); }
.k-nav__drop-btn:hover, .k-nav__drop-btn.active, .k-nav__drop.open .k-nav__drop-btn { color: var(--text-primary); }
.k-nav__drop.open .k-nav__drop-btn svg { transform: rotate(180deg); }
.k-nav__menu {
  position: absolute; top: calc(100% + 14px); left: 50%; min-width: 272px;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--surface-card); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg), var(--edge-top);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
}
/* Invisible bridge so the pointer can cross the gap without closing it */
.k-nav__menu::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.k-nav__drop.open .k-nav__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) {
  .k-nav__drop:hover .k-nav__menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .k-nav__drop:hover .k-nav__drop-btn { color: var(--text-primary); }
}
.k-nav__links .k-nav__menu a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--text-primary);
}
.k-nav__links .k-nav__menu a:hover, .k-nav__links .k-nav__menu a[aria-current="page"] { background: var(--surface-raised); }
.k-nav__menu small { font-size: 12px; color: var(--text-faint); }

/* ================================================================
   components/actions/Button.jsx → .k-btn
   ================================================================ */
.k-btn {
  display: inline-flex; align-items: center; justify-content: center;
  /* No base border — a *transparent* 1px border on a pill-radius
     element with a gradient/solid fill triggers a Chromium
     antialiasing seam (a faint bright rim traces the curve on HiDPI
     screens). Variants that need a real border set their own below. */
  border: none; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: var(--fw-semibold); letter-spacing: 0.01em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.k-btn:active { transform: scale(0.97); }
.k-btn--sm { padding: 8px 14px; font-size: 13px; gap: 6px; }
.k-btn--md { padding: 12px 20px; font-size: 14px; gap: 8px; }
.k-btn--lg { padding: 16px 28px; font-size: 16px; gap: 10px; }
.k-btn--block { display: flex; width: 100%; }

/* The chrome gradient runs white -> dark graphite. Against a near-
   black page, that dark bottom edge meeting the page head-on reads as
   a bright rim (simultaneous-contrast illusion) unless something
   grounds it — an inset shadow that darkens the fill's own bottom
   edge, plus a soft outer shadow so the pill doesn't end abruptly. */
.k-btn--primary {
  background: var(--k-chrome); color: var(--text-on-chrome);
  box-shadow: var(--shadow-sm), inset 0 -2px 3px rgba(0, 0, 0, .3);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45));
}
.k-btn--primary:hover {
  background: var(--k-chrome-soft);
  box-shadow: var(--glow-chrome), inset 0 -2px 3px rgba(0, 0, 0, .22);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45));
}

.k-btn--secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border-strong); }
.k-btn--secondary:hover { background: var(--surface-hover); border-color: var(--border-bright); }

.k-btn--ghost { background: transparent; color: var(--text-secondary); }
.k-btn--ghost:hover { background: var(--surface-inset); }

.k-btn--link { background: transparent; color: var(--text-secondary); padding: 0; border-radius: 0; }
.k-btn--link:hover { color: var(--text-primary); }

/* ================================================================
   components/surfaces/Card.jsx → .k-card
   ================================================================ */
.k-card {
  padding: var(--space-6);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--edge-top);
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.k-card--flat   { background: var(--surface-card); }
.k-card--raised { background: var(--surface-raised); box-shadow: var(--shadow-md), var(--edge-top); }
.k-card--inset  { background: var(--surface-inset); }
.k-card--interactive { cursor: pointer; }
.k-card--interactive:hover { border-color: var(--border-strong); transform: translateY(-2px); }

/* ================================================================
   components/data-display/Tag.jsx → .k-tag
   ================================================================ */
.k-tag {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--font-mono); font-weight: var(--fw-medium); letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
}
.k-tag--sm { padding: 3px 9px; font-size: 11px; }
.k-tag--md { padding: 5px 12px; font-size: 12px; }
.k-tag--outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-hairline); }
.k-tag--solid   { background: var(--surface-inset); color: var(--text-secondary); border: 1px solid var(--border-faint); }

/* ================================================================
   components/data-display/Badge.jsx → .k-badge
   ================================================================ */
.k-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; white-space: nowrap;
  border: 1px solid;
}
.k-badge__dot { width: 6px; height: 6px; border-radius: 50%; }
.k-badge--neutral { color: var(--text-muted); background: var(--surface-inset); border-color: var(--border-hairline); }
.k-badge--neutral .k-badge__dot { background: var(--text-faint); }
.k-badge--live { color: var(--k-live); background: var(--k-live-dim); border-color: rgba(108, 140, 255, .3); }
.k-badge--live .k-badge__dot { background: var(--k-live); box-shadow: 0 0 8px currentColor; animation: k-pulse 1.8s var(--ease-in-out) infinite; }
.k-badge--ok { color: var(--k-ok); background: var(--k-ok-dim); border-color: rgba(74, 222, 128, .3); }
.k-badge--ok .k-badge__dot { background: var(--k-ok); }
.k-badge--warn { color: var(--k-warn); background: var(--k-warn-dim); border-color: rgba(251, 191, 36, .3); }
.k-badge--warn .k-badge__dot { background: var(--k-warn); }
.k-badge--chrome { color: var(--text-primary); background: var(--surface-hover); border-color: var(--border-strong); }
.k-badge--chrome .k-badge__dot { background: var(--k-chrome-flat); }

/* ================================================================
   components/data-display/MetricTile.jsx → .k-metric-tile
   ================================================================ */
.k-metric-tile {
  display: flex; flex-direction: column; gap: 8px;
  padding: var(--space-4);
  background: var(--surface-raised); border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md); box-shadow: var(--edge-top);
}
.k-metric-tile__label {
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text-faint);
}
.k-metric-tile__row { display: flex; align-items: baseline; gap: 3px; transition: opacity .15s ease; }
.k-metric-tile__value { font-family: var(--font-mono); font-size: 26px; font-weight: var(--fw-medium); letter-spacing: -0.01em; color: var(--text-primary); }
.k-metric-tile__value--live { color: var(--k-live); }
.k-metric-tile__value--warn { color: var(--k-warn); }
.k-metric-tile__unit { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }

/* ================================================================
   components/data-display/ProgressMeter.jsx → .k-progress
   ================================================================ */
.k-progress { display: flex; flex-direction: column; gap: 8px; }
.k-progress__head { display: flex; justify-content: space-between; align-items: baseline; }
.k-progress__label { font-size: var(--fs-body-sm); color: var(--text-secondary); }
.k-progress__value { font-family: var(--font-mono); font-size: var(--fs-body-sm); font-weight: var(--fw-medium); color: var(--text-primary); }
.k-progress__track { height: 6px; border-radius: var(--radius-pill); background: var(--surface-inset); overflow: hidden; }
.k-progress__fill { height: 100%; border-radius: var(--radius-pill); background: var(--k-chrome-flat); transition: width var(--dur-slow) var(--ease-out); }

/* ================================================================
   components/data-display/StatusDot.jsx → .k-status
   ================================================================ */
.k-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-secondary); }
.k-status__glyph { font-size: 10px; line-height: 1; }
.k-status--ok .k-status__glyph { color: var(--k-ok); }
.k-status--warn .k-status__glyph { color: var(--k-warn); }
.k-status--danger .k-status__glyph { color: var(--k-danger); }
.k-status--idle .k-status__glyph { color: var(--text-faint); }

/* ================================================================
   components/data-display/StatCard.jsx → .k-stat-card
   ================================================================ */
.k-stat-card { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.k-stat-card__value {
  font-family: var(--font-display); font-size: var(--fs-display-m); font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-display); line-height: 1;
  background: var(--k-chrome); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(230, 235, 240, 0.14));
}
.k-stat-card__value--flat { background: none; -webkit-text-fill-color: currentColor; color: var(--text-primary); }
.k-stat-card__caption { font-size: var(--fs-body-sm); color: var(--text-muted); max-width: 220px; line-height: var(--lh-normal); }

/* ================================================================
   components/surfaces/FeatureCard.jsx → .k-feature-card
   ================================================================ */
.k-feature-card { display: flex; flex-direction: column; gap: var(--space-4); }
.k-feature-card__row { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.k-feature-card__body { display: flex; flex-direction: column; gap: var(--space-4); }
.k-feature-card__icon {
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; border-radius: var(--radius-md);
  background: var(--surface-inset); border: 1px solid var(--border-hairline);
}
.k-feature-card__eyebrow { font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text-faint); }
.k-feature-card h3 { font-size: var(--fs-h3); letter-spacing: var(--ls-tight); color: var(--text-primary); }
.k-feature-card p { margin: 0; font-size: var(--fs-body-sm); line-height: var(--lh-relaxed); color: var(--text-muted); }
.k-feature-card__tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
@media (max-width: 640px) {
  .k-feature-card__row { flex-direction: row; align-items: center; gap: 14px; }
  .k-feature-card__row h3 { flex: 1; margin: 0; }
  .k-feature-card__row .k-feature-card__icon { margin: 0; flex-shrink: 0; }
}

/* ================================================================
   Accordion — same trigger/panel/chevron classes drive four shapes
   (feature cards, diff cards, the problem statement, pricing tiers).
   Desktop always renders the panel expanded and the trigger inert;
   only ≤640px collapses/expands, toggled via JS adding .is-open.
   ================================================================ */
.k-accordion__trigger {
  /* Explicit reset, not `all: unset` — some WebKit builds don't fully
     strip the native <button> chrome (white pill, black text) with
     `all: unset`, only with -webkit-appearance: none spelled out.
     No `display` here on purpose: every trigger class below (feature
     card row, diff-card, problem-sec, pricing head) sets its own, and
     since this rule loads after .k-feature-card__row in this same
     file, a display here would win the cascade and silently break
     that flex row back to block stacking. */
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  box-sizing: border-box; width: 100%;
  margin: 0; padding: 0; border: none; border-radius: 0;
  background: none; box-shadow: none;
  font: inherit; color: inherit; text-align: inherit; line-height: inherit;
  cursor: pointer;
}
.k-accordion__chevron { flex-shrink: 0; color: var(--text-faint); transition: transform var(--dur); }
@media (max-width: 640px) {
  .k-accordion__panel {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .4s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
  }
  .k-accordion__item.is-open .k-accordion__panel { opacity: 1; }
  .k-accordion__item.is-open .k-accordion__chevron { transform: rotate(180deg); }
}
@media (min-width: 641px) {
  .k-accordion__trigger { pointer-events: none; }
  .k-accordion__chevron { display: none; }
}

/* ================================================================
   components/surfaces/StepRow.jsx → .k-step-row
   ================================================================ */
.k-step-row {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-6);
  padding-bottom: var(--space-8); border-bottom: 1px solid var(--border-faint);
}
.k-step-row:last-child { padding-bottom: 0; border-bottom: none; }
.k-step-row__index {
  font-family: var(--font-display); font-size: var(--fs-display-m); font-weight: var(--fw-regular);
  line-height: 1; color: var(--text-faint);
}
.k-step-row__body { display: flex; flex-direction: column; gap: 10px; }
.k-step-row__icon { font-size: 22px; }
.k-step-row h3 { font-size: var(--fs-h3); letter-spacing: var(--ls-tight); color: var(--text-primary); }
.k-step-row p { margin: 0; font-size: var(--fs-body-sm); line-height: var(--lh-relaxed); color: var(--text-muted); max-width: 560px; }

/* ================================================================
   components/surfaces/PricingTier.jsx → .k-pricing-tier
   ================================================================ */
.k-pricing-tier {
  display: flex; flex-direction: column; gap: var(--space-5); position: relative;
  border: 1px solid var(--border-hairline); box-shadow: var(--edge-top);
}
.k-pricing-tier--featured { border-color: var(--border-bright); box-shadow: var(--shadow-lg), var(--edge-top); }
.k-pricing-tier__badge { position: absolute; top: -12px; left: var(--space-6); }
.k-pricing-tier__head { display: flex; flex-direction: column; gap: 10px; }
.k-pricing-tier__phase { font-family: var(--font-mono); font-size: var(--fs-eyebrow); letter-spacing: var(--ls-eyebrow); text-transform: uppercase; color: var(--text-faint); }
.k-pricing-tier h3 { font-size: var(--fs-h2); letter-spacing: var(--ls-tight); color: var(--text-primary); }
.k-pricing-tier__desc { margin: 0; font-size: var(--fs-body-sm); line-height: var(--lh-relaxed); color: var(--text-muted); }
.k-pricing-tier__price-block { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; border-top: 1px solid var(--border-faint); }
.k-pricing-tier__price {
  font-family: var(--font-display); font-size: var(--fs-h1); font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight);
  background: var(--k-chrome); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-top: var(--space-4);
  filter: drop-shadow(0 0 10px rgba(230, 235, 240, 0.14));
}
.k-pricing-tier__price-note { font-family: var(--font-mono); font-size: var(--fs-caption); color: var(--text-faint); }
.k-pricing-tier__features { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: flex; flex-direction: column; gap: 10px; }
.k-pricing-tier__features li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-body-sm); color: var(--text-secondary); }
.k-pricing-tier__features li::before {
  content: '';
  width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C8CFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: center;
}

/* ================================================================
   Accent theming (page-level) — default is royal-blue (--k-live).
   agro.html opts into a green accent via data-accent="agro" on <body>.
   Only the small "live/accent" touches shift (badges, checkmarks,
   glow, focus ring, icon tints) — primary buttons stay the chrome
   gradient regardless, matching the DS's "chrome is always chrome"
   rule.
   ================================================================ */
[data-accent="agro"] {
  --k-live: #34D399;
  --k-live-dim: rgba(52, 211, 153, 0.14);
  --focus-ring: rgba(52, 211, 153, 0.55);
  --glow-live: 0 0 0 1px rgba(52, 211, 153, 0.35), 0 0 24px rgba(52, 211, 153, 0.18);
}

/* ================================================================
   Sector tags (proyectos.html) — fixed hues, independent of page
   accent, so a project keeps its own sector color even inside the
   green-accented agro.html.
   ================================================================ */
[data-sector="agro"] { --sector-fg: #34D399; --sector-bg: rgba(52, 211, 153, .12); }
[data-sector="amb"]  { --sector-fg: #38BDF8; --sector-bg: rgba(56, 189, 248, .12); }
[data-sector="mfg"]  { --sector-fg: #FB923C; --sector-bg: rgba(251, 146, 60, .12); }
[data-sector="saas"] { --sector-fg: #A78BFA; --sector-bg: rgba(167, 139, 250, .12); }
[data-sector="dep"]  { --sector-fg: #F472B6; --sector-bg: rgba(244, 114, 182, .12); }

/* Fixed project-status colors — independent of both page accent and
   sector, so "en producción" always reads the same green everywhere. */
:root {
  --status-prod: #4ADE80;
  --status-saas: #A78BFA;
  --status-dev:  #FBBF24;
}

/* ================================================================
   components/data-display/Filter (proyectos.html sector filter)
   ================================================================ */
.k-filter-btn {
  font-family: var(--font-mono); font-size: 12px; font-weight: var(--fw-medium); letter-spacing: 0.02em;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-muted); border: 1px solid var(--border-hairline);
  cursor: pointer; transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.k-filter-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.k-filter-btn.is-active { color: var(--text-on-chrome); background: var(--k-chrome); border-color: transparent; }

/* ================================================================
   Project card (proyectos.html / agro.html shared case-study card)
   ================================================================ */
.k-project-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border-hairline); border-radius: var(--radius-lg);
  background: var(--surface-card); box-shadow: var(--edge-top);
  overflow: hidden; transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.k-project-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.k-project-card__visual {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: var(--surface-inset); border-bottom: 1px solid var(--border-faint);
}
.k-project-card__visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k-project-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex: 1; }
.k-project-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.k-project-card__sector {
  font-family: var(--font-mono); font-size: 10px; font-weight: var(--fw-medium); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--radius-pill); background: var(--sector-bg, var(--surface-inset)); color: var(--sector-fg, var(--text-muted));
}
.k-project-card__status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.k-project-card__status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.k-project-card__status--prod .k-project-card__status-dot { background: var(--status-prod); box-shadow: 0 0 6px var(--status-prod); }
.k-project-card__status--saas .k-project-card__status-dot { background: var(--status-saas); box-shadow: 0 0 6px var(--status-saas); }
.k-project-card__status--dev  .k-project-card__status-dot { background: var(--status-dev);  box-shadow: 0 0 6px var(--status-dev); }
.k-project-card__cat { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.03em; color: var(--text-faint); }
.k-project-card h3 { font-size: 18px; font-weight: var(--fw-semibold); letter-spacing: var(--ls-tight); color: var(--text-primary); }
.k-project-card p.desc { margin: 0; font-size: var(--fs-body-sm); line-height: var(--lh-relaxed); color: var(--text-muted); flex: 1; }
.k-project-card__metrics { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; border-top: 1px solid var(--border-faint); margin-top: 4px; }
.k-project-card__metric { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.k-project-card__metric::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--sector-fg, var(--k-live)); flex-shrink: 0; margin-top: 2px; }
.k-project-card__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }

/* Featured variant — spans 2 columns, image beside content */
.k-project-card--featured { grid-column: span 2; flex-direction: row; }
.k-project-card--featured .k-project-card__visual { width: 46%; aspect-ratio: auto; border-bottom: none; border-right: 1px solid var(--border-faint); flex-shrink: 0; }
.k-project-card--featured .k-project-card__body { padding: 28px; justify-content: center; }
.k-project-card--featured.k-project-card--flip { flex-direction: row-reverse; }
.k-project-card--featured.k-project-card--flip .k-project-card__visual { border-right: none; border-left: 1px solid var(--border-faint); }
@media (max-width: 760px) {
  .k-project-card--featured, .k-project-card--featured.k-project-card--flip { grid-column: span 1; flex-direction: column; }
  .k-project-card--featured .k-project-card__visual { width: 100%; aspect-ratio: 16/9; border-right: none; border-left: none; border-bottom: 1px solid var(--border-faint); }
}

/* ================================================================
   Footer — shared across all pages (identical structure/copy
   pattern: wordmark + blurb, link columns, copyright row).
   ================================================================ */
footer { padding: 56px var(--gutter) 32px; border-top: 1px solid var(--border-faint); }
.foot-top { max-width: var(--container-max); margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; }
.foot-brand { display: flex; flex-direction: column; gap: 12px; max-width: 260px; }
.foot-brand p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-faint); }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 12px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); font-weight: var(--fw-medium); }
.foot-col a { font-size: 14px; color: var(--text-muted); transition: color var(--dur); }
.foot-col a:hover { color: var(--text-primary); }
.foot-bottom { max-width: var(--container-max); margin: 0 auto; padding-top: 24px; border-top: 1px solid var(--border-faint); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.foot-copy { font-family: var(--font-body); font-size: 13px; color: var(--text-faint); }

/* Nav — logo + mobile burger breakpoint (shared across all pages) */
.k-nav__logo { text-decoration: none; }
@media (max-width: 820px) {
  .k-nav__links, .k-nav .k-btn.desktop { display: none; }
  .k-nav__burger { display: flex; align-items: center; justify-content: center; }
}

/* ================================================================
   Calendly embed — shared across index.html and agro.html.
   Calendly ignores our background/text/accent query-string params on
   this plan — verified by reading the actual iframe src (the params
   do reach Calendly, it just renders its default light card anyway).
   Query-param customization is gated to paid plans. Rather than ship
   a white card on a black page, force it dark with the standard
   "invert the iframe" trick: flip light<->dark, then rotate hue back
   so blues land near blue instead of orange. Not pixel-perfect (logos
   /photos would invert too, but Calendly's UI here is flat color),
   good enough to read as "on brand" instead of "a bug".
   ================================================================ */
.calendly-frame {
  max-width: 720px; margin: 0 auto 32px; padding: 10px;
  background: var(--surface-card); border: 1px solid var(--border-hairline);
  border-radius: calc(var(--radius-lg) + 10px); box-shadow: var(--shadow-lg), var(--edge-top);
}
.calendly-inline-widget { width: 100%; height: 700px; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-page); }
/* Calendly is always requested with light colours; the dark theme inverts it. */
[data-theme="dark"] .calendly-inline-widget iframe { filter: invert(0.92) hue-rotate(180deg) contrast(0.95); }
.contact-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-fn { margin-top: 20px; font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
@media (max-width: 680px) { .calendly-inline-widget { height: 1000px; } }

/* ================================================================
   Mobile — tighter rhythm + horizontal-scroll card pattern.
   On a small screen, every section stacking full-height one after
   another makes for an extremely long page with no way to scan.
   Two levers: (1) compress the vertical rhythm between sections, and
   (2) let card grids that are "N equal things" become a swipeable
   horizontal strip instead of N full-height stacked blocks — you see
   the first one immediately and skim across instead of scrolling
   through all of them at full height.
   ================================================================ */
@media (max-width: 640px) {
  :root {
    --section-y: 56px;
    --gutter: 20px;
  }
  .k-section-head { margin-bottom: 28px; }

  /* Reusable horizontal-scroll-snap pattern. Apply by adding this
     class in markup, or targeted per-grid below via the same rules. */
  .k-scroll-x {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 6px;
  }
  .k-scroll-x::-webkit-scrollbar { display: none; }
  .k-scroll-x > * { scroll-snap-align: start; flex: 0 0 84%; }
}

/* ================================================================
   Light theme — opt in per page with <html data-theme="light">
   (academias.html, proyectos.html). Only tokens and the few components
   that hard-code dark values are overridden. No yellow in this palette:
   alerts are red, accents are blue.
   ================================================================ */
[data-theme="light"] {
  color-scheme: light;
  --frame-bg: #FFFFFF; --frame-bar: #F3F5F8; --frame-line: #E3E8EE; --frame-dot: #D5DBE2;
  --shadow-shot: 0 40px 80px -40px rgba(15, 23, 42, .30), 0 12px 28px -16px rgba(15, 23, 42, .14);
  --shadow-soft: rgba(15, 23, 42, .18);
  --surface-page:   #F6F7F9;
  --surface-card:   #FFFFFF;
  --surface-raised: #F1F3F6;
  --surface-inset:  #E7EAEF;
  --surface-hover:  #E2E6EC;

  --text-primary:   #0E1118;
  --text-secondary: #2F343D;
  --text-muted:     #505662;
  --text-faint:     #5C626D;
  --text-on-chrome: #FFFFFF;

  --border-faint:   rgba(14, 17, 24, 0.07);
  --border-hairline: rgba(14, 17, 24, 0.11);
  --border-strong:  rgba(14, 17, 24, 0.20);
  --border-bright:  rgba(14, 17, 24, 0.34);

  /* "Chrome" becomes graphite ink on light paper */
  --k-chrome:      linear-gradient(180deg, #2A2F38 0%, #0E1118 100%);
  --k-chrome-soft: linear-gradient(180deg, #3A404B 0%, #1C2029 100%);
  --k-chrome-flat: #1C2029;

  --live-rgb: 37 87 230;
  --k-live:     #2557E6; --k-live-dim:   rgba(37, 87, 230, 0.10);
  --k-ok:       #0F6B32; --k-ok-dim:     rgba(21, 127, 60, 0.10);
  --k-danger:   #B91F1F; --k-danger-dim: rgba(209, 43, 43, 0.09);
  --k-warn:     #B91F1F; --k-warn-dim:   rgba(209, 43, 43, 0.09);
  --status-prod: #16A34A;
  --focus-ring: rgba(37, 87, 230, 0.45);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px -10px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 24px 56px -24px rgba(15, 23, 42, 0.22);
  --shadow-xl: 0 36px 80px -36px rgba(15, 23, 42, 0.28);
  --edge-top:  inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --glow-chrome: 0 0 0 rgba(0, 0, 0, 0);
}
[data-theme="light"] ::selection { background: rgba(37, 87, 230, 0.18); }
[data-theme="light"] .k-nav { background: rgba(246, 247, 249, 0.82); }
[data-theme="light"] .k-chrome-text,
[data-theme="light"] .k-wordmark__main { filter: none; }
[data-theme="light"] .k-btn--primary,
[data-theme="light"] .k-btn--primary:hover { filter: drop-shadow(0 6px 14px rgba(15, 23, 42, .18)); box-shadow: var(--shadow-sm); }

/* Light-theme contrast for the fixed-hue sector/status/agro colours */
[data-theme="light"] [data-accent="agro"] {
  --k-live: #15803D; --k-live-dim: rgba(21, 128, 61, 0.10);
  --focus-ring: rgba(21, 128, 61, 0.45);
}
[data-theme="light"] [data-sector="agro"] { --sector-fg: #15803D; --sector-bg: rgba(21, 128, 61, .10); }
[data-theme="light"] [data-sector="amb"]  { --sector-fg: #0369A1; --sector-bg: rgba(3, 105, 161, .10); }
[data-theme="light"] [data-sector="mfg"]  { --sector-fg: #C2410C; --sector-bg: rgba(194, 65, 12, .10); }
[data-theme="light"] [data-sector="saas"] { --sector-fg: #1D4ED8; --sector-bg: rgba(29, 78, 216, .10); }
[data-theme="light"] [data-sector="dep"]  { --sector-fg: #BE185D; --sector-bg: rgba(190, 24, 93, .10); }
[data-theme="light"] { --status-saas: #2557E6; --status-dev: #64748B; }

/* ================================================================
   Theme switch (nav). Default is light; the choice is stored in
   localStorage by scripts/site.js and applied before first paint by
   the inline snippet in each page's <head>.
   ================================================================ */
.k-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-pill); cursor: pointer;
  background: transparent; border: 1px solid var(--border-hairline); color: var(--text-muted);
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.k-theme-toggle:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--surface-hover); }
.k-theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.k-theme-toggle .i-sun { display: none; }
[data-theme="dark"] .k-theme-toggle .i-sun { display: block; }
[data-theme="dark"] .k-theme-toggle .i-moon { display: none; }
.k-nav__actions { display: flex; align-items: center; gap: 10px; }
