/* ── Variables ───────────────────────────────────────────── */
:root {
  --bg:           #0f1117;
  --surface-50:   #1a1d27;
  --surface-100:  #222638;
  --surface-200:  #2a2f45;
  --surface-300:  #353b56;
  --accent:       #6366f1;
  --accent-light: #818cf8;
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --text:         #ffffff;
  --text-soft:    #d1d5db;
  --text-muted:   #9ca3af;
  --border:       #2a2f45;
  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    16px;
  --transition:   all 0.18s ease;
  --nav-height:   60px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle indigo glow */
body::after {
  content: '';
  position: fixed;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,0.1) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text); }

img { max-width: 100%; display: block; }

h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.4; }

/* ── Nav ─────────────────────────────────────────────────── */

nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-height);
  background: rgba(15,17,23,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-light);
  letter-spacing: 0.02em;
  user-select: none;
  text-decoration: none;
}

.nav-logo-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--surface-100);
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn-ghost:hover {
  background: var(--surface-200);
  color: var(--text);
  border-color: var(--surface-300);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn-danger:hover {
  background: rgba(239,68,68,0.18);
  color: #fca5a5;
  border-color: rgba(239,68,68,0.4);
}

/* nav-cta — slightly smaller in the nav bar */
.nav-cta { padding: 0.35rem 0.85rem; font-size: 0.82rem; }

/* ── Status dot ──────────────────────────────────────────── */

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 5px var(--success);
  display: inline-block;
  animation: dot-pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Layout ──────────────────────────────────────────────── */

main, .main-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 1.5rem 80px;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 0 4rem;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.04em;
}

.hero h1 { color: var(--text); max-width: 700px; }

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero > p {
  max-width: 520px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.25rem;
}

/* ── Section headings ────────────────────────────────────── */

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text);
  letter-spacing: -0.02em;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Features / Services grid ────────────────────────────── */

.features {
  position: relative;
  z-index: 1;
  padding: 2rem 0 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--surface-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover { border-color: var(--surface-300); transform: translateY(-2px); }
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.feature-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.feature-card h3 { color: var(--text); font-size: 0.95rem; }
.feature-card p  { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; flex: 1; }

.feature-card .card-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ── Status box ──────────────────────────────────────────── */

.status-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.status-box-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.status-box-left p {
  font-size: 0.875rem;
  color: var(--text-soft);
}

.status-box-left p span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ── General card ────────────────────────────────────────── */

.card {
  background: var(--surface-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card h3 { color: var(--text); margin-bottom: 0.4rem; }
.card p   { font-size: 0.875rem; color: var(--text-muted); }

/* ── Badge ───────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-internal {
  background: rgba(245,158,11,0.1);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.2);
}

.badge-live {
  background: rgba(16,185,129,0.1);
  color: #34d399;
  border: 1px solid rgba(16,185,129,0.2);
}

/* ── Legal box ───────────────────────────────────────────── */

.legal-box {
  background: var(--surface-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  word-break: break-word;
}

.legal-box h1, .legal-box h2, .legal-box h3, .legal-box h4 {
  font-family: inherit;
  text-align: center;
  margin: 2rem auto 1rem;
  line-height: 1.3;
}

.legal-box h1 { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.legal-box h2 { font-size: 1.25rem; font-weight: 700; color: var(--accent-light); }
.legal-box h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-soft); }

.legal-box p  { font-size: 0.9rem; color: var(--text-soft); line-height: 1.8; margin: 1rem 0; }
.legal-box ul, .legal-box ol { margin: 1rem 0 1rem 1.5rem; color: var(--text-soft); font-size: 0.9rem; }
.legal-box li { margin-bottom: 0.5rem; }
.legal-box li::marker { color: var(--accent); }
.legal-box a  { color: var(--accent-light); text-decoration: underline; }
.legal-box a:hover { color: var(--text); text-decoration: none; }

.legal-box .chapter-title {
  font-size: 1.25rem; font-weight: 800; color: var(--accent-light);
  text-align: center; display: block; margin: 2rem auto 1rem;
}

.legal-box .last-updated {
  display: block; color: var(--text-muted); font-size: 0.82rem;
  margin: 1rem 0; text-align: left;
}

.legal-box .contact-info {
  margin-top: 1.5rem; color: var(--accent-light); font-size: 0.9rem; text-align: center;
}

#policy-container { text-align: center; }
#policy-container canvas { box-shadow: 0 8px 24px rgba(0,0,0,0.2); border-radius: 8px; }

.loader {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
  justify-content: center;
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--text); }

/* ── Animations ──────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .hero { padding: 2rem 0 3rem; }
  h1 { font-size: 2rem; }
  .features-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  main, .main-content { padding-left: 1rem; padding-right: 1rem; }
  .nav-links .btn-ghost { display: none; }
  .legal-box { padding: 1.5rem 1rem; }
}

/* ── Print (legal docs) ──────────────────────────────────── */

@media print {
  body { background: #fff; color: #000; }
  nav, footer { display: none; }
  .legal-box { border: none; padding: 0; max-width: 100%; }
}
