/* =======================
   TOKENS
   ======================= */
:root{
  --bg:#0f1222; --fg:#e8ecf1; --muted:#9aa3b2;
  --brand:#4f7cff; --brand-2:#7a5cff;
  --card:#171a2f; --line:#262b48;
  --ok:#23d18b; --warn:#ffcc66;

  /* Onboarding/form theme */
  --panel:#111827; --input:#0f172a;
  --primary:#6366f1; --primary-2:#7c82f9;
  --ring:rgba(99,102,241,0.35);
  --radius:14px;
}

/* =======================
   BASE
   ======================= */
*{box-sizing:border-box}
html,body{
  margin:0; padding:0;
  background:var(--bg); color:var(--fg);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
}
a{color:var(--fg);text-decoration:none}
.wrap{max-width:1100px;margin:0 auto;padding:0 20px}

/* Keep header above everything */
header.nav{
  position:sticky; top:0; z-index:1100;
  background:rgba(15,18,34,.95);          /* solid (no blur) */
  border-bottom:1px solid var(--line);
}

/* =======================
   NAV — DESKTOP DEFAULTS
   ======================= */
.menu-btn{
  display:none; /* shown on mobile only */
  background:transparent; color:var(--fg);
  border:1px solid var(--line);
  padding:8px 12px; border-radius:10px; font-weight:700;
  align-items:center; gap:6px;
}
.nav-links{
  display:flex;
  gap:18px;
}

/* Make sure desktop layout never hides links */
@media (min-width:821px){
  .nav-links{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    overflow:visible;
  }
  .nav-links a{
    display:inline-flex;
    white-space:nowrap;
    padding:8px 12px;
    border-radius:10px;
  }
}

/* =======================
   NAV — MOBILE DRAWER (closed by default; JS toggles .open)
   ======================= */
@media (max-width:820px){
  .nav-inner{ position:relative; gap:10px; }
  .brand span{ font-size:18px; }
  .logo-word{ height:34px; }

  .menu-btn{ display:inline-flex; }

  /* Drawer panel (hidden by default) */
  header.nav .nav-links{
    position:fixed; left:12px; right:12px; top:72px;
    display:none; flex-direction:column; gap:14px;
    padding:16px;
    background:#121530; border:1px solid var(--line); border-radius:18px;
    box-shadow:0 20px 60px rgba(0,0,0,.45);
    z-index:1201;      /* above backdrop & header */
    filter:none;       /* ensure sharp */
  }
  header.nav .nav-links a{
    padding:10px 12px; border-radius:8px;
  }
  header.nav .nav-links a:hover{
    background:rgba(255,255,255,.06);
  }
  header.nav .nav-links.open{ display:flex; }

  /* Backdrop behind drawer (clicks to close) — NO BLUR */
  .menu-backdrop{
    position:fixed; inset:0;
    background:rgba(0,0,0,.45);    /* dim only, no blur */
    display:none; z-index:1200;    /* below panel, above page/header */
    pointer-events:none;           /* inert unless .show */
  }
  .menu-backdrop.show{
    display:block; pointer-events:auto;
  }

  /* Lock body scroll when menu open */
  .body-lock{ overflow:hidden; }
}

/* Ensure hidden attr doesn’t win when we toggle .show */
.menu-backdrop[hidden]{ display:none; }
.menu-backdrop.show{ display:block !important; }

/* =======================
   DEMO THUMBNAILS
   ======================= */
.demo .thumb{
  display:block;
  width:100%; height:150px; object-fit:cover;
  border-radius:12px; border:1px solid var(--line);
  background:none;
}

/* =======================
   ONBOARDING FORM POLISH
   ======================= */
.onboard-wrap{max-width:860px;margin:40px auto;padding:0 20px;}
.onboard-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}
.onboard-head h1{font-size:28px;font-weight:800;margin:0 0 6px}
.onboard-head p{color:var(--muted);margin:0 0 18px}

.form-grid{display:grid;gap:14px}
.form-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:720px){.form-2,.form-3{grid-template-columns:1fr}}

.label{font-weight:600;font-size:14px;margin-bottom:6px;display:block}
.input,.select,.textarea,.file{
  width:100%; background:var(--input); border:1px solid var(--line);
  color:#e5e7eb; border-radius:10px; padding:12px 12px; outline:none;
  transition:box-shadow .15s,border-color .15s,transform .02s;
}
.input:focus,.select:focus,.textarea:focus,.file:focus{
  border-color:var(--primary); box-shadow:0 0 0 4px var(--ring);
}
.textarea{min-height:110px;resize:vertical}

.checklist{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.check{display:flex;gap:10px;align-items:center}
.check input{width:18px;height:18px;border-radius:6px}

.note{color:var(--muted);font-size:14px;margin-top:10px}
.actions{display:flex;gap:10px;align-items:center;margin-top:18px}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--primary); color:#fff; font-weight:800;
  padding:12px 18px; border-radius:12px; border:0; cursor:pointer;
  transition:transform .15s, box-shadow .15s, background .15s;
}
.btn:hover{
  background:var(--primary-2);
  transform:translateY(-1px);
  box-shadow:0 8px 30px rgba(79,124,255,.25);
}
.small{font-size:12px;color:var(--muted)}

.badge{
  display:inline-block; padding:6px 10px; border:1px solid var(--line);
  border-radius:999px; color:#cbd5e1; background:rgba(255,255,255,0.03);
  margin-left:6px; font-size:12px; font-weight:700;
}

/* =======================
   LOGO SIZES
   ======================= */
.logo-word{ max-height:60px; width:auto; display:inline-block; }
.hero-logo{ max-width:300px; height:auto; display:block; margin:0 auto; }

/* =======================
   KILL ANY LEGACY SEARCH BAR
   ======================= */
.search{ display:none !important; }

/* =======================
   BLOG TOC — STOP OVERLAP ON SMALL SCREENS
   (Override per-page sticky TOC)
   ======================= */
@media (max-width:960px){
  .layout{ grid-template-columns:1fr !important; }
  .toc{
    position:static !important;
    top:auto !important; left:auto !important; right:auto !important;
    max-height:none !important;
    overflow:visible !important;
    margin-bottom:14px !important;
    z-index:auto !important;
  }
}
/* GLOBAL CARD STYLE — applies everywhere */
.card {
  background: var(--card);
  border: 2px solid var(--brand);
  border-radius: 16px;
  padding: 18px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: 0 0 20px rgba(79,124,255,.25); /* glow */
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(79,124,255,.4); /* stronger glow on hover */
  border-color: var(--brand-2); /* subtle color shift */
}

.card h3 {
  margin: 0 0 8px;
}
/* Make estimator + FAQ match glowing card style */
.est-box,
#faq details {
  background: var(--card);
  border: 2px solid var(--brand);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 0 20px rgba(79,124,255,.25);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.est-box:hover,
#faq details:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 28px rgba(79,124,255,.4);
  border-color: var(--brand-2);
}
