/* ==========================================================================
   MAXWELL NORD SYSTEMS — Design System & Stylesheet (Zero-Dependency)
   Optimized for Cloudflare Pages / Static Hosting
   ========================================================================== */

:root {
  --bg: #080c14;
  --bg-subtle: #0d1322;
  --surface: #111827;
  --surface-hover: #162032;
  --surface-card: #0f172a;
  --surface-elevated: #1e293b;
  --border: #1e293b;
  --border-light: #334155;
  --border-accent: rgba(59, 130, 246, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent: #2563eb;
  --accent-glow: #3b82f6;
  --accent-hover: #1d4ed8;
  --accent-light: #60a5fa;
  --accent-subtle: rgba(37, 99, 235, 0.12);
  
  --cyan: #06b6d4;
  --cyan-light: #38bdf8;
  --emerald: #10b981;
  --emerald-subtle: rgba(16, 185, 129, 0.12);
  --amber: #f59e0b;
  --amber-subtle: rgba(245, 158, 11, 0.12);
  --rose: #f43f5e;
  --rose-subtle: rgba(244, 63, 94, 0.12);
  
  --max-w: 1140px;
  --max-w-narrow: 860px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 36px -4px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 40px -10px rgba(59, 130, 246, 0.3);
  
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Grid & Glow */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 550px;
  background: radial-gradient(circle at 50% -20%, rgba(37, 99, 235, 0.16) 0%, rgba(6, 182, 212, 0.05) 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.18;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.72;
}

p + p {
  margin-top: 1rem;
}

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

a:hover {
  color: var(--text-primary);
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--cyan-light);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Layout Utilities */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: var(--transition);
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.94rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-light);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-elevated);
  border-color: var(--border-light);
  color: #ffffff;
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-subtle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(37, 99, 235, 0.1);
  color: var(--cyan-light);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.eyebrow {
  display: inline-block;
  color: var(--cyan-light);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Sections */
section {
  padding: 88px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.section-head {
  max-width: 780px;
  margin-bottom: 44px;
}

.section-head h2 {
  margin-bottom: 14px;
}

.lead {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Hero Section */
.hero {
  padding: 100px 0 90px;
  border-top: none;
  max-width: 960px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero p {
  color: var(--text-secondary);
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  max-width: 820px;
  margin-bottom: 36px;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Cards & Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  border: 1px solid rgba(37, 99, 235, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-light);
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Deep Technical / Privacy Callout Box */
.private-panel {
  background: linear-gradient(145deg, #0d1527 0%, #0a0f1d 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 42px;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.private-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-light), transparent);
}

.private-panel h3 {
  font-size: 1.45rem;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.privacy-warning {
  margin-top: 24px;
  padding: 22px 24px;
  border-left: 4px solid var(--amber);
  background: rgba(245, 158, 11, 0.08);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #f1f5f9;
  font-size: 0.98rem;
  line-height: 1.68;
}

.privacy-warning.danger {
  border-left-color: var(--rose);
  background: rgba(244, 63, 94, 0.08);
}

.privacy-warning strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
}

.gpu-card {
  margin-top: 28px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.gpu-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

/* Legal Precedents & Sources */
.sources-box {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.65;
}

.sources-box a {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sources-box a:hover {
  color: var(--text-primary);
}

/* Feature Showcase Box */
.showcase-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
  background: linear-gradient(145deg, var(--surface), #0f172a);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.showcase-banner:hover {
  border-color: var(--border-light);
}

.showcase-preview-thumb {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: perspective(800px) rotateY(-4deg) rotateX(2deg);
  transition: var(--transition);
}

.showcase-banner:hover .showcase-preview-thumb {
  transform: perspective(800px) rotateY(0deg) rotateX(0deg) scale(1.02);
}

.showcase-preview-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Screenshot Display in Showcase Page */
.screens-flow {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 50px;
}

.screen-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.screen-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 16px 48px -8px rgba(0, 0, 0, 0.8);
}

.screen-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(15, 23, 42, 0.6);
}

.screen-header-left h3 {
  font-size: 1.28rem;
  margin-bottom: 4px;
}

.screen-header-left p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.screen-image-wrapper {
  background: #0b0f19;
  padding: 16px;
  position: relative;
}

.screen-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Interactive Tabs Bar */
.tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 28px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Contact & CTA */
.contact-section {
  text-align: center;
  padding: 100px 0 120px;
}

.contact-section .section-head {
  margin: 0 auto 36px;
}

.contact-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: linear-gradient(145deg, var(--surface), #0b1120);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 48px;
  box-shadow: var(--shadow-md);
}

.contact-email {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan-light);
  letter-spacing: -0.01em;
  padding: 10px 20px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-email:hover {
  background: rgba(6, 182, 212, 0.15);
  color: #ffffff;
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: #060911;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.footer-links a:hover {
  color: var(--text-primary);
}

/* Legal Pages Styling (Impressum / Datenschutz) */
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px 40px;
  margin-top: 24px;
}

.legal-card h2 {
  font-size: 1.32rem;
  color: var(--text-primary);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-card h2:first-of-type {
  margin-top: 0;
}

.legal-card p, .legal-card li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.legal-card ul {
  padding-left: 20px;
  margin-top: 12px;
}

.legal-card li + li {
  margin-top: 8px;
}

/* Toast Notification (Copy to clipboard, etc.) */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cyan-light);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 9999;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Breakpoints */
@media (max-width: 920px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .showcase-banner {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding-top: 60px;
  }
  
  .private-panel {
    padding: 28px;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #0b0f19;
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .contact-box {
    padding: 24px;
    width: 100%;
  }
  
  .contact-email {
    font-size: 1.05rem;
    word-break: break-all;
  }
  
  .legal-card {
    padding: 24px;
  }
}
