/* =========================================================
   Dhurta — Neon Deck design system
   Shared across index / features / guide / troubleshooting
   ========================================================= */

:root {
  --bg: #050310;
  --bg-2: #0a0620;
  --surface: #120b28;
  --surface-2: #1a1136;
  --ink: #f4f2ff;
  --ink-dim: #a89fcf;
  --ink-faint: #6c6296;

  --cyan: #00f5d4;
  --cyan-soft: #6df9e4;
  --magenta: #ff0055;
  --magenta-soft: #ff5c8f;
  --violet: #ff6a00;
  --gold: #ff6a00;

  --line: rgba(0, 240, 255, 0.16);
  --line-strong: rgba(0, 240, 255, 0.4);
  --glow-cyan: 0 0 24px rgba(0, 240, 255, 0.35);
  --glow-magenta: 0 0 24px rgba(255, 46, 224, 0.35);

  --good: #35e08a;
  --warn: #ffb648;
  --bad: #ff5470;

  --radius: 14px;
  --radius-sm: 8px;
}

:root[data-theme="light"] {
  --bg: #f6f4ff;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #edeafc;
  --ink: #16102e;
  --ink-dim: #4c4470;
  --ink-faint: #776e9e;

  --cyan: #007a68;
  --cyan-soft: #009c85;
  --magenta: #c40045;
  --magenta-soft: #e0195f;
  --violet: #b34e00;
  --gold: #b34e00;

  --line: rgba(0, 122, 104, 0.18);
  --line-strong: rgba(0, 122, 104, 0.42);
  --glow-cyan: 0 0 20px rgba(0, 122, 104, 0.18);
  --glow-magenta: 0 0 20px rgba(196, 0, 69, 0.18);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f4ff;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #edeafc;
    --ink: #16102e;
    --ink-dim: #4c4470;
    --ink-faint: #776e9e;

    --cyan: #007a68;
    --cyan-soft: #009c85;
    --magenta: #c40045;
    --magenta-soft: #e0195f;
    --violet: #b34e00;
    --gold: #b34e00;

    --line: rgba(0, 122, 104, 0.18);
    --line-strong: rgba(0, 122, 104, 0.42);
    --glow-cyan: 0 0 20px rgba(0, 122, 104, 0.18);
    --glow-magenta: 0 0 20px rgba(196, 0, 69, 0.18);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 45%),
    radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--cyan) 16%, transparent), transparent 40%);
  background-attachment: fixed;
}

::selection { background: var(--magenta); color: #0a0416; }

h1, h2, h3, .display {
  font-family: "Century Gothic", "Avenir Next", "Segoe UI Semibold", "Segoe UI", sans-serif;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  text-shadow: 0 0 12px color-mix(in srgb, var(--cyan) 55%, transparent);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  display: inline-block;
}

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ---------- NAV ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img {
  width: 32px; height: 32px; object-fit: contain;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--magenta) 55%, transparent));
}
.brand-word {
  font-family: "Century Gothic", "Avenir Next", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

nav.links { display: flex; gap: 30px; font-size: 0.86rem; }
nav.links a {
  text-decoration: none;
  color: var(--ink-dim);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 0;
  position: relative;
}
nav.links a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: var(--glow-cyan);
  transition: right 0.25s ease;
}
nav.links a:hover { color: var(--ink); }
nav.links a:hover::after, nav.links a[aria-current="page"]::after { right: 0; }
nav.links a[aria-current="page"] { color: var(--ink); }

.btn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { border-color: var(--cyan); transform: translateY(-1px); box-shadow: var(--glow-cyan); }

.btn-primary {
  background: linear-gradient(120deg, var(--magenta), var(--violet) 60%, var(--cyan));
  color: #fff;
  border: 1px solid transparent;
  font-weight: 700;
  box-shadow: 0 6px 30px -8px color-mix(in srgb, var(--magenta) 70%, transparent);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 8px 36px -6px color-mix(in srgb, var(--magenta) 80%, transparent); }

/* ---------- SECTION SCAFFOLD ---------- */
section { padding: 108px 0; position: relative; }
section .head { margin-bottom: 56px; max-width: 62ch; }
section .head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-top: 14px; }
section .head p { color: var(--ink-dim); margin-top: 16px; font-size: 1.02rem; max-width: 54ch; text-transform: none; }
section .head.center { margin-left: auto; margin-right: auto; text-align: center; }

.rule { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- CARDS (3D tilt) ---------- */
.tilt-card {
  --rx: 0deg; --ry: 0deg;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  opacity: 0;
  translate: 0 18px;
}
.tilt-card.in { opacity: 1; translate: 0 0; transition: opacity 0.6s ease, translate 0.6s ease, transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.tilt-card:hover { border-color: var(--line-strong); box-shadow: var(--glow-cyan); }

.tilt-card .icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, color-mix(in srgb, var(--magenta) 20%, transparent), color-mix(in srgb, var(--cyan) 20%, transparent));
  margin-bottom: 16px;
}
.tilt-card .icon svg { width: 20px; height: 20px; stroke: var(--cyan); fill: none; stroke-width: 1.6; }
.tilt-card h3, .tilt-card h4 { text-transform: none; font-size: 1.05rem; margin-bottom: 8px; }
.tilt-card p { color: var(--ink-dim); font-size: 0.9rem; margin: 0; text-transform: none; }

.badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 4px 10px;
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--ink-faint);
}
.badge.live { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.badge.dev { color: var(--magenta-soft); border-color: color-mix(in srgb, var(--magenta) 45%, transparent); background: color-mix(in srgb, var(--magenta) 8%, transparent); }

/* ---------- DHURTA UI RENDER (reusable browser mockup) ---------- */
.shot-frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 20px 60px -24px rgba(0,0,0,0.6), var(--glow-cyan); }
.shot-frame img { display: block; width: 100%; height: auto; }

.render-note {
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin-top: 8px;
  text-align: center;
}

.dwin {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #0d0a1c;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7), var(--glow-cyan);
  font-family: -apple-system, "Segoe UI", sans-serif;
}
.dwin-title {
  height: 30px;
  background: #120e26;
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dwin-dot { width: 9px; height: 9px; border-radius: 50%; }
.dwin-tabs {
  height: 34px;
  background: #0f0c20;
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dwin-tab {
  height: 26px; padding: 0 12px; border-radius: 6px 6px 0 0;
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; color: #a89fcf; background: rgba(255,255,255,0.03);
}
.dwin-tab.active { background: #1a1636; color: #f4f2ff; }
.dwin-tab .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.dwin-url {
  height: 40px;
  background: #120e26;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dwin-url-pill {
  flex: 1; height: 26px; border-radius: 20px; background: #1a1636;
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  font-size: 0.74rem; color: #a89fcf; font-family: ui-monospace, monospace;
}
.dwin-body { display: flex; min-height: 260px; }
.dwin-side {
  width: 46px; background: #0b0818;
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 14px 0;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.dwin-side .si { width: 18px; height: 18px; opacity: 0.5; }
.dwin-side .si.active { opacity: 1; }
.dwin-side svg { width: 100%; height: 100%; stroke: var(--cyan); fill: none; stroke-width: 1.6; }
.dwin-main {
  flex: 1; padding: 22px;
  background: radial-gradient(circle at 30% 20%, rgba(139,59,255,0.12), transparent 60%), #0d0a1c;
}

/* ---------- SCROLL REVEAL (generic) ---------- */
.reveal { opacity: 0; translate: 0 18px; transition: opacity 0.6s ease, translate 0.6s ease; }
.reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .tilt-card, .reveal { transition: none !important; opacity: 1 !important; translate: 0 !important; transform: none !important; }
}

/* ---------- FOOTER ---------- */
footer.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 60px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.foot-col h5 {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 14px;
}
.foot-col a { display: block; text-decoration: none; color: var(--ink-dim); font-size: 0.88rem; margin-bottom: 10px; }
.foot-col a:hover { color: var(--cyan); }
.foot-legal {
  padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
}
.foot-copy { color: var(--ink-faint); font-size: 0.8rem; }
.disclaimer { color: var(--ink-faint); font-size: 0.78rem; max-width: 70ch; margin-top: 10px; }

.theme-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--glow-cyan);
}
.theme-toggle svg { width: 19px; height: 19px; stroke: var(--cyan); fill: none; stroke-width: 1.6; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.compare-wrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.compare th, table.compare td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
table.compare th {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 500;
}
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--ink-faint); }

@media (max-width: 960px) {
  nav.links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .dwin-body { flex-direction: column; }
}
