/* ==========================================================================
   QUIARSA S.A.C. — Design tokens + component styles
   Distribución farmacéutica trazable a nivel nacional
   ========================================================================== */

/* ---------- Fonts ---------- */
/* Display: General Sans (Fontshare) — geometric, clean, modern/tech
   Body: Satoshi (Fontshare) — even, legible, professional            */

:root,
[data-theme='light'] {
  /* ---------- Type scale ---------- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.25rem, 1rem + 3vw, 3.75rem);
  --text-hero: clamp(2.25rem, 1rem + 3.4vw, 4.25rem);

  /* ---------- Spacing (4px base) ---------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---------- Surfaces (cool, clinical light) ---------- */
  --color-bg: #f6f9fc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-surface-offset: #e9eff6;
  --color-surface-offset-2: #dde7f0;
  --color-divider: #e2e9f0;
  --color-border: #d3dee8;

  /* ---------- Text ---------- */
  --color-text: #101c2c;
  --color-text-muted: #56677d;
  --color-text-faint: #94a3b5;
  --color-text-inverse: #f6f9fc;

  /* ---------- Brand Navy (deep, premium — header/footer/hero) ---------- */
  --color-navy: #071c33;
  --color-navy-2: #0d2c4a;
  --color-navy-3: #143d63;

  /* ---------- Primary Accent (Quiarsa brand blue, from logo) ---------- */
  --color-primary: #1c6cb5;
  --color-primary-hover: #155a99;
  --color-primary-active: #0f487e;
  --color-primary-highlight: #dceaf7;
  --color-primary-light: #4f9de0;

  /* ---------- Trace Accent (teal — reserved for trazabilidad/Pharmastring) ---------- */
  --color-trace: #0ea99a;
  --color-trace-hover: #0b8c80;
  --color-trace-active: #086e64;
  --color-trace-highlight: #d8f2ee;

  /* ---------- Semantic ---------- */
  --color-success: #2f9e5b;
  --color-success-highlight: #d9f0e3;
  --color-warning: #c17a1f;
  --color-warning-highlight: #f5e4c8;
  --color-error: #c1443f;
  --color-error-highlight: #f6dcda;

  /* ---------- Radius ---------- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* ---------- Motion ---------- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---------- Shadows ---------- */
  --shadow-sm: 0 1px 2px oklch(0.2 0.03 240 / 0.06), 0 1px 1px oklch(0.2 0.03 240 / 0.04);
  --shadow-md: 0 6px 16px oklch(0.2 0.03 240 / 0.10), 0 2px 4px oklch(0.2 0.03 240 / 0.06);
  --shadow-lg: 0 16px 40px oklch(0.2 0.03 240 / 0.16), 0 4px 10px oklch(0.2 0.03 240 / 0.08);

  /* ---------- Content widths ---------- */
  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1280px;
  --content-full: 100%;

  /* ---------- Fonts ---------- */
  --font-display: 'General Sans', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #08131f;
  --color-surface: #0d1e30;
  --color-surface-2: #112538;
  --color-surface-offset: #142a3f;
  --color-surface-offset-2: #1a3348;
  --color-divider: #1e3a52;
  --color-border: #274a66;

  --color-text: #e6edf5;
  --color-text-muted: #9fb1c4;
  --color-text-faint: #62778d;
  --color-text-inverse: #08131f;

  --color-navy: #030d18;
  --color-navy-2: #071a2c;
  --color-navy-3: #0d2c4a;

  --color-primary: #5aa6e6;
  --color-primary-hover: #78b8ef;
  --color-primary-active: #97c9f3;
  --color-primary-highlight: #16324d;
  --color-primary-light: #7fbdf0;

  --color-trace: #35d6c3;
  --color-trace-hover: #5be0d0;
  --color-trace-active: #7fe8db;
  --color-trace-highlight: #113630;

  --color-success: #5fc98a;
  --color-success-highlight: #123a26;
  --color-warning: #e0a24f;
  --color-warning-highlight: #3a2c14;
  --color-error: #e08a86;
  --color-error-highlight: #3a1f1e;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #08131f;
    --color-surface: #0d1e30;
    --color-surface-2: #112538;
    --color-surface-offset: #142a3f;
    --color-surface-offset-2: #1a3348;
    --color-divider: #1e3a52;
    --color-border: #274a66;
    --color-text: #e6edf5;
    --color-text-muted: #9fb1c4;
    --color-text-faint: #62778d;
    --color-text-inverse: #08131f;
    --color-navy: #030d18;
    --color-navy-2: #071a2c;
    --color-navy-3: #0d2c4a;
    --color-primary: #5aa6e6;
    --color-primary-hover: #78b8ef;
    --color-primary-active: #97c9f3;
    --color-primary-highlight: #16324d;
    --color-primary-light: #7fbdf0;
    --color-trace: #35d6c3;
    --color-trace-hover: #5be0d0;
    --color-trace-active: #7fe8db;
    --color-trace-highlight: #113630;
  }
}

/* ==========================================================================
   Base type
   ========================================================================== */

ul, ol { list-style: none; }

body {
  font-family: var(--font-body);
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-text);
  letter-spacing: -0.01em;
}
p { color: var(--color-text-muted); max-width: 68ch; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--default { max-width: var(--content-default); }
.container--narrow { max-width: var(--content-narrow); }

section { position: relative; }
.section-pad { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }
.section-pad-sm { padding-block: clamp(var(--space-10), 5vw, var(--space-16)); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
}
.eyebrow--trace { color: var(--color-trace); }
.eyebrow--trace::before { background: var(--color-trace); }
.eyebrow--inverse { color: var(--color-primary-light); }
.eyebrow--inverse::before { background: var(--color-primary-light); }

.section-head { max-width: 640px; margin-bottom: var(--space-12); }
.section-head h2 { font-size: var(--text-xl); margin-top: var(--space-3); }
.section-head p { margin-top: var(--space-4); font-size: var(--text-base); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.85em 1.6em;
  border-radius: var(--radius-md);
  white-space: nowrap;
  line-height: 1.2;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-primary:active { background: var(--color-primary-active); transform: translateY(0); }

.btn-ghost-light {
  border: 1.5px solid oklch(1 0 0 / 0.35);
  color: #fff;
  background: oklch(1 0 0 / 0.06);
}
.btn-ghost-light:hover { background: oklch(1 0 0 / 0.14); border-color: oklch(1 0 0 / 0.55); }

.btn-outline {
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn-trace {
  background: var(--color-trace);
  color: #fff;
}
.btn-trace:hover { background: var(--color-trace-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.btn-sm { padding: 0.6em 1.2em; font-size: var(--text-xs); }
.btn-block { width: 100%; }

/* ==========================================================================
   Utility bar
   ========================================================================== */

.utility-bar {
  background: var(--color-navy);
  color: oklch(0.95 0.01 250 / 0.75);
  font-size: var(--text-xs);
}
.utility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 38px;
}
.utility-left span, .utility-right a { display: inline-flex; align-items: center; gap: var(--space-1); }
.utility-left svg, .utility-right svg { width: 14px; height: 14px; flex-shrink: 0; }
.utility-right { display: flex; gap: var(--space-5); align-items: center; }
.utility-right a:hover { color: #fff; }
.utility-portal {
  background: var(--color-trace);
  color: #06231f;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}
.utility-portal:hover { color: #06231f; opacity: 0.88; }
.utility-portal svg { color: #06231f; }
@media (max-width: 700px) { .utility-left { display: none; } .utility-row { justify-content: flex-end; } }
@media (max-width: 480px) { .utility-right a span, .utility-right { font-size: 11px; } .utility-portal { padding: 3px 10px; } }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.theme-toggle .icon-moon { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-moon { display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s cubic-bezier(0.16,1,0.3,1), background 0.3s;
}
.site-header--hidden { transform: translateY(-100%); }
.site-header--scrolled { box-shadow: var(--shadow-sm); }

.header-bar {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.brand img { height: 34px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: var(--space-1); flex: 1; justify-content: center; }
.main-nav > li { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
}
.nav-link:hover { color: var(--color-primary); background: var(--color-primary-highlight); }
.nav-link.is-active { color: var(--color-primary); }
.nav-link svg { width: 14px; height: 14px; transition: transform var(--transition-interactive); }
.main-nav > li:hover .nav-link svg { transform: rotate(180deg); }
.mobile-nav .mn-toggle svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform var(--transition-interactive); }
.mobile-nav .mn-toggle.is-open svg { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover { background: var(--color-surface-offset); color: var(--color-text); }
.theme-toggle svg { width: 18px; height: 18px; }

.hamburger { display: none; width: 38px; height: 38px; align-items: center; justify-content: center; }
.hamburger svg { width: 22px; height: 22px; }

/* Dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 300px;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-interactive), transform var(--transition-interactive), visibility var(--transition-interactive);
  z-index: 50;
}
.main-nav > li:hover .dropdown,
.main-nav > li:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown--wide { min-width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1); }
.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.dropdown-item:hover { background: var(--color-surface-offset); }
.dropdown-item .di-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropdown-item .di-icon svg { width: 18px; height: 18px; }
.dropdown-item strong { display: block; font-weight: 600; color: var(--color-text); }
.dropdown-item span { color: var(--color-text-muted); font-size: var(--text-xs); }
.dropdown-foot {
  grid-column: 1 / -1;
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: var(--color-navy);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, oklch(0.1 0.04 250 / 0.92) 0%, oklch(0.12 0.04 250 / 0.65) 45%, oklch(0.12 0.04 250 / 0.35) 75%, oklch(0.12 0.04 250 / 0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(var(--space-20), 12vw, var(--space-32));
  max-width: 760px;
}
.hero h1 {
  color: #fff;
  font-size: var(--text-hero);
  margin-top: var(--space-4);
}
.hero p.lead {
  color: oklch(0.95 0.01 250 / 0.85);
  font-size: var(--text-lg);
  max-width: 56ch;
  margin-top: var(--space-5);
}
.hero-cta { display: flex; gap: var(--space-3); margin-top: var(--space-8); flex-wrap: wrap; }
.hero-decor {
  position: absolute;
  right: -10%;
  bottom: -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle at 50% 50%, oklch(0.55 0.14 190 / 0.25), transparent 70%);
  z-index: 1;
}

.page-hero {
  position: relative;
  color: #fff;
  background: linear-gradient(150deg, var(--color-navy) 0%, var(--color-navy-3) 100%);
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(120deg, transparent 60%, oklch(0.4 0.1 210 / 0.25) 100%);
}
.page-hero .breadcrumb { position: relative; z-index: 2; font-size: var(--text-xs); color: oklch(0.9 0.01 250 / 0.6); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-4); }
.page-hero h1 { position: relative; z-index: 2; color: #fff; font-size: var(--text-2xl); max-width: 720px; }
.page-hero p { position: relative; z-index: 2; color: oklch(0.95 0.01 250 / 0.8); font-size: var(--text-lg); max-width: 640px; margin-top: var(--space-4); }

/* ==========================================================================
   Trust bar / certifications
   ========================================================================== */

.trust-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  padding-block: var(--space-6);
}
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--space-6), 4vw, var(--space-12));
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.trust-item svg { width: 20px; height: 20px; color: var(--color-primary); flex-shrink: 0; }

/* ==========================================================================
   Cards / grids
   ========================================================================== */

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive), border-color var(--transition-interactive);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--color-primary-highlight); }

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile--trace { background: var(--color-trace-highlight); color: var(--color-trace); }

.card h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.card p { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Value prop cards on dark bg */
.card--dark {
  background: oklch(1 0 0 / 0.04);
  border: 1px solid oklch(1 0 0 / 0.1);
}
.card--dark:hover { background: oklch(1 0 0 / 0.07); border-color: oklch(1 0 0 / 0.2); }
.card--dark h3, .card--dark p { color: #fff; }
.card--dark p { color: oklch(0.95 0.01 250 / 0.7); }
.card--dark .icon-tile { background: oklch(1 0 0 / 0.1); color: var(--color-primary-light); }
.card--dark .icon-tile--trace { background: oklch(0.6 0.1 190 / 0.22); color: #4fe3d1; }

/* ==========================================================================
   Dark navy sections
   ========================================================================== */

.section-navy {
  background: var(--color-navy);
  color: #fff;
}
.section-navy p { color: oklch(0.95 0.01 250 / 0.72); }
.section-navy h2, .section-navy h3 { color: #fff; }

/* ==========================================================================
   Stats
   ========================================================================== */

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
@media (max-width: 800px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat .num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-primary-light);
  font-variant-numeric: tabular-nums;
}
.section-navy .stat .num, .hero .stat .num { color: var(--color-primary-light); }
.stat .label { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-1); text-transform: uppercase; letter-spacing: 0.04em; }
.section-navy .stat .label { color: oklch(0.9 0.01 250 / 0.55); }

/* ==========================================================================
   Traceability flow diagram
   ========================================================================== */

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  position: relative;
}
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } }
.flow-step {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
}
.flow-step .fs-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--color-trace);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  margin-bottom: var(--space-4);
}
.flow-step h4 { font-size: var(--text-base); margin-bottom: var(--space-2); }
.flow-step p { font-size: var(--text-xs); }

/* ==========================================================================
   Live tracking mock panel
   ========================================================================== */

.track-panel {
  background: var(--color-navy-2);
  border: 1px solid oklch(1 0 0 / 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
  font-size: var(--text-sm);
}
.track-row:last-child { border-bottom: none; }
.track-row .tr-loc { display: flex; align-items: center; gap: var(--space-2); color: #fff; font-weight: 500; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-trace); position: relative; flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-trace);
  animation: pulse-ring 2s cubic-bezier(0.16,1,0.3,1) infinite;
}
@keyframes pulse-ring { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }
.track-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-full);
  background: var(--color-trace-highlight);
  color: var(--color-trace);
}
[data-theme='dark'] .track-badge, .track-panel .track-badge { background: oklch(0.6 0.1 190 / 0.18); color: #4fe3d1; }

/* ==========================================================================
   Coverage
   ========================================================================== */

.coverage-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-6);
}
@media (max-width: 560px) { .coverage-list { grid-template-columns: 1fr; } }
.coverage-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-block: var(--space-1);
}
.coverage-list svg { width: 16px; height: 16px; color: var(--color-success); flex-shrink: 0; }

/* ==========================================================================
   Products page
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}
.filter-chip {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.55em 1.1em;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.search-box {
  position: relative;
  margin-bottom: var(--space-8);
}
.search-box input {
  width: 100%;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-12);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--text-base);
}
.search-box input:focus { border-color: var(--color-primary); }
.search-box svg { position: absolute; left: var(--space-4); top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--color-text-faint); }

.product-count { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.product-card .pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-2); margin-bottom: var(--space-3); }
.product-card .pc-cat { font-size: var(--text-xs); color: var(--color-primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.product-card .pc-trace { display: flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); color: var(--color-trace); font-weight: 600; flex-shrink: 0; }
.product-card .pc-trace svg { width: 13px; height: 13px; }
.product-card h4 { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-1); }
.product-card .pc-forma { font-size: var(--text-xs); color: var(--color-text-muted); }

.empty-state { text-align: center; padding: var(--space-16) var(--space-4); color: var(--color-text-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--color-navy); color: oklch(0.95 0.01 250 / 0.7); padding-top: clamp(var(--space-16), 6vw, var(--space-24)); position: relative; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-8); padding-bottom: var(--space-16); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }
.footer-top img { height: 32px; margin-bottom: var(--space-4); }
.footer-top p { color: oklch(0.95 0.01 250 / 0.55); font-size: var(--text-sm); max-width: 30ch; }
.footer-col h5 { color: #fff; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-4); font-family: var(--font-body); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { font-size: var(--text-sm); color: oklch(0.95 0.01 250 / 0.65); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid oklch(1 0 0 / 0.1);
  padding-block: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: oklch(0.95 0.01 250 / 0.5);
}
.footer-social { display: flex; gap: var(--space-3); }
.footer-social a { width: 34px; height: 34px; border-radius: var(--radius-full); border: 1px solid oklch(1 0 0 / 0.15); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: oklch(1 0 0 / 0.1); }
.footer-social svg { width: 16px; height: 16px; color: #fff; }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  background: linear-gradient(120deg, var(--color-navy) 0%, var(--color-navy-3) 60%, var(--color-trace-active) 140%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: var(--text-xl); max-width: 32ch; }
.cta-band p { color: oklch(0.95 0.01 250 / 0.75); margin-top: var(--space-2); }
.cta-band .cta-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ==========================================================================
   Utility
   ========================================================================== */

.text-center { text-align: center; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-8), 6vw, var(--space-16)); align-items: center; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
.rounded-media { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.35em 0.8em;
  border-radius: var(--radius-full);
}
.badge--trace { background: var(--color-trace-highlight); color: var(--color-trace); }
.badge--primary { background: var(--color-primary-highlight); color: var(--color-primary); }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Mobile nav
   ========================================================================== */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--color-bg);
  padding: var(--space-6);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
  overflow-y: auto;
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-8); }
.mobile-nav-head img { height: 30px; }
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav li { border-bottom: 1px solid var(--color-divider); }
.mobile-nav a, .mobile-nav .mn-toggle { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4) 0; font-size: var(--text-base); font-weight: 500; color: var(--color-text); width: 100%; }
.mobile-nav .mn-sub { padding-left: var(--space-4); display: none; padding-bottom: var(--space-3); }
.mobile-nav .mn-sub.is-open { display: block; }
.mobile-nav .mn-sub a { font-size: var(--text-sm); font-weight: 400; color: var(--color-text-muted); padding: var(--space-2) 0; }
.mobile-nav-cta { margin-top: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }

@media (max-width: 860px) {
  .main-nav, .header-actions .btn { display: none; }
  .hamburger { display: flex; }
}

@media (max-width: 700px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
