:root {
  --ink: #1d1a17;
  --ink-soft: #5a5148;
  --paper: #fbf7f0;
  --paper-2: #f3ece0;
  --accent: #d4622a;
  --accent-soft: #f0c8ae;
  --dark: #241f1a;
  --radius: 18px;
  --shadow: 0 18px 40px -24px rgba(29, 26, 23, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.1rem, 4.4vw, 3.6rem); font-weight: 700; letter-spacing: -.02em; }
h1 em { color: var(--accent); font-style: italic; }
h2 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
h3 { font-size: 1.08rem; font-weight: 800; }

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

.wrap { width: min(1120px, 92vw); margin: 0 auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid rgba(29, 26, 23, .08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo { font-weight: 800; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 1.4rem; font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
.nav-links a { position: relative; padding: .2rem 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width .25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-inner { display: grid; grid-template-columns: 1.35fr .85fr; gap: 3rem; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 2.2rem; }

.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 34px -22px rgba(212, 98, 42, .9); }
.btn-ghost { border-color: rgba(29, 26, 23, .18); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

.hero-facts { display: flex; flex-wrap: wrap; gap: 2rem; list-style: none; padding: 0; margin: 0; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-size: 1.5rem; color: var(--accent); font-weight: 800; }
.hero-facts span { font-size: .82rem; color: var(--ink-soft); }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  /*
    Декоративное пятно-«blob» убрано: анимированный слой с радиусным
    градиентом заставлял Firefox перезапускать вкладку.
    Фон героя задан статично, без композитинга.
  */
  background: radial-gradient(circle at 50% 50%, #f7d8c1 0%, #eebd9b 60%, transparent 72%);
  border-radius: 46% 54% 62% 38% / 48% 40% 60% 52%;
  padding: 2rem 1rem;
}
.cat-card {
  position: relative; background: #fff; border-radius: var(--radius);
  padding: 2rem 1.8rem; box-shadow: var(--shadow); max-width: 260px; text-align: center;
}
.cat-emoji { font-size: 4.4rem; line-height: 1; margin-bottom: .6rem; }
.cat-card p { margin: 0; font-weight: 700; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 6vw, 4.8rem) 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--dark); color: #f6efe6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-sub { color: var(--ink-soft); max-width: 62ch; margin-bottom: 2.2rem; }
.section-dark .section-sub { color: #bfb3a5; }

.grid { display: grid; gap: 1.2rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: #fff; border-radius: var(--radius); padding: 1.5rem;
  border: 1px solid rgba(29, 26, 23, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { font-size: 1.9rem; margin-bottom: .6rem; }
.card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 1rem 1.2rem; font-size: .93rem; }
thead th { background: #efe6d8; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
tbody tr + tr td { border-top: 1px solid rgba(29, 26, 23, .07); }
tbody tr:hover { background: #fdfaf5; }
td:first-child { font-weight: 700; }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.calc-form {
  background: #fff; border-radius: var(--radius); padding: 1.6rem;
  display: grid; gap: 1rem; box-shadow: var(--shadow); border: 1px solid rgba(29, 26, 23, .07);
}
.calc-form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.calc-form input[type="number"], .calc-form select {
  font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--ink);
  padding: .6rem .8rem; border-radius: 12px; border: 1.5px solid rgba(29, 26, 23, .15);
  background: var(--paper); width: 100%;
}
.calc-form input:focus, .calc-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.check { display: flex !important; align-items: center; gap: .6rem; font-weight: 600 !important; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.calc-result {
  background: var(--dark); color: #f6efe6; border-radius: var(--radius);
  padding: 1.8rem; min-height: 100%; box-shadow: var(--shadow);
}
.result-placeholder { color: #9d9186; margin: 0; }
.result-grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
.result-main { font-family: "Playfair Display", Georgia, serif; font-size: 2rem; line-height: 1.1; color: #fff; }
.result-main small { display: block; font-family: "Manrope", sans-serif; font-size: .8rem; font-weight: 600; color: #a99c8f; margin-bottom: .3rem; }
.result-rows { display: grid; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.result-rows li { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: .5rem; font-size: .92rem; color: #d8ccbf; }
.result-rows b { color: #fff; }
.calc-note { font-size: .78rem; color: #9d9186; margin: 0; }

/* ---------- danger ---------- */
.danger-card {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius); padding: 1.4rem; transition: background .2s ease;
}
.danger-card:hover { background: rgba(212, 98, 42, .16); }
.danger-card h3 { color: #f0c8ae; }
.danger-card p { margin: 0; font-size: .92rem; color: #c9bcae; }

/* ---------- timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: .9rem; }
.timeline li { display: flex; gap: 1.2rem; align-items: flex-start; background: #fff; border-radius: var(--radius); padding: 1.1rem 1.3rem; border: 1px solid rgba(29,26,23,.07); }
.timeline .day {
  flex: 0 0 auto; min-width: 62px; text-align: center; font-size: .78rem; font-weight: 800;
  background: var(--accent-soft); color: #8c3f16; border-radius: 999px; padding: .35rem .6rem;
}
.timeline h3 { margin-bottom: .2rem; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

.note { border-left: 4px solid var(--accent); background: #fff; padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: .94rem; color: var(--ink-soft); }
.note strong { color: var(--ink); }

/* ---------- footer ---------- */
.footer { background: var(--paper-2); padding: 2.2rem 0; border-top: 1px solid rgba(29,26,23,.08); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-size: .85rem; color: var(--ink-soft); }
.footer p { margin: 0; }
.muted { opacity: .7; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .calc { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
