/* Светло-бежевый презентационный стиль (ориентир — нейтральный beige deck) */
:root {
  --cream: #f7f2ea;
  --cream-deep: #ebe3d6;
  --sand: #dfd2c4;
  --linen: #faf8f4;
  --ink: #3d342c;
  --ink-soft: #5c534a;
  --muted: #8a8076;
  --accent: #a67c52;
  --accent-soft: #c9a882;
  --accent-deep: #7d5a3a;
  --white: #fffefc;
  --line: rgba(61, 52, 44, 0.12);
  --line-strong: rgba(61, 52, 44, 0.2);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px rgba(61, 52, 44, 0.08);
  --shadow-soft: 0 6px 24px rgba(61, 52, 44, 0.06);
  --max: 920px;
  --font: "Outfit", system-ui, -apple-system, sans-serif;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  /* до измерения JS; затем перезаписывается реальной высотой шапки на html */
  --topbar-h: 5.5rem;
  --anchor-offset: 20px;
}

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

html {
  scroll-behavior: smooth;
  /* реальная высота шапки (--topbar-h с html) + запас, чтобы предыдущий блок не просвечивал под sticky */
  scroll-padding-top: calc(var(--topbar-h) + var(--anchor-offset));
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#hero,
.deck-slide[id],
.deck-band[id] {
  scroll-margin-top: calc(var(--topbar-h) + var(--anchor-offset));
}

a {
  color: var(--accent-deep);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ——— Top bar ——— */
body.is-nav-open {
  overflow: hidden;
}

.topbar-fill {
  display: none;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--cream-deep);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.nav-toggle-box {
  position: relative;
  width: 22px;
  height: 16px;
  display: block;
}

.nav-toggle-bar {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.22s ease, top 0.22s ease;
}

.nav-toggle-bar:nth-child(1) {
  top: 0;
}

.nav-toggle-bar:nth-child(2) {
  top: 7px;
}

.nav-toggle-bar:nth-child(3) {
  top: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bar {
    transition: none;
  }
}

body.is-nav-open .nav-toggle-bar:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

body.is-nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

body.is-nav-open .nav-toggle-bar:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--topbar-h, 3.75rem);
  z-index: 1000;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(45, 38, 32, 0.42);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

body.is-nav-open .nav-backdrop {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .nav-backdrop {
    transition: none;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  /* без backdrop-filter: иначе fixed-меню позиционируется относительно шапки и не перекрывает страницу */
  background: rgba(255, 254, 252, 0.97);
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.topbar-inner {
  max-width: calc(var(--max) + 48px);
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 24px);
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  width: 158px;
  height: auto;
}

.brand-fallback {
  display: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--accent-deep);
}

.phones {
  flex-shrink: 0;
  margin-left: auto;
  text-align: right;
}

.phones strong {
  display: block;
  font-family: var(--font);
  font-size: clamp(15px, 3.2vw, 18px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.phones strong a {
  color: inherit;
}

.phones strong a:hover {
  color: var(--accent-deep);
}

/* меню между логотипом и телефоном — равная ширина кнопок (экран ≥768px) */
.nav-scroll {
  flex: 1 1 auto;
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.nav-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(4px, 1.5vw, 10px);
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.nav-pills li {
  flex: 1 1 0;
  min-width: 0;
}

.nav-pills a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 8px clamp(4px, 1.2vw, 12px);
  border-radius: 999px;
  font-size: clamp(12px, 2.8vw, 14px);
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--cream-deep);
  border: 1px solid transparent;
  text-align: center;
  line-height: 1.2;
  hyphens: auto;
}

.nav-pills a:hover {
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--ink);
}

@media (max-width: 767px) {
  .topbar-fill {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
  }

  .phones {
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-scroll {
    flex: none;
    position: fixed;
    top: var(--topbar-h, 3.75rem);
    right: 0;
    bottom: 0;
    left: auto;
    width: min(17.5rem, 88vw);
    z-index: 1001;
    align-items: stretch;
    justify-content: flex-start;
    padding: 18px 18px 28px;
    background: var(--linen);
    border-left: 1px solid var(--line);
    box-shadow: -16px 0 48px rgba(61, 52, 44, 0.14);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.28s;
  }

  body.is-nav-open .nav-scroll {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .nav-pills {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
  }

  .nav-pills li {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .nav-pills a {
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 16px;
    white-space: normal;
    hyphens: none;
  }

  .nav-pills a:active {
    background: var(--cream-deep);
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .nav-scroll {
    transition: none;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: min(120px, 36vw);
  }

  .phones strong {
    font-size: clamp(13px, 3.5vw, 16px);
  }
}

/* ——— Hero (cover slide — светлый беж) ——— */
.deck-hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
  padding: 48px clamp(16px, 4vw, 24px) 56px;
  background:
    linear-gradient(165deg, var(--linen) 0%, var(--cream) 42%, var(--cream-deep) 100%);
  color: var(--ink);
  overflow: hidden;
}

.deck-hero-decor {
  position: absolute;
  top: -20%;
  right: -8%;
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  background: linear-gradient(135deg, rgba(166, 124, 82, 0.14), rgba(223, 210, 196, 0.5));
  pointer-events: none;
}

.deck-hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.deck-hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  max-width: min(18ch, 100%);
  color: var(--ink);
}

@media (max-width: 520px) {
  .deck-hero {
    min-height: 0;
    padding-top: 32px;
    padding-bottom: 48px;
  }
}

.hero-lead {
  font-size: clamp(1rem, 1.85vw, 1.18rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 32px;
}

.hero-lead strong {
  font-weight: 600;
  color: var(--ink);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.hero-stat {
  padding: 22px 20px;
  background: var(--white);
  text-align: left;
}

.hero-stat strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.8vw, 2.1rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-stat span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

/* ——— Content slides ——— */
.deck {
  padding: 0 clamp(16px, 4vw, 24px) 72px;
  background: var(--cream);
}

.deck-slide {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 88px) 0;
}

.deck-slide + .deck-slide {
  border-top: 1px solid var(--line);
}

.deck-kicker {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.deck-slide h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 20px;
  line-height: 1.18;
}

.deck-slide h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 28px 0 12px;
}

.deck-slide > p,
.deck-slide .prose {
  margin: 0 0 16px;
  color: var(--ink-soft);
  max-width: 72ch;
}

.deck-slide > p:last-child {
  margin-bottom: 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

@media (max-width: 820px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  padding: 28px 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 48px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent-deep));
  opacity: 0.9;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.28rem;
  margin: 8px 0 12px;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.deck-slide .grid-3 + p {
  margin-top: 24px;
  font-size: 15px;
}

/* Тёмная полоса → тёплый taupe-как на втором слайде презентации */
.deck-band {
  margin: 0 calc(-1 * clamp(16px, 4vw, 24px));
  padding: clamp(52px, 7vw, 88px) clamp(16px, 4vw, 24px);
  background: linear-gradient(155deg, #4a4038 0%, #3a322c 50%, #2e2823 100%);
  color: rgba(255, 252, 248, 0.9);
}

.deck-band-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.deck-band .deck-kicker {
  color: var(--accent-soft);
}

.deck-band h2 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--white);
  max-width: 22ch;
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
}

.band-lead {
  margin: 0 0 28px;
  max-width: 62ch;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 252, 248, 0.72);
}

.band-lead a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.band-lead a:hover {
  color: var(--white);
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.benefit-item {
  padding: 24px 22px;
  border-radius: var(--radius);
  background: rgba(255, 252, 248, 0.06);
  border: 1px solid rgba(255, 252, 248, 0.12);
}

.benefit-item strong {
  display: block;
  font-family: var(--display);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
}

.benefit-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 252, 248, 0.68);
}

@media (max-width: 768px) {
  .benefit-grid {
    grid-template-columns: 1fr;
  }
}

.list-check {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  max-width: 72ch;
}

.list-check li {
  position: relative;
  padding: 14px 0 14px 36px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-soft);
}

.list-check li:last-child {
  border-bottom: none;
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.25);
}

.clients {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  columns: 2;
  column-gap: 40px;
  max-width: none;
}

@media (max-width: 640px) {
  .clients {
    columns: 1;
  }
}

.contact-block {
  margin-top: 8px;
}

.contact-lines {
  font-size: 17px;
  margin-bottom: 20px;
}

.contact-lines p {
  margin: 0 0 10px;
}

.contact-phones {
  line-height: 1.55;
}

.contact-phones br + a {
  display: inline-block;
  margin-top: 2px;
}

.map-wrap {
  margin-top: 20px;
  margin-inline: auto;
  max-width: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.map-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.site-footer {
  background: #2a2420;
  color: rgba(255, 252, 248, 0.55);
  padding: 40px 24px 48px;
  text-align: center;
  font-size: 14px;
}

.site-footer p {
  margin: 0 0 12px;
}

.site-footer a {
  color: rgba(255, 252, 248, 0.88);
  margin: 0 12px;
  font-weight: 500;
}

.site-footer a:hover {
  color: var(--accent-soft);
}
