/* ============================================
   DETH-X LEGAL PAGES — v3
   Visual DNA: Hex-Evo (bg, palette, fonts)
   Brand identity: Deth-x (logos, product name)
   Relationship: stated in corporate identity block
   ============================================ */

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

:root {
  --bg-primary: #01010b;
  --bg-secondary: #06060f;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --text-primary: #e8e8ec;
  --text-secondary: #9898a6;
  --text-muted: #5c5c6e;
  --accent: #00e5a0;
  --accent-dim: rgba(0, 229, 160, 0.2);
  --accent-glow: rgba(0, 229, 160, 0.08);
  --border: #222233;
  --border-light: #2a2a3d;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max-width: 860px;
  --gutter: clamp(20px, 5vw, 60px);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: clamp(0.9375rem, 0.875rem + 0.2vw, 1.0625rem);
  overflow-x: hidden;
  position: relative;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; }

/* ============================================
   HEX BACKGROUND SYSTEM
   Matches hex-evo structure exactly:
   hex-bg-system (fixed) > hex-glow (z:0) > particleCanvas (z:0) > hexCanvas (z:1)
   Glow shines BEHIND hex grid, visible through gaps
   ============================================ */
.hex-bg-system {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh; height: 100dvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hex-bg-system .hex-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hex-bg-system .hex-glow-inner {
  position: absolute;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(200, 180, 255, 0.32) 0%,
    rgba(160, 140, 240, 0.16) 30%,
    rgba(120, 100, 220, 0.06) 55%,
    transparent 70%
  );
  transform: translate(-50%, -50%);
  will-change: left, top;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.hex-bg-system #particleCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hex-bg-system .hex-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ============================================
   NAV BAR
   ============================================ */
.legal-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(1, 1, 11, 0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(16px, 5vw, 40px);
  display: flex; align-items: center; justify-content: space-between;
  height: clamp(60px, 8vw, 80px);
}
.legal-nav-brand {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.legal-nav-brand img {
  height: clamp(32px, 5vw, 42px); width: auto;
}
.legal-nav-brand span {
  font-family: var(--font-display); font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em;
}
.legal-nav-links { display: flex; gap: clamp(1rem, 2vw, 2rem); }
.legal-nav-links a {
  font-family: var(--font-body);
  font-size: clamp(0.72rem, 0.8vw, 0.85rem);
  font-weight: 500; color: var(--text-secondary);
  letter-spacing: 0.03em; text-transform: uppercase;
  position: relative; padding: 4px 0; transition: var(--transition);
}
.legal-nav-links a::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0; right: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: var(--transition); margin: 0 auto;
}
.legal-nav-links a:hover { color: var(--text-primary); }
.legal-nav-links a:hover::after,
.legal-nav-links a.active::after { width: 100%; }
.legal-nav-links a.active { color: var(--text-primary); }

/* ============================================
   PAGE CONTAINER — scrolls over hex bg
   ============================================ */
.legal-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter) clamp(60px, 8vw, 100px);
  position: relative;
  z-index: 10;
}

/* HEADER */
.legal-header {
  margin-bottom: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
}
.legal-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; color: var(--accent);
  margin-bottom: 12px; line-height: 1.15; letter-spacing: -0.02em;
}
.legal-header .legal-meta {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.8;
}
.legal-header .legal-meta strong { color: var(--text-secondary); }

/* CORPORATE IDENTITY BLOCK */
.legal-identity {
  background: rgba(22, 22, 31, 0.85);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: clamp(32px, 4vw, 48px);
  display: flex; align-items: center; gap: 16px;
  transition: border-color var(--transition);
}
.legal-identity:hover { border-color: var(--border-light); }
.legal-identity-logo {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 4px;
}
.legal-identity-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.legal-identity-text strong { color: var(--text-primary); }
.legal-identity-text .parent-tag {
  display: inline-block;
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  padding: 1px 8px; font-size: 0.7rem; font-weight: 600;
  color: var(--accent); letter-spacing: 0.04em;
  margin-left: 4px; vertical-align: middle;
}
.legal-identity-text .entity-label {
  display: block; font-size: 0.72rem; color: var(--text-muted);
  margin-top: 4px; letter-spacing: 0.04em;
}

/* CONTENT SECTIONS */
.legal-section { margin-bottom: clamp(28px, 4vw, 40px); }
.legal-section h2 {
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.2vw, 0.95rem);
  font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.legal-section h3 {
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 8px; margin-top: 20px;
}
.legal-section p {
  font-size: 0.88rem; color: var(--text-secondary);
  margin-bottom: 12px; line-height: 1.85;
}
.legal-section p strong { color: var(--text-primary); font-weight: 600; }
.legal-section ul { list-style: none; padding: 0; margin-bottom: 16px; }
.legal-section ul li {
  position: relative; padding-left: 20px;
  font-size: 0.86rem; color: var(--text-secondary);
  margin-bottom: 6px; line-height: 1.75;
}
.legal-section ul li::before {
  content: ''; position: absolute; left: 2px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-dim); border: 1px solid rgba(0, 229, 160, 0.3);
}
.legal-section ul li strong { color: var(--text-primary); }
.legal-caps {
  font-size: 0.8rem !important; color: var(--text-muted) !important;
  letter-spacing: 0.01em; line-height: 1.7 !important;
}
.legal-highlight {
  background: rgba(22, 22, 31, 0.85);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 16px 0 20px;
}
.legal-highlight p { color: var(--text-primary) !important; font-size: 0.88rem; margin-bottom: 0; }

/* FOOTER */
.legal-footer {
  background: rgba(6, 6, 15, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: clamp(36px, 5vw, 56px) var(--gutter);
  text-align: center;
  position: relative; z-index: 10;
}
.legal-footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px;
}
.legal-footer-brand img { height: 32px; width: auto; }
.legal-footer-brand span {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  color: var(--text-primary);
}
.legal-footer-line {
  width: 36px; height: 2px; background: var(--accent); margin: 16px auto; opacity: 0.4;
}
.legal-footer-parent { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.06em; }
.legal-footer-parent a { color: var(--text-secondary); text-decoration: underline; }
.legal-footer-parent a:hover { color: var(--accent); }
.legal-footer-copy { font-size: 0.68rem; color: rgba(232, 232, 236, 0.15); margin-top: 8px; }
.legal-footer-links {
  display: flex; justify-content: center; gap: 24px; margin-top: 14px;
}
.legal-footer-links a {
  font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; transition: var(--transition);
}
.legal-footer-links a:hover { color: var(--accent); }

/* MOBILE */
@media (max-width: 600px) {
  .legal-nav { height: 56px; }
  .legal-nav-links { gap: 12px; }
  .legal-nav-links a { font-size: 0.7rem; }
  .legal-identity { flex-direction: column; text-align: center; }
}