/* ==========================================================================
   Compliance & Mobile App Studio - Modern Static CSS
   100% Zero-External-Call, Zero-Cookie, Privacy-First Architecture
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-muted: #f1f5f9;
  --bg-accent-subtle: #eef2ff;
  --bg-success-subtle: #ecfdf5;
  --bg-warning-subtle: #fffbeb;
  
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #6366f1;
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --accent-primary: #4f46e5;
  --accent-hover: #4338ca;
  --accent-badge-text: #4338ca;
  
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;

  /* Typography & Sizing */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  --max-width: 860px;
}

/* Automatic Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --bg-muted: #1e293b;
    --bg-accent-subtle: rgba(99, 102, 241, 0.15);
    --bg-success-subtle: rgba(16, 185, 129, 0.15);
    --bg-warning-subtle: rgba(245, 158, 11, 0.15);
    
    --border-subtle: #1f2937;
    --border-medium: #374151;
    --border-focus: #818cf8;
    
    --text-main: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-inverse: #0b0f19;
    
    --accent-primary: #6366f1;
    --accent-hover: #818cf8;
    --accent-badge-text: #a5b4fc;
    
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: var(--text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

/* Main Content */
.main-content {
  flex: 1;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Hero Section */
.hero-section {
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 3rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-accent-subtle);
  color: var(--accent-badge-text);
  margin-bottom: 1.25rem;
  letter-spacing: 0.025em;
}

.badge-success {
  background: var(--bg-success-subtle);
  color: var(--success);
}

.hero-title {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 42rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-muted);
  border-color: var(--border-focus);
}

/* Section Styling */
.section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

/* Feature & App Grid */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.app-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

/* Callout Box / Notice */
.callout {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.callout-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.callout-body {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.callout-success {
  border-left-color: var(--success);
  background: var(--bg-success-subtle);
}

.callout-warning {
  border-left-color: var(--warning);
  background: var(--bg-warning-subtle);
}

/* Legal Document Styling (Impressum & Privacy) */
.legal-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.legal-section {
  margin-bottom: 2.25rem;
}

.legal-section h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.375rem;
}

.legal-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.legal-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.96875rem;
  line-height: 1.7;
}

.legal-section ul,
.legal-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.legal-section li {
  margin-bottom: 0.5rem;
  font-size: 0.96875rem;
  line-height: 1.65;
}

/* Placeholder styling - clearly highlights user tokens needing replacement */
.token {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background-color: var(--bg-warning-subtle);
  color: var(--warning);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--warning);
  font-weight: 600;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
}

th {
  background: var(--bg-muted);
  color: var(--text-main);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-info p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

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

.footer-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* Utility Links */
a.inline-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

a.inline-link:hover {
  text-decoration: underline;
}

/* Responsive adjustment */
@media (max-width: 640px) {
  .nav-links {
    gap: 1rem;
  }
  .nav-link {
    font-size: 0.875rem;
  }
  .hero-title {
    font-size: 1.875rem;
  }
}
