/* Acktide — публичный сайт. Палитра совпадает с консолью (web/src/styles.css). */
:root {
  --navy: #14213d;
  --ink: #202d40;
  --muted: #64707f;
  --line: #e2e8ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --accent: #2f5d8a;
  --accent-soft: #e8f0f8;
  --sky: #b6d7f2;
  --green: #16803a;
  --amber: #b45309;
  --red: #b91c1c;
  --radius: 10px;
  --maxw: 1080px;
  --gap: clamp(3rem, 7vw, 5.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #0e1729;
    --ink: #e6ecf3;
    --muted: #94a2b4;
    --line: #22303f;
    --bg: #0b1220;
    --bg-soft: #111b2b;
    --accent: #8bb8e0;
    --accent-soft: #16263a;
    --sky: #b6d7f2;
    --green: #4ade80;
    --amber: #fbbf24;
    --red: #f87171;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

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

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  font-weight: 650;
}

h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
}

h3 {
  font-size: 1.12rem;
  font-weight: 620;
}

p {
  margin: 0 0 1em;
}

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

/* ── Шапка ───────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
}

.brand svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  align-items: center;
  font-size: 0.94rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.nav a.is-cta {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
}

@media (max-width: 760px) {
  .nav a.hide-sm {
    display: none;
  }
}

/* ── Секции ──────────────────────────────────────────── */
section {
  padding-block: var(--gap);
  border-top: 1px solid var(--line);
}

section.plain {
  border-top: 0;
}

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

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: var(--muted);
  max-width: 62ch;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* ── Первый экран ────────────────────────────────────── */
.hero {
  padding-block: clamp(3.5rem, 8vw, 6rem) var(--gap);
  border-top: 0;
}

.hero h1 {
  max-width: 17ch;
}

.hero .lede {
  max-width: 58ch;
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  color: var(--ink);
  opacity: 0.82;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  font-weight: 560;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary {
    background: var(--sky);
    color: #0b1220;
  }
}

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

.fineprint {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1.1rem;
}

/* ── Сетки ───────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg);
}

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

.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 1rem;
}

/* ── Таблицы ─────────────────────────────────────────── */
.table-scroll {
  overflow-x: auto;
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  background: var(--bg-soft);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td.yes {
  color: var(--green);
  font-weight: 560;
}

td.no {
  color: var(--muted);
}

/* ── Шаги ────────────────────────────────────────────── */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.1rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 1rem;
  align-items: start;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 620;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .steps li::before {
    background: var(--accent-soft);
    color: var(--accent);
  }
}

.steps strong {
  grid-column: 2;
  font-weight: 600;
}

.steps span {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ── Код ─────────────────────────────────────────────── */
pre {
  background: var(--navy);
  color: #dbe7f3;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 1.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

:not(pre) > code {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

/* ── Цитата-врезка ───────────────────────────────────── */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ── Тарифы ──────────────────────────────────────────── */
.plans {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  margin-top: 2.5rem;
  align-items: stretch;
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--bg);
}

.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.plan h2,
.plan h3 {
  margin-bottom: 0.2rem;
  font-size: 1.4rem;
}

.plan .price {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.plan .price small {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.15rem;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.5rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.96rem;
}

.plan li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--muted);
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

.plan .btn {
  margin-top: auto;
  justify-content: center;
}

/* ── Списки границ ───────────────────────────────────── */
.check {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.7rem;
}

.check li {
  padding-left: 1.7rem;
  position: relative;
}

.check li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.check.has li::before {
  content: "✓";
  color: var(--green);
}

.check.hasnt li::before {
  content: "—";
  color: var(--muted);
}

/* ── Подвал ──────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 4rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.foot-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

footer h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 0 0 0.9rem;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.colophon {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.88rem;
}
