/* =========================================================
   Правовой консалтинг — стили сайта (тёмная версия)
   Концепция: «Тихая уверенность» — кинематографичный, сдержанно
   дорогой сайт для юридической практики. Весь сайт живёт в глубоком
   navy (не только hero), один тёплый бронзовый акцент, щедрая
   типографика, медленные уверенные переходы.
   ========================================================= */

:root {
  --navy: #17333E;
  --navy-deep: #0A1A21;
  --navy-soft: #3F5A66;
  /* page background layers — three close, deliberately subtle steps of
     depth instead of one flat black: base page, alternating section tint,
     elevated card/input surface */
  --bg: #0A1A21;
  --navy-tint: #102530; /* alternating section background (was a light tint) */
  --surface: #16323D;   /* card / form / dropdown surface */
  --ink: #ECEEEF;       /* primary text (was dark ink for a light page) */
  --ink-muted: #97A6AB; /* secondary text */
  --line: rgba(255,255,255,.14); /* hairline borders/dividers on dark */
  --white: #FFFFFF;
  --accent: #A9834F;
  --accent-soft: #C7A876;
  --ok: #6FCF97;
  --err: #F2837C;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --container-w: 1120px;
  --radius: 14px;

  /* сигнатурный easing — медленный уверенный выход, как у премиальных сайтов */
  --ease-cinema: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--navy-deep);
  padding: 12px 18px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  transition: opacity .7s var(--ease-cinema), visibility 0s linear .7s;
}
.preloader-mark {
  width: 44px;
  height: auto;
  opacity: 0;
  animation: preloader-fade 1.1s var(--ease-cinema) forwards;
}
@keyframes preloader-fade {
  0% { opacity: 0; transform: scale(.9); }
  60% { opacity: 1; transform: scale(1); }
  100% { opacity: .85; transform: scale(1); }
}
.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Custom cursor (desktop, fine pointer only) ---------- */
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1px solid rgba(169,131,79,.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate3d(-100px,-100px,0);
  transition: transform .15s ease-out, width .25s var(--ease-cinema), height .25s var(--ease-cinema), border-color .25s ease, opacity .25s ease;
  opacity: 0;
}
.cursor-ring.is-active { opacity: 1; }
.cursor-ring.is-hover { width: 52px; height: 52px; border-color: var(--accent); background: rgba(169,131,79,.08); }
.has-custom-cursor, .has-custom-cursor a, .has-custom-cursor button { cursor: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease-cinema), background .2s ease, color .2s ease, border-color .2s ease, box-shadow .3s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--navy-deep);
}
.btn-primary:hover { background: var(--accent-soft); box-shadow: 0 12px 28px -12px rgba(169,131,79,.55); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.btn-ghost-dark {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn-block { width: 100%; justify-content: center; }

/* magnetic buttons get their transform overridden by JS via inline style;
   the transition above keeps the snap-back smooth */

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease-cinema), border-color .4s var(--ease-cinema), backdrop-filter .4s ease;
}
.site-header .brand-text { color: var(--white); transition: color .4s ease; }
.site-header .main-nav a { color: rgba(255,255,255,.85); transition: color .4s ease; }
.site-header .nav-toggle { border-color: rgba(255,255,255,.35); }
.site-header .nav-toggle span { background: var(--white); }

/* header text is already light by default (it always sits on a dark page
   now) — scrolling just adds a translucent dark panel + hairline so it
   still reads as "lifted" above the content behind it */
.site-header.is-scrolled {
  background: rgba(10,26,33,.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { transition: opacity .3s ease; }
.brand:hover { opacity: .8; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.brand-text {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: .03em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 12px;
}
.main-nav a {
  font-size: 13px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-cinema);
}
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav a:hover { color: var(--accent-soft) !important; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 2px;
  transition: transform .2s ease, opacity .2s ease, top .2s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 24px; }
.nav-toggle.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero (cinematic, full-bleed dark) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh; /* fallback for browsers without svh support */
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--navy-deep);
  padding: 140px 0 120px;
}
/* soft vignette at the foot of the hero — a film-like pool of shadow that
   eases the eye toward the scroll cue instead of a flat hard edge */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 130px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.45));
}
@media (max-width: 760px) {
  .hero::after { height: 80px; }
}
.hero-glow { position: absolute; inset: 0; z-index: 0; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  will-change: transform;
}
.blob-a {
  width: 620px; height: 620px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(169,131,79,.55), transparent 70%);
  animation: blob-float-a 22s ease-in-out infinite;
}
.blob-b {
  width: 520px; height: 520px;
  bottom: -220px; left: -140px;
  background: radial-gradient(circle, rgba(63,90,102,.55), transparent 70%);
  animation: blob-float-b 26s ease-in-out infinite;
}
@keyframes blob-float-a {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(1.08); }
}
@keyframes blob-float-b {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(50px, -30px) scale(1.06); }
}
.hero-watermark {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 46vw;
  max-width: 640px;
  opacity: .05;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  /* сглаживаем прозрачность отдельным CSS-переходом: при быстрой/рывковой
     прокрутке (особенно на мобильных) JS обновляет opacity редкими большими
     скачками — переход интерполирует между ними, и угасание выглядит плавным
     независимо от того, как часто фактически прилетают события scroll. */
  transition: opacity .35s ease-out;
}

.hero-logo-mark {
  height: 256px;
  width: auto;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .9s var(--ease-cinema), transform .9s var(--ease-cinema);
}
.hero-eyebrow {
  font-size: 34px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-weight: 600;
  margin: 0 0 22px;
  line-height: 1.25;
  opacity: .45;
  transform: translateY(8px);
  transition: opacity .9s var(--ease-cinema), transform .9s var(--ease-cinema);
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.08;
  color: var(--white);
  margin: 0 0 26px;
}
.line-mask { display: block; overflow: hidden; padding-bottom: .06em; }
.line-inner {
  display: block;
  transform: translateY(112%);
  transition: transform 1.05s var(--ease-cinema);
}
.line-mask:nth-child(1) .line-inner { transition-delay: .25s; }
.line-mask:nth-child(2) .line-inner { transition-delay: .4s; }

.hero-lead {
  font-size: 18px;
  color: rgba(255,255,255,.72);
  max-width: 560px;
  margin: 0 0 36px;
  opacity: .45;
  transform: translateY(8px);
  transition: opacity .9s var(--ease-cinema), transform .9s var(--ease-cinema);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: .45;
  transform: translateY(8px);
  transition: opacity .9s var(--ease-cinema), transform .9s var(--ease-cinema);
}
.ico { font-size: 16px; }

/* compact lead form in the hero — first-screen conversion path */
.hero-form {
  width: 100%;
  max-width: 720px;
  margin-top: 22px;
}
.hero-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.hero-form input[type="text"],
.hero-form input[type="tel"] {
  flex: 1 1 180px;
  min-width: 0;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  color: var(--white);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}
.hero-form input[type="text"]::placeholder,
.hero-form input[type="tel"]::placeholder { color: rgba(255,255,255,.55); }
.hero-form input[type="text"]:focus,
.hero-form input[type="tel"]:focus {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.1);
}
.hero-form .btn {
  flex: 1 1 230px;
  min-height: 50px;
  white-space: normal;
}
.hero-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(255,255,255,.58);
}
.hero-consent input { margin-top: 2px; flex: 0 0 auto; }
.hero-consent a { color: rgba(255,255,255,.8); text-decoration: underline; }
.hero-form-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.hero-form-phone:hover { color: var(--white); text-decoration: underline; }
.hero-form .form-status { margin: 7px 0 0; font-size: 12.5px; }
@media (max-width: 640px) {
  .hero-form { margin-top: 18px; }
  .hero-form-row { flex-direction: column; }
  .hero-form input[type="text"],
  .hero-form input[type="tel"],
  .hero-form .btn { width: 100%; flex: 0 0 auto; }
  .hero-actions { display: none; }
  .hero-logo-mark { height: 96px; margin-bottom: 14px; }
  .hero-eyebrow { font-size: 17px; margin-bottom: 12px; }
  .hero-title { font-size: 36px; margin-bottom: 16px; }
  .hero-lead {
    font-size: 14.5px;
    line-height: 1.5;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
@media (min-width: 1101px) {
  .hero-inner { max-width: 1180px; padding-right: 420px; }
  .hero-form {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 360px;
    margin: 0;
    padding: 24px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(9, 26, 29, .72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

/* hero load-in sequence, triggered by JS adding .is-loaded once the preloader clears */
.hero.is-loaded .hero-logo-mark { opacity: 1; transform: none; transition-delay: 0s; }
.hero.is-loaded .hero-eyebrow { opacity: 1; transform: none; transition-delay: .12s; }
.hero.is-loaded .line-inner { transform: translateY(0); }
.hero.is-loaded .hero-lead { opacity: 1; transform: none; transition-delay: .55s; }
.hero.is-loaded .hero-actions { opacity: 1; transform: none; transition-delay: .7s; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 1;
  width: 22px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px;
  opacity: 0;
  transition: opacity 1s var(--ease-cinema) 1.1s, border-color .3s ease;
}
.hero.is-loaded .scroll-cue { opacity: 1; }
.scroll-cue:hover { border-color: rgba(255,255,255,.7); }
.scroll-cue span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent-soft);
  animation: scroll-cue-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-cue-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .85s var(--ease-cinema), transform .85s var(--ease-cinema);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-group > .reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-cinema), transform .8s var(--ease-cinema);
}
.reveal-group.is-visible > .reveal-item { opacity: 1; transform: none; }
.reveal-group.is-visible > .reveal-item:nth-child(1) { transition-delay: .05s; }
.reveal-group.is-visible > .reveal-item:nth-child(2) { transition-delay: .15s; }
.reveal-group.is-visible > .reveal-item:nth-child(3) { transition-delay: .25s; }
.reveal-group.is-visible > .reveal-item:nth-child(4) { transition-delay: .35s; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--navy-tint); }

.section-kicker {
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-weight: 700;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
}
.kicker-line {
  display: inline-block;
  width: 0;
  height: 1px;
  background: var(--accent);
  margin-right: 0;
  transition: width .7s var(--ease-cinema) .15s, margin-right .7s var(--ease-cinema) .15s;
}
.reveal.is-visible .kicker-line { width: 28px; margin-right: 10px; }

.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 38px);
  color: var(--ink);
  margin: 0 0 20px;
  max-width: 700px;
}
.section-lead {
  font-size: 16.5px;
  color: var(--ink-muted);
  max-width: 640px;
  margin: 0;
}
.section-intro { margin-bottom: 40px; }

/* ---------- About / stats ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}
.about-photo {
  margin: 0;
  position: sticky;
  top: 100px;
}
.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.7);
  outline: 1px solid rgba(255,255,255,.08);
  outline-offset: -1px;
}
.photo-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transform: scale(1.15);
  filter: grayscale(.12) contrast(1.06) saturate(.92) brightness(.99);
  transition: transform 1.4s var(--ease-cinema);
}
.about-photo.is-visible .photo-frame img { transform: scale(1); }
.photo-veil {
  position: absolute;
  inset: 0;
  background: var(--navy-deep);
  transform-origin: left center;
  transition: transform 1s var(--ease-cinema) .12s;
  z-index: 2;
}
.about-photo.is-visible .photo-veil { transform: scaleX(0); }

.about-photo figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  padding-left: 2px;
}
.about-photo-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}
.about-photo-role {
  font-size: 13px;
  color: var(--ink-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.stat-card {
  padding: 28px 32px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid var(--line);
  transition: transform .5s var(--ease-cinema);
}
.stat-card:first-child { border-left: none; padding-left: 0; }
.stat-card:hover { transform: translateY(-3px); }

.service-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.service-card-top .service-num { margin: 0; }
.service-ico {
  display: inline-flex;
  color: var(--accent);
  opacity: .5;
  transition: opacity .4s ease, color .4s ease, transform .4s var(--ease-cinema);
}
.service-ico svg { width: 22px; height: 22px; }
.service-card:hover .service-ico { opacity: 1; transform: translateY(-2px); }
.stat-num {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 14px;
  color: var(--ink-muted);
}
.about-note {
  margin-top: 28px;
  font-size: 15px;
  color: var(--accent-soft);
  font-weight: 600;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .5s var(--ease-cinema), box-shadow .5s var(--ease-cinema), border-color .5s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(169,131,79,.4);
  box-shadow: 0 28px 48px -24px rgba(0,0,0,.6);
}
.service-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-soft);
  margin-bottom: 0;
}
.service-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}
.service-card p {
  font-size: 15px;
  color: var(--ink-muted);
  margin: 0;
}

.services-extra {
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.services-extra-title {
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
  font-size: 15px;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color .3s ease, transform .3s ease;
}
.chip-list li:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Homepage teaser grid (calculators preview) ---------- */
.calc-teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.calc-teaser-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  transition: border-color .3s ease, transform .3s ease;
}
.calc-teaser-item:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (max-width: 760px) {
  .calc-teaser-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Calculators ---------- */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.calc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .5s var(--ease-cinema), box-shadow .5s var(--ease-cinema), border-color .5s ease;
}
.calc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(169,131,79,.4);
  box-shadow: 0 28px 48px -24px rgba(0,0,0,.6);
}
.calc-card h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 2px;
}
.calc-note {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 6px;
}
.calc-card label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: -6px;
}
.calc-input,
.calc-select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 14.5px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.calc-input:focus,
.calc-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(169,131,79,.16);
}
.calc-select { appearance: auto; }
.calc-btn { align-self: flex-start; margin-top: 6px; }
.calc-result {
  margin: 4px 0 0;
  min-height: 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-soft);
  font-variant-numeric: tabular-nums;
}
.calc-disclaimer {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ---------- News / blog ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .5s var(--ease-cinema), box-shadow .5s var(--ease-cinema), border-color .5s ease;
}
.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(169,131,79,.4);
  box-shadow: 0 28px 48px -24px rgba(0,0,0,.6);
}
.news-date {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-soft);
  font-weight: 700;
  margin: 0 0 10px;
}
.news-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--surface);
  background: var(--accent-soft);
  border-radius: 999px;
  vertical-align: middle;
}
.news-card h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 12px;
}
.news-card h3 a { color: var(--ink); transition: color .25s ease; }
.news-card h3 a:hover { color: var(--accent-soft); }
.news-excerpt {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0 0 16px;
}
.news-more {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-soft);
  transition: color .25s ease;
}
.news-more:hover { color: var(--white); }

/* ---------- Article pages (news/*.html) ---------- */
.article-shell { padding: 140px 0 100px; }
.article-shell .container { max-width: 760px; }
.article-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 13.5px;
  color: var(--accent-soft);
}
.article-back:hover { color: var(--white); }
.article-date {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-soft);
  font-weight: 700;
  margin: 0 0 14px;
}
.article-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 42px);
  color: var(--white);
  margin: 0 0 28px;
  line-height: 1.15;
}
.article-body p {
  font-size: 16.5px;
  color: var(--ink);
  margin: 0 0 20px;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 23px;
  color: var(--ink);
  margin: 36px 0 14px;
}
.article-body ul { margin: 0 0 20px; padding-left: 0; }
.article-body ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--ink);
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.article-sources {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}
.article-sources a { color: var(--ink-muted); text-decoration: underline; }
.article-cta {
  margin-top: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ---------- Врезка "Пример из практики" на страницах услуг ---------- */
.practice-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.practice-note .practice-note-ico { flex-shrink: 0; color: var(--accent-soft); }
.practice-note p { margin: 0; font-size: 15px; color: var(--ink); }
.practice-note .practice-note-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent-soft);
  margin-bottom: 4px;
}
.practice-note a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(199,168,118,.5); }
.practice-note a:hover { color: var(--accent-soft); }
.article-cta p { margin: 0; font-size: 15px; color: var(--ink); max-width: 420px; }

/* ---------- Compact lead form on inner pages ---------- */
.lead-compact {
  margin-top: 44px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 28px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lead-compact-kicker {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.lead-compact-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.15;
  color: var(--ink);
}
.lead-compact-copy p {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.lead-compact-phone {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}
.lead-compact-phone a { color: var(--ink); font-weight: 700; white-space: nowrap; }
.lead-form { display: flex; flex-direction: column; gap: 12px; }
.lead-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.lead-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.lead-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(169,131,79,.16);
}
@media (max-width: 720px) {
  .lead-compact { grid-template-columns: 1fr; padding: 22px; gap: 18px; }
  .lead-compact-title { font-size: 24px; }
}

/* ---------- Pricing ---------- */
.pricing-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: 20px;
  padding: 44px;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.6);
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(480px 260px at 90% 0%, rgba(169,131,79,.25), transparent 65%);
  pointer-events: none;
}
.pricing-card p {
  position: relative;
  font-size: 17px;
  color: #DCE4E7;
  margin: 0;
}
.pricing-card .btn-primary { position: relative; align-self: flex-start; }

/* ---------- Reviews ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.review-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px 26px 24px;
  border: 1px solid var(--line);
  transition: transform .5s var(--ease-cinema), box-shadow .5s var(--ease-cinema), border-color .5s ease;
}
.review-card:hover { transform: translateY(-4px); box-shadow: 0 20px 36px -20px rgba(0,0,0,.55); border-color: rgba(169,131,79,.4); }
.review-quote-mark {
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1;
  color: var(--accent-soft);
  opacity: .38;
  margin: 0 0 -6px;
}
.review-text { margin: 0 0 20px; font-size: 15px; color: var(--ink); }
.review-foot {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.review-name { margin: 0; font-weight: 700; font-size: 14px; color: var(--ink); }
.review-role { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-muted); }

.review-card[data-doc] { cursor: pointer; }
.review-card[data-doc]:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
.review-doc-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-soft);
}
.review-doc-ico { display: inline-flex; width: 14px; height: 14px; }
.review-doc-ico svg { width: 100%; height: 100%; }

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 26px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.faq-item[open] { border-color: rgba(169,131,79,.4); box-shadow: 0 20px 36px -24px rgba(0,0,0,.55); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-icon {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform .3s ease, border-color .3s ease;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--accent-soft);
  transition: transform .3s ease;
}
.faq-icon::before { width: 12px; height: 1.6px; }
.faq-icon::after { width: 1.6px; height: 12px; }
.faq-item[open] .faq-icon { border-color: rgba(169,131,79,.5); }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-answer { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: var(--ink-muted); max-width: 680px; }

/* ---------- Lightbox (документ-подтверждение отзыва) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.lightbox.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity .25s ease, visibility 0s linear 0s;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 25, .82);
  backdrop-filter: blur(2px);
}
.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(760px, 100%);
  max-height: 90vh;
  display: flex;
}
.lightbox-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 160px;
  max-width: 100%;
  max-height: 90vh;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.6);
  background: #fff;
  opacity: 0;
  transition: opacity .2s ease;
}
.lightbox-img.is-loaded { opacity: 1; }
.lightbox.is-loading .lightbox-img,
.lightbox.is-error .lightbox-img { display: none; }

.lightbox-spinner {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .28);
  border-top-color: #fff;
  animation: lightbox-spin .8s linear infinite;
}
.lightbox.is-loading .lightbox-spinner { display: block; }
@keyframes lightbox-spin {
  to { transform: rotate(360deg); }
}

.lightbox-error {
  display: none;
  margin: 0;
  max-width: 320px;
  padding: 22px 24px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.6);
}
.lightbox-error a { color: var(--accent-soft); font-weight: 600; }
.lightbox.is-error .lightbox-error { display: block; }
.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent-soft, #c7a06a);
  color: #17333e;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.lightbox-locked { overflow: hidden; }
@media (max-width: 600px) {
  .lightbox-close { top: -14px; right: 0; }
}

/* ---------- Contacts ---------- */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-list { margin: 28px 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.contact-list a { font-size: 17px; font-weight: 600; color: var(--ink); transition: color .25s ease; }
.contact-list a:hover { color: var(--accent-soft); }

/* QR codes need a light quiet-zone to stay scannable, so this stays a
   deliberate light chip — like a printed card — rather than inverted */
.qr-block {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius);
  max-width: 380px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.5);
}
.qr-block img { border-radius: 6px; }
.qr-block p { margin: 0; font-size: 13.5px; color: var(--navy-soft); }

.map-block {
  margin-top: 56px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.55);
}
.map-block iframe { display: block; width: 100%; height: 800px; border: 0; }

.booking-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,.6);
}
.booking-form h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-size: 24px;
  margin: 0 0 6px;
}
.booking-form label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: -8px;
}
.booking-form input[type="text"],
.booking-form input[type="tel"],
.booking-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.booking-form input:focus,
.booking-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(169,131,79,.16);
}
.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 400;
  margin-top: 4px;
}
.checkbox-line input { margin-top: 3px; }
.checkbox-line a { color: var(--ink); font-weight: 600; text-decoration: underline; }
.form-status {
  min-height: 18px;
  font-size: 13.5px;
  margin: 0;
}
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
}

/* ---------- Mobile sticky booking bar ---------- */
.mobile-cta-bar {
  display: none;
}
@media (max-width: 760px) {
  .mobile-cta-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(10,26,33,.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    transform: translateY(100%);
    transition: transform .4s var(--ease-cinema);
  }
  .mobile-cta-bar.is-visible { transform: translateY(0); }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}
.footer-inner a:hover { color: var(--accent-soft); }
.footer-credit { opacity: 0.75; }
.footer-tg-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}
.footer-logo-link {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 8px;
}
.footer-logo-link svg,
.footer-tg-link svg { flex-shrink: 0; }

/* =========================================================
   Reduced motion — signature animations become instant
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preloader { display: none; }
  .cursor-ring { display: none; }
  .blob { animation: none; }
  .scroll-cue span { animation: none; }
  .line-inner,
  .hero-logo-mark, .hero-eyebrow, .hero-lead, .hero-actions,
  .reveal, .reveal-group > .reveal-item,
  .photo-frame img, .photo-veil, .kicker-line,
  .stat-card, .service-card, .review-card, .service-ico,
  .main-nav a::after, .brand, .mobile-cta-bar,
  .btn {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* ---------- Шаблоны документов (templates/*.html) ---------- */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.template-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .5s var(--ease-cinema), box-shadow .5s var(--ease-cinema), border-color .5s ease;
}
.template-card:hover {
  transform: translateY(-6px);
  border-color: rgba(169,131,79,.4);
  box-shadow: 0 28px 48px -24px rgba(0,0,0,.6);
}
.template-card h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
}
.template-card p {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0 0 18px;
  flex: 1;
}
.template-card .news-more { align-self: flex-start; }

.templates-note {
  margin-top: 40px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--navy-tint);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-muted);
}

/* ---------- Услуги: карточка с ценой (uslugi/*.html) ---------- */
.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-soft);
}
.price-tag span {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--ink-muted);
}
.template-card .price-tag { margin-bottom: 14px; }

.price-box {
  margin: 36px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 32px;
}
.price-box h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 18px;
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.price-row:first-of-type { border-top: none; padding-top: 0; }
.price-row .price-label { font-size: 15px; color: var(--ink); }
.price-row .price-value {
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16.5px;
  color: var(--accent-soft);
  white-space: nowrap;
}
.price-box-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

/* ---------- Страница «Стоимость» (stoimost/index.html) ---------- */
.price-group {
  margin-bottom: 36px;
}
.price-group:last-of-type { margin-bottom: 0; }
.price-group h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  margin: 0 0 4px;
}
.price-group .price-group-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--accent-soft);
}
.price-group .price-group-link:hover { color: var(--white); }
.price-group .price-box { margin: 0; }
.price-final-note {
  margin-top: 8px;
  padding: 22px 26px;
  border-radius: var(--radius);
  background: var(--navy-tint);
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-muted);
}

/* Редактор шаблона документа: форма слева, предпросмотр справа */
.doc-shell { padding: 140px 0 100px; }
.doc-head { max-width: 760px; margin: 0 0 40px; }
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
}

.doc-form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.doc-form-panel h2 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 14px;
}
.doc-form-panel h2:first-child { margin-top: 0; }
.doc-form-panel label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin: 14px 0 6px;
}
.doc-form-panel label:first-of-type { margin-top: 0; }
.doc-form-panel input[type="text"],
.doc-form-panel input[type="date"],
.doc-form-panel input[type="number"],
.doc-form-panel textarea,
.doc-form-panel select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.doc-form-panel textarea { resize: vertical; min-height: 64px; }
.doc-form-panel select { appearance: auto; }
.doc-form-panel input:focus,
.doc-form-panel textarea:focus,
.doc-form-panel select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(169,131,79,.16);
}
.doc-field-hint { margin: 4px 0 0; font-size: 12px; color: var(--ink-muted); }
.doc-fieldset-divider { border: none; border-top: 1px solid var(--line); margin: 28px 0 0; }
.doc-field-group[hidden] { display: none; }

.doc-preview-col { position: sticky; top: 100px; }
.doc-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.doc-preview-panel {
  background: #fff;
  color: #1b1b1b;
  border-radius: var(--radius);
  padding: 48px 44px;
  max-height: 72vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.55);
}
.doc-preview-panel #doc-preview-content {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 14.5px;
  line-height: 1.6;
}
#doc-preview-content h1 {
  font-size: 17px;
  text-align: center;
  margin: 0 0 22px;
  font-weight: 700;
}
#doc-preview-content p { margin: 0 0 14px; text-align: justify; }
#doc-preview-content .doc-muted { color: #8a8a8a; }
#doc-preview-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
#doc-preview-content th, #doc-preview-content td { border: 1px solid #333; padding: 6px 9px; font-size: 13px; text-align: left; }
#doc-preview-content .doc-sign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
#doc-preview-content .doc-sign-grid p { margin: 0 0 4px; }
#doc-preview-content .doc-sign-line { margin-top: 34px; border-top: 1px solid #333; padding-top: 4px; font-size: 11.5px; color: #555; }

.doc-cta {
  margin-top: 22px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.doc-cta p { margin: 0; font-size: 14px; color: var(--ink-muted); }

@media print {
  body * { visibility: hidden; }
  .doc-preview-panel, .doc-preview-panel * { visibility: visible; }
  .doc-preview-panel {
    position: absolute; left: 0; top: 0; width: 100%;
    box-shadow: none; max-height: none; overflow: visible; border-radius: 0; padding: 0;
  }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr; border-top: none; }
  .stat-card { border-left: none; border-top: 1px solid var(--line); padding: 22px 0 4px; }
  .stat-card:first-child { border-top: none; padding-left: 0; }
  .services-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; gap: 40px; }
  .map-block { margin-top: 36px; }
  .map-block iframe { height: 560px; }
  .templates-grid { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-preview-col { position: static; }
  .doc-preview-panel { max-height: none; padding: 32px 26px; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { position: static; max-width: 280px; }

  .hero-watermark { width: 70vw; opacity: .04; }
}

/* 8 пунктов меню + бренд + кнопка не умещаются в одну строку уже на «планшетной»
   ширине — переключаемся на бургер раньше (1120px = ширине .container), иначе
   между пунктами пропадает отступ и текст visually «слипается». */
@media (max-width: 1120px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 18px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink) !important; }
  .main-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }
}

@media (max-width: 760px) {
  .hero { padding: 120px 0 80px; min-height: 92svh; }
  .hero-logo-mark { height: 128px; }
  .section { padding: 64px 0; }
  .article-shell { padding: 110px 0 70px; }
  .doc-shell { padding: 110px 0 70px; }
  .doc-form-panel, .doc-preview-panel { padding: 24px 20px; }
  .article-cta { flex-direction: column; align-items: stretch; }
  .pricing-card { padding: 30px; }
  .booking-form { padding: 26px; }
  .qr-block { flex-direction: column; align-items: flex-start; }
  .faq-item { padding: 2px 18px; }
  .faq-item summary { font-size: 16px; gap: 12px; }

  .cursor-ring { display: none; }
}

@media (max-width: 420px) {
  .header-actions .btn-sm { display: none; }
}

@media (hover: none) and (pointer: coarse) {
  .cursor-ring { display: none; }
}
