@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;700;800&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  --bg: #F7F3EE;
  --bg-alt: #EDE9E2;
  --bg-card: #FDFBF8;
  --text: #1A1A1A;
  --text-mid: #3D3732;
  --text-light: #7A7269;
  --accent: #C0392B;
  --accent-dark: #96281B;
  --border: #D4CEC5;
  --border-light: #E8E3DB;
  --kanji: rgba(26,26,26,0.035);
  --font-serif: 'Shippori Mincho', 'Georgia', serif;
  --font-sans: 'Raleway', system-ui, sans-serif;
  --max-w: 1180px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== СБРОС ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* Текстура бумаги */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 27px,
    rgba(26,26,26,0.012) 28px
  );
  pointer-events: none;
  z-index: 9000;
}

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p { color: var(--text-mid); }

/* ===== НАВИГАЦИЯ ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(247,243,238,0.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 4rem);
  z-index: 1000;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
}
.nav-logo .k {
  font-size: 1.9rem;
  color: var(--accent);
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color 0.3s;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { width: 100%; }

/* Кнопка скачать в навигации */
.nav-dl {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem !important;
  background: var(--accent);
  color: var(--bg) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  transition: background 0.3s !important;
  white-space: nowrap;
}
.nav-dl:hover { background: var(--accent-dark) !important; color: var(--bg) !important; }
.nav-dl::after { display: none !important; }

/* ===== КОНТЕНТ ===== */
.page-content { padding-top: var(--nav-h); }

/* ===== KANJI ФОНОВЫЙ ===== */
.kanji-bg {
  position: absolute;
  font-family: var(--font-serif);
  font-weight: 800;
  color: var(--kanji);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* ===== РАЗДЕЛИТЕЛЬ-МАЗОК ===== */
.brush {
  display: inline-block;
  width: 72px;
  height: 2.5px;
  background: var(--accent);
  border-radius: 2px;
  position: relative;
  margin: 0.9rem 0 1.4rem;
}
.brush::after {
  content: '';
  position: absolute;
  left: 78px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.35;
}

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 1.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-dl {
  background: var(--accent);
  color: var(--bg);
  font-size: 0.95rem;
  padding: 1rem 2.5rem;
  letter-spacing: 0.06em;
}
.btn-dl:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

/* ===== СЕКЦИИ ===== */
.section {
  padding: clamp(3.5rem, 7vw, 7rem) clamp(1.25rem, 5vw, 4rem);
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.section-wrap { padding: clamp(3.5rem, 7vw, 7rem) clamp(1.25rem, 5vw, 4rem); }
.section-wrap > .in { max-width: var(--max-w); margin: 0 auto; }

.sh { margin-bottom: 2.75rem; }
.sh-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

/* ===== ШАПКА СТРАНИЦЫ ===== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--border);
  min-height: 260px;
  display: flex;
  align-items: flex-end;
}
.page-hero .kanji-bg {
  right: clamp(0.5rem, 4vw, 6rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(9rem, 18vw, 17rem);
}
.page-hero-in {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ===== КАРТОЧКИ ФУНКЦИЙ ===== */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.35rem;
}
.feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.feat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s var(--ease);
}
.feat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(26,26,26,0.09); border-color: var(--border); }
.feat-card:hover::before { transform: scaleY(1); }
.feat-ico { font-size: 2rem; margin-bottom: 0.9rem; line-height: 1; }
.feat-title { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.45rem; color: var(--text); }
.feat-desc { font-size: 0.875rem; color: var(--text-light); line-height: 1.65; }

/* ===== СКАЧАТЬ — большой блок ===== */
.dl-block {
  text-align: center;
  padding: clamp(3rem, 6vw, 5rem) 2rem;
  background: var(--text);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.dl-block .kanji-bg { color: rgba(247,243,238,0.04); left: 50%; transform: translateX(-50%); font-size: clamp(12rem, 25vw, 22rem); top: -2rem; }
.dl-block h2 { color: var(--bg); font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 0.75rem; position: relative; z-index: 1; }
.dl-block p { color: rgba(247,243,238,0.65); margin-bottom: 2rem; position: relative; z-index: 1; }
.dl-meta { font-size: 0.78rem; color: rgba(247,243,238,0.45); margin-top: 1rem; letter-spacing: 0.08em; position: relative; z-index: 1; }

/* ===== СИСТЕМНЫЕ ТРЕБОВАНИЯ ===== */
.sysreq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.sysreq-item {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}
.sysreq-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-light); margin-bottom: 0.35rem; }
.sysreq-val { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; color: var(--text); }

/* ===== ШАГИ ===== */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.step h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.step p { font-size: 0.875rem; color: var(--text-light); }

/* ===== ТЕГИ ===== */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 0.22rem 0.55rem; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text-light); }
.tag-free { border-color: #27AE60; color: #1e8449; background: rgba(39,174,96,0.06); }

/* ===== ЮРИДИЧЕСКИЙ ТЕКСТ ===== */
.legal-body {
  max-width: 780px;
}
.legal-body h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}
.legal-body p {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 0.75rem;
  line-height: 1.8;
}
.legal-body ul, .legal-body ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.legal-body ul li { list-style: disc; }
.legal-body ol li { list-style: decimal; }
.legal-body li {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.legal-body strong { color: var(--text); }
.legal-date {
  font-size: 0.78rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
}

/* ===== ФУТЕР ===== */
.footer { border-top: 1px solid var(--border); padding: 2.5rem clamp(1.25rem, 5vw, 4rem); }
.footer-in {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.f-logo { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 800; }
.f-logo span { color: var(--accent); }
.f-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.f-nav a { font-size: 0.78rem; color: var(--text-light); letter-spacing: 0.05em; transition: color 0.25s; }
.f-nav a:hover { color: var(--accent); }
.f-copy { font-size: 0.78rem; color: var(--text-light); text-align: right; }
.f-copy a { transition: color 0.25s; }
.f-copy a:hover { color: var(--accent); }

/* ===== АНИМАЦИИ ===== */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-up.vis { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ===== АДАПТИВ ===== */
@media (max-width: 860px) {
  .sysreq-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.72rem; letter-spacing: 0.05em; }
  .feat-grid { grid-template-columns: 1fr; }
  .footer-in { flex-direction: column; }
  .f-copy { text-align: left; }
}
@media (max-width: 480px) {
  .nav-links { gap: 0.7rem; }
}
