/* ==========================================================================
   layout.scss — Контейнер, секции, сетки, хедер, футер, навигация, бургер
   Объединяет: layout.css
   ========================================================================== */

/* layout.css — part of NAOMI TOFU design system */

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}
@media (min-width: 1024px) {
  .container { padding-inline: 2.5rem; }
  :root { --header-h: 80px; }
}

.section {
  padding-block: 4rem;
}
@media (min-width: 768px) {
  .section { padding-block: 6rem; }
}
@media (min-width: 1024px) {
  .section { padding-block: 8rem; }
}

.section--white { background: #fff; }
.section--cream { background: var(--cream); }
.section--dark { background: var(--ink); color: #fff; position: relative; overflow: hidden; }

.section__relative { position: relative; }

.section__bg-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(74,124,89,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(216,112,147,0.3) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.section__head {
  max-width: 50rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .section__head { margin-bottom: 4rem; }
}
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--light h2, .section__head--light .eyebrow { color: #fff; }

.section__head--row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .section__head--row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    max-width: none;
  }
}

.section__title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
@media (min-width: 768px) {
  .section__title { font-size: 2.25rem; }
}
@media (min-width: 1024px) {
  .section__title { font-size: 3rem; }
}


/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Always have a solid white background so the header is visible at the top
     of the page on every screen size. Previously the header was transparent
     at the top (only showing a backdrop blur after scrolling past 8px), which
     made it nearly invisible on top of the cream hero background on mobile. */
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}
.header.is-scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
  /* Subtle shadow when scrolled so the header visually "lifts" off content */
  box-shadow: 0 4px 16px -8px rgba(0,0,0,0.08);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo__img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .logo__img { width: 2.75rem; height: 2.75rem; }
}
.logo__img img { width: 100%; height: 100%; object-fit: cover; }
.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo__brand {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .logo__brand { font-size: 1.125rem; }
}
.logo__sub {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  font-weight: 500;
  margin-top: 0.25rem;
}
@media (min-width: 768px) {
  .logo__sub { font-size: 0.75rem; }
}

.nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
@media (min-width: 1024px) {
  .nav { display: flex; }
}
.nav__link {
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mute);
  transition: color 0.2s ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: -1px;
  height: 1px;
  background: var(--ink);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header__phone { display: none; }
@media (min-width: 768px) {
  .header__phone { display: inline-flex; }
}


/* --------------------------------------------------------------------------
   7. Burger (SVG-based, robust at all viewport sizes)
   -------------------------------------------------------------------------- */

.burger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}
.burger:hover {
  background: var(--cream);
  border-color: var(--ink);
}
@media (min-width: 1024px) {
  .burger { display: none; }
}
.burger__icon {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink);
  transition: opacity 0.2s ease, transform 0.3s ease;
}
.burger__icon--menu { opacity: 1; transform: rotate(0deg); }
.burger__icon--close { opacity: 0; transform: rotate(-90deg); }
.burger.is-open .burger__icon--menu { opacity: 0; transform: rotate(90deg); }
.burger.is-open .burger__icon--close { opacity: 1; transform: rotate(0deg); }

/* --------------------------------------------------------------------------
   8. Mobile navigation drawer
   CRITICAL: hidden by default, only shown when .is-open is added
   -------------------------------------------------------------------------- */

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20,20,20,0.4);
  backdrop-filter: blur(2px);
  z-index: 70;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-backdrop.is-open { opacity: 1; visibility: visible; }

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 380px);
  background: #fff;
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  visibility: hidden;
  z-index: 80;
  box-shadow: -20px 0 60px -30px rgba(0,0,0,0.2);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0.35s ease;
}
.mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}
@media (min-width: 1024px) {
  .mobile-nav, .mobile-backdrop { display: none; }
}

.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 4rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.mobile-nav__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mobile-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.mobile-nav__close:hover { background: var(--cream); }

.mobile-nav__list {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1rem;
  border-radius: 1rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease;
}
.mobile-nav__link:hover, .mobile-nav__link.is-active {
  background: var(--cream);
  color: var(--ink);
}
.mobile-nav__link::after {
  content: "→";
  color: var(--mute);
}

.mobile-nav__footer {
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}
.mobile-nav__address {
  font-size: 0.75rem;
  color: var(--mute);
  text-align: center;
  padding-top: 0.5rem;
}


/* --------------------------------------------------------------------------
   10. Grids
   -------------------------------------------------------------------------- */

.grid { display: grid; gap: 1rem; }
.grid--2-5 { grid-template-columns: 1fr; gap: 2.5rem; }
.grid--3 { gap: 1rem; }
.grid--4 { gap: 1rem; }
.grid--5 { gap: 1rem; }

@media (min-width: 640px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid--2-5 { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--5 { grid-template-columns: repeat(5, 1fr); }
}


/* --------------------------------------------------------------------------
   21. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--ink);
  color: #fff;
  margin-top: auto;
}
.footer__inner {
  padding-block: 2rem;
}
@media (min-width: 768px) {
  .footer__inner { padding-block: 2.5rem; }
}

.footer__grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 1.5rem; align-items: start; }
}

.footer__brand { }



@media (min-width: 768px) {
  
}
.footer__logo-img img { width: 100%; height: 100%; object-fit: cover; }




.footer__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__platform {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

.footer__col-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  margin-bottom: 1rem;
}
.footer__list { display: flex; flex-direction: column; gap: 0.75rem; }
.footer__list a, .footer__list li {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer__list a:hover { color: #fff; }
.footer__phone {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: 0.9375rem !important;
}
.footer__address {
  color: rgba(255,255,255,0.65) !important;
  line-height: 1.6;
}
.footer__dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}
.footer__social:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.footer__social svg { width: 1.25rem; height: 1.25rem; }

.footer__bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}
@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.footer__bottom strong { color: rgba(255,255,255,0.65); font-weight: 500; }

/* Legal block in footer bottom — company requisites + legal links */
.footer__legal {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  line-height: 1.5;
}
.footer__company { color: rgba(255,255,255,0.7); font-weight: 500; }
.footer__requisites { color: rgba(255,255,255,0.5); font-size: 0.72rem; letter-spacing: 0.01em; }
.footer__address { color: rgba(255,255,255,0.45); font-size: 0.72rem; }

.footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  font-size: 0.75rem;
}
.footer__legal-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.2);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.footer__legal-links a:hover {
  color: rgba(255,255,255,0.9);
  text-decoration-color: rgba(255,255,255,0.6);
}
.footer__legal-links span {
  color: rgba(255,255,255,0.3);
}


/* --------------------------------------------------------------------------
   29.11 Footer on small screens
   -------------------------------------------------------------------------- */

@media (max-width: 639px) {
  .footer__inner {
    padding-block: 2.5rem;
  }
  .footer__grid {
    gap: 2rem;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }
  .footer__legal-links {
    justify-content: center;
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   29.12 Body scroll lock — when modal/menu is open, prevent the page
   from scrolling. We keep overflow: hidden on body (which already has
   overflow-x: hidden) and rely on html's overflow-x: hidden to prevent
   any horizontal scroll. We do NOT use position: fixed on body because
   it would break the sticky header.
   The scroll position is preserved by the browser when overflow: hidden
   is set and later removed. JS also saves/restores scrollY as a safety
   net for iOS Safari.
   -------------------------------------------------------------------------- */

body.is-locked {
  overflow: hidden;
  /* Keep horizontal overflow hidden too, even if .is-locked is added */
  overflow-x: hidden;
}


/* --------------------------------------------------------------------------
   29.14 Section padding adjustments for small screens
   -------------------------------------------------------------------------- */

@media (max-width: 639px) {
  .section {
    padding-block: 3rem;
  }
  .section__head {
    margin-bottom: 2rem;
  }
}



.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer__logo-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  overflow: hidden;
  flex-shrink: 0;
}
.footer__logo-img img {
  width: 90px;
  height: auto;
  object-fit: contain;
  display: block;
}
@media (min-width: 768px) {
  .footer__logo-img img { width: 100px; }
}
.footer__logo-text {
  display: none !important;
}
.footer__logo-brand {
  display: none !important;
}
.footer__logo-sub {
  display: none !important;
}
.footer__about {
  margin-top: 1rem;
  max-width: 280px;
  color: rgba(255,255,255,0.65);
  font-size: 0.8125rem;
  line-height: 1.6;
}

