:root {
  --bg: #f4efe8;
  --paper: #fffaf3;
  --ink: #16202f;
  --muted: #657083;
  --line: rgba(22, 32, 47, 0.12);
  --accent: #b86432;
  --accent-dark: #8f4520;
  --navy: #1e3447;
  --green: #3f7f59;
  --shadow: 0 24px 70px rgba(22, 32, 47, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.55rem;
}

.section-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 100vh;
  color: #fff;
  background: linear-gradient(120deg, rgba(14, 24, 36, 0.88), rgba(30, 52, 71, 0.72)), url('../assets/optimized/header-background.webp') center/cover no-repeat;
  padding-bottom: 64px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  padding: 0.9rem 1rem;
  background: rgba(22, 32, 47, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar a {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.9;
}

.topbar a:hover {
  opacity: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-top: clamp(7.5rem, 14vw, 11rem);
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 0.85rem;
}

.hero .eyebrow,
.contact-card .eyebrow,
.documents-card .eyebrow {
  color: #ffbd7f;
}

.hero h1 {
  max-width: 820px;
  font-size: clamp(2.5rem, 6vw, 5.7rem);
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 720px;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 28px rgba(184, 100, 50, 0.26);
}

.button-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.button-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.trust-row span {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.price-card {
  display: grid;
  gap: 0.2rem;
  padding: 1.35rem;
  color: var(--ink);
  background: #fff;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 700;
}

.new-price {
  color: var(--accent-dark);
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}

.price-note {
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  padding: 74px 0 0;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 1.6rem;
}

.section-heading.narrow {
  max-width: 720px;
}

.section-heading h2,
.documents-card h2,
.contact-card h2 {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.04em;
}

.section-heading p:not(.eyebrow),
.documents-card p,
.contact-card p {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.quick-facts,
.split-section,
.condition-section,
.scenarios-section,
.investment-section,
.documents-section,
.location-section,
.faq-section,
.contact-section {
  margin-bottom: 78px;
}

.facts-grid,
.scenario-grid,
.investment-cards,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.facts-grid article,
.scenario-grid article,
.investment-cards article,
.blog-card,
.check-card,
.faq-list details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(22, 32, 47, 0.06);
}

.facts-grid article,
.scenario-grid article,
.investment-cards article,
.blog-card {
  padding: 1.35rem;
}

.facts-grid span {
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.facts-grid strong {
  display: block;
  margin-top: 0.35rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  line-height: 1.05;
}

.facts-grid p,
.scenario-grid p,
.investment-cards p,
.blog-card p {
  margin-top: 0.55rem;
  color: var(--muted);
}

.comparison-table {
  overflow: hidden;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(22, 32, 47, 0.06);
}

.comparison-row {
  display: grid;
  grid-template-columns: 0.8fr 1.1fr 1.1fr;
}

.comparison-row span {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.comparison-row span + span {
  border-left: 1px solid var(--line);
}

.comparison-row span:first-child {
  color: var(--navy);
  font-weight: 800;
}

.comparison-head {
  background: var(--navy);
}

.comparison-head span,
.comparison-head span:first-child {
  color: #fff;
  font-weight: 800;
}

.featured-row {
  background: #fff4e8;
}

.featured-row span {
  color: var(--ink);
}

.section-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.section-link {
  color: var(--navy);
  background: rgba(30, 52, 71, 0.08);
  border-color: rgba(30, 52, 71, 0.14);
}

.blog-hero {
  padding: 8rem 0 4rem;
  color: #fff;
  background: linear-gradient(120deg, rgba(14, 24, 36, 0.92), rgba(30, 52, 71, 0.78)), url('../assets/optimized/home-2.webp') center/cover no-repeat;
}

.blog-hero h1 {
  max-width: 880px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.055em;
}

.blog-hero p {
  max-width: 760px;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

.blog-main {
  padding: 64px 0 78px;
}

.blog-card {
  display: grid;
  align-content: start;
  min-height: 260px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(22, 32, 47, 0.12);
}

.blog-card span {
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-card h2,
.blog-card h3,
.investment-cards h3 {
  margin-top: 0.75rem;
  color: var(--navy);
  font-size: 1.55rem;
}

.article-shell {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
}

.article-content {
  padding: 64px 0;
}

.article-content h2 {
  margin: 2.2rem 0 0.8rem;
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.article-content p,
.article-content li {
  color: var(--muted);
  font-size: 1.05rem;
}

.article-content p + p {
  margin-top: 1rem;
}

.article-content ul {
  margin-top: 0.7rem;
}

.article-cta {
  margin-top: 2rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--navy);
}

.article-cta p {
  color: rgba(255, 255, 255, 0.78);
}

.gallery-collection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-collection figure {
  position: relative;
  min-height: 260px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #ddd;
  box-shadow: 0 16px 40px rgba(22, 32, 47, 0.12);
}

.gallery-main-card {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-collection img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

.gallery-collection figure:hover img {
  transform: scale(1.035);
}

.gallery-collection figcaption {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(22, 32, 47, 0.78);
  font-size: 0.9rem;
  font-weight: 800;
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.check-card {
  padding: clamp(1.3rem, 3vw, 2rem);
}

.check-card h3,
.scenario-grid h3 {
  margin-bottom: 1rem;
  color: var(--navy);
  font-size: 1.65rem;
}

.check-card li::marker {
  color: var(--accent);
}

.positive {
  border-top: 5px solid var(--green);
}

.neutral {
  border-top: 5px solid var(--accent);
}

.documents-card,
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: 2rem;
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.documents-card h2,
.contact-card h2 {
  color: #fff;
}

.documents-card p,
.contact-card p {
  color: rgba(255, 255, 255, 0.76);
}

.docs-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.docs-list div {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.docs-list dt {
  color: #ffbd7f;
  font-weight: 800;
}

.docs-list dd {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.86);
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.location-grid span {
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  border-radius: var(--radius-md);
  color: var(--navy);
  background: linear-gradient(145deg, #fffaf3, #efe2d2);
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(22, 32, 47, 0.06);
}

.faq-list {
  display: grid;
  gap: 0.9rem;
}

.faq-list details {
  padding: 1rem 1.2rem;
}

.faq-list summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.08rem;
}

.faq-list p {
  margin-top: 0.7rem;
  color: var(--muted);
}

.contact-card {
  grid-template-columns: 1fr;
}

.hidden-phone {
  display: none;
}

.phone-container,
.email-container {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.phone-number-link,
.email-link {
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
}

.phone-container span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.68);
}

.footer {
  padding: 1.4rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  background: #111927;
}

.floating-call-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 34px rgba(184, 100, 50, 0.44);
  animation: pulse-call 2.2s infinite;
}

.floating-call-button svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

@keyframes pulse-call {
  0%, 100% { box-shadow: 0 12px 34px rgba(184, 100, 50, 0.44); }
  50% { box-shadow: 0 12px 34px rgba(184, 100, 50, 0.64), 0 0 0 12px rgba(184, 100, 50, 0.16); }
}

.img-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

.img-preview-modal.active {
  display: flex;
}

.img-preview-modal img {
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.modal-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

/* ==========================================================================
   Авито/ЦИАН Лидогенерационный Баннер
   ========================================================================== */
.ad-source-banner {
  background: linear-gradient(135deg, var(--navy), #122230);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.ad-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.ad-banner-text {
  max-width: 720px;
}

.ad-banner-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffbd7f;
  background: rgba(255, 189, 127, 0.12);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.ad-banner-text h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ad-banner-text p {
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
  line-height: 1.55;
}

.ad-banner-actions {
  flex-shrink: 0;
}

.ad-banner-actions .button {
  box-shadow: 0 12px 24px rgba(184, 100, 50, 0.22);
}

@media (max-width: 940px) {
  .hero,
  .documents-card,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .ad-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
  }

  .ad-banner-actions {
    width: 100%;
  }

  .ad-banner-actions .button {
    width: 100%;
  }

  .facts-grid,
  .scenario-grid,
  .investment-cards,
  .blog-grid,
  .location-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-row span + span {
    border-left: 0;
  }

  .gallery-collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .section-shell {
    width: min(100% - 28px, 1160px);
  }

  .site-header {
    min-height: auto;
    padding-bottom: 44px;
  }

  .topbar {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.75rem 0.9rem;
  }

  .topbar a {
    white-space: nowrap;
    font-size: 0.88rem;
  }

  .hero {
    padding-top: 6.5rem;
  }

  .hero-card img {
    height: 260px;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .facts-grid,
  .scenario-grid,
  .investment-cards,
  .blog-grid,
  .location-grid,
  .gallery-collection {
    grid-template-columns: 1fr;
  }

  .section-cta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .gallery-main-card {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-collection figure,
  .gallery-collection img {
    min-height: 230px;
  }

  main {
    padding-top: 46px;
  }

  .quick-facts,
  .split-section,
  .condition-section,
  .scenarios-section,
  .investment-section,
  .documents-section,
  .location-section,
  .faq-section,
  .contact-section {
    margin-bottom: 54px;
  }

  .floating-call-button {
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
  }
}
