/* Ладога Дом. Единая система: один шрифт, шкала отступов, радиусы Tailwind, одна кривая анимации. */

:root {
  --s-25: 2px;
  --s-50: 4px;
  --s-75: 8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-3xl: 24px;

  --bg: #F4F1EC;
  --surface: #FFFFFF;
  --ink: #1F1F1F;
  --muted: #666666;
  --line: #E2DCD2;
  --accent: #9A6B3F;
  --accent-hover: #835830;
  --accent-soft: #C49A6C;
  --danger: #B3261E;

  --dark-1: #181818;
  --dark-2: #1F1F1F;
  --dark-3: #272727;
  --dark-4: #313131;
  --dark-5: #131209;
  --on-dark-muted: #B5B5B5;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s-800); }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.lock { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
i.ph, i.ph-fill { line-height: 1; flex: none; }

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

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--s-300); }
@media (min-width: 768px) { .wrap { padding-inline: var(--s-400); } }

.skip {
  position: absolute; left: var(--s-200); top: var(--s-200); z-index: 100;
  padding: var(--s-75) var(--s-100); border-radius: var(--r-lg);
  background: var(--ink); color: #fff; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  border: 0; border-radius: var(--r-lg);
  background: var(--accent); color: #fff;
  font-size: 16px; line-height: 24px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 300ms var(--ease), transform 500ms var(--ease);
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); transition-duration: 200ms; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-sm { font-size: 14px; line-height: 20px; }
.btn-block { width: 100%; }

/* ---------- Навигация ---------- */
.brand { display: inline-flex; align-items: center; gap: var(--s-75); font-size: 16px; line-height: 24px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand i { font-size: 24px; color: var(--accent); }

.nav {
  position: fixed; top: var(--s-200); left: 50%; z-index: 50;
  transform: translateX(-50%);
  width: max-content; max-width: calc(100% - var(--s-400));
  display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: rgba(244, 241, 236, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(31, 31, 31, 0.08);
  border-radius: var(--r-2xl);
}
.nav-simple { gap: var(--s-400); }
.nav-links { display: none; align-items: center; gap: var(--s-50); }
.nav-links a {
  padding: var(--s-75) var(--s-100); border-radius: var(--r-lg);
  font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; color: var(--muted);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(31, 31, 31, 0.05); }
.nav-links a[aria-current="true"] { color: var(--ink); background: rgba(31, 31, 31, 0.08); }
.nav-phone { display: none; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav-cta { display: none; white-space: nowrap; }

.burger {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-50);
  width: var(--s-500); height: var(--s-500); margin-left: auto;
  border: 0; border-radius: var(--r-lg); background: transparent; cursor: pointer;
}
.burger span {
  display: block; width: 20px; height: var(--s-25); border-radius: 1px; background: var(--ink);
  transition: transform 500ms var(--ease);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

@media (max-width: 1079px) {
  .nav { width: calc(100% - var(--s-400)); justify-content: space-between; }
  .nav-simple { width: max-content; }
}
@media (min-width: 1080px) {
  .nav-links, .nav-phone, .nav-cta { display: flex; }
  .nav-cta { display: inline-flex; }
  .burger { display: none; }
}

/* Мобильное меню: полноэкранная панель */
.menu {
  position: fixed; inset: 0; z-index: 40;
  padding: var(--s-900) var(--s-300) var(--s-400);
  background: rgba(244, 241, 236, 0.96);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 500ms var(--ease), visibility 0s linear 500ms;
  overflow-y: auto;
}
.menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 500ms var(--ease), visibility 0s; }
.menu-links { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-200); max-width: 480px; margin-inline: auto; }
.menu-links > * {
  opacity: 0; transform: translateY(var(--s-300));
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  transition-delay: 0ms;
}
.menu.open .menu-links > * { opacity: 1; transform: none; transition-delay: var(--d, 0ms); }
.menu-links a:not(.btn) { font-size: 30px; line-height: 36px; font-weight: 600; text-decoration: none; }
.menu-links .menu-phone { margin-top: var(--s-200); font-size: 20px; line-height: 28px; color: var(--muted); }
.menu-links .btn { margin-top: var(--s-100); }
@media (min-width: 1080px) { .menu { display: none; } }

/* ---------- Первый экран ---------- */
.hero { padding-top: var(--s-900); padding-bottom: var(--s-700); }
.hero-grid { display: grid; gap: var(--s-600); align-items: center; padding-top: var(--s-400); }
.eyebrow {
  display: inline-block; margin-bottom: var(--s-300);
  padding: var(--s-50) var(--s-100); border-radius: var(--r-lg);
  background: rgba(154, 107, 63, 0.12); color: var(--accent);
  font-size: 14px; line-height: 20px; font-weight: 600;
}
.hero-title {
  max-width: 680px;
  font-size: 36px; line-height: 40px; font-weight: 700;
  padding-bottom: var(--s-25);
  color: #000;
  background: linear-gradient(to right, #000000, #666666);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-text { max-width: 680px; margin-top: var(--s-300); font-size: 18px; line-height: 28px; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-200) var(--s-300); margin-top: var(--s-400); }
.note { font-size: 14px; line-height: 20px; color: var(--muted); max-width: 280px; }
.proof { display: flex; align-items: center; gap: var(--s-75); margin-top: var(--s-300); font-size: 14px; line-height: 20px; font-weight: 600; }
.proof i { font-size: 20px; color: var(--accent); }

.hero-media {
  padding: var(--s-75); border-radius: var(--r-3xl); background: var(--surface);
}
.hero-media img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: var(--r-2xl); }

@media (min-width: 640px) { .hero-title { font-size: 48px; line-height: 1; } }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-700); }
  .hero-title { font-size: 60px; line-height: 1; }
}

.stats { display: grid; gap: var(--s-200); margin-top: var(--s-700); }
.stat { display: flex; flex-direction: column; gap: var(--s-50); padding: var(--s-300); border-radius: var(--r-2xl); background: var(--surface); }
.stat strong { font-size: 36px; line-height: 40px; font-weight: 600; }
.stat span { font-size: 14px; line-height: 20px; color: var(--muted); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Секции ---------- */
.section { padding-block: var(--s-700); }
.section-tight { padding-top: var(--s-300); }
@media (min-width: 768px) { .section { padding-block: var(--s-900); } .section-tight { padding-top: var(--s-400); } }

.section-head { max-width: 680px; margin-bottom: var(--s-500); }
.section-head h2, .about-copy h2, .cta-copy h2 { font-size: 30px; line-height: 36px; }
@media (min-width: 768px) { .section-head h2, .about-copy h2, .cta-copy h2 { font-size: 36px; line-height: 40px; } }
.lead { margin-top: var(--s-200); font-size: 18px; line-height: 28px; color: var(--muted); }

/* Проекты */
.project-grid { display: grid; gap: var(--s-200); }
.project-card {
  padding: var(--s-75); border-radius: var(--r-2xl); background: var(--surface);
  transition: transform 500ms var(--ease);
}
.project-card:hover { transform: translateY(calc(var(--s-50) * -1)); }
.project-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); }
.project-body { padding: var(--s-200) var(--s-100) var(--s-100); }
.project-body h3 { font-size: 20px; line-height: 28px; }
.project-body .meta { margin-top: var(--s-50); font-size: 14px; line-height: 20px; color: var(--muted); }
.project-body .price { margin-top: var(--s-100); font-size: 16px; line-height: 24px; font-weight: 700; color: var(--accent); }
@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(4, 1fr); } }

/* Слоган с проявлением слов */
.tagline { padding-block: var(--s-800); background: var(--dark-1); color: #fff; }
.tagline-text { max-width: 680px; font-size: 36px; line-height: 40px; font-weight: 600; text-wrap: balance; }
.js .tagline-text .w { opacity: 0.3; transition: opacity 500ms var(--ease); }
.js .tagline-text .w.on { opacity: 1; }
@media (min-width: 768px) { .tagline { padding-block: var(--s-900); } .tagline-text { font-size: 48px; line-height: 1; } }

/* Преимущества */
.benefit-grid { display: grid; gap: var(--s-200); }
.benefit-card { padding: var(--s-300); border-radius: var(--r-2xl); background: var(--surface); }
.icon-box { display: inline-flex; align-items: center; justify-content: center; width: var(--s-600); height: var(--s-600); margin-bottom: var(--s-200); border-radius: var(--r-lg); background: var(--bg); color: var(--accent); }
.icon-box i { font-size: 24px; }
.benefit-card h3 { font-size: 20px; line-height: 28px; }
.benefit-card p { margin-top: var(--s-75); color: var(--muted); }
@media (min-width: 768px) { .benefit-grid { grid-template-columns: repeat(2, 1fr); } }

/* Шаги */
.steps { display: grid; gap: var(--s-400); counter-reset: none; }
.step-num { display: block; margin-bottom: var(--s-200); font-size: 36px; line-height: 40px; font-weight: 600; color: var(--accent-soft); }
.step h3 { font-size: 20px; line-height: 28px; }
.step p { margin-top: var(--s-75); color: var(--muted); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-500); } }

/* О компании */
.about-grid { display: grid; gap: var(--s-500); align-items: center; }
.about-media { padding: var(--s-75); border-radius: var(--r-3xl); background: var(--surface); }
.about-media img { width: 100%; aspect-ratio: 9 / 10; object-fit: cover; border-radius: var(--r-2xl); }
.prose p + p { margin-top: var(--s-200); }
.about-copy .prose { margin-top: var(--s-200); color: var(--muted); font-size: 18px; line-height: 28px; max-width: 680px; }
.quote { margin-top: var(--s-400); padding: var(--s-300); border-radius: var(--r-2xl); background: var(--surface); }
.quote p { font-size: 18px; line-height: 28px; font-weight: 500; }
.quote footer { display: flex; flex-direction: column; margin-top: var(--s-200); font-size: 14px; line-height: 20px; }
.quote footer span { color: var(--muted); }
@media (min-width: 900px) { .about-grid { grid-template-columns: 0.8fr 1.2fr; gap: var(--s-700); } }

/* Отзывы */
.review-grid { display: grid; gap: var(--s-200); }
.review-card { display: flex; flex-direction: column; padding: var(--s-300); border-radius: var(--r-2xl); background: var(--surface); }
.stars { display: flex; gap: var(--s-25); font-size: 16px; color: var(--accent); }
.review-text { margin-top: var(--s-200); flex: 1; }
.review-author { display: flex; align-items: center; gap: var(--s-100); margin-top: var(--s-300); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: var(--s-500); height: var(--s-500); border-radius: 9999px; background: var(--accent); color: #fff; font-size: 14px; line-height: 20px; font-weight: 700; flex: none; }
.review-author div { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; }
.review-author span { color: var(--muted); }
@media (min-width: 900px) { .review-grid { grid-template-columns: repeat(3, 1fr); } }

/* Вопросы */
.faq-wrap { max-width: 880px; }
.faq { display: flex; flex-direction: column; gap: var(--s-75); }
.faq-item { border-radius: var(--r-2xl); background: var(--surface); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-200);
  padding: var(--s-200) var(--s-300); border-radius: var(--r-2xl);
  font-size: 16px; line-height: 24px; font-weight: 600; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { font-size: 20px; color: var(--accent); transition: transform 500ms var(--ease); }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { padding: 0 var(--s-300) var(--s-300); color: var(--muted); max-width: 680px; }

/* Заявка */
.cta { padding-block: var(--s-700); background: var(--dark-1); color: #fff; }
.cta-grid { display: grid; gap: var(--s-500); align-items: start; }
.cta .lead { color: var(--on-dark-muted); max-width: 520px; }
.guarantees { display: flex; flex-direction: column; gap: var(--s-100); margin-top: var(--s-400); }
.guarantees li { display: flex; align-items: center; gap: var(--s-100); font-weight: 500; }
.guarantees i { font-size: 24px; color: var(--accent-soft); }
.lead-form { padding: var(--s-300); border-radius: var(--r-2xl); background: var(--dark-2); }
.field { margin-bottom: var(--s-200); }
.field label { display: block; margin-bottom: var(--s-75); font-size: 14px; line-height: 20px; font-weight: 600; }
.field input {
  width: 100%; padding: var(--s-100) var(--s-200);
  border: 1px solid var(--dark-4); border-radius: var(--r-lg);
  background: var(--dark-3); color: #fff;
  transition: border-color 300ms var(--ease);
}
.field input::placeholder { color: #8A8A8A; }
.field input:hover { border-color: #4A4A4A; }
.field input:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: #FF8A80; }
.field-error { min-height: 0; margin-top: var(--s-50); font-size: 14px; line-height: 20px; color: #FF8A80; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: var(--s-200); font-size: 14px; line-height: 20px; }
.form-status:empty { display: none; }
.form-status.ok { color: #9BD3A7; }
.form-status.err { color: #FF8A80; }
.consent { margin-top: var(--s-200); font-size: 12px; line-height: 16px; color: var(--on-dark-muted); }
.consent a { color: #fff; }
@media (min-width: 900px) { .cta { padding-block: var(--s-900); } .cta-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--s-700); } .lead-form { padding: var(--s-400); } }

/* ---------- Подвал ---------- */
.footer { padding-top: var(--s-700); background: var(--dark-5); color: #fff; }
.footer-grid { display: grid; gap: var(--s-400); }
.footer-brand p { margin-top: var(--s-75); font-size: 14px; line-height: 20px; color: var(--on-dark-muted); }
.footer-brand .brand { margin-bottom: var(--s-100); }
.footer-brand .brand i { color: var(--accent-soft); }
.footer-contacts, .footer-links { display: flex; flex-direction: column; gap: var(--s-100); font-size: 14px; line-height: 20px; }
.footer-contacts a, .footer-links a { display: inline-flex; align-items: center; gap: var(--s-75); text-decoration: none; transition: color 300ms var(--ease); }
.footer-contacts a:hover, .footer-links a:hover { color: var(--accent-soft); }
.footer-contacts i { font-size: 20px; color: var(--accent-soft); }
.footer-bottom { padding-block: var(--s-400); font-size: 12px; line-height: 16px; color: var(--on-dark-muted); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ---------- Служебные страницы ---------- */
.page { padding-top: var(--s-900); padding-bottom: var(--s-700); min-height: 70vh; }
.page-wrap { max-width: 800px; padding-top: var(--s-400); }
.page-title { font-size: 36px; line-height: 40px; margin-bottom: var(--s-300); }
.page .prose { color: var(--muted); font-size: 16px; line-height: 24px; margin-bottom: var(--s-400); }
.page .prose a, .page-links a { color: var(--accent); font-weight: 600; }
.code404 { font-size: 96px; line-height: 1; font-weight: 700; color: var(--accent-soft); margin-bottom: var(--s-200); }

/* ---------- Появление при прокрутке ---------- */
.js .reveal { opacity: 0; transform: translateY(var(--s-400)); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 300ms linear; }
  .menu-links > * { transform: none; }
  .btn:hover, .project-card:hover { transform: none; }
  .burger span, .faq-item summary i { transition: none; }
  .js .tagline-text .w { transition: opacity 300ms linear; }
}
