:root {
  --brand: #406868;
  --brand-deep: #2f4f50;
  --brand-soft: #5a8588;
  --accent: #e09860;
  --accent-deep: #c4783e;
  --ink: #24383a;
  --muted: #5f7376;
  --line: #d5e0e1;
  --bg: #f4f7f6;
  --bg-warm: #faf6f1;
  --surface: #ffffff;
  --danger: #b7433a;
  --ok: #2f7a55;
  --radius: 10px;
  --shadow: 0 12px 40px rgba(64, 104, 104, 0.08);
  --font-display: "Instrument Serif", "Times New Roman", Georgia, serif;
  --font: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 55% at 85% -10%, rgba(224, 152, 96, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at -10% 20%, rgba(64, 104, 104, 0.1), transparent 50%),
    linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 48%, #eef3f2 100%);
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--accent-deep); }

.wrap {
  width: min(1040px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(64, 104, 104, 0.12);
  background: rgba(250, 246, 241, 0.88);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.brand-logo.lg {
  height: 48px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 560;
}
.nav a:hover { color: var(--brand-deep); }

.inline { display: inline; margin: 0; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 560;
  padding: 0;
}
.link-btn:hover { color: var(--brand-deep); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--radius);
  padding: 0.78rem 1.35rem;
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.btn.primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(64, 104, 104, 0.22);
}
.btn.primary:hover {
  background: var(--brand-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.accent {
  background: var(--accent);
  color: #2a241c;
  box-shadow: 0 8px 24px rgba(224, 152, 96, 0.28);
}
.btn.accent:hover {
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid rgba(64, 104, 104, 0.28);
  box-shadow: none;
}
.btn.ghost:hover {
  border-color: var(--brand);
  background: rgba(64, 104, 104, 0.06);
  color: var(--brand-deep);
  text-decoration: none;
}

.btn.small { padding: 0.48rem 0.95rem; font-size: 0.88rem; }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 35% auto auto;
  width: min(520px, 70vw);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at center, rgba(224, 152, 96, 0.22) 0%, transparent 58%),
    repeating-conic-gradient(from 0deg, rgba(224, 152, 96, 0.12) 0deg 8deg, transparent 8deg 45deg);
  border-radius: 50%;
  opacity: 0.55;
  animation: sun-drift 28s linear infinite;
  pointer-events: none;
}

@keyframes sun-drift {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 1.25rem;
  max-width: 40rem;
  animation: rise 0.8s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero-logo {
  height: clamp(42px, 7vw, 58px);
  width: auto;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.8vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.section {
  padding: 2.75rem 0;
}

.section h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.55rem, 3vw, 2rem);
  color: var(--brand-deep);
}

.section-lead {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 48ch;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.service-item {
  padding: 1.35rem 1.25rem 1.35rem 0;
  border-bottom: 1px solid var(--line);
  animation: rise 0.7s var(--ease) both;
}
.service-item:nth-child(1) { animation-delay: 0.05s; }
.service-item:nth-child(2) { animation-delay: 0.12s; }
.service-item:nth-child(3) { animation-delay: 0.18s; }
.service-item:nth-child(4) { animation-delay: 0.24s; }

.service-item:nth-child(odd) {
  padding-right: 1.5rem;
  border-right: 1px solid var(--line);
}
.service-item:nth-child(even) {
  padding-left: 1.5rem;
}

.service-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.service-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.knowledge {
  padding-bottom: 1rem;
}

.subscribe-promo {
  padding: 1rem 0 4rem;
}

.promo-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.75rem 1.9rem;
  background: linear-gradient(135deg, rgba(64, 104, 104, 0.08), rgba(224, 152, 96, 0.12));
  border: 1px solid rgba(64, 104, 104, 0.14);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.promo-inner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 152, 96, 0.35), transparent 70%);
  pointer-events: none;
}

.promo-inner h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.55rem;
  color: var(--brand-deep);
}

.promo-inner p {
  margin: 0;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.price-line {
  margin-top: 0.85rem !important;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.price-line .price {
  font-family: var(--font-display);
  font-size: 2.35rem;
  color: var(--brand-deep);
  line-height: 1;
}

.price-line .currency {
  color: var(--muted);
  font-size: 1rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.35);
}

.site-footer a { color: var(--brand-soft); }
.site-footer .muted { margin: 0.35rem 0 0; }

.auth {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem;
}

.auth-card,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(420px, 100%);
  padding: 2rem 1.75rem;
}

.subscribe-card { width: min(480px, 100%); }

.brand-block {
  text-align: center;
  margin-bottom: 1.5rem;
}
.brand-block h1 {
  margin: 0.9rem 0 0.3rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.85rem;
  color: var(--brand-deep);
}
.brand-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"] {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input:focus {
  outline: none;
  border-color: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(64, 104, 104, 0.15);
}

label.check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
}
label.check input { margin-top: 0.25rem; }

.alert {
  background: rgba(183, 67, 58, 0.08);
  border: 1px solid rgba(183, 67, 58, 0.28);
  color: #8f2f28;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.ok {
  background: rgba(47, 122, 85, 0.1);
  border: 1px solid rgba(47, 122, 85, 0.28);
  color: var(--ok);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.muted { color: var(--muted); font-size: 0.9rem; }

.page {
  flex: 1;
  padding: 2.5rem 0 3.5rem;
}

.page h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--brand-deep);
}

.article-group { margin-bottom: 2rem; }

.article-group h2 {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 0.75rem;
  font-family: var(--font);
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.article-list li {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 0;
}

.article-list a {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.article-list a:hover strong { color: var(--brand); }

.article-list strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.article-list span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.article-list time {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-soft);
  margin-top: 0.35rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.meta { color: var(--muted); font-size: 0.9rem; }

.article-body .content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 1.8rem;
  margin-top: 1.1rem;
  box-shadow: var(--shadow);
}

.article-body .content h2,
.article-body .content h3 {
  margin-top: 1.55rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--brand-deep);
}

.article-body .content p,
.article-body .content ul,
.article-body .content ol,
.article-body .content li,
.article-body .content td,
.article-body .content th {
  color: var(--muted);
}

.article-body .content strong { color: var(--ink); }

.article-body .content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.article-body .content th,
.article-body .content td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.4rem;
  text-align: left;
  vertical-align: top;
}
.article-body .content th { color: var(--brand-deep); }

.article-body .content code,
.article-body .content pre {
  background: #eef3f2;
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
}
.article-body .content pre {
  padding: 1rem;
  overflow-x: auto;
}
.article-body .content code {
  padding: 0.12rem 0.35rem;
}
.article-body .content blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(224, 152, 96, 0.1);
  color: var(--ink);
}

.legal-card {
  padding: 1.6rem 1.8rem;
  margin-top: 1rem;
}
.legal-card h2 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--brand-deep);
}
.legal-card p,
.legal-card li { color: var(--muted); }

.requisites {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.requisites li { margin: 0.25rem 0; }

.footer-contacts {
  margin: 0.35rem 0 0.5rem;
}
.footer-max {
  font-weight: 600;
  color: var(--brand);
}
.footer-max:hover {
  color: var(--accent);
}

.max-bot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.max-bot-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(64, 104, 104, 0.06);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.max-bot-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.max-bot-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: rgba(64, 104, 104, 0.1);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.max-bot-action {
  margin-top: 0.35rem;
  font-weight: 600;
  color: var(--accent);
}

.support-max {
  background: linear-gradient(180deg, rgba(224, 152, 96, 0.06), transparent 70%);
}

@media (max-width: 720px) {
  .max-bot-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-item:nth-child(odd),
  .service-item:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-right: none;
  }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .nav { width: 100%; }
  .hero::before { inset: -10% -20% auto auto; opacity: 0.4; }
}
