/* ==========================================================================
   NTH Automation — Designsystem
   Automatisierung · KI · IT-Systeme
   ========================================================================== */

/* ---------- Design-Tokens ---------- */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 9px;

  --maxw: 1140px;
  --header-h: 68px;

  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.06), 0 1px 3px rgba(2, 6, 23, 0.08);
  --shadow-md: 0 6px 24px -8px rgba(2, 6, 23, 0.18);
  --shadow-lg: 0 20px 50px -16px rgba(2, 6, 23, 0.28);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Dunkles Theme (Standard) */
:root, html[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-2: #0c1220;
  --surface: #101828;
  --surface-2: #14203a;
  --border: #1e2a3f;
  --border-soft: rgba(148, 163, 184, 0.12);
  --text: #e8eef7;
  --text-muted: #93a1b5;
  --text-faint: #64748b;
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-contrast: #04131a;
  --grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  --code-bg: #0b1120;
  --code-border: #1e2a3f;
  --hero-grid: rgba(148, 163, 184, 0.06);
}

/* Helles Theme */
html[data-theme="light"] {
  --bg: #f7fafc;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: #e2e8f0;
  --border-soft: rgba(15, 23, 42, 0.08);
  --text: #0b1220;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  --accent: #0891b2;
  --accent-2: #2563eb;
  --accent-soft: rgba(8, 145, 178, 0.10);
  --accent-contrast: #ffffff;
  --grad: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  --code-bg: #0b1120;
  --code-border: #1e293b;
  --hero-grid: rgba(15, 23, 42, 0.05);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--accent); color: var(--accent-contrast); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 88px 0; position: relative; }

.section-alt { background: var(--bg-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

/* ---------- Typografie ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }

h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 16px; }
h3 { font-size: 1.18rem; font-weight: 700; }

.lead { color: var(--text-muted); font-size: 1.1rem; max-width: 60ch; }

.section-head { max-width: 720px; margin-bottom: 48px; }

.accent { color: var(--accent); }
.mono { font-family: var(--font-mono); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border-soft); }

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

.logo { display: inline-flex; align-items: center; gap: 12px; height: 40px; }
.logo img { height: 40px; width: auto; }
html[data-theme="dark"] .logo img.logo-dark { display: block; }
html[data-theme="dark"] .logo img.logo-light { display: none; }
html[data-theme="light"] .logo img.logo-dark { display: none; }
html[data-theme="light"] .logo img.logo-light { display: block; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }
.theme-toggle .icon { width: 16px; height: 16px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--grad);
  color: var(--accent-contrast);
  box-shadow: 0 8px 22px -8px rgba(34, 211, 238, 0.55);
}
.btn-primary:hover { box-shadow: 0 12px 28px -8px rgba(34, 211, 238, 0.7); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn .icon { width: 16px; height: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: -240px; right: -160px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; position: relative; }

.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); margin-bottom: 22px; }
.hero h1 .grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead { font-size: 1.18rem; margin-bottom: 32px; }

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

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stats .stat b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats .stat span { color: var(--text-muted); font-size: 0.85rem; }

/* Terminal-Karte */
.terminal {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--code-border);
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar .dot.r { background: #ff5f57; }
.terminal-bar .dot.y { background: #febc2e; }
.terminal-bar .dot.g { background: #28c840; }
.terminal-bar .title { margin-left: 10px; color: #64748b; font-size: 0.75rem; }
.terminal-body { padding: 20px; color: #cbd5e1; }
.terminal-body .ln { display: flex; gap: 10px; }
.terminal-body .ln .prompt { color: #22d3ee; }
.terminal-body .ln .cmd { color: #e8eef7; }
.terminal-body .ln .ok { color: #4ade80; }
.terminal-body .ln .dim { color: #64748b; }

/* ---------- Karten / Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-md); }

.card .icon-wrap {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  margin-bottom: 18px;
}
.card .icon-wrap svg { width: 24px; height: 24px; stroke: var(--accent); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.94rem; }
.card .tag {
  position: absolute;
  top: 20px; right: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
}

/* ---------- Technologien (Chips) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
}
.chip::before { content: "›"; color: var(--accent); }
.chip:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

/* ---------- Prozess ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.step .num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.1em;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Über ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: start; }

.fact-list { display: grid; gap: 14px; margin-top: 24px; }
.fact { display: flex; gap: 14px; align-items: flex-start; }
.fact .k {
  flex: 0 0 150px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  padding-top: 3px;
}
.fact .v { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }

.contact-methods { display: grid; gap: 14px; margin-top: 24px; }
.contact-method {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.18s var(--ease);
}
.contact-method:hover { border-color: var(--accent); }
.contact-method .icon-wrap { flex: 0 0 auto; }
.contact-method .label { font-size: 0.8rem; color: var(--text-faint); }
.contact-method .value { font-weight: 600; }
.contact-method a.value:hover { color: var(--accent); }

.form {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 7px; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.8rem; color: var(--text-faint); margin-top: 14px; }

/* ---------- Legal (Impressum / Datenschutz) ---------- */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.5rem; margin: 40px 0 14px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p { color: var(--text-muted); margin-bottom: 14px; }
.legal ul { margin: 0 0 14px 20px; list-style: disc; color: var(--text-muted); }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.placeholder {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ---------- CTA-Band ---------- */
.cta-band {
  background: var(--grad);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  color: var(--accent-contrast);
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: var(--accent-contrast); margin-bottom: 12px; }
.cta-band p { color: color-mix(in srgb, var(--accent-contrast) 82%, transparent); margin-bottom: 28px; }
.cta-band .btn { background: var(--accent-contrast); color: var(--accent-2); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 56px 0 32px;
  background: var(--bg-2);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin-top: 14px; max-width: 32ch; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--text-muted); padding: 5px 0; font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Reveal-Animationen ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 24px; }
  .hero { padding: 64px 0; }
  .hero-stats { gap: 20px; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav-toggle { display: flex; }
  .theme-label { display: none; }
}
