/* ═══════════════════════════════════════════════════════
   DietLan — Landing Page Styles
   Design: Clean & Natural | Lora + Raleway
   ═══════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --c-bg:        #FFFFFF;
  --c-bg-tint:   #F9FAF7;
  --c-green:     #22C55E;
  --c-green-d:   #16A34A;
  --c-green-lt:  #F0FDF4;
  --c-text:      #1C1917;
  --c-muted:     #78716C;
  --c-border:    #E5E7EB;
  --c-wb:        #CB11AB;
  --c-ozon:      #005BFF;
  --c-buy-bg:    #1C1917;

  --r-card:  16px;
  --r-btn:   50px;
  --shadow:  0 4px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);

  --f-head: 'Lora', Georgia, serif;
  --f-body: 'Raleway', system-ui, sans-serif;

  --max-w: 1200px;
  --gap:   clamp(1.5rem, 4vw, 2.5rem);
  --section-py: clamp(4rem, 8vw, 7rem);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--f-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

/* ═══════════════════════════ BUTTONS ═══════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-btn);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--c-green); outline-offset: 3px; }

.btn--primary {
  background: var(--c-green);
  color: #fff;
}
.btn--primary:hover { background: var(--c-green-d); }

.btn--outline {
  background: transparent;
  color: var(--c-green-d);
  border: 2px solid var(--c-green);
}
.btn--outline:hover { background: var(--c-green); color: #fff; }

.btn--wb {
  background: var(--c-wb);
  color: #fff;
}
.btn--wb:hover { background: #a80d8e; box-shadow: 0 4px 16px rgba(203,17,171,0.35); }

.btn--ozon {
  background: var(--c-ozon);
  color: #fff;
}
.btn--ozon:hover { background: #0044cc; box-shadow: 0 4px 16px rgba(0,91,255,0.35); }

.btn--sm { padding: 10px 20px; font-size: 0.9rem; }

/* ═══════════════════════════ HEADER ═══════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header--scrolled {
  border-color: var(--c-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo__img { height: 240px; width: auto; display: block; }
.logo__img--footer { height: 192px; filter: brightness(0) invert(1); }
.logo__leaf { display: flex; }
.logo__text {
  font-family: var(--f-head);
  font-size: 1.4rem;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.logo__text strong { color: var(--c-green-d); }

/* Nav */
.nav {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}
.nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--c-muted);
  transition: color 0.2s;
}
.nav__link:hover { color: var(--c-text); }
.nav__link:focus-visible { outline: 2px solid var(--c-green); outline-offset: 3px; border-radius: 4px; }

.header__cta { margin-left: 1rem; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.burger:hover { background: var(--c-green-lt); }
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.burger:focus-visible { outline: 2px solid var(--c-green); outline-offset: 3px; }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 1rem 1.5rem 1.5rem;
}
.mobile-menu--open { display: flex; }
.mobile-menu__link {
  padding: 0.9rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border);
  transition: color 0.2s;
}
.mobile-menu__link:last-of-type { border-bottom: none; }
.mobile-menu__link:hover { color: var(--c-green-d); }
.mobile-menu__cta { margin-top: 1rem; align-self: flex-start; }

/* ═══════════════════════════ HERO ═══════════════════════════ */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr min(44%, 540px);
  min-height: min(90vh, 720px);
  overflow: hidden;
  background: linear-gradient(135deg, #0f3d1a 0%, #1a6b2e 50%, #22C55E 100%);
}
/* Левая колонка: текст. Переопределяем поведение .container */
.hero > .hero__content {
  margin-inline: 0;
  max-width: none;
  padding-block: 5rem;
  padding-left: max(1.5rem, calc((100vw - var(--max-w)) / 2));
  padding-right: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__tag {
  display: inline-block;
  background: rgba(34,197,94,0.2);
  border: 1px solid rgba(34,197,94,0.5);
  color: #86efac;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 1.25rem;
}
.hero__title {
  font-family: var(--f-head);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.hero__sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.82);
  margin-bottom: 2.25rem;
  line-height: 1.65;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.hero__trust span {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.88);
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}

/* Правая колонка: showcase-карусель */
.hero__showcase {
  display: flex;
  flex-direction: column;
  background: #f7f4ef;
  overflow: hidden;
  position: relative;
}
.hero__slide-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem 1rem 0.5rem;
}
.hero__slide-img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.hero__slide-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.5rem;
  background: #fff;
  transition: opacity 0.22s ease;
}
.hero__slide-name {
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: #1C1917;
  text-align: center;
  line-height: 1.3;
}
.hero__slide-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
/* Состояние перехода */
.hero__showcase.fading .hero__slide-img,
.hero__showcase.fading .hero__slide-meta {
  opacity: 0;
  transform: scale(0.96);
}

/* Навигация (prev / counter / next) */

/* Прогресс-бар автосмены */
.hero__showcase-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(34,197,94,0.18);
  z-index: 10;
}
.hero__showcase-fill {
  height: 100%;
  background: var(--c-green);
  width: 0%;
  transition: width 0.35s ease;
}

/* Стрелка вниз */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 28%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
  opacity: 0.55;
  pointer-events: none;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* Mobile: вертикальный стэк */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 300px;
  }
  .hero > .hero__content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
    padding-top: 3rem;
  }
  .hero__scroll { left: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll { animation: none; }
  .hero__slide-img,
  .hero__slide-meta { transition: none; }
}

/* ═══════════════════════════ SECTION COMMON ═══════════════════════════ */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green-d);
  background: var(--c-green-lt);
  border-radius: 50px;
  padding: 4px 14px;
  margin-bottom: 1rem;
}
.section-label--light {
  color: rgba(134,239,172,0.9);
  background: rgba(34,197,94,0.12);
}
.section-title {
  font-family: var(--f-head);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.section-title--light { color: #fff; }
.section-sub { font-size: 1.05rem; color: var(--c-muted); margin-bottom: 3rem; }
.section-sub--light { color: rgba(255,255,255,0.65); }

/* ═══════════════════════════ ABOUT ═══════════════════════════ */
.about {
  padding-block: var(--section-py);
  background: var(--c-bg-tint);
}
.about__desc {
  font-size: 1.05rem;
  color: var(--c-muted);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 3rem;
}
.about__pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap);
}

.pillar {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.pillar__icon {
  width: 56px;
  height: 56px;
  background: var(--c-green-lt);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.pillar__title {
  font-family: var(--f-head);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.pillar__text { font-size: 0.95rem; color: var(--c-muted); line-height: 1.6; }

/* ═══════════════════════════ PRODUCTS ═══════════════════════════ */
.products {
  padding-block: var(--section-py);
  background: var(--c-bg);
}
.products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap);
}

.product-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.product-card__img-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--c-green-lt);
}
.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card__img { transform: scale(1.05); }

/* Placeholder для карточек без фото */
.product-card__img-wrap--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-color-1 { background: linear-gradient(135deg, #16A34A 0%, #4ADE80 100%); }
.pc-color-2 { background: linear-gradient(135deg, #059669 0%, #6EE7B7 100%); }
.pc-color-3 { background: linear-gradient(135deg, #15803D 0%, #22C55E 100%); }
.product-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.product-card__title {
  font-family: var(--f-head);
  font-size: 1.15rem;
  font-weight: 600;
}
.product-card__desc {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.5;
  flex: 1;
}
.product-card__body .btn { align-self: flex-start; margin-top: 0.75rem; }

.product-card__btns {
  display: flex;
  gap: 8px;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.btn--wb-pill, .btn--ozon-pill { align-self: flex-start; }

.btn--wb-pill {
  background: #CB11AB;
  color: #fff;
  border-radius: var(--r-btn);
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--f-body);
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, transform 0.15s;
}
.btn--wb-pill:hover { background: #a80d8e; transform: translateY(-2px); }
.btn--wb-pill:focus-visible { outline: 3px solid #CB11AB; outline-offset: 3px; }
.btn--ozon-pill {
  background: #005BFF;
  color: #fff;
  border-radius: var(--r-btn);
  padding: 9px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--f-body);
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, transform 0.15s;
}
.btn--ozon-pill:hover { background: #0044cc; transform: translateY(-2px); }
.btn--ozon-pill:focus-visible { outline: 3px solid #005BFF; outline-offset: 3px; }

/* ═══════════════════════════ BUY ═══════════════════════════ */
.buy {
  padding-block: var(--section-py);
  background: var(--c-buy-bg);
}
.buy__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
}

.buy-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border-radius: var(--r-card);
  border: 1.5px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.buy-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.buy-card:focus-visible { outline: 3px solid var(--c-green); outline-offset: 3px; }
.buy-card__logo { flex-shrink: 0; }
.buy-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.buy-card__name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--f-head);
}
.buy-card__hint { font-size: 0.9rem; color: rgba(255,255,255,0.5); }
.buy-card--wb:hover  { border-color: rgba(203,17,171,0.4); }
.buy-card--ozon:hover { border-color: rgba(0,91,255,0.4); }

/* ═══════════════════════════ FOOTER ═══════════════════════════ */
.footer {
  background: #111;
  padding-block: 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.logo--footer .logo__text { font-size: 1.15rem; color: rgba(255,255,255,0.7); }
.logo--footer .logo__text strong { color: var(--c-green); }
.footer__copy {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.35);
  margin-left: auto;
}
.footer__links {
  display: flex;
  gap: 1rem;
}
.footer__mp-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.footer__mp-link:hover { color: #fff; }
.footer__mp-link:focus-visible { outline: 2px solid var(--c-green); outline-offset: 3px; border-radius: 4px; }

/* ═══════════════════════════ REVEAL ANIMATION ═══════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger — повторяется каждые 3 в строке */
.products__grid .reveal:nth-child(3n+2) { transition-delay: 0.08s; }
.products__grid .reveal:nth-child(3n+3) { transition-delay: 0.16s; }
.about__pillars .reveal:nth-child(2)    { transition-delay: 0.1s; }
.about__pillars .reveal:nth-child(3)    { transition-delay: 0.2s; }

/* ═══════════════════════════ RESPONSIVE ═══════════════════════════ */

/* ── 768px ── */
@media (max-width: 768px) {
  .nav { display: none; }
  .header__cta { display: none; }
  .burger { display: flex; }

  .hero { min-height: min(80vh, 600px); }
  .hero__content { padding-block: 4rem 3rem; }

  .products__grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

  .footer__copy { order: 3; width: 100%; margin-left: 0; }
  .footer__links { margin-left: auto; }
}

/* ── 480px ── */
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .products__grid { grid-template-columns: 1fr; }
  .buy__cards { grid-template-columns: 1fr; }

  .about__pillars { grid-template-columns: 1fr; }
}
