/* Лёд Онлайн — базовые стили. Без внешних шрифтов и зависимостей. */

:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f0f9ff;
  --bg-elevated: #ffffff;
  --bg-soft: #e0f2fe;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #bae6fd;
  --border-strong: #7dd3fc;
  --accent: #0284c7;
  --accent-strong: #0369a1;
  --accent-soft: #e0f2fe;
  --accent-contrast: #ffffff;
  --shadow: 0 10px 30px -18px rgba(2, 132, 199, 0.55);

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1080px;
  --space: clamp(1rem, 2.5vw, 1.75rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1320;
    --bg-elevated: #0f172a;
    --bg-soft: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --border-strong: #334155;
    --accent: #38bdf8;
    --accent-strong: #7dd3fc;
    --accent-soft: #12283c;
    --accent-contrast: #0b1320;
    --shadow: 0 10px 30px -18px rgba(56, 189, 248, 0.35);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

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

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1rem;
  z-index: 10;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Шапка и навигация ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.75rem;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img, .brand svg { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.15rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Секции ---------- */

main { display: block; }

.section { padding-block: clamp(2rem, 6vw, 4rem); }
.section + .section { border-top: 1px solid var(--border); }

.hero {
  padding-block: clamp(2.5rem, 8vw, 5rem);
  background:
    radial-gradient(60% 60% at 85% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(45% 45% at 5% 90%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 820px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin: 0 0 1rem;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.9rem, 5.5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2.2vw, 1.25rem); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  color: var(--text-muted);
  max-width: 60ch;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }

/* ---------- Кнопки ---------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-contrast); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-soft); color: var(--text); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn[aria-disabled="true"],
.btn.is-placeholder {
  cursor: default;
  opacity: 0.9;
}

/* ---------- Карточки и сетки ---------- */

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.85rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1.2rem;
  line-height: 1;
}

/* ---------- Шаги ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.step {
  position: relative;
  counter-increment: step;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem 1.2rem;
}
.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-bottom: 0.7rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  font-size: 0.9rem;
}
.step h3 { font-size: 1.02rem; }
.step p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }

/* ---------- Списки ---------- */

.list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
}
.list li { margin-bottom: 0.4rem; }
.list li::marker { color: var(--accent); }

.list-plain { list-style: none; padding-left: 0; }
.list-plain li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.55rem;
}
.list-plain li::before {
  content: "❄";
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 0.9em;
  line-height: 1.7;
}

/* ---------- Плашки-плейсхолдеры и акценты ---------- */

.placeholder {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  white-space: normal;
}

.note {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.94rem;
}
.note strong { color: var(--accent-strong); }
.note > :last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-strong);
  vertical-align: middle;
}

/* ---------- Hero-иллюстрация ---------- */

.hero-art {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  background:
    radial-gradient(70% 70% at 50% 30%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 75%),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}
.hero-art img, .hero-art svg { width: min(240px, 60%); }

/* ---------- Правовые документы ---------- */

.doc {
  max-width: 78ch;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.doc h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.doc h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.doc h2:first-of-type { border-top: 0; }
.doc h3 { font-size: 1.05rem; margin-top: 1.4rem; }

.doc .doc-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.doc ol, .doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.5rem; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}
.doc th, .doc td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.doc th { background: var(--bg-soft); font-weight: 600; }

.toc {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.93rem;
}
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.25rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ---------- Футер ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-block: 2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-grid h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

.footer-bottom {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.83rem;
}

/* ---------- Мобильная адаптивность от 360px ---------- */

@media (max-width: 479px) {
  :root { --space: 1rem; }
  .nav { gap: 0.5rem; }
  .nav-links { gap: 0.15rem 0.85rem; font-size: 0.9rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .card, .step { border-radius: var(--radius-sm); }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .btn-row { display: none; }
  body { background: #fff; color: #000; }
  .card, .note { box-shadow: none; }
}
