:root {
  --bg: #f8f4ee;
  --bg-soft: #fffdf9;
  --surface: #ffffff;
  --text: #2d2a27;
  --muted: #6f6760;
  --primary: #b48767;
  --primary-dark: #94674a;
  --line: #ece4da;
  --shadow: 0 12px 30px rgba(87, 63, 47, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
}

body[data-theme="green"] {
  --bg: #f1f6f1;
  --bg-soft: #fbfefb;
  --text: #24322a;
  --muted: #5f7165;
  --primary: #79a588;
  --primary-dark: #5c846b;
  --line: #dfebdf;
  --shadow: 0 12px 30px rgba(67, 100, 79, 0.1);
}

body[data-theme="blue"] {
  --bg: #f0f4fa;
  --bg-soft: #fbfdff;
  --text: #213042;
  --muted: #60758f;
  --primary: #6f8fb4;
  --primary-dark: #55749a;
  --line: #dde7f3;
  --shadow: 0 12px 30px rgba(58, 86, 120, 0.11);
}

body[data-theme="sky"] {
  --bg: #eef8fb;
  --bg-soft: #f9fdff;
  --text: #21414e;
  --muted: #5d7e8a;
  --primary: #67a8bf;
  --primary-dark: #498ca4;
  --line: #d9edf3;
  --shadow: 0 12px 30px rgba(66, 115, 132, 0.12);
}

body[data-theme="lavender"] {
  --bg: #f5f2f9;
  --bg-soft: #fdfbff;
  --text: #342b41;
  --muted: #7a7088;
  --primary: #a08bb7;
  --primary-dark: #856ea0;
  --line: #e8e0f0;
  --shadow: 0 12px 30px rgba(101, 79, 126, 0.1);
}

body[data-theme="rose"] {
  --bg: #f9f3f1;
  --bg-soft: #fffdfc;
  --text: #3a2f2d;
  --muted: #86706b;
  --primary: #c19387;
  --primary-dark: #a8776b;
  --line: #f0e1dc;
  --shadow: 0 12px 30px rgba(114, 81, 74, 0.1);
}

body[data-theme="mint"] {
  --bg: #eef8f4;
  --bg-soft: #fbfffd;
  --text: #213a33;
  --muted: #5f7e75;
  --primary: #75b3a2;
  --primary-dark: #559886;
  --line: #dcefe8;
  --shadow: 0 12px 30px rgba(62, 109, 95, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #f5ebe0 0, transparent 35%),
    var(--bg);
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 244, 238, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(228, 215, 201, 0.6);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-switcher {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  max-width: min(64vw, 620px);
  padding-bottom: 2px;
}

.theme-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.theme-btn:hover {
  transform: translateY(-1px);
}

.theme-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.header-cta {
  text-decoration: none;
  color: var(--primary-dark);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.section {
  padding: 72px 0;
}

.soft-bg {
  background: var(--bg-soft);
}

.hero {
  padding-top: 42px;
}

.hero-grid {
  display: grid;
  gap: 24px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

h1 {
  margin: 0 0 14px;
  line-height: 1.15;
  font-size: clamp(2rem, 3vw + 1rem, 3.3rem);
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.hero-image-wrap img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  object-fit: cover;
  max-height: 560px;
}

.section-title {
  margin: 0 0 28px;
  text-align: center;
  font-size: clamp(1.5rem, 1.6vw + 1rem, 2.2rem);
}

.section-title.left {
  text-align: left;
}

.card-grid {
  display: grid;
  gap: 16px;
}

.issues-grid {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.step-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 20px;
  min-height: 148px;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.step-num {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4e4d7;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.step-card h3 {
  margin: 0;
  font-size: 1rem;
}

.split-block {
  display: grid;
  gap: 24px;
  align-items: center;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.image-card img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.gallery-item {
  border: 0;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: transparent;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.about-photo {
  max-height: 540px;
  width: 100%;
  object-fit: cover;
}

.contacts {
  text-align: center;
  max-width: 680px;
}

.contacts p {
  margin: 10px 0;
  color: var(--muted);
}

.contacts a {
  color: var(--primary-dark);
  font-weight: 600;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 30px;
  background: #f6f0e9;
}

.footer-inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 699px) {
  .container {
    width: min(1120px, calc(100vw - 28px));
  }

  .header-inner {
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .brand {
    font-size: 0.98rem;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .theme-switcher {
    max-width: calc(100vw - 168px);
    gap: 5px;
  }

  .header-cta {
    padding: 9px 14px;
    font-size: 0.92rem;
    flex: 0 0 auto;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(1.72rem, 7vw, 2.2rem);
  }

  .hero-subtitle {
    font-size: 0.98rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .contacts .btn {
    width: 100%;
    text-align: center;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-image-wrap img {
    max-height: 420px;
  }

  .section-title {
    margin-bottom: 22px;
  }

  .card {
    padding: 18px;
  }

  .steps {
    grid-template-columns: repeat(4, minmax(86%, 1fr));
    gap: 12px;
    margin-right: -2px;
    padding-bottom: 12px;
  }

  .step-card {
    min-height: 134px;
    padding: 18px;
  }

  .lead {
    font-size: 1rem;
  }

  .image-card img,
  .gallery-item,
  .hero-image-wrap img {
    border-radius: 18px;
  }

  .contacts {
    text-align: left;
  }

  .contacts .section-title {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    gap: 2px;
  }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(27, 22, 18, 0.74);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal img {
  max-width: min(94vw, 920px);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  color: #3e3127;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 700px) {
  .issues-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
  }

  .formats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-block {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }

  .about-block {
    grid-template-columns: 0.86fr 1.14fr;
  }
}
