/* ═══════════════════════════════════════════════════
   jaklens.ai — Shared Stylesheet
   Used by: all pages
════════════════════════════════════════════════════ */

/* ── Font metric override (prevents CLS on Inter swap) ── */
/* Arial is sized to match Inter so the font-swap is invisible */
@font-face {
  font-family: 'Inter Fallback';
  font-style: normal;
  font-weight: 100 900;
  src: local('Arial'), local('Helvetica Neue'), local('sans-serif');
  ascent-override: 90%;
  descent-override: 22.43%;
  line-gap-override: 0%;
  size-adjust: 107.64%;
}

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ───────────────────────────────────── */
:root {
  --bg:      #020617;
  --bg1:     #0f172a;
  --bg2:     #1e293b;
  --border:  #1e293b;
  --border2: #334155;
  --text:    #f8fafc;
  --text2:   #94a3b8;
  --text3:   #64748b;
  --indigo:  #6366f1;
  --violet:  #8b5cf6;
  --emerald: #10b981;
  --rose:    #f43f5e;
  --amber:   #f59e0b;
  --cyan:    #06b6d4;
  --r:       12px;
}

/* ── Base ────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Typography ──────────────────────────────────── */
.grad-text {
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 40%, #a5b4fc 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.grad-text-indigo {
  background: linear-gradient(135deg, #a5b4fc 0%, #6366f1 60%, #8b5cf6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Layout ──────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.divider    { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* ── Grid bg ─────────────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Navigation ──────────────────────────────────── */
nav[aria-label="Main navigation"] {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px;
  background: rgba(2,6,23,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30,41,59,0.8);
}
.nav-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800; letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-links {
  display: flex; align-items: center; gap: 24px;
  flex: 1; justify-content: center;
}
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--text2);
  transition: color 0.2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: #a5b4fc; }
.btn-nav {
  padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: var(--indigo); color: #fff;
  border: none; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 0 20px rgba(99,102,241,0.3); white-space: nowrap;
  flex-shrink: 0;
}
.btn-nav:hover { background: #4f46e5; transform: translateY(-1px); }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(30,41,59,0.55); border: 1px solid var(--border2);
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); transition: all 0.2s;
}
.theme-toggle:hover { background: rgba(51,65,85,0.8); color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; pointer-events: none; }
.icon-moon { display: none; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all 0.2s; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 0 30px rgba(99,102,241,0.4), 0 4px 16px rgba(0,0,0,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(99,102,241,0.55), 0 8px 24px rgba(0,0,0,0.4); }
.btn-secondary {
  background: rgba(30,41,59,0.8); color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: rgba(51,65,85,0.8); transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Section Labels ──────────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; margin-bottom: 20px;
}
.section-label.indigo  { background:rgba(99,102,241,0.1);  border:1px solid rgba(99,102,241,0.2);  color:#a5b4fc; }
.section-label.emerald { background:rgba(16,185,129,0.1);  border:1px solid rgba(16,185,129,0.2);  color:#6ee7b7; }
.section-label.violet  { background:rgba(139,92,246,0.1);  border:1px solid rgba(139,92,246,0.2);  color:#c4b5fd; }
.section-label.amber   { background:rgba(245,158,11,0.1);  border:1px solid rgba(245,158,11,0.2);  color:#fde68a; }
.section-label.rose    { background:rgba(244,63,94,0.1);   border:1px solid rgba(244,63,94,0.2);   color:#fda4af; }
.section-h   { font-size: clamp(28px,4vw,42px); font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px; }
.section-sub { font-size: 17px; color: var(--text2); max-width: 560px; line-height: 1.65; }

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px;
  transition: all 0.3s; position: relative; overflow: hidden;
}
.card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-3px); }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.card p  { font-size: 14px; color: var(--text2); line-height: 1.65; }

/* ── Page Hero (inner pages) ─────────────────────── */
.page-hero {
  padding: 140px 0 72px;
  text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(32px,5vw,56px); font-weight: 900;
  letter-spacing: -1.5px; line-height: 1.08; margin-bottom: 20px;
}
.page-hero p {
  font-size: clamp(16px,2vw,19px); color: var(--text2);
  max-width: 620px; margin: 0 auto 36px; line-height: 1.65;
}

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text3); margin-bottom: 0;
  list-style: none; flex-wrap: wrap;
}
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; color: var(--border2); }
.breadcrumb a { color: var(--text3); transition: color 0.2s; }
.breadcrumb a:hover { color: #a5b4fc; }
.breadcrumb span { color: var(--text3); }

/* ── Footer brand ────────────────────────────────── */
.footer-brand { display: flex; flex-direction: column; gap: 6px; }

/* ── FAQ Section ─────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 48px; }
.faq-item {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.faq-q {
  padding: 20px 24px; font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; transition: color 0.2s;
}
.faq-q:hover { color: #a5b4fc; }
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.3s; color: var(--text3); }
.faq-item.open .faq-q svg { transform: rotate(180deg); color: #a5b4fc; }
.faq-a {
  padding: 0 24px; max-height: 0; overflow: hidden;
  font-size: 14px; color: var(--text2); line-height: 1.75;
  transition: max-height 0.35s ease, padding 0.2s;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 24px 20px; }

/* ── Footer ──────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 48px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-logo { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text3); transition: color 0.2s; }
.footer-links a:hover { color: var(--text2); }
.footer-copy { font-size: 12px; color: var(--text3); }

/* ── Blog cards ──────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 48px; }
.blog-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; transition: all 0.3s;
  display: flex; flex-direction: column;
}
.blog-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-3px); }
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.blog-card-tag {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.blog-card h2 { font-size: 17px; font-weight: 700; line-height: 1.4; }
.blog-card p  { font-size: 13px; color: var(--text2); line-height: 1.65; flex: 1; }
.blog-card-meta { font-size: 11px; color: var(--text3); }
.blog-card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #a5b4fc;
  padding: 16px 24px; border-top: 1px solid var(--border);
  transition: gap 0.2s;
}
.blog-card-link:hover { gap: 10px; }
.blog-card-link svg { width: 14px; height: 14px; }

/* ── Blog post (article) ─────────────────────────── */
.article-wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.article-wrap h1 { font-size: clamp(28px,4vw,44px); font-weight: 900; letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px; }
.article-meta { font-size: 13px; color: var(--text3); margin-bottom: 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.article-body { font-size: 16px; line-height: 1.8; color: var(--text2); }
.article-body h2 { font-size: 24px; font-weight: 800; color: var(--text); margin: 48px 0 16px; letter-spacing: -0.5px; }
.article-body h3 { font-size: 19px; font-weight: 700; color: var(--text); margin: 32px 0 12px; }
.article-body p  { margin-bottom: 20px; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body a { color: #a5b4fc; text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote {
  border-left: 3px solid var(--indigo); padding: 16px 20px;
  background: rgba(99,102,241,0.06); border-radius: 0 8px 8px 0;
  margin: 24px 0; color: var(--text);
}
.article-cta {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(99,102,241,0.2); border-radius: var(--r);
  padding: 32px; text-align: center; margin: 48px 0;
}
.article-cta h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.article-cta p  { font-size: 14px; color: var(--text2); margin-bottom: 20px; }

/* ── Compare table ───────────────────────────────── */
.compare-wrap { overflow-x: auto; margin-top: 48px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th {
  padding: 14px 20px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text3);
}
.compare-table th.hl { color: #a5b4fc; background: rgba(99,102,241,0.05); border-radius: 8px 8px 0 0; }
.compare-table td { padding: 14px 20px; border-bottom: 1px solid rgba(30,41,59,0.5); color: var(--text2); }
.compare-table td.hl { background: rgba(99,102,241,0.04); }
.compare-table tr:last-child td { border-bottom: none; }
.check { color: var(--emerald); }
.cross { color: var(--rose); }

/* ── Animations ──────────────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
@keyframes fadein { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
.animate-in { animation: fadein 0.5s ease both; }

/* ── Light theme ─────────────────────────────────── */
[data-theme="light"] {
  --bg: #f8fafc; --bg1: #ffffff; --bg2: #f1f5f9;
  --border: #e2e8f0; --border2: #cbd5e1;
  --text: #0f172a; --text2: #475569; --text3: #94a3b8;
}
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] nav  { background: rgba(248,250,252,0.92); border-bottom-color: rgba(203,213,225,0.8); }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .theme-toggle { background: rgba(226,232,240,0.7); border-color: var(--border); }
[data-theme="light"] .btn-secondary { background: rgba(226,232,240,0.8); color: var(--text); border-color: var(--border2); }
[data-theme="light"] .grad-text { background: linear-gradient(135deg,#0f172a,#334155,#4338ca); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
[data-theme="light"] .section-label.indigo  { color: #4338ca; border-color: rgba(99,102,241,0.4); }
[data-theme="light"] .section-label.emerald { color: #047857; border-color: rgba(16,185,129,0.4); }
[data-theme="light"] .section-label.violet  { color: #6d28d9; border-color: rgba(139,92,246,0.4); }
[data-theme="light"] .section-label.amber   { color: #b45309; border-color: rgba(245,158,11,0.4); }
[data-theme="light"] .section-label.rose    { color: #be123c; border-color: rgba(244,63,94,0.4); }
[data-theme="light"] [style*="color:#a5b4fc"]  { color: #4338ca !important; }
[data-theme="light"] [style*="color: #a5b4fc"] { color: #4338ca !important; }
body, nav, .card, footer { transition: background-color 0.25s, border-color 0.25s, color 0.25s; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  /* Remove expensive GPU layer on mobile — nav becomes opaque */
  nav[aria-label="Main navigation"] {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(2,6,23,0.98);
  }
}
@media (max-width: 600px) {
  .blog-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .page-hero { padding: 110px 0 56px; }
}
