/* Страница «Ремонт квартир»: дополнительные стили поверх index.css. */

.page-remont .main-nav > a[aria-current="page"],
.remont-nav-dialog a[aria-current="page"] {
  color: var(--accent);
  pointer-events: none;
}

/* Кнопка открытия меню — только мобильная ширина; на десктопе весь блок скрыт вместе с dialog. */
.remont-menu-trigger {
  display: none;
}

@media (min-width: 921px) {
  .remont-nav-dialog {
    display: none;
  }
}

@media (max-width: 920px) {
  .page-remont .site-header {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .page-remont .nav-wrap {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  /* index.css прячет пункты шапки — на мобиле используем отдельный dialog, не fixed-оверлей на весь экран. */
  .page-remont .remont-main-nav--desktop {
    display: none !important;
  }

  .page-remont .remont-menu-trigger {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .page-remont .remont-menu-trigger:hover {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(255, 255, 255, 0.1);
  }

  .page-remont .remont-menu-trigger__bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 22px;
  }

  .page-remont .remont-menu-trigger__bars span {
    display: block;
    height: 2px;
    border-radius: 1px;
    background: var(--text);
  }

  .page-remont .brand {
    flex: 1;
    min-width: 0;
  }

  .page-remont .brand > span {
    font-size: clamp(12px, 3.2vw, 15px);
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Нативный <dialog>: модальное окно, ::backdrop, фокус-ловушка и scroll-lock даёт браузер — фон страницы не «ломается». */
.remont-nav-dialog {
  border: none;
  padding: 0;
  margin: auto;
  max-width: calc(100vw - 24px);
  width: min(100%, 400px);
  background: transparent;
  box-shadow: none;
}

.remont-nav-dialog::backdrop {
  background: rgba(5, 7, 12, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.remont-nav-dialog__panel {
  padding: 22px 20px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    165deg,
    rgba(28, 32, 44, 0.98) 0%,
    rgba(14, 16, 24, 0.98) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 64px rgba(0, 0, 0, 0.55);
  animation: remontDialogPanelIn 0.28s ease-out;
}

@keyframes remontDialogPanelIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.remont-nav-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.remont-nav-dialog__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.remont-nav-dialog__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  /* В <dialog> у h2 часто сбрасывается наследование — явно как у основного текста сайта. */
  color: var(--text);
}

.remont-nav-dialog__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.remont-nav-dialog__close:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.remont-nav-dialog__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.remont-nav-dialog__list a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.remont-nav-dialog__list a:hover {
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--accent);
}

.remont-nav-dialog__list a.remont-nav-dialog__cta {
  margin-top: 6px;
  border-color: var(--accent-strong);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .remont-nav-dialog__panel {
    animation: none;
  }

  .page-remont .remont-section--intro::after {
    animation: none;
  }
}

/* На главной анимация в .hero::after; здесь дублируем на первый блок, чтобы полосы не «пропадали». */
.page-remont .remont-section--intro {
  overflow: hidden;
}

.page-remont .remont-section--intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    -45deg,
    rgba(245, 158, 11, 0.1) 0 12px,
    rgba(245, 158, 11, 0) 12px 32px
  );
  opacity: 0.18;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 10%,
    rgba(0, 0, 0, 1) 90%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 10%,
    rgba(0, 0, 0, 1) 90%,
    rgba(0, 0, 0, 0) 100%
  );
  animation:
    stripeDrift 14s ease-in-out infinite alternate,
    stripeFade 4.8s ease-in-out infinite;
  will-change: background-position;
}

.remont-section {
  --surface-tint: rgba(14, 16, 22, 0.62);
  --surface-tint-strong: rgba(8, 9, 12, 0.82);
}

/* Меньше отступов у вводного блока — страница не «расползается» по вертикали. */
.remont-section--intro.section {
  padding-top: 36px;
  padding-bottom: 44px;
}

.remont-intro {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.remont-section--panel.section {
  padding-top: 0;
  padding-bottom: 64px;
}

.remont-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}

.remont-hero__ooo {
  margin: 0 0 6px;
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.remont-hero__name {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.12em;
  background: linear-gradient(
    110deg,
    #f4d67a 0%,
    #f8dc90 22%,
    #e8c45a 45%,
    #c09030 62%,
    #e8c45a 78%,
    #f4d67a 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.remont-hero__title {
  margin: 0;
  text-align: right;
}

.remont-hero__title-prefix {
  display: block;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--text);
  margin-bottom: 6px;
}

.remont-hero__title-line {
  display: block;
  font-size: clamp(32px, 6.5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.04em;
}

.remont-hero__lemana {
  color: var(--text);
}

.remont-hero__pro {
  color: var(--accent);
  margin-left: 0.12em;
}

/* Мобильные: крупные clamp() на десктопе дают слишком высокие заголовки — жёстко ограничиваем кегль и трекинг. */
@media (max-width: 640px) {
  .remont-section--intro.section {
    padding-top: 20px;
    padding-bottom: 28px;
  }

  .remont-intro {
    gap: 14px;
  }

  .remont-hero {
    gap: 12px;
  }

  .remont-hero__ooo {
    font-size: 9px;
    line-height: 1.35;
  }

  .remont-hero__name {
    font-size: clamp(17px, 8.2vw, 24px);
    letter-spacing: 0.05em;
  }

  .remont-hero__title-prefix {
    font-size: clamp(12px, 3.6vw, 15px);
    margin-bottom: 4px;
    letter-spacing: 0.04em;
  }

  .remont-hero__title-line {
    font-size: clamp(20px, 10.5vw, 32px);
    letter-spacing: 0.02em;
    line-height: 1.08;
  }
}

@media (max-width: 380px) {
  .remont-hero__name {
    font-size: clamp(16px, 7.5vw, 22px);
  }

  .remont-hero__title-line {
    font-size: clamp(18px, 9.5vw, 28px);
  }
}

.remont-showcase__frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.remont-showcase__img {
  width: 100%;
  height: auto;
  display: block;
}

.remont-showcase__bubble {
  position: absolute;
  left: clamp(10px, 2.5vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  max-width: min(300px, 48vw);
  margin: 0;
  padding: clamp(14px, 2.5vw, 20px) clamp(16px, 2.5vw, 24px);
  font-size: clamp(13px, 1.8vw, 17px);
  font-weight: 700;
  line-height: 1.35;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.96);
  clip-path: polygon(8% 0%, 92% 0%, 100% 50%, 92% 100%, 8% 100%, 0% 50%);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.22));
}

/* Карточка контактов: сетка «фото | копирайт | QR»; QR крупные для сканирования на любом экране. */
.remont-panel {
  max-width: min(960px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 2.5vw, 22px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    168deg,
    rgba(20, 24, 34, 0.94) 0%,
    rgba(10, 12, 18, 0.9) 100%
  );
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
}

.remont-panel__grid {
  display: grid;
  grid-template-columns: minmax(150px, 28%) minmax(0, 1fr) auto;
  gap: 14px 18px;
  align-items: center;
}

.remont-panel__photo {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 3 / 4;
  max-height: min(300px, 38vh);
  align-self: center;
}

.remont-panel__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.remont-panel__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-width: 0;
  text-align: left;
}

.remont-panel__phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.remont-panel__label {
  margin: 0;
  font-size: clamp(12px, 1.45vw, 14px);
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.remont-panel__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: clamp(13px, 1.65vw, 16px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0a0a0a;
  background: linear-gradient(180deg, #fafafa 0%, #e2e2e2 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.remont-panel__pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.22);
}

.remont-panel__furniture {
  margin: 0;
  font-size: clamp(13px, 1.55vw, 15px);
  font-weight: 700;
  color: #e8c45a;
  line-height: 1.35;
}

.remont-panel__mail {
  margin: 2px 0 0;
  font-size: clamp(12px, 1.4vw, 14px);
  font-weight: 600;
}

.remont-panel__mail a {
  color: var(--text);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.remont-panel__mail a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.remont-panel__qrs {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
  justify-content: flex-end;
  justify-self: end;
}

.remont-panel__qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  flex: 0 0 auto;
  min-width: min(100%, 200px);
}

.remont-panel__qr-item:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.remont-panel__qr-caption {
  font-size: clamp(11px, 1.5vw, 13px);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  max-width: 200px;
  line-height: 1.3;
}

.remont-panel__qr-item--site .remont-panel__qr-caption {
  text-transform: none;
  font-weight: 700;
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: 0.02em;
}

.remont-panel__qr-item:hover .remont-panel__qr-caption {
  color: var(--accent);
}

.remont-panel__qr-item img {
  /* Крупный модуль QR — удобнее для камеры телефона на всех устройствах. */
  width: clamp(140px, 26vw, 200px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
  display: block;
}

/* Планшет/узкий экран: карточка в колонку, иначе средняя колонка с текстом слишком узкая рядом с крупными QR. */
@media (max-width: 880px) {
  .remont-panel {
    max-width: none;
    padding: 16px 14px;
  }

  .remont-panel__grid {
    grid-template-columns: 1fr;
    gap: 18px;
    justify-items: stretch;
  }

  .remont-panel__photo {
    max-height: none;
    aspect-ratio: 16 / 10;
    width: 100%;
    max-width: 100%;
    order: 2;
  }

  .remont-panel__copy {
    order: 1;
    text-align: center;
    align-items: center;
  }

  .remont-panel__phone-row {
    justify-content: center;
    flex-direction: column;
    gap: 10px;
  }

  .remont-panel__pill {
    min-height: 48px;
    padding: 12px 22px;
    font-size: clamp(15px, 4vw, 17px);
  }

  .remont-panel__qrs {
    order: 3;
    justify-content: center;
    justify-self: center;
    width: 100%;
    gap: 20px 28px;
  }

  .remont-panel__qr-item {
    min-width: unset;
  }

  .remont-panel__qr-item img {
    width: min(240px, 42vw);
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .remont-hero {
    grid-template-columns: 1fr;
  }

  .remont-hero__title {
    text-align: left;
  }

  .remont-showcase__bubble {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    max-width: none;
    margin: -28px 12px 12px;
    clip-path: none;
    border-radius: 14px;
  }

  .remont-showcase__frame {
    display: flex;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .remont-panel__pill:hover,
  .remont-panel__qr-item:hover {
    transform: none;
  }
}
