/* ============================================
   DomainPark.Center — Futuristic Design System
   ============================================ */

:root {
  --bg-deep: #050814;
  --bg-1: #0a0f24;
  --bg-2: #0f1730;
  --surface: rgba(15, 23, 48, 0.7);
  --surface-2: rgba(20, 30, 60, 0.5);
  --border: rgba(120, 200, 255, 0.18);
  --border-strong: rgba(120, 200, 255, 0.4);
  --text: #e6f0ff;
  --text-dim: #8aa0c8;
  --text-mute: #5a6b8c;
  --cyan: #00e5ff;
  --cyan-soft: #4dd9ff;
  --magenta: #ff3df0;
  --violet: #8a5cff;
  --green: #5cffb1;
  --amber: #ffc857;
  --grid: rgba(80, 160, 255, 0.06);
  --grid-strong: rgba(80, 160, 255, 0.13);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --font-display: "Space Grotesk", "Inter", sans-serif;
}

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

html {
  background: var(--bg-deep);
}

html, body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--cyan-soft); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan); text-shadow: 0 0 8px rgba(0,229,255,.5); }

/* ============================================
   NETWORK BACKGROUND (Canvas)
   ============================================ */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: block;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 120px 0 80px;
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 20, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .02em;
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.brand-mark svg, .brand-mark img { width: 44px; height: 44px; }
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,.28), transparent 65%);
  z-index: -1;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.15); opacity: 1; }
}

.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name .top { color: var(--text); font-weight: 700; }
.brand-name .sub { color: var(--cyan); font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; margin-top: 4px; text-transform: uppercase; }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 8px;
  position: relative;
  transition: all .2s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(120, 200, 255, 0.06);
}

.nav-links a.active {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0,229,255,.25);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-cta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1;} 50% { opacity: .4;} }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 80px 0 60px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-emblem {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.emblem-logo {
  width: 90%;
  height: 90%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter:
    drop-shadow(0 0 30px rgba(0,229,255,.35))
    drop-shadow(0 0 60px rgba(138,92,255,.25))
    drop-shadow(0 20px 40px rgba(0,0,0,.6));
  animation: emblemFloat 8s ease-in-out infinite;
}

@keyframes emblemFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-12px) rotate(.6deg); }
}

.emblem-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.emblem-rings .er {
  position: absolute;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 50%;
}
.emblem-rings .er1 {
  width: 75%; height: 75%;
  border-color: rgba(0, 229, 255, 0.25);
  border-style: dashed;
  animation: spinSlow 30s linear infinite;
}
.emblem-rings .er2 {
  width: 95%; height: 95%;
  border-color: rgba(138, 92, 255, 0.18);
  animation: spinSlow 50s linear infinite reverse;
}
.emblem-rings .er3 {
  width: 110%; height: 110%;
  border: 1px dotted rgba(255, 61, 240, 0.15);
  animation: spinSlow 70s linear infinite;
}
.emblem-rings::after {
  content: "";
  position: absolute;
  width: 80%; height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,.12), transparent 60%);
  filter: blur(20px);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0,229,255,.2);
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero-eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 1.5s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #a8c5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero p.lead {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 640px;
  margin-bottom: 40px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, #4dd9ff 100%);
  color: #03101e;
  box-shadow: 0 0 0 1px rgba(0,229,255,.4), 0 8px 24px rgba(0,229,255,.25);
}
.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(0,229,255,.6), 0 12px 32px rgba(0,229,255,.4);
  color: #03101e;
}
/* Lichtstrahl-Sweep auf btn-primary */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 55%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent);
  pointer-events: none;
}
.btn-primary:hover::after {
  animation: btnLightSweep .5s ease forwards;
}
@keyframes btnLightSweep {
  to { left: 160%; }
}

.btn-ghost {
  background: rgba(255,255,255,.03);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(120, 200, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--text);
}

/* ============================================
   STATUS / SYSTEM PANEL
   ============================================ */
.system-panel {
  margin-top: 56px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.system-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: sweep 4s ease-in-out infinite;
}
@keyframes sweep {
  0%,100% { opacity: .3; transform: translateX(-100%);}
  50% { opacity: 1; transform: translateX(100%);}
}

.system-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.2);
}

.system-panel-head .title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex; align-items: center; gap: 10px;
}

.system-dots { display: flex; gap: 6px; }
.system-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.system-dots span:nth-child(1) { background: #ff5f56; }
.system-dots span:nth-child(2) { background: #ffbd2e; }
.system-dots span:nth-child(3) { background: #27c93f; }

.system-panel-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat {
  padding: 24px;
  border-right: 1px solid var(--border);
  position: relative;
}
.stat:last-child { border-right: none; }

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

.stat-label .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: blink 2s ease-in-out infinite;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.02em;
}

.stat-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ============================================
   SECTION
   ============================================ */
section { padding: 80px 0; }

.section-head { margin-bottom: 48px; max-width: 720px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}
.section-lead {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ============================================
   SERVICES GRID
   ============================================ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(10, 15, 36, 0.85);
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,.4), 0 0 0 1px rgba(0,229,255,.15);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, border-color .2s, box-shadow .2s;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: var(--cyan);
  box-shadow: 0 4px 32px rgba(0,229,255,.25), 0 0 0 1px rgba(0,229,255,.4);
  color: var(--cyan);
}

.back-to-top svg {
  transition: transform .2s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

.service-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all .25s;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 200px at var(--mx,50%) var(--my,0%), rgba(0,229,255,.12), transparent 50%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}

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

/* Neon-Randblitz beim Hover */
.service-card::after {
  content: '';
  position: absolute;
  top: -1px; left: -120%;
  width: 55%; height: calc(100% + 2px);
  background: linear-gradient(90deg, transparent, rgba(0,229,255,.55), transparent);
  pointer-events: none;
  opacity: 0;
}
.service-card:hover::after {
  animation: neonSweep .65s linear forwards;
  opacity: 1;
}
@keyframes neonSweep { to { left: 160%; } }

.service-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,229,255,.15), rgba(138,92,255,.15));
  border: 1px solid rgba(0,229,255,.25);
  display: grid; place-items: center;
  margin-bottom: 20px;
  color: var(--cyan);
}

.service-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.service-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

.service-tag {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ============================================
   STACK / TECH
   ============================================ */
.stack-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

.terminal {
  background: rgba(2, 6, 16, 0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
  position: relative;
}

.terminal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}

.terminal-head .system-dots span { width: 11px; height: 11px; }

.terminal-head .path {
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: .1em;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px 18px;
  line-height: 1.8;
  min-height: 280px;
}

.terminal-line { display: block; }
.tl-prompt { color: var(--green); }
.tl-cmd { color: var(--text); }
.tl-comment { color: var(--text-mute); }
.tl-key { color: var(--magenta); }
.tl-val { color: var(--cyan); }
.tl-ok { color: var(--green); }

.cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--cyan);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.stack-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stack-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stack-row .k {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--text-mute);
}
.stack-row .v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.stack-row .v .badge {
  display: inline-block;
  padding: 3px 8px;
  background: rgba(92,255,177,.1);
  color: var(--green);
  border: 1px solid rgba(92,255,177,.25);
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: .1em;
  margin-left: 8px;
}

/* ============================================
   CONTACT / CTA
   ============================================ */
.cta {
  margin-top: 40px;
  padding: 56px 48px;
  background: linear-gradient(135deg, rgba(0,229,255,.08), rgba(138,92,255,.06));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 400px at 80% 50%, rgba(0,229,255,.15), transparent 60%);
  pointer-events: none;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  position: relative;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.cta p { color: var(--text-dim); margin-bottom: 24px; }

.contact-card {
  background: rgba(0,0,0,.35);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.contact-card .row {
  display: flex; gap: 12px; padding: 8px 0;
  border-bottom: 1px dashed rgba(120,200,255,.1);
}
.contact-card .row:last-child { border-bottom: none; }
.contact-card .k {
  color: var(--text-mute);
  width: 70px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 10px;
  padding-top: 2px;
}
.contact-card .v { color: var(--text); flex: 1; }
.contact-card .v a { color: var(--cyan-soft); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(5, 8, 20, 0.7);
  backdrop-filter: blur(12px);
  padding: 48px 0 32px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  font-size: 13px;
  color: var(--text-dim);
}
.footer-col a:hover { color: var(--cyan); }

.footer-about {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-top: 16px;
  max-width: 320px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: .05em;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom .status {
  display: flex; align-items: center; gap: 8px;
  color: var(--green);
}
.footer-bottom .status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: blink 2s ease-in-out infinite;
}

.footer-credit {
  margin-top: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--text-mute);
  text-transform: lowercase;
}
.footer-credit a {
  color: var(--cyan-soft);
  border-bottom: 1px dashed rgba(0,229,255,.3);
  padding-bottom: 1px;
}
.footer-credit a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* Mobile-Nav-Toggle */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: rgba(120,200,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  align-items: center; justify-content: center;
  position: relative;
  transition: all .2s;
}
.nav-toggle:hover { border-color: var(--border-strong); background: rgba(120,200,255,.1); }
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 9px; right: 9px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s ease;
}
.nav-toggle::before { top: 12px; }
.nav-toggle span    { top: 19px; }
.nav-toggle::after  { top: 26px; }
.nav-toggle.open::before { top: 19px; transform: rotate(45deg); background: var(--cyan); }
.nav-toggle.open span    { opacity: 0; }
.nav-toggle.open::after  { top: 19px; transform: rotate(-45deg); background: var(--cyan); }

/* ============================================
   LEGAL PAGES (Impressum / Datenschutz)
   ============================================ */
.legal-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 60px;
}

.legal-hero .crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 20px;
}
.legal-hero .crumb a { color: var(--cyan); }

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.05;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #a8c5ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.legal-hero .legal-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 640px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.legal-toc h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
  font-weight: 500;
}

.legal-toc ul { list-style: none; }
.legal-toc li { margin-bottom: 4px; }
.legal-toc a {
  display: block;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all .15s;
  line-height: 1.4;
}
.legal-toc a:hover {
  color: var(--text);
  background: rgba(120,200,255,.04);
  border-left-color: var(--border-strong);
}
.legal-toc a.active {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: rgba(0,229,255,.05);
}

.legal-content {
  max-width: 760px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text-dim);
}

.legal-content section {
  padding: 40px 0;
  border-bottom: 1px solid rgba(120,200,255,.08);
  scroll-margin-top: 96px;
}
.legal-content section:first-of-type { padding-top: 0; }
.legal-content section:last-of-type { border-bottom: none; }

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.015em;
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.legal-content h2 .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: .15em;
  font-weight: 500;
  flex-shrink: 0;
}

.legal-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}

.legal-content p { margin-bottom: 16px; }
.legal-content ul, .legal-content ol { margin: 0 0 18px 22px; }
.legal-content li { margin-bottom: 8px; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(0,229,255,.08);
  border: 1px solid rgba(0,229,255,.18);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--cyan-soft);
}

.legal-content .info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 13px;
}
.legal-content .info-box .ib-title {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}
.legal-content .info-box .ib-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 4px 0;
  color: var(--text);
}
.legal-content .info-box .ib-row .k { color: var(--text-mute); font-size: 11px; padding-top: 2px; text-transform: uppercase; letter-spacing: .1em; }

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.legal-content th, .legal-content td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal-content th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  background: rgba(0,0,0,.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet landscape and below */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
  .footer-grid .footer-col:last-child { grid-column: 1 / -1; }
  .legal-layout { grid-template-columns: 200px 1fr; gap: 32px; }
  .hero { padding: 60px 0 40px; }
  section { padding: 60px 0; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .nav-links {
    display: flex;
    position: fixed;
    inset: 72px 0 0 0;
    flex-direction: column;
    gap: 4px;
    padding: 24px 20px;
    background: rgba(5, 8, 20, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s ease, opacity .3s ease;
    z-index: 49;
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
  }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .system-panel-body { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .stack-grid { grid-template-columns: 1fr; gap: 20px; }
  .cta { padding: 36px 28px; }
  .cta-grid { grid-template-columns: 1fr; gap: 28px; padding: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
  .footer-grid .footer-col:last-child { grid-column: auto; }
  .legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .legal-toc { position: static; max-height: none; }
  .legal-toc ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }

  .hero-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero-emblem { max-width: 280px; margin: 0 auto; order: -1; }
  .hero-eyebrow { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }

  .section-head { text-align: left; }

  .terminal-body { font-size: 12px; padding: 16px 14px; min-height: 240px; }
  .terminal-head .path { font-size: 10px; }
}

/* Phone landscape and below */
@media (max-width: 640px) {
  body { font-size: 15px; }
  main { padding: 80px 0 32px; }
  section { padding: 48px 0; }
  .container { padding: 0 16px; }

  .nav-inner { height: 64px; }
  .nav-links { inset: 64px 0 0 0; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-mark img, .brand-mark svg { width: 38px; height: 38px; }
  .brand-name .top { font-size: 16px; }
  .brand-name .sub { font-size: 9px; }

  .hero { padding: 32px 0; }
  .hero h1 { font-size: clamp(36px, 11vw, 56px); }
  .hero p.lead { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; width: 100%; }
  .hero-emblem { max-width: 220px; }

  .system-panel { margin-top: 36px; }
  .system-panel-body { grid-template-columns: 1fr; }
  .stat { padding: 18px 20px; border-right: none !important; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .stat-value { font-size: 24px; }

  .services { grid-template-columns: 1fr; gap: 12px; }
  .service-card { padding: 22px; }
  .back-to-top { bottom: 20px; right: 20px; }

  .section-title { font-size: clamp(26px, 7vw, 36px); }
  .section-lead { font-size: 15px; }

  .stack-row { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .stack-row .v { font-size: 12px; }

  .cta { padding: 28px 20px; border-radius: 16px; }
  .cta h2 { font-size: clamp(22px, 6vw, 30px); }

  .contact-card { padding: 18px; font-size: 12px; }
  .contact-card .row { flex-direction: column; gap: 2px; padding: 8px 0; }
  .contact-card .k { width: auto; padding-top: 0; }

  .footer { padding: 36px 0 24px; margin-top: 56px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 28px; }
  .footer-grid .footer-col { grid-column: auto !important; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }

  .legal-hero { padding: 32px 0 24px; margin-bottom: 32px; }
  .legal-hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .legal-hero .legal-sub { font-size: 14px; }
  .legal-content { font-size: 14.5px; }
  .legal-content section { padding: 28px 0; scroll-margin-top: 80px; }
  .legal-content h2 { font-size: 20px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .legal-content h3 { font-size: 16px; }
  .legal-content .info-box { padding: 16px 18px; }
  .legal-content .info-box .ib-row { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; border-bottom: 1px dashed rgba(120,200,255,.06); }
  .legal-content .info-box .ib-row:last-child { border-bottom: none; }
  .legal-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }

  .legal-toc ul { grid-template-columns: 1fr; }
}

/* Very small phones */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .brand-name .top { font-size: 15px; }
  .nav-inner { height: 60px; }
  .nav-links { inset: 60px 0 0 0; }
  .hero h1 { font-size: 36px; }
  .system-panel-head { padding: 10px 14px; }
  .system-panel-head .title { font-size: 9px; }
  .stat { padding: 16px; }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .px-layer { transform: none !important; }
}

/* ============================================
   ENTRY ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s cubic-bezier(.2,.8,.2,1), transform .75s cubic-bezier(.2,.8,.2,1);
}
.fade-up.d1 { transition-delay: .08s; }
.fade-up.d2 { transition-delay: .20s; }
.fade-up.d3 { transition-delay: .34s; }
.fade-up.d4 { transition-delay: .50s; }
.fade-up.d5 { transition-delay: .68s; }
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes twBlink { 50% { opacity: 0; } }

::selection {
  background: rgba(0,229,255,.3);
  color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(120,200,255,.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,200,255,.3); }
