/* ======================= VARIABLES & BASE ======================= */
:root {
  --bg-color: #f7f5f0;
  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --line-color: #1a1a1a;
  --whatsapp: #25d366;
  --telegram: #2aabee;
  --max-messenger: #5856d6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text-dark);
  background: var(--bg-color);
  line-height: 1.6;
  font-size: 15px;
  letter-spacing: -0.1px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: "Tenor Sans", sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 2px;
}

/* ======================= BUTTONS ======================= */
.btn {
  display: inline-block;
  padding: 16px 36px;
  background: var(--text-dark);
  color: var(--bg-color);
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid var(--text-dark);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn:hover {
  background: transparent;
  color: var(--text-dark);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--text-dark);
}

.btn--outline:hover {
  background: var(--text-dark);
  color: var(--bg-color);
}

.btn--whatsapp {
  background: var(--whatsapp);
  border-color: var(--whatsapp);
  color: #fff;
}
.btn--telegram {
  background: var(--telegram);
  border-color: var(--telegram);
  color: #fff;
}
.btn--max {
  background: var(--max-messenger);
  border-color: var(--max-messenger);
  color: #fff;
}

/* ======================= HEADER ======================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-color);
  z-index: 1000;
  border-bottom: 1px solid var(--line-color);
}

.header__inner {
  max-width: 1600px;
  margin: 0 auto;
  height: 80px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}

.header__logo-name {
  font-family: "Tenor Sans", sans-serif;
  font-size: 24px;
  letter-spacing: 3px;
}

.header__logo-sub {
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.header__list {
  display: flex;
  gap: 35px;
}

.header__link {
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
  white-space: nowrap;
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header__link:hover {
  opacity: 0.5;
  transform: scale(1.05);
}

.header__btn {
  padding: 12px 24px;
  font-size: 11px;
}

/* ======================= LAYOUT & BLOCKS ======================= */
.main {
  padding-top: 80px;
}

.block {
  padding: 120px 10%;
  border-bottom: 1px solid var(--line-color);
}

.block__head {
  text-align: center;
  margin-bottom: 80px;
}

.block__title {
  font-size: 44px;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.block__subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 15px;
  letter-spacing: 0.5px;
}

/* ======================= TICKER ======================= */
.ticker {
  background: var(--text-dark);
  color: var(--bg-color);
  padding: 18px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line-color);
  display: flex;
}

.ticker__wrapper {
  display: flex;
  width: 100%;
}

.ticker__inner {
  display: flex;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0;
  font-family: "Tenor Sans", sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: tickerAnimate 25s linear infinite;
}

.ticker__inner span {
  margin: 0 20px;
}

@keyframes tickerAnimate {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

/* ======================= HERO ======================= */
.hero {
  padding: 40px;
  border-bottom: 1px solid var(--line-color);
}

.hero__frame {
  border: 1px solid var(--line-color);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: calc(85vh - 80px);
}

.hero__image-wrapper {
  border-right: 1px solid var(--line-color);
  overflow: hidden;
  position: relative;
  background: #000;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  opacity: 0.85;
}

.hero__content {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero__pretitle {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.hero__title {
  font-size: 56px;
  margin-bottom: 24px;
}

.hero__since {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ======================= ABOUT ======================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 15px;
}

.about__photo {
  display: flex;
  justify-content: flex-end;
}

.image-frame {
  border: 1px solid var(--line-color);
  padding: 6px;
  background: var(--bg-color);
  width: 100%;
  max-width: 440px;
}

.image-frame img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  filter: grayscale(100%);
}

/* ======================= SERVICES ======================= */
.menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-color);
  border: 1px solid var(--line-color);
  max-width: 1400px;
  margin: 0 auto;
}

.menu__card {
  background: var(--bg-color);
  padding: 50px 40px;
}

.menu__card--accent {
  background: #fff;
}

.menu__card-title {
  font-size: 18px;
  margin-bottom: 35px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-color);
  letter-spacing: 1px;
}

.menu__card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 24px;
}

.menu__name {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.menu__price {
  font-family: "Tenor Sans", sans-serif;
  font-size: 15px;
}

.menu__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ======================= INCLUDED ======================= */
.included__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-color);
  border: 1px solid var(--line-color);
  max-width: 1400px;
  margin: 0 auto;
}

.included__card {
  background: var(--bg-color);
  padding: 50px 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background 0.3s ease;
}

.included__card:hover {
  background: #fff;
}

.included__icon {
  width: 32px;
  height: 32px;
  color: var(--text-dark);
  margin: 0 auto 25px;
  transition: transform 0.3s ease;
}

.included__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.included__card:hover .included__icon {
  transform: translateY(-2px);
}

.included__card-title {
  font-size: 18px;
  margin-bottom: 15px;
  letter-spacing: 1px;
  line-height: 1.3;
}

.included__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ======================= PORTFOLIO ======================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery__item {
  overflow: hidden;
  border: 1px solid var(--line-color);
  padding: 3px;
  background: #fff;
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition:
    filter 0.4s,
    transform 0.4s;
}

.gallery__item:hover img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.gallery__item img[src*="14f"] {
  object-position: top center;
}

/* ======================= REVIEWS ======================= */
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-color);
  border: 1px solid var(--line-color);
  max-width: 1400px;
  margin: 0 auto;
}

.review {
  background: var(--bg-color);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review p {
  font-size: 14px;
  color: var(--text-dark);
  margin-bottom: 30px;
  line-height: 1.7;
  font-style: italic;
}

.review__author {
  font-family: "Tenor Sans", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1px;
}

.review__avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border: 1px solid rgba(26, 26, 26, 0.2);
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
}

.review__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}

.review:hover .review__avatar img {
  filter: grayscale(0%);
}

/* ======================= CONTACTS ======================= */
.contacts {
  padding: 100px 10% 40px;
}

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.contacts__phone {
  display: inline-block;
  font-family: "Tenor Sans", sans-serif;
  font-size: 38px;
  margin: 30px 0;
  letter-spacing: 1px;
}

.contacts__phone:hover {
  opacity: 0.6;
}

.contacts__buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.contacts__buttons .btn {
  flex: 1;             
  text-align: center;   
  min-width: 140px;     
  padding: 16px 20px; 
  display: inline-flex; 
  justify-content: center;
  align-items: center;
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1); 
}

.contacts__buttons .btn.btn--whatsapp:hover {
  background: var(--whatsapp) !important;
  color: #fff !important;
  transform: translateY(-4px) !important;
}

.contacts__buttons .btn.btn--telegram:hover {
  background: var(--telegram) !important;
  color: #fff !important;
  transform: translateY(-4px) !important;
}

.contacts__buttons .btn.btn--max:hover {
  background: var(--max-messenger) !important;
  color: #fff !important;
  transform: translateY(-4px) !important;
}

.contacts__details p {
  margin-bottom: 24px;
  color: var(--text-muted);
}

.contacts__details strong {
  display: block;
  color: var(--text-dark);
  font-size: 11px;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.contacts__map {
  position: relative;
  min-height: 450px;
  border: 1px solid var(--line-color);
}

.contacts__copy {
  margin-top: 100px;
  padding-top: 30px;
  border-top: 1px solid var(--line-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 1px;
}

/* ======================= RESPONSIVE ======================= */
.burger {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  cursor: pointer;
}

.burger span {
  width: 28px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s;
}

.burger span:nth-child(2) {
  width: 20px;
}

@media (max-width: 1250px) {
  .header__inner {
    padding: 0 20px;
  }
  .header__list {
    gap: 15px;
  }
}

@media (max-width: 1200px) {
  .hero__frame {
    grid-template-columns: 1fr;
  }
  .hero__image-wrapper {
    border-right: none;
    border-bottom: 1px solid var(--line-color);
    min-height: 400px;
  }
  .menu,
  .reviews__grid {
    grid-template-columns: 1fr;
  }
  .included__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }
}

@media (max-width: 1024px) {
  .header__nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    transform: translateY(-150%);
    transition: transform 0.35s ease;
    border-bottom: 1px solid var(--line-color);
  }
  .header__nav.nav--open {
    transform: translateY(0);
  }
  .header__list {
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
  }
  .header__link {
    display: block;
    padding: 15px 40px;
    border-bottom: 1px solid #eee;
  }
  .header__btn {
    display: none;
  }
  .burger {
    display: flex;
  }
}

@media (max-width: 992px) {
  .about__grid,
  .contacts__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__photo {
    justify-content: flex-start;
  }
  .block {
    padding: 80px 5%;
  }
  .block__title {
    font-size: 32px;
  }
  .hero__title {
    font-size: 38px;
  }
}

@media (max-width: 768px) {
  .included__grid {
    grid-template-columns: 1fr;
  }
}

/* Исправляем главный контейнер первого экрана */
.hero__frame {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* Настраиваем обертку картинки */
.hero__image-wrapper {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    overflow: hidden !important;
}

.hero__img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Чиним текстовый блок, чтобы он не обрезался */
.hero__content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 15px !important; /* Уменьшаем боковые отступы */
    box-sizing: border-box !important;
}

/* Адаптируем заголовок под узкие экраны (iPhone 12 и меньше) */
@media (max-width: 440px) {
    .hero__title {
        font-size: 28px !important; /* Немного уменьшаем шрифт, чтобы буквы не вылезали */
        line-height: 1.2 !important;
        -webkit-hyphens: auto !important;
        -ms-hyphens: auto !important;
        hyphens: auto !important; /* Если слово слишком длинное, оно аккуратно перенесется */
    }
    
    .hero__pretitle {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }

    /* Корректируем кнопку, чтобы текст внутри помещался */
    .btn--hero {
        width: 100% !important;
        padding: 14px 10px !important;
        font-size: 14px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
}

/* Страхуем всю страницу от горизонтального скролла */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Чиним перенос знака рубля (правка Анны) */
.menu__price {
    white-space: nowrap !important;
}

/* Добавляем мягкие переносы слогов в блок "О мастере" */
.about__text p {
    -webkit-hyphens: auto !important;
    -ms-hyphens: auto !important;
    hyphens: auto !important;
}
