:root {
  --bg: #0b1929;
  --bg-deep: #060f18;
  --text: #e8f0f8;
  --muted: #8ba3b8;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.35);
  --gold: #d4a84b;
  --gold-dim: rgba(212, 168, 75, 0.35);
  --gold-hi: #f8ecc8;
  --violet: #818cf8;
  --glass: rgba(11, 25, 41, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.04);
  --radius: 1.25rem;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#canvas-root {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#canvas-root canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45, 212, 191, 0.07), transparent 55%),
    radial-gradient(ellipse 100% 100% at 50% 100%, rgba(6, 15, 24, 0.9), transparent 50%),
    linear-gradient(180deg, transparent 0%, rgba(6, 15, 24, 0.4) 100%);
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  animation: fadeDown 1s ease 0.2s both;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(212, 168, 75, 0.22), 0 0 28px rgba(45, 212, 191, 0.12);
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--glass-highlight);
}

.nav-links a.active {
  color: var(--accent);
}

/* —— Home (landing) —— */

main.main-home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem clamp(1.25rem, 4vw, 3rem) 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.2);
  margin-bottom: 1.75rem;
  animation: fadeUp 1s ease 0.35s both;
}

.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.5s ease infinite;
}

h1.hero-title {
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.5rem;
  animation: fadeUp 1s ease 0.45s both;
}

h1.hero-title .gradient {
  background: linear-gradient(135deg, #fff 15%, var(--gold-hi) 35%, var(--accent) 58%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.entity {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  animation: fadeUp 1s ease 0.55s both;
}

.entity strong {
  color: var(--text);
  font-weight: 500;
}

.tagline {
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 2.5rem;
  animation: fadeUp 1s ease 0.65s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3.5rem;
  animation: fadeUp 1s ease 0.75s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s;
}

.btn-primary {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent), #5eead4);
  box-shadow: 0 4px 28px rgba(45, 212, 191, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(45, 212, 191, 0.35);
}

.btn-ghost {
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 56rem;
  width: 100%;
  animation: fadeUp 1s ease 0.9s both;
}

.card {
  text-align: left;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  transition: transform 0.35s ease, border-color 0.35s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.2);
}

.card-icon {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.card h2 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 300;
}

.card p a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.card p a:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.cards-single {
  margin-top: 1rem;
  grid-template-columns: 1fr;
}

.card-wide {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.card-wide p {
  margin-bottom: 0;
}

/* —— Doc pages (privacy, risk, AI) —— */

main.main-doc {
  flex: 1;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  display: flex;
  justify-content: center;
  animation: fadeUp 0.8s ease 0.3s both;
}

.doc-panel {
  width: 100%;
  max-width: 42rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.doc-panel h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.doc-panel h2 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.doc-panel p,
.doc-panel li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
}

.doc-panel p { margin-bottom: 0.85rem; }

.doc-panel ul,
.doc-panel ol {
  margin: 0.5rem 0 1rem 1.25rem;
  color: var(--muted);
}

.doc-panel li { margin-bottom: 0.4rem; }

.doc-panel li strong,
.doc-panel p strong {
  color: var(--text);
  font-weight: 500;
}

.doc-panel a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.doc-panel a:hover { opacity: 0.85; text-decoration: underline; }

.doc-panel .muted {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--glass-border);
}

.doc-panel code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.15em 0.4em;
  border-radius: 0.35rem;
  color: var(--accent);
}

.doc-panel .doc-links {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

.callout {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(45, 212, 191, 0.25);
  background: rgba(45, 212, 191, 0.06);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.callout strong { color: var(--accent); font-weight: 500; }

.callout-warn {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.06);
}

.callout-warn strong { color: #fbbf24; }

/* —— Footer —— */

footer {
  padding: 2rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  animation: fadeUp 1s ease 1s both;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover { color: var(--accent); }

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

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
