/* =====================================================================
   BetterGroupHelper – Website
   ===================================================================== */
:root {
  --bg: #f5f4ef;
  --bg-alt: #ecebe4;
  --surface: #ffffff;
  --ink: #12141b;
  --ink-2: #2b2e38;
  --muted: #5d616d;
  --line: #e2e0d8;
  --accent: #3b6dff;
  --accent-2: #5b3df5;
  --accent-ink: #ffffff;
  --lime: #c8f542;
  --chat-bg: #dfe7f1;
  --bubble-in: #ffffff;
  --bubble-out: #e3f2d3;
  --bubble-bot: #eef1ff;
  --danger: #d0453a;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(18,20,27,.04), 0 12px 32px -8px rgba(18,20,27,.12);
  --shadow-lg: 0 2px 4px rgba(18,20,27,.04), 0 30px 60px -20px rgba(30,40,90,.30);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f14; --bg-alt: #12151c; --surface: #171a23; --ink: #eceef3; --ink-2: #cfd2dc; --muted: #9aa0ae; --line: #252a36;
    --accent: #6e8dff; --accent-2: #8b72ff; --chat-bg: #10141c; --bubble-in: #1d2230; --bubble-out: #23331f; --bubble-bot: #1c2140;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -8px rgba(0,0,0,.5);
    --shadow-lg: 0 30px 60px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.02em; margin: 0; color: var(--ink); }
p { margin: 0; }
code { font-family: var(--mono); font-size: .86em; background: var(--bg-alt); border: 1px solid var(--line); padding: .05em .4em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 0 rgba(47,191,113,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(47,191,113,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--font); text-decoration: none; border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: var(--surface); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-light { background: #fff; color: #12141b; }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.45); }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 18px/1 var(--display); letter-spacing: -.01em; }
.brand b { color: var(--accent); font-weight: 700; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav-menu a:not(.btn):hover { background: var(--bg-alt); }
.nav-menu .lang { color: var(--muted); font-size: 14px; }
.nav-menu .btn { margin-left: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6.4vw, 76px); font-weight: 700; margin-bottom: 22px; }
.hero mark { background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); color: inherit; padding: 0 .06em; }
@media (prefers-color-scheme: dark) { .hero mark { background: none; color: var(--lime); } }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); max-width: 540px; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; }
.hero-points li::before { content: "✓"; color: #2fbf71; font-weight: 700; margin-right: 7px; }

/* Chat-Illustration */
.chat { background: var(--chat-bg); border-radius: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; max-width: 460px; justify-self: end; width: 100%;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat-head strong { display: block; font-size: 15px; }
.chat-head span { font-size: 12px; color: var(--muted); }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--display); color: #fff; background: linear-gradient(135deg, #f59e42, #e0457b); }
.chat-body { padding: 18px 14px 20px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; line-height: 1.45; }
.msg { max-width: 86%; padding: 8px 12px 9px; border-radius: 16px; background: var(--bubble-in); box-shadow: 0 1px 1px rgba(0,0,0,.06); opacity: 0; animation: msg-in .45s ease forwards; }
.msg b { display: block; font-size: 12.5px; margin-bottom: 1px; color: var(--accent); }
.msg .u1 { color: #d9534f; } .msg .u2 { color: #8e44ad; } .msg .u3 { color: #1f9d6a; }
.msg-in { border-bottom-left-radius: 6px; align-self: flex-start; }
.msg-out { background: var(--bubble-out); align-self: flex-end; border-bottom-right-radius: 6px; font-family: var(--mono); font-size: 13px; }
.msg-bot { background: var(--bubble-bot); border-bottom-left-radius: 6px; }
.msg-spam { position: relative; animation: msg-in .45s ease forwards, removed .6s ease 2.4s forwards; }
.msg:nth-child(1) { animation-delay: .1s; } .msg:nth-child(2) { animation-delay: .6s; }
.msg:nth-child(3) { animation-delay: 1.4s; } .msg:nth-child(4) { animation-delay: 2.2s; }
.msg:nth-child(5) { animation-delay: 3s; } .msg:nth-child(6) { animation-delay: 3.8s; }
.msg-spam.msg { animation-delay: .6s, 2.4s; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes removed { to { opacity: .38; text-decoration: line-through; filter: grayscale(1); } }
.kb { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 9px; }
.kb span { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink); text-align: center; padding: 7px 6px; border-radius: 9px; font-size: 12.5px; font-weight: 600; }
.kb .wide { grid-column: span 2; }
@media (prefers-reduced-motion: reduce) { .msg { opacity: 1; } .msg-spam { opacity: .38; text-decoration: line-through; } }

/* Live-Zahlen */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 64px 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.stats div { padding: 22px 24px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dt { color: var(--muted); font-size: 13px; font-weight: 500; }
.stats dd { margin: 4px 0 0; font: 700 34px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head h2, .split h2 { font-size: clamp(32px, 4.2vw, 50px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 18px; }
.section-head .eyebrow, .split .eyebrow { color: var(--accent); font-size: 13px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(200px, auto); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 21px; margin: 16px 0 8px; }
.card p { color: var(--muted); font-size: 15px; }
.card .icon { font-size: 26px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--bg-alt); }
.card-lg { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
.card-lg h3 { font-size: clamp(26px, 3vw, 36px); margin-top: auto; padding-top: 40px; }
.card-lg p { font-size: 17px; max-width: 520px; }
.card-wide { grid-column: span 2; }
.card-accent { background: linear-gradient(150deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.card-accent h3, .card-accent p { color: #fff; }
.card-accent p { opacity: .88; }
.card-accent .icon { background: rgba(255,255,255,.16); }
.filter-demo { margin-top: 28px; display: grid; gap: 8px; max-width: 460px; }
.filter-demo div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); font-size: 15px; }
.filter-demo u { text-decoration: none; background: rgba(255,255,255,.22); border-radius: 4px; padding: 0 3px; }
.filter-demo em { font: 600 12px/1 var(--mono); font-style: normal; padding: 6px 9px; border-radius: 99px; background: rgba(255,255,255,.18); }
.filter-demo em.ok { background: var(--lime); color: #12141b; }
.filter-demo em.hard { background: #ff6b5e; color: #fff; }
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 600 12px/1 var(--mono); padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); }

/* Split / Diagramm */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split > div > p { color: var(--muted); font-size: 18px; margin-bottom: 24px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; font-weight: 500; }
.checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 7px; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2312141b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/15px no-repeat; }
.diagram { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.diagram text { font: 600 14px var(--font); fill: var(--ink); text-anchor: middle; dominant-baseline: middle; }
.d-lines path { stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 2; fill: none; stroke-dasharray: 5 6; animation: flow 1.6s linear infinite; }
.d-lines .d-dash { stroke: var(--muted); opacity: .5; }
@keyframes flow { to { stroke-dashoffset: -22; } }
.d-node rect { fill: var(--bg-alt); stroke: var(--line); }
.d-core circle { fill: var(--accent); }
.d-core text { fill: #fff; font-size: 26px; }
.d-core .d-core-label { font: 700 15px var(--display); }
.d-log rect { fill: color-mix(in srgb, var(--lime) 45%, var(--surface)); }
.d-rep rect { fill: color-mix(in srgb, var(--danger) 18%, var(--surface)); }

/* Steps */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.steps li { counter-increment: s; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 64px 22px 24px; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); position: absolute; top: 20px; left: 22px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font: 700 15px var(--display); }
.steps h3 { font-size: 19px; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 14.5px; }

/* Tabs / Commands */
.tablist { display: inline-flex; gap: 4px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 20px; box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; }
.tablist button { appearance: none; border: 0; background: none; font: 600 15px var(--font); color: var(--muted); padding: 10px 20px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tablist button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tabpanel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 28px; box-shadow: var(--shadow); }
.cmds { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.cmds div:nth-last-child(-n+2) { border-bottom: 0; }
.cmds div { display: flex; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cmds dt { font: 500 14px var(--mono); color: var(--accent); min-width: 150px; }
.cmds dd { margin: 0; color: var(--ink-2); font-size: 15px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; font: 600 17px var(--font); padding: 20px 32px 20px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 400 26px var(--display); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); }

/* CTA */
.cta { padding: 0 0 104px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 56px; border-radius: 32px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #5b3df5 0%, #3b6dff 45%, #1b2a6b 100%); box-shadow: var(--shadow-lg); }
.cta h2 { color: #fff; font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 8px; }
.cta p { opacity: .85; font-size: 18px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: var(--bg); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 320px; font-size: 15px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-links h3 { font: 600 13px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-links a { display: block; color: var(--ink-2); text-decoration: none; padding: 4px 0; font-size: 15px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; background: linear-gradient(var(--line), var(--line)) top center / calc(100% - 48px) 1px no-repeat; color: var(--muted); font-size: 13px; }

/* Rechtstexte / Fehlerseiten */
.page { padding: 72px 0 104px; }
.page h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 28px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 40px 0 12px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose address { font-style: normal; line-height: 1.7; }
.notice { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); padding: 14px 18px; border-radius: 12px; margin-bottom: 24px; }
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 72px 24px; }
.error-code { font: 700 clamp(96px, 18vw, 180px)/1 var(--display); letter-spacing: -.05em; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: 30px; margin: 8px 0 12px; }
.error-page p { color: var(--muted); margin-bottom: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:last-child { grid-column: span 2; }
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav-menu.is-open { display: flex; }
  .nav-menu a:not(.btn) { padding: 12px; }
  .nav-menu .btn { margin: 8px 0 0; }
  .hero { padding-top: 32px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 44px; }
  .chat { justify-self: start; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card-lg { grid-column: span 2; grid-row: auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cmds { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .footer-bottom { background-size: calc(100% - 32px) 1px; }
  .bento { grid-template-columns: 1fr; }
  .card-lg, .card-wide { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .steps li:last-child { grid-column: auto; }
  .stats dd { font-size: 26px; }
  .stats div { padding: 16px; }
  .cmds div { flex-direction: column; gap: 4px; }
  .cmds dt { min-width: 0; }
  .tabpanel { padding: 4px 18px; }
  .cta-inner { padding: 36px 24px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
}
