/* Kreta Software v8 — High-Contrast Architectural B2B Design System
   Obsidian Hero + Warm Alabaster Canvas + Editorial Serif + Vivid Vertical Accents + Bento Grid */
:root {
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --surface-2: #ECE9E0;
  --obsidian: #090D12;
  --obsidian-2: #111822;
  --obsidian-border: rgba(255, 255, 255, 0.11);
  --ink: #0C1216;
  --ink-2: #33414A;
  --muted: #60707A;
  --border: #E2DDD2;
  --border-strong: #C9C2B4;

  --emerald: #10B981;
  --emerald-dark: #059669;
  --emerald-soft: #ECFDF5;
  --indigo: #6366F1;
  --indigo-dark: #4F46E5;
  --indigo-soft: #EEF2FF;
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-soft: #FFFBEB;
  --rose: #F43F5E;
  --rose-dark: #E11D48;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(9, 13, 18, 0.05);
  --shadow-md: 0 16px 40px rgba(9, 13, 18, 0.09);
  --shadow-lg: 0 32px 72px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; max-width: 100%; overflow-x: clip;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 22px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Obsidian Sticky Header */
.k-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(9, 13, 18, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--obsidian-border);
  color: #F8FAFC;
}
.k-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; min-height: 68px; flex-wrap: wrap; padding: 8px 0;
}
.k-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--font-display);
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: #FFFFFF;
}
.k-brand img { width: 32px; height: 32px; border-radius: 9px; display: block; border: 1px solid rgba(255,255,255,.15); }
.k-tabs {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--obsidian-border);
  padding: 4px; border-radius: 999px; overflow-x: auto; max-width: 100%;
}
.k-tab {
  text-decoration: none; font-size: 13px; font-weight: 600;
  color: #CBD5E1; padding: 7px 13px; border-radius: 999px;
  white-space: nowrap; transition: background .18s var(--ease), color .18s var(--ease);
}
.k-tab:hover { background: rgba(255,255,255,0.1); color: #fff; }
.k-tab.active { background: #FFFFFF; color: var(--obsidian); }
.k-tab.hot { color: #34D399; font-weight: 800; }
.k-tab.hot.active { background: var(--emerald); color: #052e16; }
.k-nav-right { display: inline-flex; align-items: center; gap: 8px; }
.lang-toggle {
  background: rgba(255,255,255,0.08); border: 1px solid var(--obsidian-border);
  color: #E2E8F0; font-size: 12px; font-weight: 700; padding: 6px 10px;
  border-radius: 8px; cursor: pointer;
}
.lang-toggle:hover { background: rgba(255,255,255,0.15); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: 11px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-emerald { background: var(--emerald); color: #032215; box-shadow: 0 8px 24px rgba(16, 185, 129, 0.30); }
.btn-emerald:hover { background: #34D399; }
.btn-dark { background: var(--obsidian); color: #fff; }
.btn-dark:hover { background: #1e293b; }
.btn-ghost-dark { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.18); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.15); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }

/* Dramatic Obsidian Hero */
.hero-dark {
  background:
    radial-gradient(680px 380px at 10% 10%, rgba(16, 185, 129, 0.22), transparent 65%),
    radial-gradient(640px 360px at 90% 14%, rgba(99, 102, 241, 0.22), transparent 65%),
    radial-gradient(500px 260px at 50% 95%, rgba(245, 158, 11, 0.14), transparent 65%),
    linear-gradient(180deg, #090D12 0%, #0E151F 100%);
  color: #F8FAFC;
  padding: 46px 0 52px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 36px; align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow-dark {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16, 185, 129, 0.14); border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6EE7B7; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; margin-bottom: 16px;
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 10px #34D399; }
h1.hero-h1 {
  font-family: var(--font-display); font-size: clamp(36px, 4.6vw, 56px);
  line-height: 1.04; letter-spacing: -0.035em; margin: 0 0 16px; font-weight: 800; color: #FFFFFF;
}
h1.hero-h1 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; color: #34D399;
}
.hero-sub { font-size: 17px; color: #CBD5E1; margin: 0 0 22px; max-width: 550px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }

/* Dark Hero Stat Strip */
.hero-metrics {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
@media (max-width: 520px) { .hero-metrics { grid-template-columns: 1fr; } }
.h-stat {
  background: rgba(255,255,255,0.05); border: 1px solid var(--obsidian-border);
  border-radius: 12px; padding: 12px 14px;
}
.h-stat strong { display: block; font-family: var(--font-display); font-size: 20px; color: #FFFFFF; }
.h-stat span { font-size: 12px; color: #94A3B8; }

/* Interactive Live Hero App Frame */
.live-frame {
  background: #111822; border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.live-frame-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; background: #0B1017; border-bottom: 1px solid rgba(255,255,255,0.09); flex-wrap: wrap;
}
.frame-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.fpill {
  background: rgba(255,255,255,0.08); color: #CBD5E1; border: 0;
  padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.fpill.active { background: var(--emerald); color: #032215; }
.live-frame-body { padding: 18px; color: #F1F5F9; }
.fkpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.fkpi {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 11px; padding: 10px 12px;
}
.fkpi span { display: block; font-size: 11px; color: #94A3B8; }
.fkpi strong { font-family: var(--font-display); font-size: 18px; color: #FFFFFF; }
.frows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.frow {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09); font-size: 13px;
}
.fbadge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  cursor: pointer; border: 0;
}

/* Light Alabaster Sections & Bento Grid */
.section { padding: 52px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 26px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.03em; margin: 0 0 6px; font-weight: 800; color: var(--ink);
}
.section-head h2 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--emerald-dark); }
.section-head p { margin: 0; color: var(--ink-2); max-width: 620px; font-size: 15.5px; }

.bento-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
@media (max-width: 960px) { .bento-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bento-4 { grid-template-columns: 1fr; } }
.bento-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.bento-tile strong { display: block; font-family: var(--font-display); font-size: 24px; color: var(--ink); margin-bottom: 4px; }
.bento-tile span { font-size: 13px; color: var(--ink-2); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.v-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.v-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.v-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--card-accent, var(--emerald-dark));
}
.v-card h3 { font-family: var(--font-display); font-size: 19px; margin: 10px 0 6px; font-weight: 800; letter-spacing: -0.02em; }
.v-card p { margin: 0 0 14px; font-size: 13.8px; color: var(--ink-2); }
.v-hook { font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--bg); padding: 8px 10px; border-radius: 9px; margin-bottom: 14px; border: 1px solid var(--border); }
.v-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; width: fit-content; }

/* Filter & Search */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.f-pill {
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.f-pill.active { background: var(--obsidian); color: #fff; border-color: var(--obsidian); }
.search-in {
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 14px; min-width: 290px;
}

/* Dark CTA Band */
.cta-band {
  background: linear-gradient(135deg, #090D12 0%, #0F2924 55%, #1E1B4B 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 36px 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(23px, 3vw, 32px); margin: 0 0 8px; letter-spacing: -0.025em; }
.cta-band p { margin: 0; color: #CBD5E1; max-width: 580px; font-size: 15px; }

/* Code Inspector */
.code-box {
  background: #090D12; color: #E2E8F0; border-radius: var(--radius-md);
  border: 1px solid #1E293B; overflow: hidden; box-shadow: var(--shadow-md);
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: #111822; border-bottom: 1px solid #1E293B; overflow-x: auto;
}
.code-head-tabs { display: flex; gap: 6px; white-space: nowrap; }
.ctab {
  background: transparent; color: #94A3B8; border: 1px solid transparent;
  padding: 6px 12px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; cursor: pointer;
}
.ctab.active { background: #1E293B; color: #34D399; border-color: #334155; }
.code-pre { margin: 0; padding: 20px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.8px; line-height: 1.65; color: #E2E8F0; }

/* Footer */
.k-footer {
  border-top: 1px solid var(--border); padding: 28px 0 42px; margin-top: 24px;
  font-size: 13px; color: var(--muted);
}
.k-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.k-footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.k-footer-links a { text-decoration: none; font-weight: 700; color: var(--ink-2); }
.k-footer-links a:hover { color: var(--emerald-dark); }
