/* Chatmere — static marketing + legal site
   No external dependencies (no CDN, no web fonts, no JS).
   Brand palette taken from the app design tokens:
   calm accessible blue #1B4D7A, deep #003366, light #8FB8E0. */

:root {
  --brand:        #1B4D7A;
  --brand-deep:   #003366;
  --brand-light:  #8FB8E0;
  --brand-tint:   #eef4fa;
  --ink:          #1a2230;
  --ink-soft:     #45516a;
  --line:         #dbe3ee;
  --bg:           #ffffff;
  --bg-alt:       #f6f9fc;
  --ok:           #1f7a4d;
  --radius:       14px;
  --maxw:         960px;
  --shadow:       0 1px 2px rgba(16, 38, 66, .06), 0 10px 30px rgba(16, 38, 66, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; color: var(--brand-deep); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -.01em; margin: 0 0 .4em; }
h2 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.18rem; margin: 1.6em 0 .4em; color: var(--ink); }

p { margin: 0 0 1em; color: var(--ink-soft); }
strong { color: var(--ink); }

a { color: var(--brand); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-deep); color: #fff; padding: 10px 16px; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-weight: 700; font-size: 1.2rem; color: var(--brand-deep);
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: inline-grid; place-items: center;
}
.nav { display: flex; gap: 6px 4px; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--ink-soft); padding: 7px 12px; border-radius: 8px; font-size: .98rem;
}
.nav a:hover { background: var(--brand-tint); color: var(--brand-deep); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand-deep); font-weight: 600; background: var(--brand-tint); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 480px at 78% -12%, rgba(143, 184, 224, .35), transparent 60%),
    linear-gradient(180deg, var(--brand-tint), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 64px 0 56px;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand); background: #fff; border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero p.lead { font-size: 1.22rem; color: var(--ink-soft); max-width: 38ch; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand-deep); color: #fff; }
.btn-primary:hover { background: #022a55; text-decoration: none; }
.btn-ghost { background: #fff; color: var(--brand-deep); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-light); text-decoration: none; }

/* ---------- Sections ---------- */
section { padding: 8px 0; }
.section-pad { padding: 52px 0; }
.bg-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { max-width: 60ch; }

/* ---------- Feature grid ---------- */
.grid {
  display: grid; gap: 20px; margin-top: 28px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; }
.card .ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--brand-tint); color: var(--brand-deep);
  display: inline-grid; place-items: center; margin-bottom: 14px;
}
.card .ico svg { width: 22px; height: 22px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .num {
  counter-increment: step;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-deep); color: #fff; font-weight: 700;
  display: grid; place-items: center; margin-bottom: 12px;
}
.step .num::before { content: counter(step); }
.step h3 { margin-top: 0; }
.step p { margin-bottom: 0; }

/* ---------- Legal / prose pages ---------- */
.legal { padding: 48px 0 64px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal .updated { color: var(--ink-soft); font-size: .95rem; margin-top: -.4em; }
.legal h2 { font-size: 1.35rem; }
.legal ul, .legal ol { color: var(--ink-soft); padding-left: 1.3em; }
.legal li { margin-bottom: .45em; }
.legal table {
  width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .96rem;
}
.legal th, .legal td {
  text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top;
}
.legal th { background: var(--brand-tint); color: var(--brand-deep); }

.callout {
  background: var(--brand-tint); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: 10px;
  padding: 16px 18px; margin: 1.4em 0; color: var(--ink);
}
.callout p:last-child { margin-bottom: 0; }

.toc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; margin: 22px 0 8px;
}
.toc strong { display: block; margin-bottom: 8px; color: var(--brand-deep); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc a { color: var(--ink-soft); }

.contact-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); margin-top: 22px;
}
.contact-box .email { font-size: 1.2rem; font-weight: 600; color: var(--brand-deep); }

/* ---------- FAQ ---------- */
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 18px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--brand-deep);
  padding: 14px 0; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 1.3rem; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding-top: 12px; }
.faq details p:last-child { padding-bottom: 8px; margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-deep); color: #cfe0f1;
  padding: 44px 0 36px; margin-top: 60px;
}
.site-footer a { color: #fff; }
.site-footer .cols {
  display: flex; flex-wrap: wrap; gap: 30px 48px; justify-content: space-between;
}
.site-footer .brand { color: #fff; }
.site-footer nav { display: flex; flex-direction: column; gap: 9px; }
.site-footer nav strong { color: #9bbbdc; font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.site-footer .legal-line {
  border-top: 1px solid rgba(255, 255, 255, .14);
  margin-top: 30px; padding-top: 20px; font-size: .9rem; color: #aecbe8;
}
.site-footer .legal-line p { color: #aecbe8; margin: 0; }

/* ---------- Brand mark image ---------- */
.mark img { width: 30px; height: 30px; display: block; border-radius: 7px; }

/* ---------- Supported messengers ---------- */
.messengers {
  display: grid; gap: 18px; margin-top: 30px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.messenger {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 22px; text-align: center; box-shadow: var(--shadow);
}
.messenger img { width: 60px; height: 60px; border-radius: 15px; }
.messenger h3 { margin: 16px 0 .3em; color: var(--brand-deep); }
.messenger p { margin-bottom: 0; font-size: .96rem; }
.messengers-more { margin-top: 20px; text-align: center; }

/* ---------- KI / AI USP spotlight ---------- */
.usp {
  background:
    radial-gradient(900px 360px at 85% -20%, rgba(143, 184, 224, .28), transparent 60%),
    var(--brand-deep);
  color: #eaf2fb;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.usp .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: #bcd6f0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.usp .eyebrow svg { width: 14px; height: 14px; }
.usp h2 { color: #fff; margin-top: .2em; }
.usp .section-lead { color: #c8dcef; max-width: 60ch; }
.usp .ai-grid {
  display: grid; gap: 18px; margin-top: 30px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.usp .ai-card {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 24px;
}
.usp .ai-card h3 { color: #fff; margin-top: 0; }
.usp .ai-card p { color: #c8dcef; margin-bottom: 0; }
.usp .ai-card .ico {
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(255, 255, 255, .12); color: #fff;
  display: inline-grid; place-items: center; margin-bottom: 14px;
}
.usp .ai-card .ico svg { width: 22px; height: 22px; }
.usp .pill {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  color: #eaf2fb; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.usp .pill svg { width: 16px; height: 16px; }

/* ---------- Tabs (CSS-only, no JS) ---------- */
.tabs > input[type="radio"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tablist {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 1px solid var(--line); margin: 24px 0 0;
}
.tablist label {
  padding: 11px 18px; border-radius: 10px 10px 0 0; cursor: pointer;
  font-weight: 600; font-size: .98rem; color: var(--ink-soft);
  border: 1px solid transparent; border-bottom: none; margin-bottom: -1px;
  white-space: nowrap;
}
.tablist label:hover { background: var(--brand-tint); color: var(--brand-deep); }
.tabs > .tabpanel { display: none; }
.tabs > .tabpanel > h2:first-child,
.tabs > .tabpanel > h3:first-child { margin-top: 1.2em; }

#tab-overview:checked   ~ .tablist label[for="tab-overview"],
#tab-blocks:checked     ~ .tablist label[for="tab-blocks"],
#tab-flows:checked      ~ .tablist label[for="tab-flows"],
#tab-visibility:checked ~ .tablist label[for="tab-visibility"] {
  color: var(--brand-deep); background: #fff;
  border-color: var(--line); border-bottom-color: #fff;
}
#tab-overview:checked   ~ #panel-overview,
#tab-blocks:checked     ~ #panel-blocks,
#tab-flows:checked      ~ #panel-flows,
#tab-visibility:checked ~ #panel-visibility { display: block; }

.tabs > input[type="radio"]:focus-visible ~ .tablist label[for="tab-overview"] { outline: 3px solid var(--brand-light); outline-offset: 2px; }

/* ---------- Architecture diagram ---------- */
figure.diagram {
  margin: 28px 0 8px; padding: 16px 16px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
figure.diagram svg { width: 100%; height: auto; display: block; }
figure.diagram figcaption {
  color: var(--ink-soft); font-size: .9rem; margin-top: 12px; text-align: center;
}
.legend {
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center;
  margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-soft);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 24px; border-top: 3px solid; display: inline-block; }

/* ---------- Transparency banner (home) ---------- */
.band-cta { text-align: center; }
.band-cta .btn { margin-top: 8px; }

/* ---------- Misc ---------- */
.muted { color: var(--ink-soft); }
hr.soft { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.tag {
  display: inline-block; font-size: .78rem; font-weight: 600; color: var(--ok);
  background: #e7f4ec; border: 1px solid #cdebd9; padding: 3px 10px; border-radius: 999px;
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero { padding: 46px 0 40px; }
  .nav { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
