/* ============================================================
   Mailgent — Design System
   E-Mail-Postfächer für KI-Agenten. In der EU.
   ============================================================ */

:root {
  /* Farben — hell */
  --bg:        #ffffff;
  --bg-soft:   #f5f6fb;
  --bg-card:   #ffffff;
  --ink:       #0b0d1a;
  --ink-soft:  #30344a;
  --muted:     #5c6076;
  --border:    #e7e9f2;
  --border-strong: #d6d9e6;

  --brand:     #5b4df0;   /* Indigo-Violett */
  --brand-ink: #4536d6;
  --brand-soft:#eceaffe0;
  --accent:    #0cae95;   /* Mint/Teal — EU-frisch */
  --accent-soft:#e3f8f3;

  --code-bg:   #0c0e1c;
  --code-ink:  #e8eaf6;

  --shadow-sm: 0 1px 2px rgba(12,14,26,.06), 0 1px 1px rgba(12,14,26,.04);
  --shadow-md: 0 8px 24px -8px rgba(12,14,26,.14), 0 2px 6px rgba(12,14,26,.06);
  --shadow-lg: 0 24px 60px -20px rgba(43,37,120,.30);

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw:      1120px;
  --gutter:    24px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #090a13;
    --bg-soft:   #0e1020;
    --bg-card:   #12142400;
    --bg-card:   #121426;
    --ink:       #f3f4fb;
    --ink-soft:  #d4d7e6;
    --muted:     #9499b4;
    --border:    #212545;
    --border-strong: #2c3157;
    --brand:     #8a7dff;
    --brand-ink: #a99dff;
    --brand-soft:#1a1840;
    --accent:    #22d3b0;
    --accent-soft:#0c2a27;
    --code-bg:   #0c0e1c;
    --code-ink:  #e8eaf6;
    --shadow-lg: 0 24px 70px -24px rgba(0,0,0,.7);
    --shadow-md: 0 8px 24px -8px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg:#090a13; --bg-soft:#0e1020; --bg-card:#121426; --ink:#f3f4fb; --ink-soft:#d4d7e6;
  --muted:#9499b4; --border:#212545; --border-strong:#2c3157; --brand:#8a7dff; --brand-ink:#a99dff;
  --brand-soft:#1a1840; --accent:#22d3b0; --accent-soft:#0c2a27;
  --shadow-lg:0 24px 70px -24px rgba(0,0,0,.7); --shadow-md:0 8px 24px -8px rgba(0,0,0,.5);
}

/* ---------- Reset / Basis ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .4em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.03em; }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1rem; color: var(--ink-soft); }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
::selection { background: var(--brand); color:#fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display:inline-flex; align-items:center; gap:.5em;
  font-size:.8rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color: var(--brand-ink); margin-bottom: 1rem;
}
.eyebrow::before { content:""; width:22px; height:2px; background:var(--brand); border-radius:2px; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 46ch; }
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.center { text-align:center; margin-left:auto; margin-right:auto; }

/* ---------- Buttons ---------- */
.btn {
  display:inline-flex; align-items:center; gap:.55em; justify-content:center;
  font-weight:600; font-size:.98rem; font-family:inherit;
  padding:.8em 1.35em; border-radius: 999px; border:1px solid transparent;
  cursor:pointer; transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space:nowrap; text-decoration:none;
}
.btn:hover { text-decoration:none; }
.btn-primary { background: var(--brand); color:#fff; box-shadow: 0 6px 18px -6px rgba(91,77,240,.6); }
.btn-primary:hover { background: var(--brand-ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.btn-lg { padding: .95em 1.7em; font-size: 1.04rem; }
.btn svg { width:1.05em; height:1.05em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top:0; z-index:50;
  backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav { display:flex; align-items:center; justify-content:space-between; height:68px; gap:24px; }
.brand { display:flex; align-items:center; gap:.6em; font-weight:700; font-size:1.15rem; letter-spacing:-.02em; color:var(--ink); }
.brand:hover { text-decoration:none; }
.brand .logo { width:30px; height:30px; }
.nav-links { display:flex; align-items:center; gap:28px; list-style:none; margin:0; padding:0; }
.nav-links a { color: var(--ink-soft); font-weight:500; font-size:.96rem; }
.nav-links a:hover { color: var(--brand-ink); text-decoration:none; }
.nav-right { display:flex; align-items:center; gap:14px; }
.theme-toggle {
  display:grid; place-items:center; width:38px; height:38px; border-radius:10px;
  background:transparent; border:1px solid var(--border); color:var(--muted); cursor:pointer;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand-ink); }
.theme-toggle svg { width:18px; height:18px; }
.nav-toggle { display:none; }
.lang-switch { display:inline-flex; align-items:center; background:var(--bg-soft);
  border:1px solid var(--border); border-radius:10px; padding:2px; font-size:.8rem; font-weight:700; letter-spacing:.02em; }
.lang-switch a { color:var(--muted); padding:.3em .62em; border-radius:8px; line-height:1; text-decoration:none; }
.lang-switch a:hover { color:var(--brand-ink); text-decoration:none; }
.lang-switch a[aria-current="true"] { background:var(--brand); color:#fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow:hidden; padding: clamp(48px, 8vw, 92px) 0 clamp(40px, 6vw, 72px); }
.hero::before {
  content:""; position:absolute; inset:-40% -20% auto -20%; height:620px; z-index:0;
  background:
    radial-gradient(60% 60% at 25% 20%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 70%),
    radial-gradient(50% 50% at 85% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  filter: blur(6px); pointer-events:none;
}
.hero-grid { position:relative; z-index:1; display:grid; grid-template-columns: 1.05fr .95fr; gap:56px; align-items:center; }
.hero h1 span { color: var(--brand-ink); }
.hero .lead { max-width: 40ch; margin-bottom: 1.8rem; }
.hero-cta { display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 1.6rem; }
.hero-note { font-size:.9rem; color:var(--muted); display:flex; align-items:center; gap:.5em; }
.hero-note svg { width:1.05em; height:1.05em; color: var(--accent); }

/* Code-Fenster */
.code-window {
  background: var(--code-bg); border-radius: var(--radius); overflow:hidden;
  box-shadow: var(--shadow-lg); border:1px solid rgba(255,255,255,.08);
}
.code-bar { display:flex; align-items:center; gap:7px; padding:12px 16px; border-bottom:1px solid rgba(255,255,255,.07); }
.code-bar .dot { width:11px; height:11px; border-radius:50%; background:#3a3f55; }
.code-bar .dot:nth-child(1){ background:#ff5f57; } .code-bar .dot:nth-child(2){ background:#febc2e; } .code-bar .dot:nth-child(3){ background:#28c840; }
.code-bar .file { margin-left:10px; font-family:var(--font-mono); font-size:.78rem; color:#8b90ab; }
pre.code { margin:0; padding:20px 20px 22px; overflow-x:auto; }
pre.code code { font-family:var(--font-mono); font-size:.86rem; line-height:1.7; color: var(--code-ink); white-space:pre; }
.tok-c  { color:#6b7194; }   /* Kommentar */
.tok-k  { color:#ff7edb; }   /* Keyword/Methode */
.tok-s  { color:#7ee787; }   /* String */
.tok-u  { color:#79c0ff; }   /* URL */
.tok-p  { color:#ffa657; }   /* Property */

/* ---------- Trust-Leiste ---------- */
.trust { border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--bg-soft); }
.trust-row { display:flex; flex-wrap:wrap; gap:14px 36px; justify-content:center; align-items:center; padding:22px 0; }
.trust-item { display:flex; align-items:center; gap:.5em; font-size:.92rem; font-weight:500; color:var(--ink-soft); }
.trust-item svg { width:1.1em; height:1.1em; color:var(--accent); flex:0 0 auto; }

/* ---------- Steps / How it works ---------- */
.steps { display:grid; grid-template-columns: repeat(3,1fr); gap:24px; counter-reset: step; }
.step {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius);
  padding:28px 26px; position:relative; box-shadow:var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  display:grid; place-items:center; width:38px; height:38px; border-radius:11px;
  background:var(--brand-soft); color:var(--brand-ink); font-weight:700; font-size:1.05rem; margin-bottom:16px;
}
.step h3 { margin-bottom:.35em; }
.step p { margin:0; font-size:.98rem; }

/* ---------- Feature-Grid ---------- */
.features { display:grid; grid-template-columns: repeat(3,1fr); gap:22px; }
.feature {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius);
  padding:26px 24px; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature:hover { border-color:var(--border-strong); transform:translateY(-3px); box-shadow:var(--shadow-md); }
.feature .ic {
  display:grid; place-items:center; width:46px; height:46px; border-radius:12px;
  background:linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); margin-bottom:16px;
}
.feature .ic svg { width:23px; height:23px; color:var(--brand-ink); }
.feature h3 { margin-bottom:.4em; font-size:1.1rem; }
.feature p { margin:0; font-size:.96rem; }

/* ---------- Split (Warum EU) ---------- */
.split { display:grid; grid-template-columns: 1fr 1fr; gap:56px; align-items:center; }
.checklist { list-style:none; margin:0; padding:0; display:grid; gap:14px; }
.checklist li { display:flex; gap:.7em; align-items:flex-start; color:var(--ink-soft); }
.checklist li svg { width:1.25em; height:1.25em; color:var(--accent); flex:0 0 auto; margin-top:.15em; }
.checklist li strong { color:var(--ink); }
.panel {
  background:var(--bg-soft); border:1px solid var(--border); border-radius:var(--radius-lg); padding:32px;
}
.panel .kv { display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px dashed var(--border-strong); }
.panel .kv:last-child { border-bottom:0; }
.panel .kv span:first-child { color:var(--muted); font-size:.95rem; }
.panel .kv span:last-child { font-weight:600; font-family:var(--font-mono); font-size:.9rem; color:var(--ink); text-align:right; }

/* ---------- Pricing ---------- */
.pricing { display:grid; grid-template-columns: repeat(3,1fr); gap:24px; align-items:stretch; }
.plan {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:30px 28px; display:flex; flex-direction:column; box-shadow:var(--shadow-sm);
}
.plan.featured { border-color:var(--brand); box-shadow: var(--shadow-lg); position:relative; }
.plan.featured::after {
  content:"Beliebt"; position:absolute; top:-12px; right:24px;
  background:var(--brand); color:#fff; font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  padding:.35em .8em; border-radius:999px;
}
.plan .name { font-weight:700; font-size:1.15rem; }
.plan .desc { font-size:.92rem; color:var(--muted); min-height:2.8em; margin:.3em 0 1.1em; }
.plan .price { font-size:2.5rem; font-weight:800; letter-spacing:-.03em; line-height:1; }
.plan .price small { font-size:.95rem; font-weight:500; color:var(--muted); letter-spacing:0; }
.plan .plist { list-style:none; margin:22px 0 26px; padding:0; display:grid; gap:12px; flex:1; }
.plan .plist li { display:flex; gap:.6em; font-size:.95rem; color:var(--ink-soft); }
.plan .plist li svg { width:1.15em; height:1.15em; color:var(--accent); flex:0 0 auto; margin-top:.15em; }
.plan .btn { width:100%; }
.price-note { text-align:center; color:var(--muted); font-size:.92rem; margin-top:26px; }

/* Monats/Jahres-Umschalter */
.billing-toggle { display:inline-flex; align-items:center; gap:4px; background:var(--bg-soft);
  border:1px solid var(--border); border-radius:999px; padding:4px; margin:0 auto 44px; }
.billing-toggle button {
  font:inherit; font-size:.9rem; font-weight:600; border:0; background:transparent; color:var(--muted);
  padding:.55em 1.2em; border-radius:999px; cursor:pointer; transition:.18s; }
.billing-toggle button.active { background:var(--brand); color:#fff; box-shadow:0 2px 8px -2px rgba(91,77,240,.5); }
.billing-toggle .save { font-size:.72rem; color:var(--accent); font-weight:700; margin-left:.4em; }
.plan .price .per-year { display:none; }
[data-billing="year"] .plan .price .per-month { display:none; }
[data-billing="year"] .plan .price .per-year { display:inline; }

/* Enterprise-Plan schlank */
.plan.enterprise .price { font-size:1.9rem; }

/* ---------- Add-ons ---------- */
.addons { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.addon { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); padding:22px 20px; }
.addon .ap { font-family:var(--font-mono); font-weight:700; font-size:1.3rem; color:var(--brand-ink); }
.addon .au { font-size:.82rem; color:var(--muted); margin-bottom:.6em; }
.addon h4 { margin:.2em 0 .3em; font-size:1rem; }
.addon p { margin:0; font-size:.9rem; color:var(--muted); }

/* ---------- Vergleichstabelle ---------- */
.compare-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--radius-lg); }
table.compare { width:100%; border-collapse:collapse; min-width:680px; font-size:.95rem; }
table.compare th, table.compare td { padding:15px 18px; text-align:center; border-bottom:1px solid var(--border); }
table.compare thead th { background:var(--bg-soft); font-size:.9rem; position:sticky; top:0; }
table.compare thead th.feat-col, table.compare td.feat { text-align:left; color:var(--ink-soft); font-weight:500; }
table.compare thead th strong { display:block; font-size:1.02rem; color:var(--ink); }
table.compare thead th span { font-size:.82rem; color:var(--muted); font-weight:500; }
table.compare tbody tr:last-child td { border-bottom:0; }
table.compare .grp td { background:var(--bg-soft); font-weight:700; font-size:.82rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); text-align:left; }
table.compare .yes { color:var(--accent); font-weight:700; }
table.compare .no { color:var(--border-strong); }
table.compare .val { font-family:var(--font-mono); font-size:.88rem; color:var(--ink); }
table.compare col.highlight, table.compare th.highlight { background:var(--brand-soft); }
table.compare td.highlight { background:color-mix(in srgb, var(--brand-soft) 55%, transparent); }

@media (max-width:760px){ .addons { grid-template-columns:1fr 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width:760px; margin:0 auto; }
.faq details {
  border:1px solid var(--border); border-radius:var(--radius-sm); padding:4px 20px; margin-bottom:12px; background:var(--bg-card);
}
.faq summary { cursor:pointer; font-weight:600; padding:16px 0; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:"+"; font-size:1.4rem; color:var(--brand-ink); font-weight:400; transition:transform .2s; }
.faq details[open] summary::after { transform:rotate(45deg); }
.faq details p { padding-bottom:18px; margin:0; font-size:.98rem; }

/* ---------- CTA-Band ---------- */
.cta-band { position:relative; overflow:hidden; border-radius:var(--radius-lg); padding:clamp(40px,6vw,64px); text-align:center;
  background: linear-gradient(135deg, #4536d6, #5b4df0 55%, #0cae95); color:#fff; box-shadow:var(--shadow-lg); }
.cta-band h2 { color:#fff; }
.cta-band p { color: rgba(255,255,255,.88); max-width:52ch; margin:0 auto 1.6rem; }
.cta-band .btn-primary { background:#fff; color:var(--brand-ink); box-shadow:0 8px 24px -6px rgba(0,0,0,.3); }
.cta-band .btn-primary:hover { background:#f2f1ff; }
.cta-band .btn-ghost { color:#fff; border-color:rgba(255,255,255,.5); }
.cta-band .btn-ghost:hover { background:rgba(255,255,255,.12); border-color:#fff; color:#fff; }

/* ---------- Footer ---------- */
.site-footer { border-top:1px solid var(--border); background:var(--bg-soft); padding:56px 0 40px; }
.foot-grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap:32px; margin-bottom:40px; }
.foot-grid h4 { font-size:.82rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin-bottom:14px; }
.foot-grid ul { list-style:none; margin:0; padding:0; display:grid; gap:9px; }
.foot-grid a { color:var(--ink-soft); font-size:.95rem; }
.foot-grid a:hover { color:var(--brand-ink); }
.foot-brand p { font-size:.95rem; color:var(--muted); max-width:34ch; margin:.8rem 0 0; }
.foot-bottom { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap;
  border-top:1px solid var(--border); padding-top:24px; font-size:.9rem; color:var(--muted); }

/* ---------- Legal (Impressum / Datenschutz) ---------- */
.legal { max-width:760px; }
.legal h1 { font-size:clamp(1.9rem,4vw,2.5rem); margin-bottom:.6em; }
.legal h2 { font-size:1.3rem; margin-top:2em; }
.legal p, .legal li { color:var(--ink-soft); }
.legal .todo { background:var(--accent-soft); border:1px dashed var(--accent); color:var(--ink);
  padding:.15em .5em; border-radius:6px; font-weight:600; font-size:.92em; }
.legal table { border-collapse:collapse; width:100%; margin:1em 0; }
.legal td { border-bottom:1px solid var(--border); padding:10px 8px; vertical-align:top; }
.legal td:first-child { color:var(--muted); width:40%; }
.back-link { display:inline-flex; align-items:center; gap:.4em; font-weight:600; margin-bottom:28px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns:1fr; gap:36px; }
  .hero .code-window { order:2; }
  .split { grid-template-columns:1fr; gap:36px; }
  .foot-grid { grid-template-columns:1fr 1fr; gap:28px; }
}
@media (max-width: 760px) {
  body { font-size:16px; }
  .nav-links { display:none; }
  .steps, .features, .pricing { grid-template-columns:1fr; }
  .foot-grid { grid-template-columns:1fr; }
  .plan.featured { order:-1; }
  .hero-cta .btn, .cta-band .btn { width:100%; }
}
