/* =========================
   Smart CFS — Neo Tech Theme
   Dark with Light (no navy)
   ========================= */
:root {
  /* LIGHT THEME */
  --bg: #f7f7fb;
  --surface: #ffffff;
  --ink: #0f1320;
  --text: #2a2e3b;
  --muted: #667085;
  --line: #e9e9f2;

  /* Accents (no navy) — sunset cyan + orchid + lime */
  --brand: #22b8cf;
  --brand-hi: #53e1ff;
  --accent: #b048ff;
  --accent-hi: #e1b5ff;
  --ok: #22c55e;
  --warn: #ffb020;
  --bad: #ef4444;

  --radius: 16px;
  --shadow-sm: 0 6px 18px rgba(15, 19, 32, 0.06);
  --shadow-md: 0 14px 32px rgba(15, 19, 32, 0.1);
  --ring: 0 0 0 3px rgba(34, 184, 207, 0.25);
}

/* DARK THEME TOKENS */
[data-theme="dark"] {
  --bg: #0e0f12;
  --surface: #14161b;
  --ink: #f3f5ff;
  --text: #c8ccdb;
  --muted: #97a0b8;
  --line: #272a33;

  --brand: #20d0e0;
  --brand-hi: #65f0ff;
  --accent: #a855f7;
  --accent-hi: #d9b8ff;

  --shadow-sm: 0 10px 22px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 24px 46px rgba(0, 0, 0, 0.38);
  --ring: 0 0 0 3px rgba(101, 240, 255, 0.25);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: radial-gradient(
      1200px 800px at 85% -10%,
      rgba(160, 80, 255, 0.12),
      transparent 60%
    ),
    radial-gradient(
      1000px 700px at 10% 120%,
      rgba(34, 184, 207, 0.12),
      transparent 60%
    ),
    var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  opacity: 0.9;
}
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 10px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 2000;
}

/* Layout */
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}
.split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 40px;
}
.grid-2 {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}
.grid-3 {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, 1fr);
}
.section {
  padding: 80px 0;
}
.section.alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04));
}

/* Typography */
.h1 {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  color: var(--ink);
  margin: 10px 0 12px;
}
h2 {
  font: 600 28px/1.25 "Inter";
  color: var(--ink);
  margin: 0;
}
h3 {
  font: 600 20px/1.35 "Inter";
  color: var(--ink);
  margin: 0 0 6px;
}
h4 {
  font: 600 16px/1.35 "Inter";
  color: var(--ink);
  margin: 0 0 6px;
}
.lead {
  color: var(--text);
  font-size: 18px;
}
.sub {
  color: var(--muted);
  margin: 8px 0 0;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
.center {
  text-align: center;
}
.mt-2 {
  margin-top: 8px;
}
.mt-3 {
  margin-top: 16px;
}
.mt-4 {
  margin-top: 24px;
}
.row-gap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.grad {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  color: var(--ink);
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.menu {
  display: flex;
  gap: 14px;
  align-items: center;
}
.menu a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink);
}
.menu a.active,
.menu a:hover {
  background: color-mix(in oklab, var(--brand) 12%, transparent);
}
.right-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
#burger {
  display: none;
}

/* Buttons & Chips */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #0b0c10;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.btn.ghost {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.sm {
  padding: 8px 12px;
  font-weight: 700;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  color: var(--brand);
  font-weight: 700;
}
.tag {
  display: inline-block;
  padding: 6px 10px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  padding: 110px 0 60px;
}
#gridFX {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-glow {
  position: absolute;
  inset: -15% -15% auto auto;
  height: 75vh;
  width: 75vw;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    color-mix(in oklab, var(--accent) 40%, transparent),
    transparent 65%
  );
  filter: blur(60px);
  opacity: 0.4;
}

/* Cards / Frames */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card h3,
.card h4 {
  margin: 0 0 8px;
}
.card p {
  margin: 0;
  color: var(--muted);
}
.frame {
  position: relative;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  background: color-mix(in oklab, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.frame::after {
  content: attr(data-size);
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #0f1320;
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  opacity: 0.8;
}
.placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16/10;
  color: var(--muted);
  font-weight: 700;
}
.icon {
  vertical-align: -3px;
  margin-right: 6px;
  color: var(--brand);
}

.kpis {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.kpi {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.kpi-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
}
.kpi-label {
  color: var(--muted);
  font-size: 12px;
}

/* Lists */
.ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ul li {
  display: flex;
  gap: 10px;
}
.ul li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  margin-top: 0.6em;
}

/* Swiper */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.chip {
  display: inline-block;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

/* AI panel */
.ai .data-panel {
  padding: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #0b0c10;
  padding: 12px 16px;
}
.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: #0b0c10;
  color: #b5f5ff;
  border: 1px solid #1b2430;
}
.pill.success {
  color: #bfffd2;
}
.panel-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 16px;
}
.mini-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.panel-chart {
  padding: 10px 16px;
}

/* Forms */
.form {
  display: grid;
  gap: 12px;
}
.form .row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
.input:focus,
select:focus,
textarea:focus {
  box-shadow: var(--ring);
  border-color: color-mix(in oklab, var(--brand) 35%, var(--line));
}
.consent {
  display: flex;
  align-items: center;
  gap: 8px;
}
#formMsg {
  min-height: 1.2em;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  position: relative;
}
.footer .cols {
  display: grid;
  gap: 24px;
  grid-template-columns: 2fr 1fr 1fr;
}
.footer .links {
  display: grid;
  gap: 6px;
}

/* Back to top */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  color: var(--ink);
  z-index: 999;
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 980px) {
  .split {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .menu {
    display: none;
    position: absolute;
    right: 16px;
    top: 64px;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    min-width: 260px;
  }
  .menu.open {
    display: flex;
  }
  #burger {
    display: inline-flex;
  }
}
@media (max-width: 600px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Tilt hint */
.tilt {
  will-change: transform;
}
