/* ============================================================
   LYB GmbH — v2  ·  Dark premium, refined & minimal
   ============================================================ */

:root {
  --bg:        #08090D;
  --bg-soft:   #0C0E14;
  --ink:       #ECEEF4;
  --muted:     #888EA2;
  --faint:     #767C92;   /* WCAG-AA-tauglich (≈4.8:1 auf --bg) */
  --line:      rgba(255,255,255,.06);
  --card-brd:  rgba(255,255,255,.08);

  --teal:      #7FE9D6;
  --indigo:    #9B9CF5;
  --accent:    var(--teal);

  --grad: linear-gradient(118deg, #7FE9D6 0%, #9B9CF5 100%);

  --container: 1120px;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --font:      'Inter', system-ui, sans-serif;
  --display:   'Space Grotesk', 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  letter-spacing: .003em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ---------- WebGL canvas ---------- */
.scene-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}
.scene-veil {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(58% 46% at 50% 40%, rgba(8,9,13,.62), transparent 72%),
    radial-gradient(120% 80% at 82% 4%, rgba(155,156,245,.07), transparent 55%),
    radial-gradient(90% 70% at 2% 100%, rgba(127,233,214,.055), transparent 55%);
}
main, .site-header, .site-footer { position: relative; z-index: 2; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 1px; width: 0;
  background: var(--grad);
  z-index: 50;
  transition: width .1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display);
  font-weight: 500; font-size: .92rem; letter-spacing: .01em;
  padding: 12px 24px; border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer; transition: transform .35s var(--ease), background .35s, border-color .35s, color .35s;
  white-space: nowrap;
}
.btn-sm  { padding: 9px 18px; font-size: .82rem; }
.btn-lg  { padding: 15px 30px; font-size: .96rem; }

.btn-primary {
  color: #07080C;
  background: var(--ink);
}
.btn-primary:hover { transform: translateY(-2px); background: #fff; }

.btn-ghost {
  color: var(--ink);
  border-color: var(--card-brd);
  background: transparent;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.32); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 40;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8,9,13,.6);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-family: var(--display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; }
.brand picture { flex: none; display: inline-flex; }
.brand-logo { flex: none; width: 34px; height: 34px; border-radius: 9px; }
.brand-name { white-space: nowrap; }
.brand-dot { color: var(--accent); }

.main-nav { display: flex; gap: 36px; }
.main-nav a { font-size: .9rem; color: var(--muted); transition: color .25s; }
.main-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 130px 0 90px;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }

.eyebrow {
  font-family: var(--display);
  text-transform: uppercase; letter-spacing: .34em;
  font-size: .7rem; font-weight: 500;
  color: var(--muted);
  margin-bottom: 34px;
}
.hero-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.7rem, 8.4vw, 6rem);
  line-height: 1.04; letter-spacing: -.04em;
  margin-bottom: 30px;
}
.accent-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  max-width: 520px;
  font-weight: 300;
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: var(--muted);
  margin-bottom: 42px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.hero-scrollhint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
}
.hero-scrollhint i {
  display: block; width: 1px; height: 46px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollPulse 2.4s var(--ease) infinite;
}
@keyframes scrollPulse { 0%,100% { opacity:.25; transform: scaleY(.55); } 50% { opacity:.9; transform: scaleY(1); } }

/* ---------- Manifesto ---------- */
.manifesto { padding: 120px 0; text-align: center; }
.manifesto-line {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4.2vw, 2.7rem);
  line-height: 1.3; letter-spacing: -.02em;
  max-width: 880px; margin-inline: auto;
}
.manifesto-line .muted { color: var(--faint); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.sec-head { max-width: 680px; margin-bottom: 72px; }
.kicker {
  display: inline-block;
  font-family: var(--display); font-size: .72rem; font-weight: 500;
  letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px;
}
.sec-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
  line-height: 1.14; letter-spacing: -.03em;
}

/* ---------- Leistungen — minimal hairline grid ---------- */
.svc-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.svc {
  background: var(--bg);
  padding: 44px 40px;
  transition: background .4s var(--ease);
}
.svc:hover { background: var(--bg-soft); }
.svc-num { font-family: var(--display); font-size: .8rem; font-weight: 500; letter-spacing: .1em; color: var(--accent); }
.svc h3 { font-family: var(--display); font-size: 1.32rem; font-weight: 500; margin: 18px 0 12px; letter-spacing: -.015em; }
.svc p { color: var(--muted); font-weight: 300; font-size: .98rem; }

/* ---------- Warum ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.why { display: flex; gap: 16px; align-items: flex-start; }
.why svg {
  flex: none; width: 20px; height: 20px; margin-top: 3px;
  fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.why h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 500; margin-bottom: 8px; letter-spacing: -.01em; }
.why p { color: var(--muted); font-weight: 300; font-size: .95rem; }

/* ---------- Gründer ---------- */
.founder-inner { display: grid; grid-template-columns: 340px 1fr; gap: 72px; align-items: center; }
.founder-photo {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--card-brd);
  position: relative;
}
.founder-photo::after {
  content:''; position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 60%, rgba(8,9,13,.4));
}
.founder-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15) contrast(1.02); }
.founder-quote {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.3rem, 2.8vw, 1.85rem);
  line-height: 1.4; letter-spacing: -.02em;
  margin: 20px 0 24px;
}
.founder-name { font-size: .95rem; margin-bottom: 18px; color: var(--muted); }
.founder-name strong { font-family: var(--display); font-weight: 500; color: var(--ink); }
.founder-text { color: var(--muted); font-weight: 300; max-width: 440px; }

/* ---------- CTA ---------- */
.cta-section { text-align: center; padding: 150px 0; }
.cta-inner { max-width: 760px; margin-inline: auto; }
.cta-title { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; letter-spacing: -.035em; }
.cta-sub { color: var(--muted); font-weight: 300; max-width: 500px; margin: 24px auto 38px; font-size: 1.06rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-mail { margin-top: 30px; color: var(--faint); font-size: .92rem; display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.cta-mail a { color: var(--muted); font-family: var(--display); letter-spacing: .02em; transition: color .25s; cursor: pointer; }
.cta-mail a:hover { color: var(--accent); }
.cta-mail .sep { color: var(--faint); }

/* ---------- Contact form ---------- */
.contact-form { max-width: 560px; margin: 46px auto 0; text-align: left; }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--display); font-size: .8rem; font-weight: 500; letter-spacing: .02em; color: var(--muted); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font-family: var(--font); font-size: .98rem; color: var(--ink);
  background: rgba(255,255,255,.03); border: 1px solid var(--card-brd); border-radius: 12px;
  padding: 13px 15px; transition: border-color .25s, background .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.05); }
.field textarea { resize: vertical; min-height: 120px; }
.cf-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); font-weight: 300; margin: 4px 0 22px; cursor: pointer; }
.cf-consent input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.cf-consent a { color: var(--accent); }
.cf-submit { width: 100%; }
.cf-submit:disabled { opacity: .6; pointer-events: none; }
/* honeypot — visually & assistive-tech hidden, still in the DOM for bots */
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; margin-top: 14px; font-size: .92rem; text-align: center; color: var(--muted); }
.form-status.is-error { color: #FF8B6B; }
.form-status.is-success { color: var(--accent); }

/* ---------- Chat widget ---------- */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid var(--card-brd); background: var(--ink); color: #07080C;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.6);
  transition: transform .3s var(--ease);
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab svg { position: absolute; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: opacity .25s, transform .25s; }
.chat-fab .i-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.chat-fab.is-open .i-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.chat-fab.is-open .i-close { opacity: 1; transform: none; }

.chat-panel {
  position: fixed; bottom: 94px; right: 24px; z-index: 60;
  width: 360px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 130px);
  display: flex; flex-direction: column;
  background: rgba(12,14,20,.92); backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--card-brd); border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.7);
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.chat-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }

.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 36px; height: 36px; border-radius: 9px; overflow: hidden; border: 1px solid var(--card-brd); flex: none; }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-id { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.chat-id strong { font-family: var(--display); font-weight: 500; font-size: .98rem; }
.chat-status { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); }
.chat-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(127,233,214,.18); }
.chat-close { background: transparent; border: 0; color: var(--muted); cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; transition: color .25s, background .25s; }
.chat-close:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.chat-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; font-size: .92rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg-bot { align-self: flex-start; background: rgba(255,255,255,.05); border: 1px solid var(--card-brd); border-bottom-left-radius: 5px; color: var(--ink); }
.msg-user { align-self: flex-end; background: var(--ink); color: #07080C; border-bottom-right-radius: 5px; }
.msg-typing { display: inline-flex; gap: 4px; align-items: center; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: chatDot 1.2s infinite ease-in-out; }
.msg-typing span:nth-child(2) { animation-delay: .2s; }
.msg-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chatDot { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.chat-chip { font-family: var(--font); font-size: .8rem; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--card-brd); border-radius: 100px; padding: 7px 13px; cursor: pointer; transition: color .25s, border-color .25s, background .25s; }
.chat-chip:hover { color: var(--ink); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.07); }

.chat-input { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--card-brd); border-radius: 100px; padding: 11px 16px; color: var(--ink); font-family: var(--font); font-size: .92rem; }
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-input button { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: #07080C; cursor: pointer; display: grid; place-items: center; transition: transform .25s; }
.chat-input button:hover { transform: scale(1.06); }
.chat-input button svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 480px) {
  .chat-panel { right: 16px; left: 16px; bottom: 88px; width: auto; height: 70vh; }
  .chat-fab { bottom: 18px; right: 18px; }
}

/* ---------- Header actions + language switch ---------- */
.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--card-brd); border-radius: 100px; }
.lang-btn {
  font-family: var(--display); font-size: .72rem; font-weight: 500; letter-spacing: .04em;
  color: var(--muted); background: transparent; border: 0; cursor: pointer;
  padding: 5px 10px; border-radius: 100px; transition: color .25s, background .25s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: #07080C; background: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; margin-top: 20px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { color: var(--muted); font-size: .86rem; transition: color .25s; }
.footer-legal a:hover { color: var(--accent); }
.footer-meta { color: var(--faint); font-weight: 300; font-size: .84rem; }

/* ---------- Legal pages ---------- */
.legal-body { background: var(--bg); }
.legal-body .site-header { background: rgba(8,9,13,.7); backdrop-filter: blur(16px) saturate(140%); border-bottom-color: var(--line); }
.legal-main { max-width: 760px; margin: 0 auto; padding: 150px 28px 110px; }
.legal-doc h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.03em; line-height: 1.1;
  margin-bottom: 14px;
}
.legal-sub { color: var(--muted); font-weight: 300; font-size: 1.02rem; margin-bottom: 40px; max-width: 640px; }
.legal-doc h2 {
  font-family: var(--display); font-weight: 500;
  font-size: 1.18rem; letter-spacing: -.01em;
  margin: 38px 0 12px; padding-top: 26px; border-top: 1px solid var(--line);
}
.legal-doc address { font-style: normal; color: var(--ink); margin-bottom: 8px; line-height: 1.7; }
.legal-doc p { color: var(--muted); font-weight: 300; margin-bottom: 10px; }
.legal-doc a { color: var(--accent); transition: opacity .25s; }
.legal-doc a:hover { opacity: .75; text-decoration: underline; }
.legal-doc strong { color: var(--ink); font-weight: 500; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .07s; }
.reveal:nth-child(3) { transition-delay: .14s; }
.reveal:nth-child(4) { transition-delay: .21s; }

.reveal-line { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal-line.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .svc-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 30px; }
  .founder-inner { grid-template-columns: 1fr; gap: 40px; }
  .founder-photo { max-width: 300px; margin-inline: auto; }
  .cf-grid { grid-template-columns: 1fr; }
  .section { padding: 84px 0; }
  .manifesto { padding: 90px 0; }
}

@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .header-inner { height: 64px; }
  .header-actions { gap: 10px; }
  .header-actions .btn-primary { display: none; }   /* CTA lebt im Hero */
  .hero { padding: 110px 0 80px; }
  .hero-title { font-size: clamp(1.9rem, 9vw, 3.2rem); }
  .hero-cta { width: 100%; gap: 10px; }
  .hero-cta .btn { flex: 1 1 140px; }
  .hero-title, .hero-sub, .manifesto-line, .sec-title, .cta-title, .founder-quote { overflow-wrap: break-word; }
  .footer-inner { gap: 14px; }
  .footer-legal { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-line { opacity: 1; transform: none; transition: none; }
  .hero-scrollhint i { animation: none; }
}
