/* ================================================================
   NirvanaCorner — Shared Design System
   Extracted from index.html — keep in sync with it.
   Link with: <link rel="stylesheet" href="/shared.css">
   (from tools/ subfolder use: <link rel="stylesheet" href="../shared.css">)
================================================================ */

/* ========= TOKENS ========= */
:root {
  --bg: #0a0a12;
  --bg-elev: #11111c;
  --bg-card: #161624;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text: #f5f5fa;
  --text-muted: #9b9bb0;
  --text-dim: #6b6b80;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --accent-3: #ff7ac6;
  --gradient: linear-gradient(135deg, #7c5cff 0%, #00d4ff 50%, #ff7ac6 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124,92,255,0.15), rgba(0,212,255,0.15));
  --shadow-lg: 0 30px 80px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 60px rgba(124,92,255,0.35);
  --radius: 18px;
  --radius-sm: 10px;
}

[data-theme="light"] {
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(10,10,18,0.08);
  --border-strong: rgba(10,10,18,0.18);
  --text: #0a0a12;
  --text-muted: #4a4a60;
  --text-dim: #8a8a9a;
  --shadow-lg: 0 30px 80px rgba(10,10,40,0.08);
  --shadow-glow: 0 10px 50px rgba(124,92,255,0.18);
}

/* ========= RESET ========= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}
::selection { background: var(--accent); color: #fff; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========= SCROLL PROGRESS ========= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 1000;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ========= NAV ========= */
nav.top {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
nav.top.scrolled { border-bottom-color: var(--border); padding: 12px 0; }
nav .row { display: flex; justify-content: space-between; align-items: center; gap: 24px; }

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--gradient);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-mark::after {
  content: '';
  position: absolute; inset: 4px;
  background: var(--bg);
  border-radius: 4px;
}
.logo-mark::before {
  content: '';
  position: absolute; inset: 8px;
  background: var(--gradient);
  border-radius: 2px;
  z-index: 1;
}

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  position: relative; padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); }
@media (max-width: 768px) { .nav-links { display: none; } }

.nav-actions { display: flex; gap: 12px; align-items: center; }
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--border-strong); transform: rotate(20deg); }

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(.2,.8,.2,1);
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 8px 24px rgba(124,92,255,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(124,92,255,0.5); }
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, #ff7ac6, #00d4ff, #7c5cff);
  opacity: 0; transition: opacity 0.4s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary span { position: relative; z-index: 1; }

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-card); border-color: var(--text); }

/* ========= BREADCRUMB ========= */
.breadcrumb {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 32px;
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--text-dim); }

/* ========= TOOL BADGE (pill label) ========= */
.tool-badge {
  display: inline-flex; align-items: center;
  background: rgba(124,92,255,0.18);
  border: 1px solid rgba(124,92,255,0.4);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11px; font-weight: 700;
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ========= CARDS ========= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

/* ========= FORM ELEMENTS ========= */
label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
input, select, textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; }

/* ========= FOOTER ========= */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  margin-top: auto;
}
.foot-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.foot-links { display: flex; gap: 24px; list-style: none; }
.foot-links a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.foot-links a:hover { color: var(--text); }

/* ========= PAGE SPACING (for tool pages) ========= */
.page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 24px 80px; /* 120px top = nav height clearance */
}
.page-wrap-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

/* ========= SECTION HEADING ========= */
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.page-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 40px;
}

/* ========= MONO CODE ========= */
code, pre, .mono {
  font-family: 'JetBrains Mono', monospace;
}
pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}
code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 13px;
  color: var(--accent-2);
}

/* ========= TOOL CTA BAND ========= */
.tool-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  margin-top: 80px;
}
.tool-cta h2 {
  font-size: 26px;
  margin-bottom: 10px;
}
.tool-cta p {
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
}

/* ========= RESPONSIVE NAV PADDING ========= */
@media (max-width: 768px) {
  .page-wrap, .page-wrap-wide { padding-top: 100px; padding-left: 16px; padding-right: 16px; }
}
