/* =====================================================================
   KBLIX website — design system
   Preserves the existing brand identity (navy/blue/cyan, Plus Jakarta
   Sans) per the confirmed direction — evolves the execution away from
   the generic Bootstrap card-grid feel toward something with more
   editorial confidence, befitting "elegant, premium" from the brief.
   No framework dependency: this file plus a small amount of vanilla
   JS is the entire client-side footprint.
   ===================================================================== */

:root {
  --navy: #0A1628;
  --navy-mid: #112233;
  --blue: #0077CC;
  --blue-dark: #005A9E;
  --cyan: #00CCFF;
  --blue-light: #E6F7FF;

  --gradient-brand: linear-gradient(135deg, #0A1628 0%, #0077CC 60%, #00CCFF 100%);

  --surface: #FFFFFF;
  --surface-alt: #F4F6FA;
  --border: #DDE4EE;

  --text-dark: #0A1628;
  --text-medium: #334466;
  --text-light: #6680A0;
  --text-on-dark: #E6F7FF;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --radius: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 8px rgba(10, 22, 40, 0.06), 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-card-hover: 0 12px 32px rgba(10, 22, 40, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--surface);
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { color: var(--text-medium); margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

svg.lucide {
  width: 1em;
  height: 1em;
  stroke-width: 2;
  vertical-align: -0.15em;
}

.shell { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

.site-announcement {
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}
.site-announcement.type-info { background: var(--blue); }
.site-announcement.type-success { background: #0A8F5B; }
.site-announcement.type-warning { background: #B8860B; }
.site-announcement.type-danger { background: #C0392B; }
.site-announcement a { color: #fff; }
.site-announcement button:hover { opacity: 1 !important; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-nav .shell {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-nav .brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.site-nav .brand svg.lucide { width: 1.3rem; height: 1.3rem; color: var(--blue); }
.site-nav .nav-links { display: flex; gap: 1.75rem; margin-left: 1rem; }
.site-nav .nav-links a { color: var(--text-medium); font-weight: 500; font-size: 0.95rem; }
.site-nav .nav-links a:hover { color: var(--navy); }
.site-nav .spacer { flex: 1; }
.nav-toggle { display: none; background: transparent; border: none; padding: 0.4rem; cursor: pointer; }

@media (max-width: 800px) {
  .site-nav .nav-links { display: none; }
  .nav-toggle { display: block; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 8px 20px rgba(0, 119, 204, 0.25); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn:active { transform: scale(0.97); }

label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--text-medium); margin-bottom: 1.1rem; }
label input, label textarea {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-dark);
}
label input:focus, label textarea:focus { outline: none; border-color: var(--blue); }

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 620px;
  margin: 0 auto 2rem;
}
.hero .cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { text-align: center; }
.stat .stat-value { font-size: 1.75rem; font-weight: 800; color: var(--navy); display: block; }
.stat .stat-label { font-size: 0.85rem; color: var(--text-light); }

.section { padding: 5rem 0; }
.section-intro { max-width: 620px; margin: 0 auto 3rem; text-align: center; }
.section-alt { background: var(--surface-alt); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
  opacity: 0;
  transform: translateY(16px);
}
.product-card.revealed { opacity: 1; transform: translateY(0); transition: opacity 0.5s ease, transform 0.5s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.product-card .product-tagline { color: var(--blue); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.75rem; }
.product-card ul { list-style: none; padding: 0; margin: 1.25rem 0; }
.product-card li { display: flex; align-items: start; gap: 0.5rem; margin-bottom: 0.6rem; font-size: 0.92rem; color: var(--text-medium); }
.product-card li svg.lucide { color: var(--blue); flex-shrink: 0; margin-top: 0.2rem; }

.site-footer { background: var(--navy); color: var(--text-on-dark); padding: 3rem 0 2rem; margin-top: 4rem; }
.site-footer a { color: var(--text-on-dark); opacity: 0.8; }
.site-footer a:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(230, 247, 255, 0.15); margin-top: 2rem; padding-top: 1.5rem; font-size: 0.85rem; opacity: 0.7; }

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  max-width: 380px;
  z-index: 1000;
  padding: 0.9rem 2.4rem 0.9rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
  animation: toast-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.success { background: #EAF7EE; color: #14532D; border-left: 4px solid #22C55E; }
.toast.error { background: #FEECEC; color: #7A1E1E; border-left: 4px solid #EF4444; }
.toast-close { position: absolute; right: 0.6rem; top: 0.6rem; background: transparent; border: none; font-size: 1.1rem; cursor: pointer; opacity: 0.5; }
.toast-close:hover { opacity: 1; }
.toast-dismissing { animation: toast-slide-out 0.28s ease-in forwards; }

@keyframes toast-slide-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-slide-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(120%); opacity: 0; } }

@media (max-width: 640px) {
  .toast { left: 1rem; right: 1rem; max-width: none; }
}

.cookie-banner {
  position: fixed;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 1000;
  max-width: 720px;
  margin: 0 auto;
  background: var(--navy);
  color: var(--text-on-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  animation: cookie-banner-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner-text { flex: 1; min-width: 240px; font-size: 0.92rem; line-height: 1.5; }
.cookie-banner-text a { color: var(--cyan); }
.cookie-banner-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }
.cookie-banner .btn-outline { border-color: rgba(230, 247, 255, 0.3); color: var(--text-on-dark); }
.cookie-banner .btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }
.cookie-banner-dismissing { animation: cookie-banner-out 0.25s ease-in forwards; }

@keyframes cookie-banner-in { from { transform: translateY(120%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes cookie-banner-out { from { transform: translateY(0); opacity: 1; } to { transform: translateY(120%); opacity: 0; } }

@media (max-width: 640px) {
  .cookie-banner { left: 1rem; right: 1rem; bottom: 1rem; flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .product-card { opacity: 1 !important; transform: none !important; }
}

/* --- Long-form legal content --- */
.legal-content { max-width: 720px; }
.legal-content h2 { font-size: 1.3rem; margin-top: 2.5rem; display: flex; align-items: baseline; gap: 0.6rem; }
.legal-content h2 .section-num { color: var(--blue); font-family: var(--font-sans); font-weight: 800; font-size: 0.95rem; }
.legal-content h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal-content ul, .legal-content ol { padding-left: 1.3rem; }
.legal-content li { margin-bottom: 0.5rem; color: var(--text-medium); }
.legal-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.legal-content th, .legal-content td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.legal-notice { background: var(--blue-light); border-left: 4px solid var(--blue); padding: 1rem 1.25rem; border-radius: 8px; font-size: 0.9rem; margin-bottom: 2rem; }
.legal-updated { color: var(--text-light); font-size: 0.85rem; margin-bottom: 2rem; }
