/* ============================================================
   Bitblade Vision — Design System
   Single Source of Truth for tokens — do not invent new colors.
   ============================================================ */

/* ---------- DARK THEME (default) ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg-primary: #060A14;
  --bg-surface: #0C1222;
  --bg-card: #101828;
  --bg-card-hover: #141F30;

  --border: rgba(56, 189, 248, 0.12);
  --border-hover: rgba(56, 189, 248, 0.35);
  --border-strong: rgba(56, 189, 248, 0.45);

  --accent-blue: #38BDF8;
  --accent-indigo: #818CF8;
  --accent-cyan: #22D3EE;
  --accent-blue-strong: #38BDF8;

  --gradient-main: linear-gradient(135deg, #38BDF8 0%, #818CF8 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(129, 140, 248, 0.15) 100%);
  --gradient-glow: radial-gradient(ellipse at top, rgba(56, 189, 248, 0.18) 0%, transparent 60%);

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #475569;

  /* Text color sitting on the cyan→indigo gradient (e.g. primary button) */
  --on-accent: #060A14;

  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 48px rgba(56, 189, 248, 0.15);

  --nav-h: 72px;
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --header-bg: rgba(6, 10, 20, 0.78);
  --header-border: rgba(56, 189, 248, 0.10);
}

/* ---------- LIGHT THEME ---------- */
:root[data-theme="light"] {
  color-scheme: light;

  --bg-primary: #F7FAFD;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;

  --border: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(56, 189, 248, 0.45);
  --border-strong: rgba(56, 189, 248, 0.65);

  --accent-blue: #0284C7;
  --accent-indigo: #4F46E5;
  --accent-cyan: #0891B2;
  --accent-blue-strong: #0284C7;

  --gradient-main: linear-gradient(135deg, #0284C7 0%, #4F46E5 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(56, 189, 248, 0.10) 0%, rgba(129, 140, 248, 0.10) 100%);
  --gradient-glow: radial-gradient(ellipse at top, rgba(56, 189, 248, 0.20) 0%, transparent 60%);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --on-accent: #FFFFFF;

  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 48px rgba(56, 189, 248, 0.20);

  --header-bg: rgba(255, 255, 255, 0.86);
  --header-border: rgba(15, 23, 42, 0.06);
}

/* Prevent flash of wrong theme on load (inline script sets data-theme before render) */
html:not([data-theme]) body { visibility: hidden; }
html { transition: background-color 0.25s ease; background: var(--bg-primary); }

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-cyan); }
button { font: inherit; cursor: pointer; }
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--text-primary);
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(1.875rem, 2.5vw + 1rem, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.75rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lead {
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 56ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-blue);
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-blue);
}

.gradient-text {
  background: var(--gradient-main);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ===== Skip link ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  background: var(--accent-blue);
  color: var(--bg-primary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 16px; color: var(--bg-primary); }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(64px, 8vw, 120px); position: relative; }
.section-sm { padding-block: clamp(48px, 5vw, 80px); }
.section-tight { padding-block: clamp(40px, 4vw, 64px); }

.section-header {
  max-width: 780px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-header.center { margin-inline: auto; text-align: center; }
.section-header.center .lead { margin-inline: auto; }

/* Subtle dot grid background */
.dot-grid {
  position: relative;
}
.dot-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(56, 189, 248, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 20%, black 80%, transparent 100%);
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
}
.nav-logo:hover { color: var(--text-primary); }
.nav-logo img { width: 32px; height: 32px; }
.nav-logo .logo-sub {
  font-weight: 400;
  color: var(--accent-blue);
  letter-spacing: 0.06em;
  font-size: 0.875rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a, .nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  background: transparent;
  border: none;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-dropdown-trigger:hover { color: var(--text-primary); background: rgba(56, 189, 248, 0.08); }
.nav-links a.active { color: var(--accent-blue); }

.nav-dropdown { position: relative; }
.nav-dropdown-trigger svg { width: 14px; height: 14px; transition: transform var(--transition); }
.nav-dropdown[aria-expanded="true"] .nav-dropdown-trigger svg,
.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  display: none;
  list-style: none;
  margin: 0;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
}
.nav-dropdown-menu a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-dropdown-menu .menu-sub {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.02);
}
.lang-switch a {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.lang-switch a.active { background: var(--bg-card-hover); color: var(--text-primary); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-blue);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-hover);
}
.btn-secondary:hover {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.06);
  color: var(--text-primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--accent-blue); }
.btn-sm { padding: 9px 16px; font-size: 0.8125rem; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding-top: clamp(72px, 10vw, 120px);
  padding-bottom: clamp(64px, 8vw, 100px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(56, 189, 248, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-meta-item .num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.hero-meta-item .num .unit {
  color: var(--accent-blue);
  font-size: 0.875rem;
  margin-left: 2px;
}
.hero-meta-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Hero visual — animated point cloud / wireframe */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.hero-visual-inner {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(129, 140, 248, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(56, 189, 248, 0.18) 0%, transparent 40%),
    linear-gradient(135deg, #0a1020 0%, #0c1426 100%);
}
.hero-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-visual-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  pointer-events: none;
}
.scan-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hover);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
  align-self: flex-start;
}
.scan-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.scan-readout {
  align-self: flex-end;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  color: var(--text-secondary);
  min-width: 200px;
  line-height: 1.6;
}
.scan-readout .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.scan-readout .row .val {
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ===== Trust bar ===== */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding-block: 36px;
}
.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.trust-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  font-weight: 500;
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  flex-wrap: wrap;
}
.trust-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  filter: grayscale(1);
  opacity: 0.7;
  transition: opacity var(--transition), color var(--transition), filter var(--transition);
}
.trust-logo:hover { opacity: 1; color: var(--text-secondary); filter: grayscale(0.4); }

/* ===== Cards / Grids ===== */
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.card-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  margin-bottom: 20px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-secondary); margin-bottom: 16px; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent-blue);
}
.card-link svg { width: 14px; height: 14px; transition: transform var(--transition); }
.card:hover .card-link svg { transform: translateX(3px); }
.card-link::after { content: none; }

/* Service card variant with topline */
.card-service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-blue) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.card-service:hover::before { opacity: 1; }

/* ===== USP / Pillars ===== */
.pillars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar {
  background: var(--bg-card);
  padding: 32px 24px;
  transition: background var(--transition);
}
.pillar:hover { background: var(--bg-card-hover); }
.pillar-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}
.pillar h4 { margin-bottom: 10px; font-size: 1.0625rem; }
.pillar p { font-size: 0.875rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }
@media (max-width: 1100px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ===== Feature block (Lauffenmühle) ===== */
.feature-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) { .feature-block { grid-template-columns: 1fr; } }
.feature-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.feature-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.feature-stat .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.feature-stat .num .accent { color: var(--accent-blue); }
.feature-stat .label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ===== Workflow ===== */
.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
@media (max-width: 900px) { .workflow { grid-template-columns: 1fr; } }
.workflow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.workflow-step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent-blue);
  margin-bottom: 16px;
  font-weight: 600;
}
.workflow-step h4 { margin-bottom: 8px; font-size: 1.125rem; }
.workflow-step p { color: var(--text-secondary); font-size: 0.9375rem; margin: 0; }

/* ===== FAQ ===== */
.faq {
  max-width: 820px;
  margin-inline: auto;
}
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq details[open] { border-color: var(--border-hover); }
.faq summary {
  cursor: pointer;
  padding: 22px 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  color: var(--text-primary);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--transition);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-body {
  padding: 0 24px 22px;
  color: var(--text-secondary);
}
.faq-body p:last-child { margin-bottom: 0; }

/* ===== Testimonials ===== */
.testimonial {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  max-width: 820px;
  margin-inline: auto;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 32px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 6rem;
  color: var(--accent-blue);
  opacity: 0.3;
  line-height: 1;
  font-weight: 700;
}
.testimonial blockquote {
  margin: 0 0 24px;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-primary);
  font-weight: 400;
  font-family: 'Space Grotesk', sans-serif;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-subtle);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--accent-blue);
}
.testimonial-meta .name { font-weight: 600; color: var(--text-primary); }
.testimonial-meta .role { font-size: 0.875rem; color: var(--text-muted); }

/* ===== CTA Block / Widget wrap ===== */
.cta-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 5vw, 72px);
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  position: relative;
}
@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr; } }

/* Widget container styled to match */
.widget-mount {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 200px;
}
.widget-fallback {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.widget-fallback h4 {
  margin: 0 0 4px;
  font-size: 1.125rem;
}
.widget-fallback p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0 0 12px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color var(--transition);
}
.form-row textarea { min-height: 110px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none;
  border-color: var(--accent-blue);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .form-row-2 { grid-template-columns: 1fr; } }
.form-consent {
  display: flex;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  align-items: flex-start;
}
.form-consent input { width: auto; margin-top: 3px; }

/* ===== Pricing ===== */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition);
}
.price-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.price-card.featured {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.04) 0%, var(--bg-card) 40%);
}
.price-badge {
  position: absolute;
  top: -10px;
  left: 28px;
  background: var(--gradient-main);
  color: var(--bg-primary);
  padding: 4px 12px;
  border-radius: 999px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.price-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 12px;
  font-weight: 600;
}
.price-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.1;
}
.price-amount .from {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 4px;
}
.price-fit {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 20px;
}
.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  font-size: 0.9375rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.price-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-secondary);
}
.price-list li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-blue);
  margin-top: 1px;
}

/* ===== Persona / Branchen ===== */
.persona-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.persona-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: inherit;
  transform: translateY(-2px);
}
.persona-card .card-icon { margin-bottom: 0; }
.persona-card h4 { margin: 0; }
.persona-card p { color: var(--text-secondary); font-size: 0.9375rem; margin: 0; }
.persona-card .card-link { margin-top: auto; }

/* ===== Project cards ===== */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}
.project-card:hover {
  border-color: var(--border-hover);
  color: inherit;
  transform: translateY(-2px);
}
.project-thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  background: linear-gradient(135deg, #0a1020 0%, #0c1426 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.project-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-body { padding: 22px 24px; }
.project-meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 8px;
  font-weight: 600;
}
.project-card h4 { margin-bottom: 4px; font-size: 1.125rem; }
.project-card p { color: var(--text-secondary); font-size: 0.9375rem; margin: 0; }
.project-thumb-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hover);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
}

/* ===== Blog post card ===== */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}
.post-card:hover { border-color: var(--border-hover); color: inherit; transform: translateY(-2px); }
.post-meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.post-card h4 { margin: 0; font-size: 1.0625rem; line-height: 1.4; }
.post-card p { color: var(--text-secondary); font-size: 0.9375rem; margin: 0; flex-grow: 1; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding-block: 64px 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 36ch;
  margin-bottom: 20px;
}
.footer-col h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: var(--text-secondary); font-size: 0.9375rem; }
.footer-col ul a:hover { color: var(--accent-blue); }
.footer-loc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.footer-loc .city {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9375rem;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  gap: 20px;
  flex-wrap: wrap;
}
.footer-bottom .links { display: flex; gap: 24px; }
.footer-bottom .links a { color: var(--text-muted); }
.footer-bottom .links a:hover { color: var(--accent-blue); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.footer-social a:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.footer-social svg { width: 16px; height: 16px; }

/* ===== Sticky FAB ===== */
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
  cursor: pointer;
  z-index: 90;
  transition: transform var(--transition);
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 22px; height: 22px; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.modal-close svg { width: 16px; height: 16px; }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner h5 { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; margin: 0 0 6px; }
.cookie-banner p { font-size: 0.875rem; color: var(--text-secondary); margin: 0 0 16px; }
.cookie-banner .row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent-blue); }
.breadcrumbs .sep { color: var(--text-muted); }
.breadcrumbs .current { color: var(--text-primary); }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }
.reveal.d4 { transition-delay: 0.4s; }

/* ===== Mobile nav ===== */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a, .nav-dropdown-trigger { padding: 14px 16px; font-size: 1rem; width: 100%; justify-content: space-between; }
  .nav-dropdown-menu {
    position: static;
    display: block;
    border: none;
    background: transparent;
    padding: 0 0 8px 16px;
    box-shadow: none;
    min-width: 0;
  }
  .nav-dropdown-menu a { padding: 8px 12px; }
  .nav-right .btn { display: none; }
  .lang-switch { display: flex; }
}

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .fab, .modal-backdrop, .cookie-banner { display: none !important; }
  body { background: white; color: black; }
}

/* ============================================================
   Theme Toggle (Light / Dark / Auto)
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--accent-blue);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }
:root[data-theme="light"] .theme-toggle .sun-icon { display: block; }
:root[data-theme="light"] .theme-toggle .moon-icon { display: none; }

/* ============================================================
   Light-theme targeted overrides
   These reach decorative spots that use inline rgba(56,189,248,0.05)
   etc. as backgrounds — too low contrast in dark mode looks fine but
   washes out on light. We bump opacity via a side-effect class.
   ============================================================ */
:root[data-theme="light"] {
  /* Inline gradient text on cards/hero stays vivid */
}
:root[data-theme="light"] .site-header { border-bottom-color: var(--header-border); }
:root[data-theme="light"] .site-footer { background: var(--bg-surface); border-top-color: var(--border); }
:root[data-theme="light"] .nav-dropdown-menu { background: var(--bg-card); box-shadow: var(--shadow-lg); }
:root[data-theme="light"] .modal-backdrop { background: rgba(15, 23, 42, 0.5); }
:root[data-theme="light"] .cookie-banner { box-shadow: var(--shadow-lg); }
:root[data-theme="light"] .btn-secondary { background: var(--bg-card); }
:root[data-theme="light"] .btn-primary { color: var(--on-accent); }
:root[data-theme="light"] .btn-primary:hover { color: var(--on-accent); }
:root[data-theme="light"] .skip-link { background: var(--accent-blue); color: #fff; }
/* Reveal-animation: avoid persistent translateY on light (less needed) */
:root[data-theme="light"] details summary { background: var(--bg-card); }
:root[data-theme="light"] .fab { color: var(--on-accent); }

/* Force-recolor inline-styled spans that use rgba(56,189,248,0.05) as bg — in light theme make them ~10% so badges read */
:root[data-theme="light"] [style*="rgba(56,189,248,0.05)"],
:root[data-theme="light"] [style*="rgba(56, 189, 248, 0.05)"] {
  background: rgba(56, 189, 248, 0.10) !important;
}
:root[data-theme="light"] [style*="rgba(56,189,248,0.04)"],
:root[data-theme="light"] [style*="rgba(56, 189, 248, 0.04)"] {
  background: rgba(56, 189, 248, 0.08) !important;
}

/* Dot-grid background — different opacity for light */
:root[data-theme="light"] .dot-grid::before {
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.08) 1px, transparent 1px);
}

/* ============================================================
   Extra Mobile Hardening
   The site already has 900/600/560/500/400 breakpoints. These
   rules tighten touch targets, hero proportions, table scroll,
   and stack tricky inline grid-1fr+1fr blocks that aren't using
   the .grid utility.
   ============================================================ */

/* Touch targets ≥ 44×44 on small screens */
@media (max-width: 720px) {
  .btn { min-height: 44px; padding: 12px 18px; }
  .btn-sm { min-height: 40px; padding: 10px 14px; }
  .btn-lg { min-height: 52px; padding: 16px 24px; }
  .nav-toggle, .theme-toggle, .modal-close { width: 44px; height: 44px; }
  .nav-toggle svg, .theme-toggle svg { width: 20px; height: 20px; }
  .lang-switch a { padding: 8px 12px; min-width: 44px; text-align: center; }
}

/* Hero typography rebalanced + side padding for small screens */
@media (max-width: 720px) {
  .hero { padding-top: clamp(40px, 12vw, 64px); padding-bottom: clamp(40px, 12vw, 64px); }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.75rem); }
  .lead { font-size: 1.0625rem; }
  .hero-actions { flex-wrap: wrap; gap: 12px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .breadcrumbs { font-size: 0.8125rem; flex-wrap: wrap; row-gap: 4px; }
}

/* Section padding tightens on small screens */
@media (max-width: 720px) {
  .section { padding-block: 48px; }
  .container { padding-inline: 20px; }
}

/* Card stacking + readability */
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
  .card { padding: 22px; }
  .card h3 { font-size: 1.25rem; }
}

/* Tables (if any) should scroll horizontally instead of breaking layout */
.section .container table { display: block; max-width: 100%; overflow-x: auto; }

/* Workflow steps stack already; tighten gap */
@media (max-width: 720px) {
  .workflow { gap: 12px; }
  .workflow-step { padding: 20px; }
}

/* Pricing grid auto-stack already; tighten badges */
@media (max-width: 720px) {
  .pricing-card { padding: 24px; }
}

/* CTA / Widget */
@media (max-width: 720px) {
  .cta-block { padding: 28px 20px; }
  .cta-grid { grid-template-columns: 1fr !important; gap: 28px; }
}

/* Modal — full-width on mobile, edge gutter 16px */
@media (max-width: 600px) {
  .modal { padding: 28px 22px; max-width: calc(100vw - 32px); border-radius: 16px; }
  .modal h4 { font-size: 1.125rem; }
}

/* Cookie banner — bottom edge with safe-area */
.cookie-banner { padding-bottom: max(20px, env(safe-area-inset-bottom, 20px)); }
@media (max-width: 600px) {
  .cookie-banner { left: 12px; right: 12px; padding: 18px; }
  .cookie-banner .row { flex-direction: column; gap: 8px; }
  .cookie-banner .row .btn { width: 100%; }
}

/* FAB position respects safe-area on iOS */
.fab { right: max(24px, env(safe-area-inset-right, 24px)); bottom: max(24px, env(safe-area-inset-bottom, 24px)); }
@media (max-width: 600px) { .fab { right: 16px; bottom: 16px; width: 52px; height: 52px; } }

/* Footer columns stack progressively */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { order: -1; }
  .site-footer { padding-block: 48px 24px; margin-top: 60px; }
}

/* Stop horizontal overflow at the body level on iOS Safari */
html, body { max-width: 100vw; }
img, video, iframe { max-width: 100%; height: auto; }

/* Make the lang+theme cluster wrap on tiny screens */
@media (max-width: 380px) {
  .nav-right { gap: 6px; }
  .lang-switch a { padding: 8px 10px; }
}

/* Reduced-motion: kill reveal-on-scroll animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
