/* ============================================================
   Apelligence – Stylesheet
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --border: #e2e8f2;
  --text: #0f1a2b;
  --text-muted: #566178;
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --accent-warm: #f59e0b;
  --accent-warm-600: #d9820a;
  --grad: linear-gradient(120deg, #2563eb 0%, #06b6d4 100%);
  --grad-warm: linear-gradient(120deg, #ffd884 0%, #f9b64a 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1120px;
  --shadow: 0 24px 50px -24px rgba(24, 43, 84, 0.28);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(79, 140, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(79, 140, 255, 0.7); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(24, 43, 84, 0.5); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-name { color: var(--text); }

.nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-menu a:not(.nav-cta):hover { background: rgba(15, 26, 43, 0.06); }
.nav-cta {
  background: #f9bc52;
  border: 1px solid transparent;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(124, 74, 0, 0.28);
  box-shadow: 0 8px 20px -12px rgba(245, 158, 11, 0.55);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(245, 158, 11, 0.7);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; }
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  font-weight: 800;
}
.hero-lead {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(620px 420px at 12% -5%, rgba(37, 99, 235, 0.14), transparent 62%),
    radial-gradient(620px 520px at 92% 12%, rgba(6, 182, 212, 0.12), transparent 62%);
  pointer-events: none;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin: 0 0 2.75rem; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 800;
}
.section-sub { color: var(--text-muted); font-size: 1.08rem; margin: 0; }

/* ---------- Cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.75rem 1.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(24, 43, 84, 0.05), 0 10px 24px -18px rgba(24, 43, 84, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.6);
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin: 0 0 0.5rem; font-size: 1.22rem; }
.card p { margin: 0; color: var(--text-muted); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem 1.6rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(24, 43, 84, 0.05), 0 10px 24px -18px rgba(24, 43, 84, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad);
}
.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px -8px rgba(37, 99, 235, 0.6);
}
.step h3 { margin: 0.8rem 0 0.5rem; font-size: 1.18rem; }
.step p { margin: 0; color: var(--text-muted); }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-text h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 800;
}
.about-text p { color: var(--text-muted); margin: 0 0 1rem; }
.about-text strong { color: var(--text); }
.about-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.about-stats li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem 1.2rem 1.7rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(24, 43, 84, 0.05), 0 10px 24px -18px rgba(24, 43, 84, 0.25);
}
.about-stats li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--grad);
}
.stat-value { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.stat-label { display: block; color: var(--text-muted); margin-top: 0.35rem; font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; max-width: 720px; }
.contact h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 800;
}
.contact .section-sub { margin: 0 auto 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: var(--text-muted); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-copy { color: var(--text-muted); font-size: 0.9rem; margin: 0; width: 100%; }

/* ---------- Legal pages (Impressum, Datenschutz) ---------- */
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.legal .container { max-width: 820px; }
.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 0.4rem;
}
.legal .legal-updated { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 2.25rem; }
.legal h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.75rem;
}
.legal h3 { font-size: 1.08rem; font-weight: 700; margin: 1.5rem 0 0.4rem; }
.legal p, .legal li { color: var(--text-muted); }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.3rem; display: grid; gap: 0.4rem; }
.legal address { font-style: normal; color: var(--text); line-height: 1.7; margin: 0 0 1rem; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: #1e4fc0; }
.legal .placeholder {
  background: rgba(245, 158, 11, 0.12);
  color: #9a6608;
  border: 1px dashed rgba(245, 158, 11, 0.6);
  border-radius: 6px;
  padding: 0.05em 0.4em;
  font-size: 0.92em;
  font-weight: 600;
}
.legal .note {
  margin-top: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.legal-back { display: inline-block; margin-bottom: 1.5rem; color: var(--accent); font-weight: 600; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem 24px 1.5rem;
    transform: translateY(-140%);
    transition: transform 0.3s ease;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 0.85rem 1rem; }
  .nav-cta { text-align: center; }
  .about { grid-template-columns: 1fr; gap: 2rem; }
}
