/* ==========================================================================
   MW flow — статический сайт
   Набор стилей для всех страниц. Не требует серверной части.
   ========================================================================== */

:root {
  --font-brand: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;

  --background: #fcfcfe;
  --foreground: #1b1f28;
  --foreground-80: rgba(27, 31, 40, 0.8);
  --muted-foreground: #586280;
  --card: #ffffff;
  --popover: #ffffff;
  --primary: #3969d9;
  --primary-foreground: #fafaff;
  --primary-40: rgba(57, 105, 217, 0.4);
  --border: #e2e5eb;
  --muted: #eef0f4;
  --brand-blue: #003da5;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1536px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.site-main {
  flex: 1;
}

/* ==========================================================================
   Анимации появления
   ========================================================================== */

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-in-up 0.7s ease-out both;
}

.fade-in-down {
  animation: fade-in-down 0.3s ease-out both;
}

/* ==========================================================================
   Шапка сайта
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: rgba(252, 252, 254, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-inner {
  height: 3.5rem;
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  height: 55.8px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: 1cm;
}

.main-nav a {
  font-family: var(--font-brand);
  font-size: 16.8px;
  letter-spacing: 0.025em;
  color: var(--foreground-80);
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Подвал сайта
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer .container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ==========================================================================
   Полоса с кнопками ВКонтакте и почты
   ========================================================================== */

.contact-strip {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 73px;
  background: linear-gradient(135deg, #888189 0%, #a39ea4 100%);
  margin-top: auto;
}

.contact-inner {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.contact-link,
.contact-mail {
  display: inline-flex;
  align-items: center;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-link:hover,
.contact-mail:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.contact-img {
  height: 73px;
  width: auto;
}

@media (min-width: 640px) {
  .contact-strip {
    height: 119px;
  }

  .contact-inner {
    padding-left: 4rem;
    padding-right: 4rem;
  }

  .contact-img {
    height: 119px;
  }
}

/* ==========================================================================
   Главная страница
   ========================================================================== */

.home {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #888189 0%, #a39ea4 100%);
}

/* Верхний hero-блок */

.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-image: url("../assets/Главная.png");
  background-size: cover;
  background-position: center;
}

.hero-content {
  display: flex;
  min-height: 440px;
  align-items: center;
  justify-content: flex-end;
  padding: 3.5rem 1.5rem;
  text-align: left;
}

.hero-text {
  width: 66.6667%;
}

.hero-title {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 32.4px;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.hero-sub {
  margin-top: 1rem;
  max-width: 42rem;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.5;
  color: #ffffff;
}

@media (min-width: 640px) {
  .hero-content {
    min-height: 560px;
    padding: 3.5rem 4rem;
  }

  .hero-text {
    width: 33.3333%;
  }

  .hero-title {
    font-size: 54px;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    min-height: 620px;
  }
}

/* Блок миссии */

.mission {
  position: relative;
  display: grid;
  width: 100%;
}

.mission-img {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: auto;
  min-height: 520px;
  align-self: start;
  object-fit: cover;
}

.mission-overlay {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  padding: 3.5rem 1.5rem;
}

.mission-text {
  max-width: 36rem;
}

.mission-title {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.025em;
  color: var(--foreground-80);
}

.mission-desc {
  margin-top: 1rem;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.625;
  color: var(--foreground-80);
}

.mission-points {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mission-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.mission-point-line {
  display: inline-block;
  width: 1px;
  flex-shrink: 0;
  align-self: flex-start;
  height: calc(1.2 * 1.625 * 16.8px);
  background: #ffffff;
}

.mission-points span:last-child {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 16.8px;
  line-height: 1.625;
  color: var(--foreground-80);
}

/* Интерактивные хотспоты на фотографии */

.hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  cursor: pointer;
}

.hotspot-tooltip {
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: #ffffff;
  color: var(--brand-blue);
  font-family: var(--font-brand);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.hotspot-tooltip svg {
  width: 1rem;
  height: 1rem;
}

.hotspot:hover .hotspot-tooltip,
.hotspot:focus-visible .hotspot-tooltip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (min-width: 640px) {
  .mission-img {
    min-height: 560px;
  }

  .mission-overlay {
    padding: 3.5rem 4rem;
  }

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

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

@media (min-width: 1024px) {
  .mission-img {
    min-height: 0;
  }
}

/* ==========================================================================
   Страницы разделов
   ========================================================================== */

.page-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  flex-direction: column;
  background-image: url("../assets/Заливка.png");
  background-repeat: repeat;
}

.page-content {
  width: 100%;
  max-width: 72rem;
  margin: -2cm auto 0;
  padding: 4rem 1rem 0;
}

@media (min-width: 640px) {
  .page-content {
    padding-top: 6rem;
  }
}

.section-title-white {
  margin-top: 1.5rem;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.025em;
  color: #ffffff;
}

@media (min-width: 640px) {
  .section-title-white {
    font-size: 40px;
  }
}

.section-desc-white {
  margin-top: 1.5rem;
  max-width: 42rem;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.625;
  color: #ffffff;
}

@media (min-width: 640px) {
  .section-desc-white {
    font-size: 1.35rem;
  }
}

/* ==========================================================================
   Страница «Наши продукты»
   ========================================================================== */

.products-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.product-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
}

.product-caption {
  padding: 1rem;
  text-align: center;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.375;
  color: var(--foreground-80);
}

@media (min-width: 640px) {
  .product-caption {
    font-size: 1rem;
  }
}

.marketplaces {
  margin-top: auto;
}

.marketplaces-label {
  text-align: center;
  font-family: var(--font-brand);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.marketplaces-row {
  margin-top: 3.33mm;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 2.5mm 1.5rem;
}

.marketplate-link {
  display: inline-flex;
  transition: opacity 0.2s ease;
}

.marketplate-link:hover {
  opacity: 0.8;
}

.marketplate-img {
  width: 85px;
  height: 44px;
  object-fit: fill;
}

/* ==========================================================================
   Страница «Вопрос-ответ»
   ========================================================================== */

.faq-section {
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .faq-section {
    margin-top: 2rem;
  }
}

.faq-list {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-item + .faq-item {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  text-align: left;
  transition: color 0.2s ease;
}

@media (min-width: 640px) {
  .faq-question {
    padding: 1.5rem 0;
  }
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question-text {
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: 0.025em;
}

@media (min-width: 640px) {
  .faq-question-text {
    font-size: 1.25rem;
  }
}

.faq-chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer-wrap {
  display: none;
}

.faq-item.open .faq-answer-wrap {
  display: block;
  animation: fade-in-down 0.3s ease-out both;
}

.faq-answer {
  max-width: 42rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--foreground-80);
}

@media (min-width: 640px) {
  .faq-answer {
    margin-bottom: 2rem;
    padding: 1.5rem;
    font-size: 1.125rem;
  }
}

.faq-answer-list {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.faq-answer-list li::marker {
  color: var(--primary);
}

/* ==========================================================================
   Страница «Гид по уходу за кожей»
   ========================================================================== */

.guide-section {
  margin-top: 5mm;
}

.guide-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.guide-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.guide-card-btn {
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: opacity 0.2s ease;
}

.guide-card-btn:hover {
  opacity: 0.9;
}

.guide-img {
  height: auto;
  width: 100%;
  object-fit: cover;
}

.guide-caption {
  padding: 1rem;
  text-align: center;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.375;
  color: var(--brand-blue);
}

@media (min-width: 640px) {
  .guide-caption {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   Всплывающая статья (модальное окно)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.5);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 50;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 42rem;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--foreground);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
  .modal {
    padding: 2rem;
  }
}

.modal-title {
  padding-right: 2rem;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.375;
  color: var(--brand-blue);
}

@media (min-width: 640px) {
  .modal-title {
    font-size: 1.5rem;
  }
}

.modal-content {
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.5rem;
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--foreground-80);
}

@media (min-width: 640px) {
  .modal-content {
    font-size: 1.125rem;
  }
}

.modal-content p + p,
.modal-content p + .modal-list-block,
.modal-list-block + p,
.modal-list-block + .modal-list-block {
  margin-top: 1.25rem;
}

.modal-list-block {
  margin-top: 1.25rem;
}

.modal-content p:first-child,
.modal-list-block:first-child {
  margin-top: 0;
}

.modal-list-title {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1rem;
  color: var(--brand-blue);
}

@media (min-width: 640px) {
  .modal-list-title {
    font-size: 1.125rem;
  }
}

.modal-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 1.25rem;
}

.modal-list strong {
  font-weight: 600;
  color: var(--foreground);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: var(--muted-foreground);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.modal-close:hover {
  background: var(--muted);
  color: var(--foreground);
}

.modal-close svg {
  width: 1rem;
  height: 1rem;
}

body.modal-open {
  overflow: hidden;
}

/* Узкая скроллбар бренда для содержимого статьи */

.scrollbar-brand {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.scrollbar-brand::-webkit-scrollbar {
  width: 8px;
}

.scrollbar-brand::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-brand::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 9999px;
}

/* ==========================================================================
   Всплывающее сообщение кнопки «Почта»
   ========================================================================== */

.mail-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.mail-popup {
  position: fixed;
  z-index: 100;
  width: 300px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--popover);
  color: var(--foreground);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: fade-in-down 0.2s ease-out both;
}

.mail-popup-text {
  padding-right: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.375;
}

.mail-popup-actions {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mail-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.mail-copy:hover {
  opacity: 0.9;
}

.mail-copy svg {
  width: 0.875rem;
  height: 0.875rem;
}

.mail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.mail-close:hover {
  color: var(--foreground);
}

.mail-close svg {
  width: 1rem;
  height: 1rem;
}

/* ==========================================================================
   Cookie-баннер
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  border-top: 1px solid var(--border);
  background: rgba(252, 252, 254, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cookie-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.cookie-text-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cookie-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: var(--primary);
}

.cookie-text {
  font-family: var(--font-brand);
  font-size: 0.875rem;
  color: var(--foreground-80);
}

.cookie-accept {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.cookie-accept:hover {
  opacity: 0.9;
}

@media (min-width: 640px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
