:root {
  --bg: #fbfaf7;
  --bg-alt: #f1efe9;
  --surface: #ffffff;
  --text: #1c2321;
  --muted: #56615e;
  --line: #e2ded5;
  --brand: #0f5e5a;
  --brand-strong: #0a4542;
  --brand-soft: #e3f0ee;
  --accent: #f2a541;
  --ok: #2f7d4f;
  --warn: #a6620c;
  --bubble-in: #ffffff;
  --bubble-out: #dcefe9;
  --chat-bg: #ece7dd;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 30, 28, 0.10);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111615;
    --bg-alt: #161d1c;
    --surface: #1b2322;
    --text: #e8ecea;
    --muted: #a3b0ac;
    --line: #2b3533;
    --brand: #4fb3a9;
    --brand-strong: #7fd0c7;
    --brand-soft: #1d3330;
    --accent: #f2b45e;
    --ok: #6cc08e;
    --warn: #e0a656;
    --bubble-in: #232d2c;
    --bubble-out: #1f3d38;
    --chat-bg: #151b1a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--brand-strong); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:not(.btn):hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600; text-decoration: none;
  border: 1px solid var(--brand); transition: background 0.15s;
}
.btn:hover { background: var(--brand-strong); color: #fff; }
.btn-small { padding: 7px 16px; font-size: 0.92rem; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-strong); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn:not(.btn-ghost) { color: #0c1413; }
}

/* Hero */
.hero { padding: 64px 0 48px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0 0 0.8rem; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.6rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Phone mockup */
.phone {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; max-width: 380px; justify-self: center; width: 100%;
}
.phone-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #0f5e5a; color: #fff; }
.phone-bar small { display: block; opacity: 0.8; font-size: 0.75rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #2b1d05; display: grid; place-items: center; font-weight: 700; }
.chat { background: var(--chat-bg); padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { margin: 0; max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 0.93rem; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }
.msg.in { background: var(--bubble-in); align-self: flex-start; border-top-left-radius: 4px; }
.msg.out { background: var(--bubble-out); align-self: flex-end; border-top-right-radius: 4px; }
.tag { display: block; font-size: 0.7rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.tag-human { color: var(--warn); }
.ticks { display: block; text-align: right; color: #3b8fd6; font-size: 0.75rem; letter-spacing: -2px; }
.phone figcaption { padding: 10px 16px; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* Facts strip */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 24px; }
.facts strong { display: block; }
.facts span { color: var(--muted); font-size: 0.95rem; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); font-size: 1.08rem; max-width: 720px; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 12px;
}
.steps p { margin: 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 2rem; }
.cards article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.cards p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 1.5rem; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.box p { margin: 0; color: var(--muted); }
.box ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.box li + li { margin-top: 6px; }
.box-ok h3 { color: var(--ok); }
.box-warn h3 { color: var(--warn); }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 0.6rem 0 0; }

.section-cta { background: var(--brand-soft); }

/* Legal pages */
.legal { padding-top: 56px; padding-bottom: 72px; }
.legal h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.legal p, .legal li { color: var(--text); }
.legal li + li { margin-top: 6px; }
.updated { color: var(--muted); font-size: 0.9rem; margin-top: -0.4rem; }
.small { font-size: 0.88rem; color: var(--muted) !important; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 24px; font-size: 0.92rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0 0 4px; }
.footer-brand { font-weight: 700; color: var(--text); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-legal { margin-top: 24px; font-size: 0.8rem; }

@media (max-width: 860px) {
  .hero-inner, .two-col { grid-template-columns: 1fr; }
  .steps, .cards { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; gap: 12px; }
  .site-header nav a:not(.btn) { display: none; }
  .hero { padding-top: 40px; }
  .section { padding: 56px 0; }
}
