/* ═══════════════════════════════════════════════════════════════════
   Enovari — Product Website
   Design tokens derived from Enovari's dark-theme system
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg-0: #0a0a0f;
  --bg-1: #0f131c;
  --bg-2: #141a27;
  --bg-3: #1a2235;
  --bg-4: #222d42;
  --border: #232d42;
  --accent: #00d4aa;
  --accent-dim: #00a888;
  --accent-soft: rgba(0, 212, 170, 0.12);
  --accent-glow: rgba(0, 212, 170, 0.3);
  --secondary: #4a9eff;
  --purple: #a78bfa;
  --gold: #d4a843;
  --text: #e0e6f0;
  --text-dim: #8b95a8;
  --text-muted: #5a6478;
  --danger: #ff4466;
  --success: #00cc66;
  --warning: #ffaa33;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --transition: 0.15s ease;
  --max-width: 1100px;
}

/* ─── RESET ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dim); }
img { max-width: 100%; display: block; }

/* ─── NAVBAR ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.navbar-brand {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-brand .mark { color: var(--accent); }
.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.navbar-links a {
  color: var(--text-dim);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.navbar-links a:hover { color: var(--text); background: var(--bg-2); }
.navbar-links a.active { color: var(--accent); }

/* ─── BUTTONS ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-0);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); color: var(--bg-0); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); }
.btn-secondary {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--text-dim); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }

/* ─── FORMS ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color var(--transition);
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input::placeholder { color: var(--text-muted); }
.form-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}
.form-group.error .form-input { border-color: var(--danger); }
.form-group.error .form-error { display: block; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── CHECKBOX GROUP ─────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.checkbox-label:hover { border-color: var(--accent-dim); }
.checkbox-label input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-0);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
}
.checkbox-label input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid var(--bg-0);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-info .checkbox-name { font-size: 13px; font-weight: 600; color: var(--text); }
.checkbox-info .checkbox-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* ─── CARDS ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
}
.card:hover { border-color: rgba(0, 212, 170, 0.25); }
.card-accent { border-top: 3px solid var(--accent); }

/* ─── LAYOUT ─────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────── */
h1 { font-size: 36px; font-weight: 800; line-height: 1.2; color: var(--text); }
h2 { font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--text); }
h3 { font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--text); }
.subtitle { font-size: 16px; color: var(--text-dim); line-height: 1.6; max-width: 600px; }
.subtitle.center { margin: 12px auto 0; }
.overline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ─── HERO ───────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}
.hero h1 { font-size: 42px; margin-bottom: 16px; }
.hero .subtitle { margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* ─── PRODUCT CARDS ──────────────────────────────────────────────── */
.product-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.product-card.scanner::before { background: var(--accent); }
.product-card.orrery::before { background: var(--secondary); }
.product-card.tapestry::before { background: var(--purple); }
.product-card:hover {
  border-color: rgba(0, 212, 170, 0.2);
  transform: translateY(-2px);
}
.product-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}
.scanner .product-icon { background: var(--accent-soft); color: var(--accent); }
.orrery .product-icon { background: rgba(74, 158, 255, 0.12); color: var(--secondary); }
.tapestry .product-icon { background: rgba(167, 139, 250, 0.12); color: var(--purple); }
.product-card h3 { margin-bottom: 8px; }
.product-card p { font-size: 14px; color: var(--text-dim); line-height: 1.6; }
.product-features {
  list-style: none;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-features li {
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.product-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.scanner .product-features li::before { background: var(--accent); }
.orrery .product-features li::before { background: var(--secondary); }
.tapestry .product-features li::before { background: var(--purple); }

/* ─── AUTH PAGES (login/signup) ──────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.auth-card h2 { margin-bottom: 6px; }
.auth-card .auth-subtitle { font-size: 14px; color: var(--text-dim); margin-bottom: 28px; }
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12px;
  margin-bottom: 16px;
  display: none;
}
.auth-alert.error { display: block; background: rgba(255,68,102,0.1); border: 1px solid rgba(255,68,102,0.25); color: var(--danger); }
.auth-alert.success { display: block; background: rgba(0,204,102,0.1); border: 1px solid rgba(0,204,102,0.25); color: var(--success); }

/* ─── DASHBOARD ──────────────────────────────────────────────────── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.dashboard-greeting h1 { font-size: 28px; }
.dashboard-greeting p { font-size: 14px; color: var(--text-dim); margin-top: 4px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-box {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-box .stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.stat-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-box .stat-note { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.product-access {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.access-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.access-card .access-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.access-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.access-badge.active { background: rgba(0,204,102,0.12); color: var(--success); }
.access-badge.inactive { background: rgba(90,100,120,0.15); color: var(--text-muted); }
.access-card p { font-size: 13px; color: var(--text-dim); flex: 1; }
.access-card .access-actions { margin-top: 16px; }

/* ─── ABOUT PAGE ─────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 0; }

/* ─── LEGAL PAGES ───────────────────────────────────────────────── */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
}
.legal-header {
  margin-bottom: 48px;
}
.legal-header h1 {
  margin-bottom: 8px;
}
.legal-effective {
  font-size: 14px;
  color: var(--text-muted);
}
.legal-content h2 {
  font-size: 20px;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.legal-content h3 {
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal-content p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-content ul {
  margin: 12px 0 16px 24px;
  padding: 0;
}
.legal-content ul li {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 6px;
}
.legal-content a {
  color: var(--accent);
}
.legal-content a:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-text { font-size: 12px; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-size: 12px; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ─── ALERT/TOAST ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); color: var(--bg-0); }
.toast.error { background: var(--danger); color: #fff; }

/* ─── HAMBURGER MENU (H9) ────────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.2s ease;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2, .about-grid { grid-template-columns: 1fr; }
  .stat-row, .product-access { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .hero { padding: 48px 0 32px; }
  .section { padding: 40px 0; }
  .hamburger { display: flex; }
  .navbar-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px;
    gap: 4px;
  }
  .navbar-links.open { display: flex; }
  .navbar-inner { position: relative; }
  .auth-card { padding: 24px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}
