/* mgchat.nl — gedeelde stijlen. Geen externe fonts of bronnen. */

:root {
  color-scheme: light dark;

  --bg: #F4F7F6;
  --surface: #FFFFFF;
  --ink: #10211D;
  --muted: #4B5D57;
  --line: #D6E0DC;
  --accent: #0B6B58;
  --accent-hover: #08594A;
  --accent-ink: #FFFFFF;
  --accent-soft: #DDEDE7;
  --notice-bg: #FFF4D6;
  --notice-ink: #5A4300;

  /* mockup */
  --m-bezel: #1A2925;
  --m-screen: #EEF3F1;
  --m-bar: #FFFFFF;
  --m-in: #FFFFFF;
  --m-in-line: #DCE5E1;
  --m-pill: #DDEDE7;

  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 66ch;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1513;
    --surface: #13201D;
    --ink: #E3ECE9;
    --muted: #9DB1AB;
    --line: #243631;
    --accent: #4FC4A6;
    --accent-hover: #6CD3B8;
    --accent-ink: #06231C;
    --accent-soft: #163731;
    --notice-bg: #3A2F0E;
    --notice-ink: #F6DE9A;

    --m-bezel: #2B3D38;
    --m-screen: #0F1A18;
    --m-bar: #16241F;
    --m-in: #1D2E2A;
    --m-in-line: #2A3F3A;
    --m-pill: #163731;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

/* ---------- header ---------- */

.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em;
}
.brand img { width: 30px; height: 30px; }

.nav { display: flex; align-items: center; gap: 20px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; font-size: 1rem;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { background: var(--accent-soft); }

/* ---------- hero ---------- */

.hero { padding: clamp(24px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 12ch;
}
.hero .lead {
  margin: 24px 0 32px;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 44ch;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 340px);
}
.hero-art::before {
  content: "";
  position: absolute; inset: 8% -14% 6% -14%;
  background: var(--accent-soft);
  border-radius: 48% 52% 44% 56% / 52% 46% 54% 48%;
  z-index: -1;
}
.hero-art svg { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(16, 33, 29, 0.18)); }

/* ---------- mockup classes ---------- */

.mk-bezel { fill: var(--m-bezel); }
.mk-screen { fill: var(--m-screen); }
.mk-bar { fill: var(--m-bar); }
.mk-rule { stroke: var(--m-in-line); stroke-width: 1; }
.mk-in { fill: var(--m-in); stroke: var(--m-in-line); stroke-width: 1; }
.mk-out { fill: var(--accent); }
.mk-pill { fill: var(--m-pill); }
.mk-ink { fill: var(--ink); }
.mk-muted { fill: var(--muted); }
.mk-accent { fill: var(--accent); }
.mk-on-accent { fill: var(--accent-ink); }
.mk-stroke-accent { stroke: var(--accent); fill: none; }
.mk-stroke-on-accent { stroke: var(--accent-ink); fill: none; }
.mk-stroke-muted { stroke: var(--muted); fill: none; }
.mk-t { font-family: var(--font-body); }
.mk-h { font-family: var(--font-display); font-weight: 700; }

/* ---------- sections ---------- */

.section { padding: clamp(56px, 9vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head { max-width: 40rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.125rem; }

.features {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 56px);
}
.features li { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto 1fr; gap: 0 14px; align-content: start; }
.features .ico {
  grid-row: 1 / 3; align-self: start;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.features .ico svg { width: 22px; height: 22px; }
.features h3 { font-size: 1.15rem; font-weight: 700; margin: 8px 0 6px; }
.features p { color: var(--muted); margin: 0; font-size: 1rem; }
.features .later h3::after {
  content: "later";
  margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600;
  background: var(--line); color: var(--muted); vertical-align: 2px;
}

/* platforms */
.platforms {
  margin-top: clamp(48px, 7vw, 80px);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px;
  padding: 24px clamp(20px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.platforms p { margin: 0; }
.platforms strong { font-family: var(--font-display); font-size: 1.1rem; }
.platforms ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.platforms li {
  font-size: 0.9rem; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.platforms li.now { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* privacy */
.flow {
  list-style: none; margin: 0 0 clamp(40px, 6vw, 64px); padding: 0;
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px;
}
.flow li.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px;
}
.flow li.step.server { border-style: dashed; background: transparent; }
.flow .who { font-weight: 600; font-size: 0.95rem; color: var(--muted); margin-bottom: 12px; display: block; }
.flow .msg {
  display: inline-block; padding: 10px 14px; border-radius: 16px; font-size: 0.98rem; line-height: 1.4;
}
.flow .msg.plain { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.flow .msg.plain.in { background: var(--m-in); color: var(--ink); border: 1px solid var(--m-in-line); border-bottom-left-radius: 4px; border-bottom-right-radius: 16px; }
.flow .msg.cipher {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85rem;
  color: var(--muted); background: var(--bg); border: 1px dashed var(--line);
  word-break: break-all;
}
.flow .note { display: block; margin-top: 12px; font-size: 0.92rem; color: var(--muted); }
.flow .arrow { align-self: center; color: var(--muted); }
.flow .arrow svg { width: 28px; height: 28px; }

.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.ledger h3 { font-size: 1.2rem; margin-bottom: 14px; }
.ledger ul { margin: 0; padding: 0; list-style: none; }
.ledger li { padding: 10px 0 10px 30px; border-top: 1px solid var(--line); position: relative; color: var(--muted); }
.ledger li strong { color: var(--ink); font-weight: 600; }
.ledger li::before {
  content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 12px; border-radius: 50%;
}
.ledger .cannot li::before { background: var(--accent); }
.ledger .can li::before { border: 2px solid var(--muted); }

.tech { margin-top: clamp(32px, 5vw, 48px); color: var(--muted); max-width: var(--measure); font-size: 0.98rem; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }

/* ---------- legal pages ---------- */

.legal { padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.legal .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.concept {
  display: inline-block; margin: 0 0 24px; padding: 6px 12px; border-radius: 8px;
  background: var(--notice-bg); color: var(--notice-ink); font-size: 0.9rem; font-weight: 600;
}
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.025em; }
.legal .meta { color: var(--muted); margin-top: 10px; }
.legal h2 { font-size: 1.35rem; margin: 2.2em 0 0.6em; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.4em; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 0.97rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
.legal th { font-weight: 600; }
.legal thead th { border-top: 0; color: var(--muted); font-size: 0.9rem; }
.ph { background: var(--notice-bg); color: var(--notice-ink); padding: 0 4px; border-radius: 4px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { width: min(78%, 300px); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { justify-self: center; transform: rotate(90deg); }
}

@media (max-width: 600px) {
  .nav .hide-sm { display: none; }
  .features { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { display: none; }
  .legal tr { border-top: 1px solid var(--line); padding: 8px 0; }
  .legal th, .legal td { border: 0; padding: 2px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
