/* Design Plugs — спільні стилі для всіх сторінок сайту. */

:root {
  color-scheme: light dark;
  --bg: #fbfaf8;
  --panel: #ffffff;
  --ink: #171412;
  --muted: #6b6560;
  --line: #e7e2dc;
  --accent: #b2432a;
  --accent-ink: #ffffff;
  --radius: 14px;
  --maxw: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15130f;
    --panel: #1e1b17;
    --ink: #f2ede6;
    --muted: #a09890;
    --line: #322d27;
    --accent: #e4714f;
    --accent-ink: #1a1512;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

/* шапка */

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand .mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent);
  display: inline-block;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 15px;
}

nav.site a:hover { color: var(--ink); }

/* типографіка */

h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; }
h2 { font-size: clamp(21px, 3vw, 26px); line-height: 1.25; letter-spacing: -0.01em; margin: 44px 0 12px; }
h3 { font-size: 17px; margin: 26px 0 8px; }
p  { margin: 0 0 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
small, .small { font-size: 14px; color: var(--muted); }

main { padding: 48px 0 72px; }

ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin: 6px 0; }

hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn:hover { filter: brightness(1.06); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btns { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 0; }

/* картки */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 24px 0 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 10px;
}

/* ціни */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 16px;
  margin: 24px 0 12px;
  /* на широкому екрані чотири тарифи стають в один ряд, виходячи за колонку тексту */
  width: min(1120px, calc(100vw - 32px));
  margin-inline: calc(50% - min(560px, (100vw - 32px) / 2));
}

.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.plan.featured { border-color: var(--accent); }

.plan .name { font-weight: 650; }
.plan .price { font-size: 30px; font-weight: 680; letter-spacing: -0.02em; margin: 8px 0 2px; }
.plan .per { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; font-size: 15px; }
.plan ul li { padding-left: 20px; position: relative; }
.plan ul li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.plan .btn { margin-top: auto; }

/* FAQ */

details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; color: var(--accent); }
details[open] summary::before { content: "– "; }
details p { margin: 10px 0 0; color: var(--muted); }

/* юридичні сторінки */

.legal { max-width: 68ch; }
.legal h2 { font-size: 19px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 15px; }
.legal .updated { font-size: 14px; color: var(--muted); margin-bottom: 30px; }

/* підвал */

footer.site {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 26px 0;
  font-size: 14px;
  color: var(--muted);
}

footer.site .wrap { display: flex; gap: 18px 24px; flex-wrap: wrap; justify-content: space-between; }
footer.site a { color: var(--muted); text-decoration: none; margin-right: 16px; }
footer.site a:hover { color: var(--ink); }
