/* ══════════════════════════════════════════════════════
   responsive.css — Mobile-First Breakpoints
   Ресничное бюро

   Breakpoints:
   sm  480px
   md  768px
   lg  1024px
   xl  1200px
══════════════════════════════════════════════════════ */

/* ── BASE (0px) — Mobile portrait 320–479px ─────────── */

/* Nav: show hamburger, hide desktop menu */
.nav__menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(250, 247, 242, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-16px);
  transition: opacity var(--t-base), transform var(--t-base);
  z-index: var(--z-dropdown);
}

.nav__menu.nav-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Nav links in mobile overlay */
.nav__menu .nav__link {
  font-family: var(--ff-display);
  font-size: var(--fs-2xl);
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text);
}

.nav__menu .nav__link::after {
  display: none;
}

.nav__menu.nav-open .nav__link {
  animation: navLinkIn 0.4s ease forwards;
}

.nav__menu.nav-open li:nth-child(1) .nav__link { animation-delay: 0.05s; }
.nav__menu.nav-open li:nth-child(2) .nav__link { animation-delay: 0.10s; }
.nav__menu.nav-open li:nth-child(3) .nav__link { animation-delay: 0.15s; }
.nav__menu.nav-open li:nth-child(4) .nav__link { animation-delay: 0.20s; }
.nav__menu.nav-open li:nth-child(5) .nav__link { animation-delay: 0.25s; }

/* Nav links in mobile overlay are hidden until menu opens */
@media (max-width: 1023px) {
  .nav__menu:not(.nav-open) .nav__link {
    opacity: 0;
  }

  .nav__menu.nav-open .nav__link {
    opacity: 0; /* Will be animated to 1 by navLinkIn keyframe */
  }
}

.hamburger {
  display: flex;
  margin-left: auto;
}

/* Hide desktop CTA in header on very small screens */
.nav__cta {
  display: none;
}

/* Hero */
.hero__title {
  letter-spacing: -0.01em;
}

.hero__sub {
  max-width: 38ch;
}

.hero__ctas {
  flex-direction: column;
  align-items: flex-start;
}

.hero__ctas .btn {
  width: 100%;
  max-width: 280px;
}

/* About */
.about__badge {
  right: 0;
  width: 80px;
  height: 80px;
  bottom: -16px;
}

.about__badge-number {
  font-size: 1.5rem;
}

/* Services tabs — scrollable row */
.services-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--sp-1);
  gap: 8px;
}

.services-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 8px 16px;
}

/* Services grid — single column */
.services-grid {
  grid-template-columns: 1fr;
}

/* Portfolio — single column */
.portfolio-grid {
  grid-template-columns: 1fr;
}

/* Carousel */
.carousel__btn {
  width: 40px;
  height: 40px;
}

.carousel__btn--prev { left: 4px; }
.carousel__btn--next { right: 4px; }

.review-card {
  padding: var(--sp-3);
}

.review-card__text {
  font-size: var(--fs-base);
}

/* Stats */
.stats-row {
  gap: var(--sp-4);
}

/* Booking */
.booking__buttons {
  flex-direction: column;
  align-items: center;
}

.booking__buttons .btn {
  width: 100%;
  max-width: 300px;
}

/* Footer */
.footer__inner {
  gap: var(--sp-3);
}

/* Contacts map */
.contacts__map iframe {
  height: 300px;
}

/* Disable parallax on mobile for performance */
.hero__bg {
  background-attachment: scroll !important;
  animation: none !important;
  inset: 0 !important;
}

/* ── SM (480px) — Large phone / mobile landscape ────── */
@media (min-width: 480px) {

  /* Portfolio 2 columns */
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Hero CTA row */
  .hero__ctas {
    flex-direction: row;
    align-items: center;
  }

  .hero__ctas .btn {
    width: auto;
  }

  /* Show nav CTA */
  .nav__cta {
    display: inline-flex;
    font-size: 0.7rem;
    padding: 10px 18px;
    min-height: 40px;
  }

  /* Booking buttons row */
  .booking__buttons {
    flex-direction: row;
  }

  .booking__buttons .btn {
    width: auto;
  }
}

/* ── MD (768px) — Tablet portrait ───────────────────── */
@media (min-width: 768px) {

  :root {
    --header-h: 80px;
  }

  /* About: 2-column grid */
  .about__grid {
    grid-template-columns: 420px 1fr;
    gap: var(--sp-7);
  }

  .about__image-wrap {
    max-width: none;
    margin-inline: 0;
  }

  /* Services: 2 columns maintained, larger cards */
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  /* Portfolio: 3 columns */
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contacts: 2-column grid */
  .contacts__grid {
    grid-template-columns: 1fr 1fr;
  }

  .contacts__map iframe {
    height: 420px;
  }

  /* Review card larger */
  .review-card {
    padding: var(--sp-4) var(--sp-5);
  }

  .review-card__text {
    font-size: var(--fs-lg);
  }

  /* Stats row — no wrap */
  .stats-row {
    flex-wrap: nowrap;
    gap: var(--sp-7);
  }

}

/* ── LG (1024px) — Tablet landscape / small desktop ── */
@media (min-width: 1024px) {

  /* Show horizontal desktop nav */
  .nav__menu {
    position: static;
    flex-direction: row;
    gap: var(--sp-3);
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 1;
    pointer-events: all;
    transform: none;
    transition: none;
    bottom: auto;
  }

  .nav__menu .nav__link {
    font-family: var(--ff-body);
    font-size: var(--fs-sm);
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: rgba(250, 247, 242, 0.85);
    animation: none !important;
    opacity: 1 !important;
  }

  .nav__menu .nav__link::after {
    display: block;
  }

  #header.header--scrolled .nav__menu .nav__link {
    color: var(--c-text-2);
  }

  /* Hide hamburger */
  .hamburger {
    display: none;
  }

  /* Show CTA properly */
  .nav__cta {
    display: inline-flex;
    font-size: var(--fs-sm);
    padding: 12px 24px;
    min-height: 46px;
  }

  /* Services: 3 columns */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Features: 3 columns */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* About: wider image */
  .about__grid {
    grid-template-columns: 440px 1fr;
  }

  /* Carousel buttons — more room */
  .carousel__btn--prev { left: -16px; }
  .carousel__btn--next { right: -16px; }
}

/* ── XL (1200px) — Desktop ──────────────────────────── */
@media (min-width: 1200px) {

  /* Services: 4 columns */
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Services grid centered variants stay 2 */
  .services-grid--centered {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About: fixed-width image column */
  .about__grid {
    grid-template-columns: 480px 1fr;
    gap: clamp(4rem, 7vw, 7rem);
  }

  /* Contacts */
  .contacts__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }

  .contacts__map iframe {
    height: 480px;
  }

}

/* ── 2XL (1440px) — Large desktop ──────────────────── */
@media (min-width: 1440px) {

  :root {
    --section-py: 8rem;
  }

  .hero__ctas .btn {
    padding: 16px 36px;
  }
}

/* ── High DPI screens ───────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero__bg {
    background-image: url('../images/hero-bg.svg');
  }
}

/* ── Touch targets (WCAG 2.5.5) ─────────────────────── */
@media (max-width: 1023px) {
  .btn {
    min-height: 48px;
  }

  .tab {
    min-height: 44px;
  }

  .nav__link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .carousel__btn {
    min-width: 48px;
    min-height: 48px;
  }

  .social-link {
    width: 48px;
    height: 48px;
  }
}

/* ── Print ──────────────────────────────────────────── */
@media print {
  #loader,
  #header,
  .float-cta,
  .hero__scroll-hint,
  .carousel__btn,
  .booking__buttons {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }
}
