/* ==========================================================================
   DataQron — Core Stylesheet
   ========================================================================== */

:root{
  --bg: #0b1020;
  --bg-2: #0f1530;
  --surface: rgba(255,255,255,0.06);
  --surface-solid: #131a33;
  --border: rgba(255,255,255,0.10);
  --text: #eef1f8;
  --text-dim: #a8b0c6;
  --text-muted: #7a83a0;
  --brand: #6d8bff;
  --brand-2: #7b5cff;
  --accent: #22d3ee;
  --accent-2: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(3,7,18,0.45);
  --shadow-sm: 0 4px 16px rgba(3,7,18,0.35);
  --grad-brand: linear-gradient(135deg,#6d8bff 0%,#7b5cff 50%,#22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(109,139,255,0.18), rgba(34,211,238,0.12));
  --maxw: 1180px;
  --nav-h: 72px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="light"]{
  --bg: #f5f7fc;
  --bg-2: #eef1fb;
  --surface: rgba(255,255,255,0.7);
  --surface-solid: #ffffff;
  --border: rgba(15,23,42,0.08);
  --text: #10162b;
  --text-dim: #454e6b;
  --text-muted: #6b7390;
  --shadow: 0 10px 30px rgba(30,41,90,0.10);
  --shadow-sm: 0 4px 14px rgba(30,41,90,0.08);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(123,92,255,0.20), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34,211,238,0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family: inherit; cursor:pointer; }
.container{ max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section{ padding: 88px 0; position: relative; }
.section-tight{ padding: 56px 0; }

h1,h2,h3,h4{ font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
h1{ font-size: clamp(2.2rem, 4vw, 3.4rem); line-height:1.12; }
h2{ font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height:1.2; }
h3{ font-size: 1.3rem; }
p{ margin: 0 0 14px; color: var(--text-dim); }
.lead{ font-size: 1.15rem; color: var(--text-dim); }

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.78rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color: var(--brand); background: var(--grad-soft); border:1px solid var(--border);
  padding:7px 14px; border-radius: 999px; margin-bottom:18px;
}
.eyebrow::before{ content:"◆"; font-size:.6rem; color: var(--accent); }

.section-head{ max-width: 680px; margin: 0 auto 48px; text-align:center; }
.section-head.left{ margin:0 0 40px; text-align:left; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 13px 26px; border-radius: 999px; font-weight:600; font-size:.95rem;
  border:1px solid transparent; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn-primary{ background: var(--grad-brand); color:#fff; box-shadow: 0 8px 24px rgba(109,139,255,0.35); }
.btn-primary:hover{ transform: translateY(-3px); box-shadow: 0 14px 32px rgba(109,139,255,0.45); }
.btn-ghost{ background: var(--surface); color: var(--text); border-color: var(--border); backdrop-filter: blur(10px); }
.btn-ghost:hover{ transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.btn-sm{ padding: 8px 16px; font-size:.82rem; }
.btn-block{ width:100%; }

/* ---------- Navbar ---------- */
.navbar{
  position: sticky; top:0; z-index: 1000;
  height: var(--nav-h);
  display:flex; align-items:center;
  background: rgba(11,16,32,0.65);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background .35s ease, border-color .35s ease;
}
html[data-theme="light"] .navbar{ background: rgba(245,247,252,0.75); }
.nav-inner{ display:flex; align-items:center; justify-content:space-between; width:100%; gap: 20px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.15rem; }
.brand-mark{
  width:34px; height:34px; border-radius:10px; background: var(--grad-brand);
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:.95rem;
  box-shadow: 0 6px 16px rgba(109,139,255,0.4);
}
.nav-links{ display:flex; align-items:center; gap: 2px; flex-wrap: nowrap; }
.nav-links a{
  padding: 9px 13px; border-radius: 8px; font-size:.88rem; font-weight:600; color: var(--text-dim);
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover, .nav-links a.active{ color: var(--text); background: var(--surface); }
.nav-tools{ display:flex; align-items:center; gap:10px; }
.icon-btn{
  width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  background: var(--surface); border:1px solid var(--border); color: var(--text);
  transition: transform .2s ease, border-color .2s ease;
}
.icon-btn:hover{ transform: translateY(-2px); border-color: var(--brand); }
.theme-toggle .sun{ display:none; }
html[data-theme="light"] .theme-toggle .moon{ display:none; }
html[data-theme="light"] .theme-toggle .sun{ display:block; }
.menu-toggle{ display:none; }
.nav-more-wrap{ position:relative; }
.nav-more-btn{ padding: 9px 13px; border-radius:8px; font-size:.88rem; font-weight:600; color: var(--text-dim); background:none; border:none; display:flex; align-items:center; gap:4px; }
.nav-more-btn:hover{ color: var(--text); background: var(--surface); }
.nav-more-panel{
  position:absolute; top: calc(100% + 10px); right:0; min-width: 230px;
  background: var(--surface-solid); border:1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 10px; display:grid; gap:2px;
  opacity:0; visibility:hidden; transform: translateY(-8px); transition: all .2s ease;
}
.nav-more-wrap.open .nav-more-panel{ opacity:1; visibility:visible; transform: translateY(0); }
.nav-more-panel a{ display:block; padding:9px 12px; border-radius:8px; font-size:.86rem; font-weight:600; color: var(--text-dim); }
.nav-more-panel a:hover{ background: var(--surface); color: var(--text); }

/* ---------- Mobile Nav ---------- */
@media (max-width: 980px){
  .nav-links, .nav-more-wrap{ display:none; }
  .menu-toggle{ display:flex; }
}
.mobile-drawer{
  position: fixed; inset: 0; z-index: 1100; display:none;
  background: rgba(5,8,18,0.6); backdrop-filter: blur(4px);
}
.mobile-drawer.open{ display:block; }
.mobile-panel{
  position:absolute; top:0; right:0; height:100%; width:min(320px,86%);
  background: var(--surface-solid); border-left:1px solid var(--border);
  padding: 24px; overflow-y:auto; transform: translateX(100%); transition: transform .3s ease;
}
.mobile-drawer.open .mobile-panel{ transform: translateX(0); }
.mobile-panel a{ display:block; padding: 13px 4px; border-bottom:1px solid var(--border); font-weight:600; color: var(--text-dim); }
.mobile-panel a:hover{ color: var(--brand); }
.mobile-close{ float:right; }

/* ---------- Hero ---------- */
.hero{ padding: 92px 0 60px; text-align:center; position:relative; }
.hero-badge-row{ display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-bottom: 22px; }
.hero h1{ max-width: 900px; margin: 0 auto 20px; }
.hero .lead{ max-width: 660px; margin: 0 auto 34px; }
.hero-grad-word{ background: var(--grad-brand); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-bottom: 46px; }
.hero-stats{ display:flex; justify-content:center; gap: 42px; flex-wrap:wrap; }
.hero-stat b{ display:block; font-size:1.6rem; font-weight:800; }
.hero-stat span{ color: var(--text-muted); font-size:.82rem; }
.hero-visual{
  margin: 50px auto 0; max-width: 920px; border-radius: 20px; border:1px solid var(--border);
  background: var(--surface); backdrop-filter: blur(14px); box-shadow: var(--shadow); padding: 6px;
}
.hero-visual-inner{
  border-radius: 15px; background: var(--surface-solid); padding: 22px; text-align:left;
  font-family: var(--font-mono); font-size:.82rem; color: var(--text-dim);
}
.hero-visual-inner .l1{ color:#f472b6;} .hero-visual-inner .l2{color:#22d3ee;} .hero-visual-inner .l3{color:#34d399;}

/* ---------- Glass Cards ---------- */
.card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; backdrop-filter: blur(14px);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
  position: relative; overflow:hidden;
}
.card::before{
  content:""; position:absolute; inset:0; background: var(--grad-soft); opacity:0;
  transition: opacity .35s ease; pointer-events:none;
}
.card:hover{ transform: translateY(-8px); box-shadow: var(--shadow); border-color: rgba(109,139,255,0.4); }
.card:hover::before{ opacity:1; }
.card > *{ position:relative; z-index:1; }

.grid{ display:grid; gap: 22px; }
.grid-2{ grid-template-columns: repeat(2, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid-3, .grid-4{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; } }

.icon-tile{
  width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background: var(--grad-brand); color:#fff; font-size:1.3rem; margin-bottom:16px;
  box-shadow: 0 8px 20px rgba(109,139,255,0.3);
}
.tag{
  display:inline-flex; align-items:center; gap:6px; font-size:.72rem; font-weight:700; padding:5px 11px;
  border-radius: 999px; background: var(--surface); border:1px solid var(--border); color: var(--text-dim);
  text-transform:uppercase; letter-spacing:.04em;
}
.tag-beginner{ color:#34d399; border-color: rgba(52,211,153,0.4); }
.tag-intermediate{ color:#fbbf24; border-color: rgba(251,191,36,0.4); }
.tag-advanced{ color:#fb7185; border-color: rgba(251,113,133,0.4); }

/* ---------- Article / Tutorial cards ---------- */
.article-card{ display:flex; flex-direction:column; gap:12px; }
.article-meta{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:.78rem; color: var(--text-muted); }
.article-meta .dot::before{ content:"•"; margin: 0 6px; }
.article-card h3{ margin: 4px 0 6px; }
.card-link{ margin-top: auto; font-weight:700; color: var(--brand); display:inline-flex; align-items:center; gap:6px; }
.card-link .arrow{ transition: transform .25s ease; }
.article-card:hover .card-link .arrow{ transform: translateX(5px); }

/* ---------- Filters / Search UI ---------- */
.filter-bar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom: 30px; }
.filter-pill{
  padding: 9px 18px; border-radius: 999px; background: var(--surface); border:1px solid var(--border);
  font-size:.85rem; font-weight:600; color: var(--text-dim); transition: all .2s ease;
}
.filter-pill:hover, .filter-pill.active{ color:#fff; background: var(--grad-brand); border-color: transparent; }
.search-box{
  display:flex; align-items:center; gap:10px; background: var(--surface); border:1px solid var(--border);
  border-radius: 999px; padding: 12px 20px; max-width: 480px; margin: 0 auto 30px;
}
.search-box input{
  border:none; background:transparent; outline:none; color: var(--text); font-size:.95rem; width:100%;
}
.search-box input::placeholder{ color: var(--text-muted); }

/* ---------- Code blocks ---------- */
.code-block{
  background: #0a0e1f; border: 1px solid var(--border); border-radius: 14px; overflow:hidden;
  margin: 18px 0 26px; box-shadow: var(--shadow-sm);
}
html[data-theme="light"] .code-block{ background: #0f1224; }
.code-head{
  display:flex; align-items:center; justify-content:space-between; padding: 10px 16px;
  background: rgba(255,255,255,0.04); border-bottom: 1px solid var(--border);
}
.code-dots{ display:flex; gap:6px; }
.code-dots span{ width:10px; height:10px; border-radius:50%; display:inline-block; }
.code-dots span:nth-child(1){ background:#fb7185; } .code-dots span:nth-child(2){ background:#fbbf24; } .code-dots span:nth-child(3){ background:#34d399; }
.code-lang{ font-family: var(--font-mono); font-size:.72rem; color: var(--text-muted); text-transform:uppercase; letter-spacing:.06em; }
.copy-btn{
  display:flex; align-items:center; gap:6px; font-size:.75rem; font-weight:600; color: var(--text-dim);
  background: var(--surface); border:1px solid var(--border); padding:6px 12px; border-radius:8px;
  transition: all .2s ease;
}
.copy-btn:hover{ color:#fff; border-color: var(--brand); background: var(--grad-brand); }
.copy-btn.copied{ color:#fff; background: var(--accent-2); border-color: transparent; }
.code-block pre{ margin:0; padding: 18px 20px; overflow-x:auto; font-family: var(--font-mono); font-size:.85rem; line-height:1.7; }
.code-block code{ color: #dbe3ff; }
.tok-kw{ color:#c792ea; } .tok-str{ color:#c3e88d; } .tok-fn{ color:#82aaff; } .tok-com{ color:#6b7390; } .tok-num{ color:#f78c6c; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs{ display:flex; gap:8px; align-items:center; font-size:.82rem; color: var(--text-muted); margin-bottom: 20px; flex-wrap:wrap; }
.breadcrumbs a{ color: var(--text-muted); }
.breadcrumbs a:hover{ color: var(--brand); }
.breadcrumbs .sep{ opacity:.5; }

/* ---------- FAQ Accordion ---------- */
.faq-item{ border:1px solid var(--border); border-radius: 14px; margin-bottom:12px; background: var(--surface); overflow:hidden; }
.faq-q{ display:flex; align-items:center; justify-content:space-between; padding: 18px 22px; cursor:pointer; font-weight:700; }
.faq-q .plus{ transition: transform .3s ease; font-size:1.2rem; color: var(--brand); }
.faq-item.open .faq-q .plus{ transform: rotate(45deg); }
.faq-a{ max-height:0; overflow:hidden; transition: max-height .35s ease; }
.faq-item.open .faq-a{ max-height: 400px; }
.faq-a-inner{ padding: 0 22px 20px; color: var(--text-dim); }

/* ---------- Newsletter ---------- */
.newsletter{
  border-radius: 24px; padding: 52px; text-align:center; background: var(--grad-soft);
  border:1px solid var(--border); position:relative; overflow:hidden;
}
.newsletter-form{ display:flex; gap:10px; justify-content:center; max-width:480px; margin: 22px auto 0; flex-wrap:wrap; }
.newsletter-form input{
  flex:1; min-width:220px; padding: 13px 20px; border-radius:999px; border:1px solid var(--border);
  background: var(--surface-solid); color: var(--text); outline:none;
}

/* ---------- Footer ---------- */
.footer{ border-top:1px solid var(--border); padding: 60px 0 30px; margin-top:60px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 30px; margin-bottom:40px; }
@media (max-width: 900px){ .footer-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer h4{ font-size:.85rem; text-transform:uppercase; letter-spacing:.06em; margin-bottom:16px; color: var(--text-muted); }
.footer ul li{ margin-bottom:10px; }
.footer ul a{ color: var(--text-dim); font-size:.9rem; }
.footer ul a:hover{ color: var(--brand); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; border-top:1px solid var(--border); padding-top:24px; font-size:.82rem; color: var(--text-muted); }
.footer-social{ display:flex; gap:10px; }

/* ---------- Scroll reveal ---------- */
.reveal{ opacity:0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible{ opacity:1; transform: translateY(0); }
.reveal-delay-1{ transition-delay: .08s; } .reveal-delay-2{ transition-delay: .16s; } .reveal-delay-3{ transition-delay: .24s; } .reveal-delay-4{ transition-delay: .32s; }

/* ---------- Utility ---------- */
.mt-0{ margin-top:0; } .mb-0{ margin-bottom:0; }
.muted{ color: var(--text-muted); }
.text-center{ text-align:center; }
.divider{ height:1px; background: var(--border); margin: 50px 0; border:none; }
.pill-row{ display:flex; gap:10px; flex-wrap:wrap; }
.stat-card{ text-align:center; padding: 30px 20px; }
.stat-card b{ font-size:2rem; display:block; background: var(--grad-brand); -webkit-background-clip:text; background-clip:text; color:transparent; }
.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items:center; }
@media (max-width: 860px){ .two-col{ grid-template-columns: 1fr; } }
.compare-card{ border-left: 3px solid var(--brand); }
.compare-card.alt{ border-left-color: var(--accent); }
.check-list li{ display:flex; gap:10px; margin-bottom:10px; color: var(--text-dim); }
.check-list li::before{ content:"✓"; color: var(--accent-2); font-weight:800; }
.page-header{ padding: 64px 0 20px; text-align:center; }
.page-header .lead{ margin: 0 auto; }
.contact-grid{ display:grid; grid-template-columns: 1fr 1.2fr; gap: 40px; }
@media (max-width: 860px){ .contact-grid{ grid-template-columns: 1fr; } }
.form-field{ margin-bottom: 16px; }
.form-field label{ display:block; font-size:.85rem; font-weight:600; margin-bottom:8px; color: var(--text-dim); }
.form-field input, .form-field textarea, .form-field select{
  width:100%; padding: 13px 16px; border-radius:10px; border:1px solid var(--border);
  background: var(--surface-solid); color: var(--text); outline:none; font-family:inherit; resize:vertical;
}
.form-field input:focus, .form-field textarea:focus{ border-color: var(--brand); }
.form-note{ font-size:.8rem; color: var(--text-muted); margin-top: 10px; }
.legal ol, .legal ul{ list-style: decimal; padding-left: 22px; margin-bottom: 16px; }
.legal ul{ list-style: disc; }
.legal li{ margin-bottom:8px; color: var(--text-dim); }
.glossary-item{ padding: 20px 0; border-bottom: 1px solid var(--border); }
.glossary-letter{ font-size:.85rem; font-weight:800; color: var(--brand); text-transform:uppercase; margin: 30px 0 6px; }
.error-hero{ text-align:center; padding: 120px 0; }
.error-code{ font-size: clamp(4rem, 12vw, 9rem); font-weight:900; background: var(--grad-brand); -webkit-background-clip:text; background-clip:text; color:transparent; line-height:1; }
.toc{ background: var(--surface); border:1px solid var(--border); border-radius:14px; padding:20px 24px; margin-bottom: 30px; }
.toc a{ display:block; padding:6px 0; color: var(--text-dim); font-size:.9rem; }
.toc a:hover{ color: var(--brand); }
