:root {
  --beige: #e1d4c2;
  --brown: #6e473b;
  --taupe: #a78d78;
  --white: #ffffff;
  --gray-50: #f6f6f6;
  --gray-100: #efefef;
  --gray-500: #7d7d7d;
  --gray-800: #2c2c2c;
  --shadow-soft: 0 14px 34px rgba(40, 25, 20, 0.2);
  --shadow-card: 0 12px 28px rgba(30, 20, 15, 0.18);
  --surface-border: rgba(110, 71, 59, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
}

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

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

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

.section {
  padding: 96px 0;
}

h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", "Times New Roman", Times, serif;
  margin: 0 0 16px;
}

p {
  line-height: 1.7;
  margin: 0 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--brown);
  color: var(--white);
  font-weight: 600;
  border: 1px solid var(--taupe);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 10px 20px rgba(110, 71, 59, 0.35);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(110, 71, 59, 0.4);
}

.btn--small {
  padding: 10px 18px;
  font-size: 14px;
}

.title-underline {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
}

.title-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 62%;
  height: 2px;
  background: var(--taupe);
}

.site-header {
  position: relative;
  z-index: 30;
}

.top-strip {
  background: var(--brown);
  color: var(--white);
  padding: 12px 0 40px;
}

.top-strip__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.32);
  transition: background 0.25s ease;
  overflow: hidden;
}

.social-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  opacity: 1;
}

.socials a:hover {
  background: rgba(255, 255, 255, 0.5);
}

.top-strip .socials a {
  background: rgba(255, 255, 255, 0.46);
}

.top-strip .socials a:hover {
  background: rgba(255, 255, 255, 0.62);
}

.top-strip .social-icon {
  filter: brightness(0) invert(1);
}

.main-nav-wrap {
  margin-top: -26px;
  position: relative;
}

.main-nav {
  min-height: 88px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}

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

.brand__logo {
  width: 112px;
  height: 64px;
  border-radius: 10px;
  background: #fff url("./img/logo.png") center/98% no-repeat;
  color: transparent;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0;
  overflow: hidden;
  border: 1px solid rgba(110, 71, 59, 0.26);
  box-shadow: 0 6px 14px rgba(30, 20, 15, 0.14);
}

.brand--header .brand__logo {
  width: 168px;
  height: 56px;
  background-size: 100% auto;
}

.brand__text {
  display: grid;
  gap: 2px;
}

.brand__text strong {
  font-size: 16px;
}

.brand__text span {
  color: var(--gray-500);
  font-size: 13px;
}

.brand--footer .brand__text strong {
  color: #efe9e5;
  font-size: 17px;
}

.brand--footer .brand__text span {
  color: #c5bbb5;
  font-size: 14px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav > a {
  position: relative;
  font-weight: 500;
}

.nav > a:not(.btn)::after,
.service-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 1.5px;
  background: var(--taupe);
  transition: width 0.3s ease;
}

.nav > a:not(.btn):hover::after,
.service-card:hover h3::after {
  width: 100%;
}

.nav__link--current {
  color: var(--brown) !important;
  font-weight: 600;
}

.nav__link--current::after {
  width: 100%;
}

.burger {
  display: none;
  border: 0;
  background: transparent;
  color: var(--brown);
}

.hero {
  position: relative;
  min-height: 680px;
  margin-top: -24px;
  display: flex;
  align-items: center;
}

.hero__bg,
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  background: linear-gradient(104deg, rgba(30, 16, 12, 0.56), rgba(30, 16, 12, 0.2));
}

.hero__content {
  position: relative;
  color: var(--white);
  max-width: 640px;
  transform: translate(-36px, -30px);
  animation: fadeIn 1s ease both;
}

.hero__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.06;
}

.floating-cards {
  position: relative;
  z-index: 22;
}

.cards--floating {
  margin-top: -95px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  transform: translateY(-20%);
}

.card {
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--surface-border);
  padding: 24px;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card .icon {
  color: var(--taupe);
}

/* SVG-иконки вместо сторонней библиотеки (Lighthouse: меньше JS) */
.icon {
  display: block;
  flex-shrink: 0;
}

.burger .icon {
  width: 24px;
  height: 24px;
}

.card .icon {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
}

.arrow .icon {
  width: 20px;
  height: 20px;
}

.process-item__icon .icon {
  width: 36px;
  height: 36px;
}

/* Ниже первого экрана: ускорение отрисовки длинной главной (content-visibility) */
.about.section,
.services.section,
.interactive.section,
.directions.section,
.process.section {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

.about__grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.about__images {
  position: relative;
  min-height: 480px;
}

.about__img-main {
  width: 85%;
  height: 470px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--surface-border);
}

.about__img-small {
  position: absolute;
  width: 48%;
  right: 0;
  bottom: -22px;
  border-radius: 18px;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-card);
}

.about__bio {
  position: relative;
}

.about__bio.is-collapsed {
  max-height: 250px;
  overflow: hidden;
}

.about__bio.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(246, 246, 246, 0), var(--gray-50));
}

.about__more-btn {
  margin: 8px 0 18px;
}

.about-page {
  padding-top: 110px;
}

.about-page__container {
  max-width: 1060px;
}

.about-page__title,
.certs__title {
  font-size: clamp(38px, 5vw, 56px);
  margin-bottom: 14px;
}

.feather-line {
  width: min(280px, 60%);
  height: 2px;
  margin-bottom: 44px;
  background: linear-gradient(
    to right,
    rgba(167, 141, 120, 0),
    rgba(167, 141, 120, 0.75) 20%,
    rgba(110, 71, 59, 0.95) 50%,
    rgba(167, 141, 120, 0.75) 80%,
    rgba(167, 141, 120, 0)
  );
  border-radius: 999px;
}

.about-story {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 40px;
  align-items: start;
}

.about-story__card {
  background: var(--white);
  border-radius: 18px;
  padding: 34px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--surface-border);
}

.about-story__card p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-story__card p:last-child {
  margin-bottom: 0;
}

.about-story__photo-wrap {
  margin: 0;
  position: sticky;
  top: 120px;
  padding: 16px;
  border-radius: 24px;
  background: #efe2d2;
  box-shadow: 0 18px 30px rgba(110, 71, 59, 0.2);
  border: 1px solid rgba(110, 71, 59, 0.26);
}

.about-story__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
}

.certs {
  background: var(--white);
}

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

.cert-card {
  display: block;
  background: var(--gray-50);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.cert-card span {
  display: block;
  padding: 14px 14px 16px;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brown);
}

.cert-card:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 34px rgba(30, 20, 15, 0.28);
}

.services-page {
  padding-top: 110px;
}

.services-page__container {
  max-width: 1060px;
}

.services-page__title {
  font-size: clamp(38px, 5vw, 56px);
  margin-bottom: 14px;
}

.contacts-page {
  padding-top: 110px;
}

.contacts-page__container {
  max-width: 980px;
}

.contacts-page__title {
  font-size: clamp(38px, 5vw, 56px);
  margin-bottom: 14px;
}

.contacts-card {
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--surface-border);
  padding: 34px;
}

.contacts-lead {
  font-size: 18px;
  margin-bottom: 18px;
}

.contacts-note {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-left: 4px solid var(--brown);
  background: #f4ece3;
  border-radius: 12px;
}

.contacts-list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.contacts-list a {
  text-decoration: underline;
}

.socials--large {
  gap: 12px;
  margin-bottom: 22px;
}

.socials--large a {
  width: 42px;
  height: 42px;
}

.contacts-call-btn {
  min-width: 210px;
}

/* Страницы с боковым столбцом «Методы работы» (все кроме главной) */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 36px;
  align-items: start;
}

.page-layout__main {
  min-width: 0;
}

.methods-sidebar {
  position: sticky;
  top: 120px;
  font-size: 14px;
  color: var(--gray-500);
}

.methods-sidebar__title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  color: var(--brown);
  margin: 0 0 14px;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.methods-sidebar__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 58%;
  height: 2px;
  background: linear-gradient(
    to right,
    rgba(110, 71, 59, 0.95),
    rgba(167, 141, 120, 0.6)
  );
  border-radius: 999px;
}

.methods-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.methods-sidebar__list li {
  position: relative;
  padding-left: 18px;
  margin: 0;
  line-height: 1.5;
}

.methods-sidebar__list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--taupe);
  font-size: 12px;
}

.media-page {
  padding-top: 110px;
}

.media-page__container {
  max-width: 1100px;
}

.media-page__title {
  font-size: clamp(34px, 4.6vw, 54px);
  margin-bottom: 14px;
  max-width: 980px;
}

.media-intro {
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--surface-border);
  padding: 30px;
  margin-bottom: 24px;
}

.media-lead {
  font-size: 22px;
  font-family: "Playfair Display", serif;
  margin-bottom: 10px;
}

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

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

.media-card h2 {
  font-size: 27px;
  margin-bottom: 12px;
}

.media-card ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.media-cta {
  background: linear-gradient(180deg, #efe2d2, #e8d8c3);
  border-radius: 20px;
  border: 1px solid rgba(110, 71, 59, 0.26);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.price-table-wrap {
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--surface-border);
  overflow: hidden;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th,
.price-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(110, 71, 59, 0.12);
}

.price-table th {
  background: linear-gradient(180deg, #efe3d2, #eadcc9);
  color: #4e332b;
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 600;
}

.price-table tbody tr:nth-child(even) {
  background: #fcf9f6;
}

.price-table tbody tr:hover {
  background: #f4ede6;
}

.price-table td:nth-child(2),
.price-table td:nth-child(3) {
  white-space: nowrap;
}

.services {
  background: var(--white);
}

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

.service-card {
  background: var(--gray-50);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--surface-border);
}

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

.service-card h3,
.service-card p {
  margin-left: 16px;
  margin-right: 16px;
}

.service-card h3 {
  margin-top: 14px;
  position: relative;
  display: inline-block;
}

.service-card p {
  margin-bottom: 18px;
}

.interactive__shell {
  width: min(1160px, 92%);
}

.interactive__bg {
  background: linear-gradient(rgba(225, 212, 194, 0.84), rgba(225, 212, 194, 0.84)),
    url("https://images.unsplash.com/photo-1469571486292-b53601020f90?auto=format&fit=crop&w=1800&q=80")
      center/cover no-repeat;
  border-radius: 24px;
  padding: 48px 28px;
}

.interactive__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.15fr 1fr;
}

.reviews,
.question-form {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--surface-border);
}

.review {
  display: none;
  color: #3f3430;
}

.review.is-active {
  display: block;
  animation: fadeIn 0.6s ease both;
}

.reviews__controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--taupe);
  color: var(--taupe);
  background: transparent;
  display: grid;
  place-items: center;
}

.question-form form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 500;
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d5cec7;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(110, 71, 59, 0.25);
  border-color: var(--brown);
}

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

.direction-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--surface-border);
}

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

.direction-card h3 {
  padding: 16px;
  margin: 0;
}

.process {
  background: var(--white);
}

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

.process-item {
  border-radius: 16px;
  background: var(--gray-50);
  padding: 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--surface-border);
}

.process-item__icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #e4d8cf;
  color: var(--brown);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.service-card {
  border: 1px solid var(--surface-border);
}

.pulse {
  animation: pulse 2.4s infinite;
}

.footer {
  background: #261b18;
  color: #efe9e5;
  padding: 52px 0;
}

.footer__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.footer h4 {
  margin-bottom: 14px;
}

.footer a {
  display: block;
  margin-bottom: 8px;
  color: #efe9e5;
}

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

.footer .socials a {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer .social-icon {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.footer__copy {
  color: #c5bbb5;
  margin-top: 12px;
  margin-bottom: 6px;
}

.footer__legal {
  color: #c5bbb5;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  max-width: 380px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
}

@media (max-width: 980px) {
  .nav {
    display: none;
    position: absolute;
    top: 90px;
    right: 4%;
    width: min(360px, 92vw);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    border-radius: 14px;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav.is-open {
    display: flex;
  }

  .burger {
    display: block;
  }

  .hero {
    margin-top: 0;
    min-height: 560px;
  }

  .hero__content {
    transform: none;
  }

  .cards--floating,
  .services__grid,
  .directions__grid,
  .process__grid,
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .about__grid,
  .interactive__grid {
    grid-template-columns: 1fr;
  }

  .about-story {
    grid-template-columns: 1fr;
  }

  .about-story__card,
  .about-story__photo-wrap {
    grid-column: auto;
  }

  .about-story__photo-wrap {
    position: static;
  }

  .about-story__photo-wrap {
    width: min(100%, 380px);
  }

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

  .price-table th,
  .price-table td {
    padding: 14px 14px;
  }

  .contacts-card {
    padding: 26px;
  }

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

  .page-layout {
    grid-template-columns: 1fr;
  }

  .methods-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 20px;
    padding-top: 8px;
    border-top: 1px solid var(--surface-border);
  }

  .methods-sidebar__title {
    margin: 0;
    width: 100%;
  }

  .methods-sidebar__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .methods-sidebar__list li {
    padding-left: 0;
  }

  .methods-sidebar__list li::before {
    content: "→ ";
    position: static;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 72px 0;
  }

  .main-nav-wrap {
    margin-top: 0;
  }

  .cards--floating {
    margin-top: 0;
    transform: none;
    grid-template-columns: 1fr;
  }

  .about__images {
    min-height: auto;
    display: grid;
    gap: 14px;
  }

  .about__img-main,
  .about__img-small {
    width: 100%;
    position: static;
    height: auto;
  }

  .services__grid,
  .directions__grid,
  .process__grid,
  .footer__grid,
  .certs__grid {
    grid-template-columns: 1fr;
  }

  .about-story__photo-wrap {
    width: min(100%, 320px);
    margin: 0 auto;
  }

  .feather-line {
    width: min(220px, 78%);
    margin-bottom: 34px;
  }

  .price-table {
    min-width: 640px;
  }

  .price-table-wrap {
    overflow-x: auto;
  }

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

  .media-intro,
  .media-card,
  .media-cta {
    padding: 22px;
  }

  .top-strip {
    padding-bottom: 18px;
  }
}
