/* ==========================================================================
   DB-Abschleppdienst — base: tokens, reset, type, buttons, nav, motion system
   Light, warm paper ground · ink · signal yellow · one cold accent
   ========================================================================== */
:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #0b0d12;
  --ink-2: #353a46;
  --muted: #6b7080;
  --faint: #c9c8c2;
  --line: rgba(11, 13, 18, .1);
  --line-2: rgba(11, 13, 18, .16);
  --yellow: #ffc20e;
  --yellow-2: #ffb000;
  --blue: #2f5bff;

  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --sec: clamp(88px, 11vw, 168px);
  --radius: 24px;
  --radius-lg: 32px;
  --nav-h: 64px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --shadow-1: 0 1px 2px rgba(11, 13, 18, .04), 0 8px 24px -12px rgba(11, 13, 18, .12);
  --shadow-2: 0 2px 4px rgba(11, 13, 18, .04), 0 28px 60px -24px rgba(11, 13, 18, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
/* paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--display); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
h3 { font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
svg { display: block; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

main { overflow-x: clip; }
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; transition: top .2s; }
.skip:focus { top: 16px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link { color: var(--ink); font-weight: 600; background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 100% 2px no-repeat; transition: background-size .4s var(--ease); }
.link:hover { background-size: 100% 100%; }

/* ---------- Atmosphere ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; opacity: .7; will-change: transform; }
.aurora span:nth-child(1) { width: 52vw; height: 52vw; left: -12vw; top: -18vw; background: radial-gradient(closest-side, #ffe39a, rgba(255, 227, 154, 0)); animation: drift-a 26s var(--ease-io) infinite alternate; }
.aurora span:nth-child(2) { width: 44vw; height: 44vw; right: -14vw; top: 4vw; background: radial-gradient(closest-side, #d4defd, rgba(212, 222, 253, 0)); animation: drift-b 32s var(--ease-io) infinite alternate; }
.aurora span:nth-child(3) { width: 36vw; height: 36vw; left: 30vw; top: 40vh; background: radial-gradient(closest-side, #ffeedd, rgba(255, 238, 221, 0)); animation: drift-c 38s var(--ease-io) infinite alternate; }
@keyframes drift-a { to { transform: translate(14vw, 10vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vw, 18vh) scale(.9); } }
@keyframes drift-c { to { transform: translate(-18vw, -12vh) scale(1.2); } }

.progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 3px; background: var(--yellow); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px;
  border: 0; border-radius: 999px;
  font: 600 1rem/1 var(--display); letter-spacing: -.01em; white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transition: transform .5s var(--ease), translate .5s var(--ease), box-shadow .5s var(--ease), background-color .3s;
}
.btn::after { /* light sweep */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: scale(.97); }
.btn-lg { padding: 18px 30px; font-size: 1.0625rem; }
.btn-sm { padding: 11px 18px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-yellow { background: var(--yellow); color: var(--ink); box-shadow: 0 10px 30px -12px rgba(255, 176, 0, .8), inset 0 -2px 0 rgba(0, 0, 0, .08); }
.btn-yellow:hover { box-shadow: 0 18px 40px -14px rgba(255, 176, 0, .95), inset 0 -2px 0 rgba(0, 0, 0, .08); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%); }
.btn-ghost { background: rgba(255, 255, 255, .6); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: #fff; }
.btn-ghost-light { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(11, 13, 18, .35); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .35); }
.btn .ic-wa { color: #25a35a; }
.btn-ghost-light .ic-wa { color: var(--ink); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 12px 0 auto; z-index: 50; transition: transform .6s var(--ease); }
.nav.is-hidden { transform: translateY(-140%); }
.nav-inner {
  display: flex; align-items: center; gap: 20px;
  height: var(--nav-h); padding: 0 10px 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 0 0 0 transparent;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  transition: background-color .4s, box-shadow .4s;
}
.nav.is-scrolled .nav-inner { background: rgba(255, 255, 255, .82); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); font: 700 1.05rem/1 var(--display); letter-spacing: -.02em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: #fff; font-size: .9rem; letter-spacing: 0; }
.brand-mark::after { content: ''; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 2px var(--bg); animation: blink 1.6s steps(1) infinite; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; padding: 9px 14px; border-radius: 999px; color: var(--ink-2); font: 500 .95rem/1 var(--body); transition: color .3s, background-color .3s; }
.nav-links a:hover { color: var(--ink); background: rgba(11, 13, 18, .05); }
.nav-links a.is-active { color: var(--ink); background: rgba(255, 194, 14, .28); }
.beacon-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(255, 194, 14, .7); animation: ping 1.8s var(--ease) infinite; }
.nav-ic { display: none; }
.burger { display: none; position: relative; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(11, 13, 18, .06); }
.burger span { position: absolute; left: 14px; right: 14px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .4s var(--ease); }
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }
.mobile-menu { margin-top: 8px; }
.mobile-menu nav { display: grid; padding: 10px; border-radius: 28px; background: rgba(255, 255, 255, .94); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2); backdrop-filter: blur(16px); animation: menu-in .5s var(--ease); }
.mobile-menu a { padding: 14px 16px; border-radius: 16px; color: var(--ink); font: 600 1.35rem/1.1 var(--display); letter-spacing: -.02em; }
.mobile-menu a:hover { background: rgba(11, 13, 18, .05); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* ---------- Shared bits ---------- */
.kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--ink); font: 600 .78rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; }
.kicker::before { content: ''; width: 28px; height: 3px; border-radius: 2px; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s var(--ease) .15s; }
.kicker.is-in::before, .is-in .kicker::before { transform: none; }
.sec { padding-block: var(--sec) 0; }
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2 { max-width: 15ch; font-size: clamp(2.3rem, 5.6vw, 5rem); }
.panel { position: relative; padding: clamp(24px, 3.4vw, 40px); border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.panel-ink { background: var(--ink); color: rgba(255, 255, 255, .72); box-shadow: var(--shadow-2); }
.panel-ink h3 { color: #fff; }

@keyframes blink { 50% { opacity: .15; } }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 194, 14, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Motion system (driven by motion.js) ---------- */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="words"], [data-reveal][data-stagger] { opacity: 1; transform: none; }
[data-reveal="words"] .w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
[data-reveal="words"] .w > span { display: inline-block; transform: translateY(108%) rotate(4deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease) calc(var(--i) * 70ms); }
[data-reveal="words"].is-in .w > span { transform: none; }
[data-reveal][data-stagger] > *, [data-reveal] [data-stagger] > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity .9s var(--ease) calc(var(--i, 0) * 80ms + var(--d, 0s) + .1s), transform 1.1s var(--ease) calc(var(--i, 0) * 80ms + var(--d, 0s) + .1s);
}
.is-in[data-stagger] > *, .is-in [data-stagger] > * { opacity: 1; transform: none; }

.reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease) .9s, transform 1.2s var(--ease) .9s; }
.hero-head .pill.reveal-up { transition-delay: .1s; }
html.is-ready .reveal-up { opacity: 1; transform: none; }

/* ---------- Footer & mobile action bar ---------- */
.footer { padding: 40px 0 48px; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--ink); }
.action-bar { display: none; }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .nav-inner { gap: 8px; }
}
@media (max-width: 640px) {
  :root { --nav-h: 58px; }
  .nav { inset: 8px 0 auto; }
  .nav .wrap { width: calc(100% - 16px); }
  .nav-inner { padding: 0 6px 0 12px; }
  .brand-name { display: none; }
  .nav-num, .nav .beacon-dot { display: none; }
  .nav-ic { display: block; }
  .nav .btn-sm { width: 46px; height: 46px; padding: 0; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .action-bar {
    position: fixed; inset: auto 0 0; z-index: 40;
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(246, 245, 241, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -1px 0 var(--line);
    animation: bar-in .8s var(--ease) 1.4s both;
  }
  .action-bar .btn { padding: 16px; }
  .action-bar .btn-ink .ic { color: #3ddc84; }
}
@keyframes bar-in { from { transform: translateY(110%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-reveal], [data-reveal] [data-stagger] > *, [data-reveal][data-stagger] > *, [data-reveal="words"] .w > span, .reveal-up, .hero-title .ch { opacity: 1 !important; transform: none !important; }
  .aurora { display: none; }
}

/* ---------- Legal pages (Impressum, Datenschutz) & 404 ---------- */
.page-head { display: flex; align-items: center; gap: 16px; padding-block: 20px; }
.legal { max-width: 760px; padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 120px); }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--muted); font-size: .95rem; transition: color .3s, gap .4s var(--ease); }
.back:hover { color: var(--ink); gap: 12px; }
.back .ic { transform: rotate(180deg); }
.legal h1 { margin-bottom: 12px; font-size: clamp(2.6rem, 7vw, 4.6rem); animation: rise 1s var(--ease) both; }
.legal .stand { margin-bottom: 40px; color: var(--muted); font-size: .9rem; }
.legal h2 { margin: 2.4em 0 .6em; font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.02em; line-height: 1.25; }
.legal h3 { margin: 1.6em 0 .4em; font-size: 1.05rem; }
.legal p, .legal ul, .legal address { margin-bottom: 1em; }
.legal address { font-style: normal; }
.legal ul { padding-left: 1.2em; list-style: disc; }
.legal li { margin-bottom: .35em; }
.legal a:not(.back) { color: var(--ink); font-weight: 500; background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 100% 2px no-repeat; transition: background-size .4s var(--ease); }
.legal a:not(.back):hover { background-size: 100% 100%; }
.legal .card-box { padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); animation: rise 1s var(--ease) .1s both; }
.legal .card-box > :last-child { margin-bottom: 0; }
.legal .card-box + .card-box { margin-top: 16px; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { color: var(--ink); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

.notfound { display: grid; place-items: center; min-height: 72vh; padding-block: 48px; text-align: center; }
.notfound .code { color: var(--ink); font: 800 clamp(6rem, 24vw, 15rem)/.9 var(--display); letter-spacing: -.06em; animation: rise 1s var(--ease) both; }
.notfound .code span { color: var(--yellow); }
.notfound h1 { margin: 12px 0 14px; font-size: clamp(1.6rem, 4vw, 2.6rem); }
.notfound p { max-width: 42ch; margin: 0 auto 28px; color: var(--muted); }
.notfound .cta { justify-content: center; }

@media (max-width: 640px) {
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
  body.page-simple { padding-bottom: 0; }
}
