@font-face {
  font-family: 'Evolventa';
  src: url('../assets/fonts/Evolventa-Regular.woff') format('woff'),
       url('../assets/fonts/Evolventa-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Evolventa';
  src: url('../assets/fonts/Evolventa-Bold.woff') format('woff'),
       url('../assets/fonts/Evolventa-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Evolventa';
  src: url('../assets/fonts/Evolventa-Oblique.woff') format('woff'),
       url('../assets/fonts/Evolventa-Oblique.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
}

:root {
  --color-gold: #a78b62;
  --gold_100: #EFEBE6;
  --gold_200: #D5CBBC;
  --gold-500: #A78B62;
  --color-text: #000000;
  --color-text-dark: #1d1b1a;
  --color-text-muted: #555555;
  --color-text-meta: #76706b;
  --color-overlay: #666666;
  --color-dim: #141211;
  --color-bg-light: #f7f7f7;
  --color-bg-contacts: #f9f9f9;
  --color-bg-beige: #efebe6;
  --color-bg-beige-dark: #f0e8e2;
  --color-white: #ffffff;
  --color-badge-bg: #fbfaf8;
  --color-badge-dark: #191817;
  --radius-card: 16px;
  --radius-btn: 500px;
  --radius-popup: 30px;
  --radius-btn-mob: 18px;
  --font-primary: 'Evolventa', 'Montserrat', 'Golos Text', sans-serif;
  --font-secondary: 'Manrope', 'Montserrat', sans-serif;
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

a {
  text-decoration: none;
  color: var(--gold-500);
}

/* ========== DESKTOP/TABLET ========== */
.bottom-line {
  padding-bottom: 20px;
}
.bottom-line::after {
  content: '';
  display: block;
  width: 65px;
  height: 3px;
  background-color: var(--gold-500);
  margin-top: 15px;
}
.section-inner {
  max-width: 1224px;
  margin: 0 auto;
  padding: 80px 0;
  border-bottom: solid 1px var(--gold_100);
}

.section-light {
  /*max-width: 1224px;*/
  /*margin: 0 auto;*/
  /*padding: 80px 40px;*/
  /*background: var(--color-bg-light);*/
  /*padding: 80px 0;*/
}

.section-contacts {
  background: var(--color-bg-contacts);
  padding: 60px 0 30px;
}

.section-label {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 32px;
}

/* HEADER */
.header-section {
  background: var(--color-white);
}

.header-container {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
}

.header-text {
  flex: 1;
  padding: 138px 80px 60px 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.header-subtitle {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 5px;
}

.header-title {
  font-family: var(--font-primary);
  font-size: 62px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-text);
  margin-bottom: 26px;
}

.header-desc {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.33;
  color: var(--color-text-muted);
  /*margin-bottom: 68px;*/
  max-width: 517px;
}

.header-buttons {
  display: flex;
  gap: 23px;
  border-bottom: solid 1px var(--gold_100);
  padding: 50px 0;
}

/* Три кнопки шапки — одной ширины и в одну строку. По содержимому они
   получались разной длины, а длинная надпись переносилась на вторую
   строку: иконка оставалась по центру, текст уезжал, и ряд выглядел
   рваным. */
.header-buttons .btn-gold,
.header-buttons .btn-outline {
  flex: 0 0 auto;
  min-width: 150px;
  white-space: nowrap;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 58px;
  padding: 0 32px;
  background: var(--color-gold);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-btn);
  border: none;
  transition: opacity var(--transition);
  box-shadow: 0 10px 26px rgba(0,0,0,0.1);
}

.btn-gold img,
.btn-gold svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  display: block;
}

.btn-gold:hover {
  opacity: 0.9;
  color: var(--color-white);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 58px;
  padding: 0 32px;
  background: var(--color-white);
  color: var(--color-text-dark);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  border-radius: var(--radius-btn);
  border: 1px solid var(--color-bg-beige);
  transition: border-color var(--transition);
}

.btn-outline img,
.btn-outline svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: block;
}

.btn-outline:hover {
  border-color: var(--color-gold);
}

.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  padding: 0 34px;
  background: var(--color-white);
  color: var(--color-text-dark);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  border-radius: var(--radius-btn);
  border: 1px solid var(--gold_200);
  transition: opacity var(--transition);
  margin: 0 0 40px;
}

.btn-outline-gold:hover {
  opacity: 0.7;
  color: var(--color-text-dark);
}

.header-photo {
  flex: 0 0 725px;
  position: relative;
}

.header-image {
  width: 100%;
  height: 786px;
  object-fit: cover;
  display: block;
}

.header-social {
  position: absolute;
  top: 46px;
  right: 108px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-white);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.social-icon {
  display: block;
  width: 31px;
  height: 31px;
  border-radius: 20%;
  background: var(--color-white);
  background-size: 19px;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity var(--transition);
}

.social-icon:hover {
  opacity: 0.8;
}

.social-icon--max {
  background-image: url('../assets/icons/icon-max-sheet.svg');
}

.social-icon--telegram {
  background-image: url('../assets/icons/icon-telegram-sheet.svg');
}

.social-icon--whatsapp {
  background-image: url('../assets/icons/icon-whatsapp-sheet.svg');
}

/* SERVICES */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

/* FORMATS */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
  transition: transform var(--transition);
}

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

.service-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
}

.service-icon img {
  width: 100%;
  height: 100%;
}

.service-title {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 8px;
}

.service-desc {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* PORTFOLIO */
.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.portfolio-header .section-label {
  margin-bottom: 0;
}

.portfolio-arrows {
  display: flex;
  gap: 8px;
}

.portfolio-arrow-btn {
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--gold_200);
  background: var(--color-white);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform var(--transition);
  cursor: pointer;
}

.portfolio-arrow-btn:hover {
  transform: translateY(-4px);
}

.portfolio-arrow-btn--left {
  background-image: url('../assets/icons/arrow-left-circle.svg');
}

.portfolio-arrow-btn--right {
  background-image: url('../assets/icons/arrow-right-circle.svg');
}

.arrow-btn {
  width: 54px;
  height: 54px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition);
}

.arrow-btn:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.arrow-btn img {
  /*width: 24px;*/
  /*height: 24px;*/
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.portfolio-card {
  position: relative;
  height: 413px;
  overflow: hidden;
  border-radius: var(--radius-card);
  cursor: pointer;
}

.portfolio-image {
  position: absolute;
  top: -5%;
  /*left: -5%;*/
  width: 110%;
  height: 110%;
  object-fit: cover;
  object-position: center;
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio-name {
  font-family: var(--font-primary);
  font-size: 23px;
  font-weight: 700;
  color: var(--color-white);
}

.portfolio-arrow {
  width: 32px;
  height: 32px;
}

/* CONTACTS */
.contacts-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 48px;
}

.contacts-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Пятая карточка в сетке из двух колонок остаётся одна: без растягивания
   рядом с ней зияет пустое место, и блок выглядит оборванным. */
/* Карточка партнёра, у которой уже есть контакт: ведёт себя как ссылка,
   выглядит — как соседние карточки. */
.service-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.contact-item--wide {
  grid-column: 1 / -1;
}

.contact-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--gold_200, #D5CBBC);
  transition: transform var(--transition);
}

.contact-item:hover {
  transform: translateY(-4px);
}

.contact-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.contact-icon img {
  width: 100%;
  height: 100%;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-value {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 0;
}

.contact-hint {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--color-bg-beige);
}

.footer-links-right {
  display: flex;
  gap: 40px;
}

.footer-copyright {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.footer-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--color-gold);
}

/* ========== MOBILE ========== */
.mob-screen-1 {
  min-height: 100vh;
  background: var(--color-white);
}

.mob-hero {
  --bg-pos-x: -350px;
  --bg-pos-y: -120px;
  --bg-scale: 230%;
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 24px;
  background:
    image-set(
      url('../assets/img/profile-desktop.webp') type('image/webp'),
      url('../assets/img/profile-desktop.jpg') type('image/jpeg')
    ) var(--bg-pos-x) var(--bg-pos-y) / var(--bg-scale) no-repeat;
}

.mob-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 50%, rgba(0,0,0,0.4) 100%);
}

.mob-hero-content {
  position: absolute;
  z-index: 1;
  /* margin-bottom: 24px; */
  top: 70px;
  right: 20px;
}

.mob-title {
  font-family: var(--font-primary);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.3px;
  color: var(--color-white);
  margin-bottom: 4px;
}

.mob-subtitle {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0;
}

.mob-hero-buttons {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
}

.mob-btn-gold,
.mob-btn-outline {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 58px;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-btn-mob);
  transition: opacity var(--transition);
}

.mob-btn-gold {
  background: var(--color-gold);
  color: var(--color-white);
  box-shadow: 0 10px 26px rgba(0,0,0,0.15);
}

.mob-btn-gold:hover {
  opacity: 0.9;
  color: var(--color-white);
}

.mob-btn-outline {
  background: #ffffff30;
  color: var(--color-white);
  border: 1px solid var(--color-white);
}

.mob-btn-gold img,
.mob-btn-outline img {
  width: 16px;
  height: 16px;
}

.mob-screen-2 {
  padding: 24px 20px 40px;
  background: var(--color-white);
}

.mob-services-header {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
}

.mob-btn-border {
  flex: 1;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--color-white);
  border: 1px solid var(--color-bg-beige);
  border-radius: 12px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-dark);
  transition: border-color var(--transition);
}

.mob-btn-border:hover {
  border-color: var(--color-gold);
}

.mob-btn-border img {
  width: 16px;
  height: 16px;
}

.mob-arrow-down {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mob-arrow-down img {
  width: 20px;
  height: 20px;
  transform: rotate(90deg);
  opacity: 0.3;
}

.mob-screen-2 .section-label {
  font-size: 12px;
  letter-spacing: 1.44px;
  margin-bottom: 16px;
  color: var(--color-text-meta);
}

.mob-services-list,
.mob-formats-list {
  margin-bottom: 24px;
}

.mob-service-item {
  padding: 16px 0;
  position: relative;
}

.mob-service-left {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.mob-service-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-beige);
  border-radius: 10px;
}

.mob-service-icon img {
  width: 20px;
  height: 20px;
}

.mob-service-title {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 2px;
}

.mob-service-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

.mob-service-border {
  position: absolute;
  bottom: 0;
  left: 48px;
  right: 0;
  height: 1px;
  background: var(--color-bg-beige);
}

.mob-formats-label {
  margin-top: 16px;
}

.mob-contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--color-bg-light);
  border-radius: 12px;
  margin-top: 16px;
}

.mob-contact-name {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0;
}

.mob-contact-role {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-meta);
  margin-bottom: 4px;
}

.mob-contact-phone {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0;
}

.mob-phone-btn {
  width: 54px;
  height: 54px;
  background: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mob-phone-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

/* ========== MODALS ========== */

/* MODAL: PORTFOLIO */
.portfolio-modal-dialog {
  max-width: 1150px;
}

.portfolio-modal-content {
  border-radius: var(--radius-popup);
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
}

.portfolio-popup-desktop {
  display: flex;
  min-height: 600px;
}

.portfolio-popup-image-wrap {
  flex: 0 0 597px;
  position: relative;
}

.portfolio-popup-image-full {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-popup-nav {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-arrow {
  width: 54px;
  height: 54px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  cursor: pointer;
}

.nav-arrow:hover {
  transform: translateY(-4px);
}

.nav-arrow img {
  /*width: 24px;*/
  /*height: 24px;*/
}

.nav-counter {
  font-family: var(--font-secondary);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2.7px;
  color: var(--color-bg-beige);
}

.portfolio-popup-info {
  flex: 1;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popup-meta {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--color-text-meta);
  margin-bottom: 8px;
}

.popup-title {
  font-family: var(--font-primary);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.33;
  color: var(--color-text);
  margin-bottom: 16px;
}

.popup-divider {
  width: 65px;
  height: 3px;
  background: var(--color-gold);
  margin-bottom: 24px;
}

.popup-section {
  margin-bottom: 20px;
}

.popup-section-label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--color-text-meta);
  margin-bottom: 4px;
}

.popup-section-text {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.53;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.popup-close-btn-desktop {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.popup-close-btn-desktop img {
  /*width: 24px;*/
  /*height: 24px;*/
}

.portfolio-popup-tablet-image {
  position: relative;
  width: 100%;
  height: 423px;
  overflow: hidden;
}

.portfolio-popup-tablet-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-popup-tablet-image .portfolio-popup-nav {
  bottom: 16px;
}

.nav-arrow-right-close {
  width: 54px;
  height: 54px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.nav-arrow-right-close img {
  /*width: 24px;*/
  /*height: 24px;*/
}

.portfolio-popup-tablet-info {
  padding: 32px;
}

/* MODAL: CONTACTS */
.contacts-modal-dialog {
  max-width: 530px;
}

.contacts-modal-content {
  border-radius: var(--radius-popup);
  border: none;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
}

.contacts-modal-content .modal-body {
  padding: 40px;
}

.contacts-modal-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* MODAL: CALLBACK */
.callback-modal-dialog {
  max-width: 530px;
}

.callback-modal-content {
  border-radius: var(--radius-popup);
  border: none;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
  overflow: hidden;
}

.callback-popup-desktop {
  display: flex;
  min-height: 462px;
}

.callback-popup-bg {
  flex: 0 0 220px;
  overflow: hidden;
}

.callback-popup-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.callback-popup-form-wrap {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.btn-close-callback {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 54px;
  height: 54px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border: none;
}

.btn-close-callback img {
  /*width: 24px;*/
  /*height: 24px;*/
}

.callback-title {
  font-family: var(--font-primary);
  font-size: 30px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 12px;
}

/* Поля замера: скрыты у «Заказать звонок», появляются у «Вызвать замер».
   display:none — не косметика: скрытый так required-элемент браузер не
   берёт в проверку, и звонок с их пустыми полями всё равно отправляется. */
.cb-measure-only {
  display: none;
  margin-bottom: 12px;
}

.is-measurement .cb-measure-only {
  display: flex;
  gap: 8px;
}

.cb-measure-only.form-row .form-input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

/* Необязательные блоки за галочкой. Правило идёт после общего
   .is-measurement .cb-measure-only{display:flex} и перебивает его:
   внутри блока не ряд полей, а галочка со своим содержимым. */
.is-measurement .cb-extra {
  display: block;
  margin-bottom: 10px;
}

.cb-extra-toggle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-text-dark);
  line-height: 1.35;
}

.cb-extra-check {
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  accent-color: var(--color-gold);
}

/* Скрываем именно display:none — так браузер не считает поля внутри
   заполненными и не тащит их в проверку, пока галочка не стоит. */
.cb-extra-body {
  display: none;
  margin-top: 10px;
}

.cb-extra.is-open .cb-extra-body {
  display: block;
}

/* Что замеряем — галочки в строку с переносом. Блок и так display:flex
   по общему правилу .is-measurement .cb-measure-only; здесь только
   перенос и разбег, иначе четыре варианта растянут форму в столбик. */
.cb-targets {
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 4px;
}

.cb-target {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--color-text-dark);
}

.cb-target input {
  width: 17px;
  height: 17px;
  flex: none;
  margin: 0;
  accent-color: var(--color-gold);
}

.cb-section-label {
  margin: 4px 0 2px;
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Полей у замера больше десятка — на невысоком экране форма выше
   viewport. Прокручиваем саму карточку, а не всю страницу за модалкой. */
.callback-popup-form-wrap,
.callback-popup-tablet,
.callback-popup-mobile {
  max-height: 90vh;
  overflow-y: auto;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--color-bg-beige);
  border-radius: 8px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-badge-bg);
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus {
  border-color: var(--color-gold);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.btn-full {
  width: 100%;
  margin-top: 8px;
}

.form-agreement {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 12px;
  margin-bottom: 0;
  text-align: center;
}

.form-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-muted);
  cursor: pointer;
  text-align: left;
}

.form-consent-checkbox {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--color-gold, #a78b62);
  cursor: pointer;
}

.form-consent-label a {
  color: inherit;
  text-decoration: underline;
}

.callback-popup-tablet {
  padding: 40px;
  position: relative;
}

.callback-popup-mobile {
  padding: 24px;
  position: relative;
}

/* MODAL: SUCCESS */
.success-modal-dialog {
  max-width: 399px;
}

.success-modal-content {
  border-radius: var(--radius-popup);
  border: none;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
}

.success-modal-content .modal-body {
  padding: 60px 40px;
}

.success-title {
  font-family: var(--font-primary);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.33;
  color: var(--color-text);
  margin-bottom: 0;
}

/* MODAL: MOBILE SHEET */
.sheet-modal-dialog {
  margin: 0 !important;
  max-width: 100%;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: none !important;
}

.sheet-modal-content {
  border-radius: 26px 26px 0 0;
  border: none;
  box-shadow: 0 -12px 44px rgba(0,0,0,0.15);
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 0;
}

.sheet-modal-content .modal-body {
  padding: 16px 20px 32px;
}

.sheet-handle {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.sheet-handle span {
  width: 44px;
  height: 5px;
  background: var(--color-bg-beige);
  border-radius: 3px;
}

.sheet-title {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-meta);
  margin-bottom: 16px;
  text-align: left;
  text-transform: uppercase;
}

.sheet-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 5px 20px;
}

.sheet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 5px 0;
  text-decoration: none;
  color: inherit;
}

.sheet-option-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(167, 139, 98, 0.13);
  border-radius: 14px;
}

.sheet-option-icon img {
  display: block;
}

.sheet-option-info {
  flex: 1;
}

.sheet-option-name {
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.sheet-option-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-meta);
  margin-bottom: 0;
}

.sheet-option-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sheet-option-arrow img {
  width: 100%;
  height: 100%;
}

.sheet-cancel {
  width: 100%;
  height: 52px;
  margin-top: 16px;
  background: var(--color-bg-beige);
  border: none;
  border-radius: 15px;
  font-family: var(--font-secondary);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-meta);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MODAL: POLICY & CONSENT */
.policy-modal-dialog {
  max-width: 1100px;
}

.policy-modal-content {
  border-radius: var(--radius-popup);
  border: none;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
}

.policy-modal-content .modal-body {
  padding: 40px;
}

.policy-title {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 24px;
}

.policy-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.policy-text p {
  margin-bottom: 12px;
}

.policy-text strong {
  color: var(--color-text);
}

.btn-back-home {
  width: 180px;
}

.policy-contacts {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--gold_200);
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 1199px) {
  .header-text {
    padding: 80px 40px 40px 60px;
  }

  .header-title {
    font-size: 48px;
  }

  .header-desc {
    font-size: 18px;
  }

  .header-photo {
    flex: 0 0 400px;
  }

  .header-image {
    height: auto;
    min-height: 600px;
  }

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

  .portfolio-grid {
    gap: 16px;
  }

  .portfolio-card {
    height: 300px;
  }
}

@media (max-width: 991px) {
  .header-container {
    flex-direction: column-reverse;
  }

  .header-text {
    padding: 40px 40px 60px;
  }

  .header-title {
    font-size: 42px;
  }

  .header-photo {
    flex: none;
  }

  .header-image {
    height: auto;
    min-height: auto;
    max-height: 500px;
  }

  .header-social {
    position: static;
    padding: 12px 24px;
    background: #000;
  }

  .social-label {
    color: var(--color-text-meta);
  }

  .section-inner {
    padding: 0 24px;
  }

  .section-light {
    padding: 48px 0;
  }

  .services-grid,
  .formats-grid {
    grid-template-columns: 1fr;
  }

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

  .contacts-grid {
    gap: 20px;
  }

  .contacts-block {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Mobile (<768px): all mobile styles are default, just overrides */
@media (max-width: 767px) {
  .portfolio-popup-tablet-info {
    padding: 24px;
  }

  .popup-title {
    font-size: 28px;
  }

  .callback-popup-tablet {
    padding: 24px;
  }

  .callback-title {
    font-size: 24px;
  }
}

/* Tablet (768px–991px) */
@media (min-width: 768px) and (max-width: 991px) {

  /* HEADER */
  .header-container {
    flex-direction: row;
    gap: 30px;
  }
  .header-text {
    flex: 0 0 298px;
    margin-left: 40px;
    padding: 142px 0 0;
  }
  .header-subtitle {
    font-size: 14px;
    letter-spacing: 1.4px;
    margin-bottom: 8px;
  }
  .header-title {
    font-size: 38px;
    line-height: 44px;
    margin-bottom: 26px;
  }
  .header-desc {
    font-size: 16px;
    line-height: 21.28px;
    margin-bottom: 43px;
    max-width: none;
  }
  .header-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding-top: 0;
    padding-bottom: 101px;
  }
  .btn-gold,
  .btn-outline {
    height: 50px;
    width: 100%;
  }
  .header-photo {
    flex: 1;
    min-width: 0;
  }
  .header-image {
    height: 606px;
    width: 100%;
    object-fit: cover;
    object-position: 50% 50%;
  }
  .header-social {
    top: 28px;
    right: 41px;
    position: absolute;
    padding: 0;
    background: transparent;
  }
  .social-label {
    font-size: 14px;
    color: var(--color-white);
  }

  /* SERVICES */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .formats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .service-title {
    font-size: 16px;
  }
  .service-desc {
    font-size: 14px;
  }

  /* PORTFOLIO */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .portfolio-name {
    font-size: 20px;
  }

  /* CONTACTS */
  .contacts-grid {
    gap: 20px;
    margin-bottom: 40px;
  }
  .contacts-block {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .contact-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 30px 20px;
  }
  .contact-icon {
    width: 36px;
    height: 36px;
  }
  .contact-text {
    gap: 5px;
  }
  .contact-hint {
    line-height: 21.28px;
  }
  .footer-links {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .footer-links-right {
    flex-direction: column;
    gap: 0px;
  }

  /* POPUP PORTFOLIO */
  .popup-title {
    font-size: 24px;
  }
  .popup-section-text {
    line-height: 24.48px;
  }
}

/* Print */
@media print {
  .d-md-block {
    display: block !important;
  }

  .d-md-none {
    display: none !important;
  }

  .modal {
    display: none !important;
  }

  .header-photo {
    flex: 0 0 40%;
  }

  .header-image {
    height: auto;
  }

  .header-text {
    padding: 20px;
  }

  .header-title {
    font-size: 36px;
  }

  .btn-gold,
  .btn-outline,
  .arrow-btn,
  .social-icon {
    display: none !important;
  }

  .section-light,
  .section-contacts {
    padding: 20px 0;
    background: none !important;
  }

  .service-card {
    box-shadow: none !important;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .portfolio-card {
    break-inside: avoid;
  }

  .contacts-grid {
    break-inside: avoid;
  }

  .footer-links {
    break-inside: avoid;
  }
}

/* MAX copy-to-clipboard toast */
.max-copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  background: var(--color-dim, #141211);
  color: var(--color-white, #fff);
  padding: 12px 20px;
  border-radius: var(--radius-btn, 500px);
  font-family: var(--font-primary);
  font-size: 14px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 4px 25px rgba(0,0,0,0.25);
  opacity: 0;
  z-index: 2000;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.max-copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------------------------------------------------------------------
   Строки-действия на визитке

   Адрес студии и вызов замера стоят в том же списке, что и описания
   форматов работы, и внешне от них не отличались — по адресу просто не
   нажимали, считая его справкой. Отличаем действием: подпись со стрелкой,
   рамка и отклик на касание. Оформление остаётся прежним, добавляется
   только то, что делает строку кнопкой.
   ------------------------------------------------------------------ */
.mob-service-action {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 14px 14px 12px;
  margin-top: 10px;
  background: var(--color-bg-white, #fff);
  border: 1px solid var(--gold_200, #d5cbbc);
  border-radius: 14px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--transition), background-color var(--transition),
              transform var(--transition);
}

.mob-service-action:hover {
  border-color: var(--color-gold);
}

/* Палец закрывает строку целиком, поэтому отклик нужен заметный:
   иначе непонятно, засчиталось нажатие или нет. */
.mob-service-action:active {
  transform: scale(.985);
  background: var(--color-bg-beige);
}

.mob-service-action:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.mob-service-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-gold);
}

.mob-service-cta-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.mob-service-action:active .mob-service-cta-arrow {
  transform: translateX(3px);
}

/* Блок действий стоит сразу под контактом, до списка услуг. Шапка над ним
   уже отбита снизу, поэтому первой строке собственный отступ не нужен —
   иначе разрыв читается как пропущенный заголовок. */
.mob-actions {
  margin-bottom: 32px;
}

.mob-actions .mob-service-action:first-child {
  margin-top: 0;
}

/* На большом экране адрес и так лежит в рамке-карточке, но что по нему
   можно кликнуть — тоже не читалось. */
.contact-cta {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-gold);
}

.contact-item:hover .contact-cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Пояснение под заголовком окна заявки: в режиме замера оно объясняет,
   что будет дальше, — иначе «оставьте номер» выглядит как ещё одна
   форма ни о чём. */
.callback-desc {
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-muted);
  margin: -6px 0 18px;
}
