/* =========================================================
   TreeLife Stimulation — style.css
   Палитра: только бирюзовый и тёмно-бирюзовый (+ белый и их оттенки)
   Шрифты: Fraunces (заголовки), IBM Plex Sans (текст)
   ========================================================= */

:root {
  --teal:        #14a3a1;
  --teal-hover:  #0f8886;
  --teal-dark:   #0b4f52;
  --teal-deep:   #073a3d;
  --teal-soft:   #e6f5f4;
  --teal-tint:   #f3fafa;
  --teal-line:   #cfe7e6;
  --white:       #ffffff;

  --font-head: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius:    10px;
  --radius-sm: 8px;
  --shadow:    0 10px 26px -6px rgba(7, 58, 61, .16), 0 2px 6px rgba(7, 58, 61, .06);
  --shadow-lg: 0 24px 60px -18px rgba(7, 58, 61, .30), 0 4px 14px rgba(7, 58, 61, .08);
  --container: 1180px;

  /* ---- тема (светлая по умолчанию) ---- */
  --bg:          var(--white);
  --surface:     var(--white);
  --surface-rgb: 255, 255, 255;
  --surface-2:   var(--teal-tint);
  --surface-3:   var(--teal-soft);
  --border-c:    var(--teal-line);
  --text:        var(--teal-dark);
  --text-strong: var(--teal-deep);
  color-scheme: light;
}

/* ---- тёмная тема: включается атрибутом на <html>, ставит скрипт js/theme.js ---- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg:          #0c1e1e;
  --surface:     #12302f;
  --surface-rgb: 18, 48, 47;
  --surface-2:   #0f2827;
  --surface-3:   #173d3c;
  --border-c:    #1f4c4a;
  --text:        #d9efec;
  --text-strong: #f2fbf9;
  --teal:        #2fd0c8;
  --teal-hover:  #4fe0d8;
  --shadow:    0 10px 26px -6px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .55), 0 4px 14px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] img:not([src*=".svg"]) { filter: brightness(.92) contrast(1.02); }


/* ====================== БАЗА ====================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

[hidden] { display: none !important; }

body {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

/* страховка от «пустого поля справа» при пинч-зуме на мобильных: любой
   случайно вылезающий за границу элемент (наклон фото, тени, анимации)
   обрезается на уровне документа, а не тянет за собой ширину страницы */
.container,
.hero,
.section,
.site-header,
.site-footer,
main {
  max-width: 100%;
}

/* лёгкая зернистая текстура поверх всего сайта — убирает "стерильную" плоскость
   типичных сгенерированных страниц, почти не заметна сознательно */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* тонкая цветная кайма сверху — фирменная деталь вместо ровного белого обреза */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 2001;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal), var(--teal-deep));
}

body.modal-open { overflow: hidden; }

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

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--text-strong);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 500;
}

h1 { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -.01em; }
h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.005em; }
h3 { font-size: 20px; }

/* короткий фирменный штрих перед заголовками секций — простая, но не шаблонная деталь */
.section__head h2::before,
.block-head h2::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 3px;
  margin-right: 2px;
  margin-bottom: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--teal-deep));
  vertical-align: middle;
}

p { margin: 0 0 1em; }

ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}


/* ====================== КНОПКИ ====================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1.5px solid transparent;
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .1s;
}

.btn:active { transform: translateY(1px); }

.btn:disabled { opacity: .6; cursor: default; }

.btn-primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
  box-shadow: 0 4px 14px -4px rgba(20, 163, 161, .55);
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn-primary:hover:not(:disabled) {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -6px rgba(20, 163, 161, .55);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: var(--teal-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-small { padding: 9px 18px; font-size: 14px; }


/* ====================== ШАПКА ====================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(var(--surface-rgb), .9);
  border-bottom: 1px solid var(--border-c);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  transition: box-shadow .35s cubic-bezier(.22,.61,.36,1),
              border-color .35s ease,
              background .35s ease;
}

/* при прокрутке шапка слегка "собирается" и приподнимается тенью —
   спокойный, дорогой эффект вместо резкого прыжка */
.site-header.is-scrolled {
  background: rgba(var(--surface-rgb), .82);
  box-shadow: 0 14px 34px -20px rgba(7, 58, 61, .35);
  border-bottom-color: transparent;
}

.site-header__row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}


.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}

.logo__mark { height: 38px; width: auto; }

.main-nav {
  display: flex;
  gap: 26px;
  margin-left: 12px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}

.main-nav a:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-phone {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.25;
}

.header-phone small { font-size: 11px; color: var(--teal); }
.header-phone span   { font-size: 16px; font-weight: 600; white-space: nowrap; }

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--border-c);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.icon-link:hover { border-color: var(--teal); background: var(--surface-3); }

/* аватар в шапке — строго круглый, обрезается по центру */
.header-avatar-wrap {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.header-avatar-wrap svg {
  position: absolute;
  inset: 0;
  margin: auto;
}

.header-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.theme-toggle { position: relative; }
.theme-toggle__icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  transition: opacity .2s ease, transform .3s ease;
}
.theme-toggle__icon--sun { opacity: 1; transform: scale(1) rotate(0deg); }
.theme-toggle__icon--moon { opacity: 0; transform: scale(.5) rotate(-40deg); }
html[data-theme="dark"] .theme-toggle__icon--sun { opacity: 0; transform: scale(.5) rotate(40deg); }
html[data-theme="dark"] .theme-toggle__icon--moon { opacity: 1; transform: scale(1) rotate(0deg); }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 11px;
  background: var(--surface-3);
  font-size: 14px;
  font-weight: 500;
  transition: background .2s;
}
.cart-link:hover { background: var(--border-c); }

.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--teal);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--border-c);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle::before { top: 13px; }
.nav-toggle span    { top: 19px; }
.nav-toggle::after  { top: 25px; }

.nav-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span    { opacity: 0; }
.nav-toggle[aria-expanded="true"]::after  { transform: translateY(-6px) rotate(-45deg); }


/* ====================== HERO ====================== */

.hero {
  position: relative;
  background:
    radial-gradient(680px 380px at 88% -8%, rgba(20, 163, 161, .16), transparent 68%),
    radial-gradient(520px 320px at 8% 105%, rgba(20, 163, 161, .10), transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--white) 100%);
  padding: 64px 0 56px;
  overflow: hidden;
}

.hero__row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
}

.hero__description {
  max-width: 540px;
  font-size: 18px;
  color: var(--text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 36px;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.hero__stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-strong);
}
.hero__stat span { font-size: 13px; color: var(--text); }

.hero__row { perspective: 1400px; }

.hero__figure {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-3);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.4deg) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform .5s cubic-bezier(.22,.61,.36,1), box-shadow .5s ease;
  transform-style: preserve-3d;
}
.hero__figure:hover { box-shadow: 0 34px 70px -20px rgba(7, 58, 61, .38), 0 6px 18px rgba(7, 58, 61, .1); }

@media (max-width: 820px) {
  /* тилт по курсору — только для десктопа с мышью */
  .hero__figure { transform: rotate(-1.4deg) !important; }
}
.hero__figure::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(7, 58, 61, .08);
  pointer-events: none;
}
.hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.hero__figure.is-empty { min-height: 320px; }


/* ====================== HERO SLIDESHOW ====================== */

.hero-slideshow {
  position: relative;
  height: 86vh;
  min-height: 560px;
  max-height: 880px;
  overflow: hidden;
  background: var(--teal-deep);
  color: #fff;
}

.hero-slideshow__slides {
  position: absolute;
  inset: 0;
}

.hero-slideshow__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(.4,0,.2,1);
  will-change: opacity;
}
.hero-slideshow__slide.is-active {
  opacity: 1;
  z-index: 1;
}
.hero-slideshow__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  transition: transform 7s linear;
  filter: saturate(1.02);
}
.hero-slideshow__slide.is-active img { transform: scale(1); }
.hero-slideshow__slide.is-empty { background: var(--teal-dark); }
.hero-slideshow__slide.is-empty img { display: none; }

.hero-slideshow__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(0deg, rgba(4, 26, 27, .82) 0%, rgba(4, 26, 27, .38) 42%, rgba(4, 26, 27, .12) 68%, rgba(4, 26, 27, .28) 100%),
    linear-gradient(90deg, rgba(4, 26, 27, .35) 0%, transparent 46%);
  pointer-events: none;
}

.hero-slideshow__content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 104px;
  max-width: 720px;
}

.hero-slideshow__eyebrow {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 20px;
  padding: 7px 15px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  backdrop-filter: blur(2px);
}

.hero-slideshow__title {
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.1;
  color: #fff;
  text-wrap: balance;
}

.hero-slideshow__description {
  max-width: 480px;
  margin: 0 0 32px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
}

.hero-slideshow__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-outline--on-dark {
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}
.btn-outline--on-dark:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.hero-slideshow__arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(4, 26, 27, .25);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.hero-slideshow__arrow svg { width: 18px; height: 18px; }
.hero-slideshow__arrow:hover {
  background: rgba(4, 26, 27, .5);
  border-color: rgba(255, 255, 255, .6);
}
.hero-slideshow__arrow--prev { left: 24px; }
.hero-slideshow__arrow--next { right: 24px; }

.hero-slideshow__footer {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-slideshow__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-slideshow__dots button {
  width: 22px;
  height: 3px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: background .3s ease, width .3s ease;
}
.hero-slideshow__dots button.is-active {
  width: 34px;
  background: #fff;
}

.hero-slideshow__count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .75);
}

@media (max-width: 820px) {
  .hero-slideshow { height: 78vh; min-height: 520px; }
  .hero-slideshow__content { padding-bottom: 84px; }
  .hero-slideshow__arrow { display: none; }
}

@media (max-width: 560px) {
  .hero-slideshow__description { display: none; }
  .hero-slideshow__title { font-size: clamp(28px, 8vw, 36px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow__slide,
  .hero-slideshow__slide img { transition: none !important; }
}


/* ====================== СЕКЦИИ ====================== */

.section { padding: 72px 0; }

.section--sage { background: var(--surface-2); }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}
.section__head p { max-width: 640px; margin: 0; }


/* ====================== КАРУСЕЛЬ / КАРТОЧКИ ТОВАРОВ ====================== */

.carousel { overflow: hidden; }

.carousel__track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.carousel__dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.carousel__dots button,
.carousel__dots span {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--border-c);
  cursor: pointer;
}
.carousel__dots .is-active { background: var(--teal); }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
  transform: translateY(-5px) rotate(-.3deg);
}

.product-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface-3);
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.product-card:hover .product-card__media img { transform: scale(1.03); }

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.product-card__category {
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.product-card__body h3 a:hover { color: var(--teal); }

.product-card__body > p { font-size: 14px; flex: 1; }

.product-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 0;
  border-top: 1px solid var(--border-c);
  border-bottom: 1px solid var(--border-c);
}
.product-card__specs dt { font-size: 12px; color: var(--teal); }
.product-card__specs dd { margin: 0; font-size: 14px; font-weight: 500; }

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-card__price {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}

/* заглушка, если картинка не загрузилась */
.is-empty { position: relative; background: var(--surface-3); }


/* ====================== КУРСЫ ====================== */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.course-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}
.course-card p { flex: 1; font-size: 15px; }

.course-card__meta {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.course-card__link {
  font-weight: 500;
  color: var(--text);
  border-bottom: 1.5px solid var(--teal);
  align-self: flex-start;
  padding-bottom: 1px;
}
.course-card__link:hover { color: var(--teal); }


/* ====================== ОТЗЫВЫ ====================== */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  position: relative;
  padding: 26px 26px 26px 30px;
  background: var(--surface);
  border: 1px solid var(--border-c);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.review-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.review-card__stars {
  margin-bottom: 10px;
  color: var(--teal);
  letter-spacing: 3px;
  font-size: 18px;
}

.review-card p { font-size: 15px; }

.review-card__author {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
}


/* ====================== TRUST ====================== */

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.trust-item {
  padding-left: 20px;
  border-left: 3px solid var(--teal);
}
.trust-item p { margin: 0; font-size: 15px; }


/* ====================== ФУТЕР ====================== */

.site-footer {
  padding: 56px 0 24px;
  background: var(--teal-deep);
  color: #cfe7e6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.footer-logo {
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
}

.footer-description { font-size: 14px; margin: 0; }

.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 14px; }
.footer-links a:hover,
.footer-bottom a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(207, 231, 230, .2);
  font-size: 13px;
}


/* ====================== МОДАЛКА АККАУНТА ====================== */

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 58, 61, .55);
  overflow-y: auto;
}
.account-modal.active { display: flex; }

.account-modal__box {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 36px 32px 32px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(7, 58, 61, .3);
}

.account-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
}
.account-modal__close:hover { background: var(--surface-3); }

.account-modal__header { text-align: center; margin-bottom: 22px; }
.account-modal__header h2 { font-size: 26px; margin-bottom: 4px; }
.account-modal__header p  { margin: 0; font-size: 14px; color: var(--teal); }

.account-modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--teal);
}

.account-form { display: flex; flex-direction: column; }

.account-form label {
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 500;
}

.account-form input[type="text"],
.account-form input[type="tel"],
.account-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-c);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-strong);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.account-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 163, 161, .18);
}

/* ошибка поля: тёмно-бирюзовая жирная рамка + текст (без красного — по палитре) */
.account-form input.input-error {
  border-color: var(--text-strong);
  border-width: 2px;
  background: var(--surface-2);
}

.field-error {
  min-height: 0;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
}
.field-error:empty { display: none; }

.form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--text-strong);
  border-radius: 5px;
  background: var(--surface-3);
  font-size: 14px;
  color: var(--text-strong);
}
.form-error:empty { display: none; }

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 4px !important;
  font-weight: 400 !important;
  cursor: pointer;
}
.remember-row input { width: 16px; height: 16px; accent-color: var(--teal); }

.account-form .btn { margin-top: 18px; width: 100%; }

.account-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  font-size: 13px;
  color: var(--teal);
}
.account-modal__divider::before,
.account-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-c);
}

.account-register,
.account-logout { width: 100%; }


/* ====================== ПРОФИЛЬ ====================== */

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.profile-header h2 { font-size: 22px; margin: 0 0 2px; }
.profile-header p  { margin: 0; font-size: 14px; color: var(--teal); }

.profile-avatar-big-wrap {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
}

/* квадратная область + object-fit: любое фото аккуратно обрезается в круг */
.profile-avatar-big {
  width: 76px;
  height: 76px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  color: var(--teal);
}

.profile-section {
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border-c);
  border-bottom: 1px solid var(--border-c);
}

.avatar-upload { display: block; cursor: pointer; }
.avatar-upload .btn { width: 100%; }

.profile-success {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
}
.profile-success:empty { display: none; }


/* ====================== АДАПТИВ ====================== */

@media (max-width: 980px) {
  .hero__row { grid-template-columns: 1fr; }
  .hero__figure { max-width: 460px; }

  .courses-grid,
  .reviews-grid,
  .trust-strip { grid-template-columns: 1fr; }

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

  /* карусель: горизонтальная прокрутка со сдвигом по карточке */
  .carousel { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .carousel__track { display: flex; gap: 16px; }
  .product-card { flex: 0 0 min(82%, 340px); scroll-snap-align: start; }
  .carousel__dots { display: flex; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .header-phone { display: none; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px 20px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-c);
    box-shadow: var(--shadow);
  }
  .main-nav.is-open,
  .main-nav.open,
  .main-nav.active { display: flex; }

  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--surface-3); }

  .section { padding: 52px 0; }
  .section__head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 36px; }
  .hero__stats { gap: 20px; }
  .account-modal__box { padding: 30px 20px 24px; }
  .cart-link { padding: 8px 12px; }
}

/* ====================== ПЛАВАЮЩИЕ КНОПКИ СВЯЗИ ====================== */

.floating-contacts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.fc-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--white);
  box-shadow: 0 10px 24px -6px rgba(7, 58, 61, .38);
  transition: transform .2s, box-shadow .2s;
  animation: fcIn .4s ease backwards;
}
.fc-btn:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 16px 30px -6px rgba(7, 58, 61, .45); }
.fc-btn svg { width: 26px; height: 26px; }

.fc-btn--wa { background: #25D366; animation-delay: .05s; }
.fc-btn--tg { background: #26A5E4; animation-delay: .15s; }

/* мягкое пульсирующее кольцо — привлекает внимание, не раздражая */
.fc-btn::before {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: fcPulse 2.6s ease-out infinite;
}
.fc-btn--wa::before { color: #25D366; }
.fc-btn--tg::before { color: #26A5E4; animation-delay: 1.3s; }

@keyframes fcPulse {
  0%   { transform: scale(.9); opacity: .55; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes fcIn {
  from { opacity: 0; transform: translateY(14px) scale(.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .floating-contacts { right: 14px; bottom: 14px; gap: 10px; }
  .fc-btn { width: 48px; height: 48px; }
  .fc-btn svg { width: 23px; height: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .fc-btn, .fc-btn::before { animation: none; }
}


/* ====================== ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ ====================== */
/* Сдержанный, "клинически" точный эффект: лёгкий подъём + расфокусировка,
   без отскоков и прыгающих элементов — так выглядит дорогой мед-бренд,
   а не шаблонный лендинг. Управляется классами .js-reveal / .is-inview
   из main.js; группы .js-reveal-group проявляются по очереди. */

.js-reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition:
    opacity .9s cubic-bezier(.22,.61,.36,1),
    transform .9s cubic-bezier(.22,.61,.36,1),
    filter .9s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform, filter;
}

.js-reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* фото/медиа — свой, чуть более "оптический" вариант: лёгкий zoom-out
   вместо подъёма, как будто изображение обретает резкость */
.js-reveal--media {
  transform: none;
  filter: blur(10px);
}
.js-reveal--media.is-inview { filter: blur(0); }
.js-reveal--media img { transform: scale(1.06); transition: transform 1.1s cubic-bezier(.22,.61,.36,1); }
.js-reveal--media.is-inview img { transform: scale(1); }

/* для элементов со своей постоянной трансформацией (например наклонённое
   hero-фото с тилтом по курсору) — реагируем только прозрачностью и
   резкостью, transform не трогаем, чтобы не перебивать наклон/тилт */
.js-reveal--fade-only {
  opacity: 0;
  filter: blur(10px);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1),
              filter .9s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0s);
}
.js-reveal--fade-only.is-inview { opacity: 1; filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  .js-reveal--fade-only { opacity: 1 !important; filter: none !important; }
}
@media (max-width: 640px) {
  .js-reveal--fade-only { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal,
  .js-reveal--media,
  .js-reveal--media img {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

@media (max-width: 640px) {
  /* на мобильных чуть скромнее по амплитуде и без blur (дешевле по GPU) */
  .js-reveal { transform: translateY(16px); filter: none; }
  .js-reveal--media { filter: none; }
  .js-reveal--media img { transform: none; }
}


/* аватар: пока нет фото (гость / не загрузил) — показываем иконку, а не битую картинку */
#headerAvatar:not([src]),
#headerAvatar[src=""],
#profileAvatar:not([src]),
#profileAvatar[src=""] { display: none !important; }

/* ====================== МОБИЛЬНАЯ ШАПКА: без «дрожания» ====================== */
/* Размеры шапки больше не меняются при прокрутке (это и вызывало цикл
   «уменьшилась → сдвинулась страница → увеличилась»). Меняются только тень и фон. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

.site-header__row { height: 72px; min-height: 72px; }
.logo { min-width: 0; flex: 0 1 auto; }
.logo span { overflow: hidden; text-overflow: ellipsis; }
.header-actions { flex-shrink: 0; }
.cart-link__icon { display: none; width: 18px; height: 18px; flex: 0 0 auto; }

@media (max-width: 820px) {
  .site-header__row { gap: 10px; }
  .logo { flex: 1 1 auto; gap: 8px; font-size: clamp(15px, 4.6vw, 20px); }
  .logo__mark { height: 34px; flex: 0 0 auto; }
  .header-actions { gap: 8px; margin-left: 0; }
  .icon-link, .nav-toggle { width: 40px; height: 40px; flex: 0 0 auto; }
  .cart-link { gap: 6px; padding: 8px 10px; }
}

@media (max-width: 520px) {
  .site-header__row { height: 64px; min-height: 64px; }
  .cart-link__icon { display: block; }
  .cart-link__text { display: none; }
}

/* overflow-x: hidden на html и body превращает body в контейнер прокрутки и ломает
   position: sticky — шапка на телефонах «дёргается» вместе с адресной строкой.
   clip так же обрезает лишнее по ширине, но sticky продолжает работать. */
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

@media (max-width: 400px) {
  .site-header__row { gap: 6px; }
  .logo { gap: 6px; font-size: 14px; letter-spacing: -.2px; }
  .logo__mark { height: 28px; }
  .header-actions { gap: 6px; }
  .icon-link, .nav-toggle { width: 38px; height: 38px; }
  .cart-link { padding: 7px 8px; gap: 4px; }
}

/* ====================== РЕКВИЗИТЫ В ПОДВАЛЕ ====================== */
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(207, 231, 230, .2); }
.footer-legal .footer-title { margin-bottom: 12px; }
.requisites { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, max-content)); gap: 10px 40px; margin: 0; font-size: 13px; }
.requisites dt { font-size: 12px; opacity: .7; margin-bottom: 2px; }
.requisites dd { margin: 0; color: var(--white); word-break: break-word; }
.footer-legal + .footer-bottom { margin-top: 24px; }

/* Шапка: пункты меню в одну строку, «О нас» не переносится */
.main-nav { flex-shrink: 0; gap: 20px; }
.main-nav a { white-space: nowrap; }
@media (min-width: 821px) and (max-width: 1280px) {
  .site-header__row { gap: 14px; }
  .main-nav { gap: 14px; margin-left: 4px; }
  .main-nav a { font-size: 14px; }
  .header-actions { gap: 10px; }
  .header-phone small { display: none; }
}

/* Шапка (v2): 5 пунктов меню + телефон + кнопки помещаются в одну строку */
.site-header .container { max-width: 1320px; }
.main-nav { flex-shrink: 0; gap: 18px; margin-left: 8px; }
.main-nav a { white-space: nowrap; }
.logo { min-width: 0; flex: 0 1 auto; }
@media (min-width: 821px) and (max-width: 1400px) {
  .site-header__row { gap: 12px; }
  .main-nav { gap: 12px; margin-left: 0; }
  .main-nav a { font-size: 14px; }
  .header-actions { gap: 8px; }
  .header-phone small { display: none; }
  .header-phone span { font-size: 15px; }
  .logo { font-size: 18px; }
  .logo__mark { height: 32px; }
  .cart-link__text { display: none; }
}
