/* ═══════════════════════════════════════════
   XSSISTANT — style.css
   Dark default · Light on [data-theme="light"]
═══════════════════════════════════════════ */

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

/* ── THEME TOKENS ── */
:root {
  --bg:         #07091A;
  --bg-2:       #0C1128;
  --surface:    #111827;
  --glass:      rgba(255,255,255,0.04);
  --glass-b:    rgba(255,255,255,0.08);
  --text:       #EEF2FF;
  --text-muted: #8899BA;
  --text-dim:   #445070;
  --brand:      #5B8DEF;
  --brand-2:    #A78BFA;
  --accent:     #22D3EE;
  --success:    #34D399;
  --grad:       linear-gradient(135deg, #5B8DEF 0%, #A78BFA 100%);
  --glow:       0 0 48px rgba(91,141,239,.18);
  --shadow:     0 24px 64px rgba(0,0,0,.5);
  --border:     rgba(255,255,255,0.07);
  --border-2:   rgba(255,255,255,0.14);
  --radius:     14px;
  --radius-lg:  22px;
  --nav-h:      68px;
}

[data-theme="light"] {
  --bg:         #F5F7FF;
  --bg-2:       #ECEFFE;
  --surface:    #FFFFFF;
  --glass:      rgba(255,255,255,0.72);
  --glass-b:    rgba(0,0,0,0.06);
  --text:       #0B142E;
  --text-muted: #526080;
  --text-dim:   #9AABC5;
  --glow:       0 0 40px rgba(91,141,239,.1);
  --shadow:     0 20px 60px rgba(0,0,50,.07);
  --border:     rgba(0,0,0,0.07);
  --border-2:   rgba(0,0,0,0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}

/* ── LOGO IMAGES ── */
.nav-logo   { display: flex; align-items: center; }
.footer-logo { display: flex; align-items: center; }

.logo-img        { height: 34px; width: auto; display: block; }
.logo-sm         { height: 26px; }
.logo-light-img  { display: none; }
[data-theme="light"] .logo-dark-img  { display: none; }
[data-theme="light"] .logo-light-img { display: block; mix-blend-mode: multiply; }

/* Hero mark watermark */
.hero-mark {
  position: absolute;
  right: 4%; top: 50%;
  transform: translateY(-50%);
  width: clamp(260px, 32vw, 480px);
  opacity: .18;
  pointer-events: none; user-select: none; z-index: 0;
}
[data-theme="light"] .hero-mark { opacity: .12; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ════════════════════════════════
   NAV
════════════════════════════════ */
.main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  background: rgba(7,9,26,0.82);
  backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background .3s, border-color .3s;
}

[data-theme="light"] .main-nav {
  background: rgba(245,247,255,0.88);
}

.nav-logo {
  font-size: 1.4rem; font-weight: 900; letter-spacing: -.04em;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.nav-logo .xs { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex; gap: .15rem; list-style: none; align-items: center;
}
.nav-links a {
  text-decoration: none; color: var(--text-muted);
  font-weight: 500; font-size: .9rem;
  padding: .5rem 1rem; border-radius: 9px;
  transition: color .2s, background .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--grad);
  border-radius: 99px;
  transition: width .25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 24px; }
.nav-links a.active { color: var(--text); }

.nav-right { display: flex; gap: .75rem; align-items: center; flex-shrink: 0; }

.theme-toggle {
  width: 38px; height: 38px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background .2s, border-color .2s;
  color: var(--text-muted);
}
.theme-toggle:hover { background: var(--glass-b); border-color: var(--border-2); color: var(--text); }

.btn-nav {
  display: inline-flex; align-items: center;
  background: var(--grad); color: white;
  padding: .5rem 1.1rem; border-radius: 9px;
  font-weight: 700; font-size: .88rem;
  text-decoration: none;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}
.btn-nav:hover { opacity: .88; transform: translateY(-1px); }

/* ════════════════════════════════
   PAGE WRAPPER
════════════════════════════════ */
.page { padding-top: var(--nav-h); }

/* ════════════════════════════════
   HERO
════════════════════════════════ */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: 6rem 5% 5rem;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .13;
}
.blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #5B8DEF 0%, transparent 70%);
  top: -200px; right: -150px;
  animation: drift 14s ease-in-out infinite;
}
.blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #A78BFA 0%, transparent 70%);
  bottom: -80px; left: 5%;
  animation: drift 18s ease-in-out infinite reverse;
}
.blob-3 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, #22D3EE 0%, transparent 70%);
  top: 45%; left: 55%;
  animation: drift 11s ease-in-out infinite 4s;
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 80%);
}

@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(40px,-25px) scale(1.06); }
  66%      { transform: translate(-25px,35px) scale(.94); }
}

.hero-content { position: relative; z-index: 1; max-width: 860px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--glass); border: 1px solid var(--border-2);
  backdrop-filter: blur(12px);
  padding: .45rem 1.1rem; border-radius: 99px;
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: 2rem; letter-spacing: .06em; text-transform: uppercase;
}
.hero-badge .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(34,211,238,.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,211,238,.6); }
  50%      { box-shadow: 0 0 0 6px rgba(34,211,238,0); }
}

.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .muted { color: var(--text-muted); font-weight: 300; }

.hero-sub {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  color: var(--text-muted); max-width: 560px;
  margin-bottom: 2.75rem; line-height: 1.8;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: .8rem 1.9rem; border-radius: 11px;
  transition: all .2s; cursor: pointer; border: none; font-family: inherit;
}
.btn-primary {
  background: var(--grad); color: white;
  box-shadow: 0 4px 28px rgba(91,141,239,.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(91,141,239,.44); }

.btn-ghost {
  background: var(--glass); color: var(--text);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--glass-b); transform: translateY(-2px); border-color: var(--brand); }

/* ════════════════════════════════
   SECTION LAYOUT
════════════════════════════════ */
.section { padding: 6rem 5%; }

.eyebrow {
  font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--brand); margin-bottom: .75rem;
}
.section-title { margin-bottom: 1rem; }
.section-lead {
  color: var(--text-muted); max-width: 560px;
  font-size: 1rem; margin-bottom: 3.5rem; line-height: 1.8;
}

.bg-alt {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ════════════════════════════════
   STAT BAR
════════════════════════════════ */
.stat-bar {
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  flex: 1; min-width: 160px;
  padding: 2.5rem 2rem; text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  display: block; font-size: 2.6rem; font-weight: 900;
  line-height: 1; margin-bottom: .4rem;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: .83rem; color: var(--text-muted); }

/* ════════════════════════════════
   CARDS
════════════════════════════════ */
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color .25s, box-shadow .25s, transform .25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: var(--grad);
  opacity: 0; transition: opacity .25s;
}
.card:hover { border-color: var(--border-2); box-shadow: var(--glow); transform: translateY(-5px); }
.card:hover::before { opacity: 1; }

.card-icon {
  width: 48px; height: 48px;
  background: var(--glass-b); border: 1px solid var(--border);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1.25rem;
}
.card p { color: var(--text-muted); font-size: .92rem; margin-top: .5rem; line-height: 1.75; }

/* ════════════════════════════════
   GRIDS
════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; }

/* ════════════════════════════════
   STEP CARDS
════════════════════════════════ */
.step-card {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.75rem;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.step-card:hover { border-color: var(--border-2); box-shadow: var(--glow); }

.step-num {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--grad); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .8rem; color: white;
}

.step-card h3 { margin-bottom: .35rem; }
.step-card p  { color: var(--text-muted); font-size: .9rem; line-height: 1.65; }

/* ════════════════════════════════
   HIGHLIGHT BOX
════════════════════════════════ */
.highlight-box {
  background: var(--glass);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 2.25rem 2.5rem;
}

/* ════════════════════════════════
   CODE BLOCK
════════════════════════════════ */
.code-block {
  background: #050813;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.75rem;
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: .8rem; line-height: 2; color: #8899BA;
  overflow-x: auto;
  position: relative;
}
.code-block::before {
  content: '●  ●  ●';
  position: absolute; top: .75rem; left: 1rem;
  font-size: .65rem; letter-spacing: .15em;
  color: rgba(255,255,255,.15);
}
.code-block code { display: block; margin-top: 1rem; }
.c-comment { color: #3D5C49; }
.c-keyword  { color: #7BB3F7; font-weight: 600; }
.c-fn       { color: #C792EA; }
.c-str      { color: #C3E88D; }
.c-num      { color: #F78C6C; }
.c-ok       { color: #4CAF7D; }

/* ════════════════════════════════
   CTA SECTION
════════════════════════════════ */
.cta-wrap {
  text-align: center;
}
.cta-wrap h2 { margin-bottom: 1rem; }
.cta-wrap p  { color: var(--text-muted); max-width: 500px; margin: 0 auto 2.5rem; }

/* ════════════════════════════════
   TAGS
════════════════════════════════ */
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; }
.tag {
  display: inline-block;
  background: var(--glass-b); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .73rem; font-weight: 600;
  padding: .25rem .7rem; border-radius: 99px; letter-spacing: .03em;
}

/* ════════════════════════════════
   VALUE CARDS (About)
════════════════════════════════ */
.value-card {
  padding: 2rem; background: var(--glass);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.value-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.value-icon { font-size: 2rem; margin-bottom: 1rem; }
.value-card h3 { margin-bottom: .5rem; }
.value-card p  { color: var(--text-muted); font-size: .92rem; }

/* ════════════════════════════════
   CONTACT FORM
════════════════════════════════ */
.form-wrap {
  max-width: 680px; margin: 0 auto;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 3rem 3rem 2.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--text-muted); letter-spacing: .03em; text-transform: uppercase; }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-2); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 9px;
  padding: .72rem 1rem; font-size: .95rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(91,141,239,.12);
}
.form-group select option { background: var(--surface); color: var(--text); }
.form-group textarea { resize: vertical; min-height: 130px; }

.btn-submit {
  width: 100%; padding: .9rem;
  background: var(--grad); color: white;
  font-weight: 700; font-size: 1rem; font-family: inherit;
  border: none; border-radius: 10px; cursor: pointer;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 24px rgba(91,141,239,.28);
}
.btn-submit:hover { opacity: .88; transform: translateY(-1px); }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 5%;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer-logo {
  font-size: 1.2rem; font-weight: 900; letter-spacing: -.03em;
  text-decoration: none; color: var(--text);
}
.footer-logo .xs { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.site-footer p { font-size: .82rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; }
.footer-links a { text-decoration: none; color: var(--text-muted); font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ════════════════════════════════
   SCROLL REVEAL
════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ════════════════════════════════
   TOAST
════════════════════════════════ */
#toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--success); color: #022c22;
  padding: .9rem 1.6rem; border-radius: 12px;
  font-weight: 700; font-size: .9rem;
  box-shadow: 0 8px 36px rgba(52,211,153,.35);
  transform: translateY(80px); opacity: 0;
  transition: all .38s cubic-bezier(.34,1.56,.64,1);
  z-index: 9999;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ════════════════════════════════
   PAGE HERO (inner pages)
════════════════════════════════ */
.page-hero {
  padding: 5rem 5% 4rem;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 720px; margin-bottom: 1.25rem; }
.page-hero p  { color: var(--text-muted); max-width: 600px; font-size: 1.05rem; line-height: 1.8; }
.page-hero .blob { opacity: .07; }

/* ════════════════════════════════
   DIVIDER
════════════════════════════════ */
.divider {
  height: 1px; background: var(--border); border: none;
  margin: 0;
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .form-row  { grid-template-columns: 1fr; }
  .stat-bar  { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .site-footer { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .form-wrap { padding: 2rem 1.5rem; }
}
