/* ==========================================================================
   KALIVAN — Editorial Minimalism + Swiss Design
   Monochrome typographic system, strict grid, flat surfaces.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-family: "Inter", "Helvetica Neue", "Neue Haas Grotesk", Arial, sans-serif;

  /* Type scale */
  --text-2xs: 0.6875rem;   /* 11px */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md: 1.0625rem;    /* 17px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.1875rem;    /* 19px */
  --text-2xl: clamp(1.875rem, 2.8vw, 2.375rem);   /* 30–38 section mobile */
  --text-3xl: clamp(2.375rem, 4vw, 3.5rem);       /* 38–56 section */
  --text-display: clamp(2.375rem, 5.5vw + 0.5rem, 5.5rem); /* 38–88 hero */

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --leading-tight: 1.02;
  --leading-snug: 1.1;
  --leading-normal: 1.55;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.035em;
  --tracking-snug: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.08em;

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-28: 7rem;
  --space-32: 8rem;
  --space-36: 9rem;
  --space-40: 10rem;
  --space-44: 11.25rem;

  /* Layout */
  --container-max: 1320px;
  --grid-columns: 12;
  --grid-gap: clamp(1rem, 2vw, 1.5rem);
  --page-padding: clamp(1.5rem, 5vw, 5rem);
  --header-height: 80px;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Light palette */
  --bg: #ffffff;
  --bg-alt: #f5f5f3;
  --bg-muted: #f4f4f1;
  --text: #111111;
  --text-secondary: #666666;
  --text-muted: #8a8a8a;
  --border: #ddddda;
  --divider: #e9e9e6;
  --accent: #2a5c4a;
  --accent-hover: #1f4538;

  --btn-primary-bg: #111111;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #2a2a2a;
  --btn-secondary-bg: transparent;
  --btn-secondary-text: #111111;
  --btn-secondary-border: #ddddda;
  --btn-secondary-hover-bg: #f5f5f3;

  --surface: #ffffff;
  --surface-alt: #f5f5f3;
  --input-bg: #ffffff;
  --chip-bg: #f5f5f3;
  --nav-bg: #ffffff;
  --header-bg: #ffffff;
  --header-bg-blur: rgba(255, 255, 255, 0.72);
  --header-bg-blur-scrolled: rgba(255, 255, 255, 0.86);
  --header-border: #e9e9e6;
  --header-shadow-scrolled: 0 12px 32px -16px rgba(17, 17, 17, 0.22);
  --tag-bg: #f5f5f3;
  --tag-text: #666666;
  --tag-border: #ddddda;
  --badge-bg: #f5f5f3;
  --badge-text: #666666;
  --notice-bg: #f5f5f3;
  --notice-text: #666666;
  --notice-border: #ddddda;
  --error-bg: #faf5f5;
  --error-border: #e0cccc;
  --error-text: #8b3030;
  --success-text: #2a5c4a;
  --success-bg: #f3f7f5;
  --success-border: #c5d9cf;
  --warning-text: #7a5a10;
  --warning-bg: #faf8f3;
  --warning-border: #e5dcc8;
  --ring: 0 0 0 2px #111111;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration-fast: 180ms;
  --duration-normal: 250ms;
  --duration-slow: 550ms;

  --shadow-none: none;
  --prose-max: 42rem;

  --hero-scrim: linear-gradient(
    to top,
    #ffffff 0%,
    rgba(255, 255, 255, 0.94) 22%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0.12) 68%,
    transparent 82%
  );
  --hero-scrim-wide: linear-gradient(
    105deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.96) 24%,
    rgba(255, 255, 255, 0.62) 42%,
    rgba(255, 255, 255, 0.18) 58%,
    transparent 74%
  );

  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-alt: #141414;
  --bg-muted: #1a1a1a;
  --text: #f5f5f3;
  --text-secondary: #a0a0a0;
  --text-muted: #737373;
  --border: #2e2e2e;
  --divider: #242424;
  --accent: #6db89a;
  --accent-hover: #8dccb2;

  --btn-primary-bg: #f5f5f3;
  --btn-primary-text: #111111;
  --btn-primary-hover: #e0e0dd;
  --btn-secondary-bg: transparent;
  --btn-secondary-text: #f5f5f3;
  --btn-secondary-border: #2e2e2e;
  --btn-secondary-hover-bg: #1a1a1a;

  --surface: #111111;
  --surface-alt: #141414;
  --input-bg: #111111;
  --chip-bg: #1a1a1a;
  --nav-bg: #0a0a0a;
  --header-bg: #0a0a0a;
  --header-bg-blur: rgba(10, 10, 10, 0.64);
  --header-bg-blur-scrolled: rgba(10, 10, 10, 0.82);
  --header-border: #242424;
  --header-shadow-scrolled: 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  --tag-bg: #1a1a1a;
  --tag-text: #a0a0a0;
  --tag-border: #2e2e2e;
  --badge-bg: #1a1a1a;
  --badge-text: #a0a0a0;
  --notice-bg: #1a1a1a;
  --notice-text: #a0a0a0;
  --notice-border: #2e2e2e;
  --error-bg: #1a1212;
  --error-border: #3d2020;
  --error-text: #e8a0a0;
  --success-text: #6db89a;
  --success-bg: #121a16;
  --success-border: #2a3d34;
  --warning-text: #d4b060;
  --warning-bg: #1a1810;
  --warning-border: #3d3520;
  --ring: 0 0 0 2px #f5f5f3;

  --hero-scrim: linear-gradient(
    to top,
    #0a0a0a 0%,
    rgba(10, 10, 10, 0.96) 22%,
    rgba(10, 10, 10, 0.62) 48%,
    rgba(10, 10, 10, 0.2) 68%,
    transparent 82%
  );
  --hero-scrim-wide: linear-gradient(
    105deg,
    #0a0a0a 0%,
    rgba(10, 10, 10, 0.96) 24%,
    rgba(10, 10, 10, 0.68) 42%,
    rgba(10, 10, 10, 0.22) 58%,
    transparent 74%
  );
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: clamp(0.9375rem, 0.15vw + 0.9rem, 1.1875rem);
  font-weight: var(--weight-regular);
  background: var(--bg);
  color: var(--text);
  line-height: var(--leading-normal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

main {
  position: relative;
  flex: 1;
}

/* Decorative backgrounds — disabled */
.grid-bg,
.scanlines,
.header__glow {
  display: none;
}

/* --------------------------------------------------------------------------
   Grid & container
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gap);
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-family);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--text);
}

.mono {
  font-family: var(--font-family);
  font-size: inherit;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-normal);
  color: var(--text);
}

[class*="__breadcrumb"] {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

[class*="__breadcrumb"] a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

[class*="__breadcrumb"] a:hover {
  color: var(--text);
}

[class*="__code"] {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Page titles */
.about-page__title,
.auth-page__title,
.faq-page__title,
.video-page__title,
.product-page__title,
.legal-page__title,
.course-welcome__title,
.catalog__title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  max-width: 16ch;
}

.editorial-hero__title {
  font-size: var(--text-display);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.04em;
  line-height: 0.98;
  max-width: 12ch;
}

/* Leads & body copy */
.about-page__lead,
.auth-page__lead,
.faq-page__lead,
.video-page__lead,
.product-page__lead,
.editorial-hero__lead,
.catalog__lead,
.product-page__subtitle,
.legal-section__text,
.course-welcome__description,
.product-card__description {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
  max-width: var(--prose-max);
}

/* Section titles */
.about-page__section-title,
.product-module__title,
.about-card__title,
.legal-section__title,
.course-module__title,
.course-lesson__title,
.product-page__upsell-title,
.faq-item__text {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
}

/* Labels & kickers */
[class*="__category"],
.product-card__includes-title,
.footer__social-label,
.editorial-hero__kicker,
.hud-chip__label,
.about-card__label,
.product-module__index,
.course-module__index,
.course-attachments__label,
.product-page__buy-label,
.product-page__upsell-label,
.product-page__extras-title,
.product-page__bonuses-title,
.faq-item__index,
.page-badge,
.nav__badge,
.auth-social__divider,
.video-card__category,
.video-page__notice,
.editorial-stat__label,
.product-page__category,
.product-card__badge,
.product-page__badge {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}

.editorial-hero__kicker {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.editorial-hero__accent {
  color: var(--text);
  font-weight: var(--weight-semibold);
  font-style: normal;
}

/* Stats & prices */
.editorial-stat__value,
.hud-chip__value,
.product-card__price,
.product-page__buy-price {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  color: var(--text);
}

.product-page__buy-price {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.product-card__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
}

.auth-form__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

/* Small text */
.product-card__subtitle,
.product-card__includes-list li,
.product-module__text,
.product-module__list li,
.course-module__description,
.course-lesson__text,
.video-card__text,
.about-page__text,
.about-card__text,
.about-page__list li,
.product-page__upsell-text,
.auth-form__note,
.footer__disclaimer,
.site-message,
.about-page__cta-text,
.faq-page__actions-note,
.video-page__actions-note {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.product-card__quote,
.product-page__quote,
.product-page__closing {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: var(--weight-medium);
  font-style: normal;
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
  color: var(--text);
  border-left: 2px solid var(--text);
  padding-left: var(--space-6);
}

.product-card__price-note,
.product-page__buy-note,
.header-user__email,
.product-card__disclaimer,
.product-page__disclaimer,
.course-learning__empty,
.auth-form__error {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Utility text */
.text-accent { color: var(--accent); }
.text-primary { color: var(--text); }
.text-warning { color: var(--warning-text); }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border: 1px solid var(--border);
}

.status-badge--success {
  color: var(--success-text);
  background: var(--success-bg);
  border-color: var(--success-border);
}

.status-badge--warning {
  color: var(--warning-text);
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.status-badge--error {
  color: var(--error-text);
  background: var(--error-bg);
  border-color: var(--error-border);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding-top: env(safe-area-inset-top, 0);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  transition: background var(--duration-fast) var(--ease),
    box-shadow var(--duration-normal) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

/* Полупрозрачная «стеклянная» шапка: контент при прокрутке размыто
   просвечивает сквозь неё — эффект перекрытия слоёв. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .header {
    background: var(--header-bg-blur);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    backdrop-filter: blur(14px) saturate(1.6);
  }

  .header--scrolled {
    background: var(--header-bg-blur-scrolled);
  }
}

/* Появляется, как только страница прокручена — добавляет глубину «перекрытия». */
.header--scrolled {
  box-shadow: var(--header-shadow-scrolled);
}

@media (prefers-reduced-motion: reduce) {
  .header {
    transition: none;
  }
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-6);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header__buttons {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text);
  transition: opacity var(--duration-fast) var(--ease);
}

.logo:hover { opacity: 0.65; }

.logo__mark {
  flex-shrink: 0;
  display: block;
  width: 3rem;
  height: 3rem;
  background-color: currentColor;
  -webkit-mask: url("../img/logo2.svg") center / contain no-repeat;
  mask: url("../img/logo2.svg") center / contain no-repeat;
}

.logo__text {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.logo__accent {
  color: var(--text);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-normal);
  text-transform: none;
  transition: color var(--duration-fast) var(--ease);
}

.nav__prefix { display: none; }

.nav__badge {
  margin-left: var(--space-2);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: var(--text-2xs);
}

.nav a:hover {
  background: transparent;
  color: var(--text);
}

.nav-courses { position: relative; }

.nav-courses__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease);
}

.nav-courses:hover .nav-courses__toggle,
.nav-courses:focus-within .nav-courses__toggle,
.nav-courses.is-open .nav-courses__toggle {
  background: transparent;
  color: var(--text);
}

.nav-courses__menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  min-width: 14rem;
  max-width: min(20rem, 80vw);
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease), visibility var(--duration-fast);
  z-index: 120;
}

.nav-courses__menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * var(--space-2));
  height: var(--space-2);
}

.nav-courses:hover .nav-courses__menu,
.nav-courses:focus-within .nav-courses__menu,
.nav-courses.is-open .nav-courses__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-courses__menu a {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: var(--weight-regular);
  font-size: var(--text-sm);
  line-height: 1.4;
  white-space: normal;
}

.nav-courses__menu a:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.theme-toggle,
.burger {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.theme-toggle:hover,
.burger:hover {
  background: var(--bg-alt);
  transform: none;
  box-shadow: none;
}

.theme-toggle__icon--sun { display: block; }
.theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.burger span {
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--duration-fast) var(--ease), opacity var(--duration-fast);
}

.burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Header user */
.header-user { position: relative; }

.header-user__toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.header-user__toggle::-webkit-details-marker { display: none; }

.header-user__name {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user__prefix { display: none; }

.header-user__menu {
  position: absolute;
  top: calc(100% + var(--space-3));
  right: 0;
  min-width: 14rem;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
}

.header-user__email {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  word-break: break-all;
}

.header-user__logout-form { margin: 0; }

.header-user__logout {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease);
}

.header-user__logout:hover {
  background: var(--bg-muted);
  transform: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-md);
  border: 1px solid var(--btn-secondary-border);
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-normal);
  white-space: nowrap;
  transition:
    background var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

.btn:hover:not(.btn--primary):not(:disabled) {
  background: var(--btn-secondary-hover-bg);
  border-color: var(--text-muted);
  transform: none;
  box-shadow: none;
}

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.btn--primary:hover:not(:disabled),
.btn--primary:focus-visible {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  color: var(--btn-primary-text);
  transform: none;
  box-shadow: none;
}

.btn--header {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--header:hover {
  background: var(--bg-alt);
  filter: none;
}

.btn--header-login {
  background: transparent;
  border-color: var(--border);
}

.btn--header-login:hover {
  background: var(--bg-alt);
  border-color: var(--text-muted);
  filter: none;
}

.header-login__icon {
  display: none;
  flex-shrink: 0;
}

.btn--link {
  padding: 0;
  min-height: auto;
  border: none;
  background: none;
  color: var(--text);
  font-weight: var(--weight-medium);
  gap: var(--space-2);
}

.btn--link::after {
  content: "→";
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease);
}

.btn--link:hover::after {
  transform: translateX(4px);
}

.btn--footer { width: fit-content; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Hero (home) — stacked by default, overlay from desktop nav breakpoint
   -------------------------------------------------------------------------- */

.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid var(--divider);
  overflow: visible;
  background: var(--bg);
  --hero-media-aspect: 4 / 5;
}

.home-hero__media {
  position: relative;
  z-index: 0;
  width: 100%;
  overflow: hidden;
  aspect-ratio: var(--hero-media-aspect);
}

.home-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 72%, transparent) 10%,
    color-mix(in srgb, var(--bg) 28%, transparent) 28%,
    transparent 48%
  );
  pointer-events: none;
}

.home-hero__banner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-inline: auto;
  /* 12% высоты при aspect 4/5 → 15% ширины контейнера */
  margin-top: -15%;
  padding-top: var(--space-12);
  padding-bottom: max(var(--space-16), env(safe-area-inset-bottom, 0px));
  isolation: isolate;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--bg) 55%, transparent) 14%,
    color-mix(in srgb, var(--bg) 94%, transparent) 30%,
    var(--bg) 44%,
    var(--bg) 100%
  );
}

.home-hero__content {
  position: relative;
  width: 100%;
  max-width: 20.5rem;
  margin-inline: auto;
  text-align: center;
}

.hero-visual__picture {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-visual__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.9) contrast(1.03);
  transform: none;
  transform-origin: center center;
}

body.page-ready .hero-visual__image {
  animation: hero-media-settle-mobile 0.9s var(--ease) forwards;
}

@keyframes hero-media-settle-mobile {
  from { opacity: 0.82; }
  to { opacity: 1; }
}

@keyframes hero-media-settle {
  from {
    opacity: 0.7;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-visual__image--dark { display: none; }

[data-theme="dark"] .hero-visual__picture--light { display: none; }
[data-theme="dark"] .hero-visual__image--light { display: none; }
[data-theme="dark"] .hero-visual__image--dark { display: block; }

.home-hero__content .editorial-hero__kicker {
  display: inline-flex;
  margin-bottom: var(--space-4);
  margin-inline: auto;
  color: var(--text-muted);
  font-size: var(--text-2xs);
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.home-hero__content .editorial-hero__kicker::before {
  content: none;
}

.home-hero__content .editorial-hero__accent {
  color: var(--accent);
  font-weight: var(--weight-semibold);
}

.home-hero__content .editorial-hero__title {
  margin-bottom: var(--space-4);
  max-width: none;
  color: var(--text);
  font-size: clamp(3.25rem, 14vw, 4.25rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.055em;
  line-height: 0.88;
  text-shadow: none;
}

.home-hero__content .editorial-hero__title::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  margin-top: var(--space-4);
  margin-inline: auto;
  border-radius: 1px;
  background: var(--accent);
}

.home-hero__content .editorial-hero__lead {
  margin-bottom: var(--space-8);
  margin-inline: auto;
  max-width: 18.5rem;
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  letter-spacing: -0.01em;
}

.home-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: 0;
}

.home-hero__cta {
  width: auto;
  min-width: 12.5rem;
  min-height: 48px;
  justify-content: center;
  padding-inline: var(--space-8);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
}

.home-hero__disclaimer {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-muted);
  max-width: 28rem;
}

/* Overlay hero — same breakpoint as full desktop nav (burger off) */
@media (min-width: 900px) {
  .home-hero {
    flex-direction: row;
    align-items: center;
    min-height: min(52rem, calc(100svh - var(--header-height)));
    min-height: min(52rem, calc(100dvh - var(--header-height)));
    overflow: hidden;
  }

  .home-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    max-width: 1350px;
    margin-inline: auto;
    aspect-ratio: auto;
  }

  .home-hero__media::after {
    background:
      linear-gradient(
        to top,
        var(--bg) 0%,
        color-mix(in srgb, var(--bg) 65%, transparent) 4%,
        color-mix(in srgb, var(--bg) 20%, transparent) 8%,
        transparent 13%
      ),
      var(--hero-scrim-wide);
  }

  .home-hero__banner {
    display: block;
    max-width: 1350px;
    margin-top: 0;
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
    background: none;
  }

  .home-hero__content {
    max-width: 30rem;
    margin-inline: 0;
    text-align: left;
  }

  .home-hero__content .editorial-hero__kicker {
    margin-bottom: var(--space-6);
    margin-inline: 0;
    font-size: var(--text-xs);
  }

  .home-hero__content .editorial-hero__title {
    margin-bottom: var(--space-6);
    font-size: clamp(5.25rem, 6.5vw, 6.75rem);
  }

  .home-hero__content .editorial-hero__title::after {
    width: 3.25rem;
    margin-inline: 0;
    margin-top: var(--space-6);
  }

  .home-hero__content .editorial-hero__lead {
    margin-bottom: var(--space-10);
    margin-inline: 0;
    max-width: 26rem;
    font-size: var(--text-lg);
  }

  .home-hero__actions {
    flex-direction: row;
    align-items: center;
  }

  .home-hero__cta {
    min-width: 14rem;
    min-height: 52px;
  }

  .hero-visual__image {
    transform: scale(1.04);
    transform-origin: center center;
  }

  body.page-ready .hero-visual__image {
    animation: hero-media-settle 1.1s var(--ease) forwards;
  }
}

/* Shared editorial hero */
.editorial-hero {
  position: relative;
  padding: var(--space-24) 0 var(--space-20);
  text-align: left;
}

.editorial-hero__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.editorial-hero__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.editorial-hero__title {
  margin-bottom: var(--space-6);
  position: relative;
}

.editorial-hero__title::after { display: none; }

.editorial-hero__lead {
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
}

.editorial-hero__stats {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.editorial-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-width: 8rem;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color var(--duration-fast) var(--ease);
}

.editorial-stat:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--text-muted);
}

.editorial-stat__label { color: var(--text-muted); }
.editorial-stat__value { color: var(--text); }

.editorial-stat__value--accent {
  font-size: var(--text-lg);
  color: var(--text);
  font-weight: var(--weight-semibold);
}

.hud-chip {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-width: 8rem;
}

.hud-chip__label { color: var(--text-muted); }
.hud-chip__value { color: var(--text); }

/* --------------------------------------------------------------------------
   Catalog
   -------------------------------------------------------------------------- */

.catalog {
  position: relative;
  padding: var(--space-36) 0 0;
  background: var(--bg);
}

.catalog__header {
  width: 100%;
  max-width: none;
  text-align: left;
  margin: 0;
  padding: 0 0 var(--space-20);
  border-bottom: 1px solid var(--divider);
}

.catalog__header::after { display: none; }

.catalog__header .editorial-hero__kicker {
  margin-bottom: var(--space-5);
}

.catalog__header .editorial-hero__kicker::before {
  content: "02 / ";
  color: var(--text);
}

.catalog__title {
  margin-bottom: var(--space-5);
  max-width: none;
}

.catalog__lead {
  color: var(--text-secondary);
  max-width: none;
}

.catalog__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-card--showcase {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  min-height: auto;
  padding: var(--space-20) 0;
  border-top: none;
  background: var(--bg);
  overflow: visible;
  align-items: start;
}

.product-card--showcase > .product-card__visual,
.product-card--showcase > .product-card__body {
  grid-row: 1;
  align-self: start;
}

.catalog__list .product-card--showcase:nth-child(even) {
  background: var(--bg);
}

.product-card--showcase:not(.product-card--reverse) .product-card__visual {
  grid-column: 1 / span 5;
}

.product-card--showcase:not(.product-card--reverse) .product-card__body {
  grid-column: 7 / span 6;
}

.product-card--showcase.product-card--reverse .product-card__visual {
  grid-column: 8 / span 5;
  order: unset;
}

.product-card--showcase.product-card--reverse .product-card__body {
  grid-column: 1 / span 6;
  order: unset;
}

.product-card__visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.product-card__visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 2.25rem;
}

.product-card:nth-child(odd) .product-card__visual-top {
  flex-direction: row;
}

.product-card:nth-child(even) .product-card__visual-top {
  flex-direction: row-reverse;
}

.product-card__visual-media {
  position: relative;
  width: 100%;
  background-color: var(--bg-alt);
  line-height: 0;
}

.product-card__visual-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-card__visual::before {
  display: none;
}

.product-card__category {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  margin-bottom: var(--space-5);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

.product-card__badge {
  position: static;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: #111111;
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  line-height: 1.25;
  box-sizing: border-box;
  box-shadow: none;
}

.product-card__badge--hit,
.product-card__badge--popular {
  background: #111111;
  border: none;
  color: #ffffff;
}

.product-card__visual-title {
  position: static;
  flex: 0 1 auto;
  display: block;
  width: max-content;
  max-width: calc(100% - 7.5rem);
  height: 2.25rem;
  margin: 0;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  line-height: calc(2.25rem - 2px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  box-shadow: none;
}

/* Слоган-хук под названием продукта — в общем стиле цитат сайта
   (см. общий блок .product-card__quote, .product-page__quote) */
.product-card__quote {
  margin-top: calc(var(--space-2) * -1);
  max-width: var(--prose-max);
}

.product-card__visual-top:empty {
  display: none;
}

/* Нечётные: title слева, badge справа */
.product-card:nth-child(odd) .product-card__visual-title {
  margin-right: auto;
}

.product-card:nth-child(odd) .product-card__badge {
  margin-left: auto;
}

/* Чётные: title справа, badge слева */
.product-card:nth-child(even) .product-card__visual-title {
  margin-left: auto;
}

.product-card:nth-child(even) .product-card__badge {
  margin-right: auto;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-4);
  padding: 0;
  background: transparent;
  align-items: flex-start;
  text-align: left;
}

.product-card__title {
  max-width: 24ch;
}

.product-card__description,
.product-card__subtitle {
  color: var(--text-secondary);
  max-width: var(--prose-max);
}

.product-card__footer {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-6);
  max-width: 100%;
  width: 100%;
}

.product-card__footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--divider);
}

.product-card:nth-child(odd) .product-card__footer {
  align-items: flex-end;
  text-align: right;
}

.product-card:nth-child(even) .product-card__footer {
  align-items: flex-start;
  text-align: left;
}

.product-card--showcase .product-card__price {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--text);
}

.product-card__pricing {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.product-card:nth-child(odd) .product-card__pricing {
  align-items: flex-end;
}

.product-card:nth-child(even) .product-card__pricing {
  align-items: flex-start;
}

.product-card__price { color: var(--text); }

.product-card__price-note { color: var(--text-muted); }

.product-card__btn {
  flex-shrink: 0;
  width: fit-content;
  min-width: auto;
}

.product-card__btn::after {
  content: " →";
}

.product-card__disclaimer {
  color: var(--text-muted);
  max-width: var(--prose-max);
}

.product-card__quote {
  margin-top: var(--space-2);
  padding: 0 0 0 var(--space-6);
  border-radius: 0;
  background: none;
  border: none;
  border-left: 2px solid var(--text);
}

.product-card__includes {
  margin-top: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--divider);
  max-width: var(--prose-max);
}

.product-card__includes-title {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.product-card__includes-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-6);
}

.product-card__includes-list li {
  padding-left: var(--space-4);
  position: relative;
  color: var(--text-secondary);
}

.product-card__includes-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Page wrappers
   -------------------------------------------------------------------------- */

.about-page,
.auth-page,
.faq-page,
.video-page,
.product-page,
.checkout-page,
.legal-page,
.course-learning {
  padding: var(--space-16) 0 var(--space-32);
}

.about-page__container,
.product-page__container,
.video-page__container,
.course-learning__container {
  max-width: 1000px;
}

.auth-page__container { max-width: 520px; }
.checkout-page__container { max-width: 720px; }
.faq-page__container,
.legal-page__container { max-width: 940px; }

[class*="__breadcrumb"] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-10);
}

[class*="__sep"] { opacity: 0.4; }

[class*="__code"] {
  margin-bottom: var(--space-4);
}

.about-page__title,
.auth-page__title,
.faq-page__title,
.video-page__title,
.product-page__title,
.legal-page__title,
.course-welcome__title {
  margin-bottom: var(--space-5);
}

/* Panels */
.about-page__panel,
.auth-page__panel,
.faq-page__panel,
.checkout-page__panel,
.legal-page__panel,
.product-module,
.product-page__extras-panel,
.product-page__buy-panel,
.video-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: none;
}

/* About */
.about-page__hero {
  text-align: left;
  max-width: var(--prose-max);
  margin-bottom: var(--space-16);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--divider);
}

.about-page__hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.about-hud__item {
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  min-width: min(200px, 80vw);
  display: grid;
  gap: var(--space-1);
  text-align: left;
}

.about-hud__item::before { display: none; }

.about-hud__label { color: var(--text-muted); }
.about-hud__value { color: var(--text); }
.about-hud__value--accent,
.about-hud__value--mint { color: var(--text); }

.about-page__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-8);
  margin-top: 0;
}

.about-page__panel { padding: var(--space-8); }

.about-page__section-title {
  margin-bottom: var(--space-5);
}

.about-page__text { color: var(--text-secondary); }

.about-page__list {
  list-style: none;
  display: grid;
  gap: var(--space-4);
}

.about-page__list li {
  display: flex;
  gap: var(--space-4);
  color: var(--text-secondary);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--divider);
}

.about-page__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.about-page__list-index {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--text-muted);
  min-width: 1.5rem;
}

.legal-page__meta-label {
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.about-page__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-16);
  padding-top: var(--space-16);
  border-top: 1px solid var(--divider);
}

.about-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: none;
  padding: var(--space-8);
}

.about-card__label { color: var(--text-muted); }

.about-card__title { margin-top: var(--space-2); }

.about-card__text {
  color: var(--text-secondary);
  margin-top: var(--space-3);
}

.about-page__cta,
.faq-page__actions,
.video-page__actions,
.product-page__actions,
.course-learning__actions,
.checkout-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: 1px solid var(--divider);
}

.about-page__cta-text,
.faq-page__actions-note,
.video-page__actions-note {
  width: 100%;
  text-align: left;
  font-style: normal;
  color: var(--text-muted);
}

/* Auth */
.auth-page__header {
  text-align: left;
  margin-bottom: var(--space-10);
}

.auth-page__panel { padding: var(--space-8); }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
}

.auth-tabs__btn {
  padding: var(--space-3) var(--space-4);
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: transparent;
  text-align: center;
  transition: color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
}

.auth-tabs__btn.is-active {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.auth-tabs__btn--register.is-active {
  background: transparent;
  border-color: var(--text);
}

.auth-form { display: grid; gap: var(--space-5); }

.auth-form__input,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: var(--font-family);
  font-size: var(--text-base);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

.auth-form__input:focus,
.auth-form input:focus {
  border-color: var(--text);
  box-shadow: var(--ring);
  transform: none;
}

.auth-form__error { color: var(--error-text); }

.auth-form__errors {
  border-radius: var(--radius-md);
  border: 1px solid var(--error-border);
  background: var(--error-bg);
  padding: var(--space-4);
  color: var(--error-text);
  font-size: var(--text-sm);
}

.auth-form__note { color: var(--text-muted); }

.auth-form__note a {
  color: var(--accent);
  text-decoration: underline;
}

.auth-form__submit { width: 100%; }

.auth-social { margin-top: var(--space-8); }

.auth-social__divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-muted);
}

.auth-social__divider::before,
.auth-social__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--divider);
}

.auth-social__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.auth-page__actions {
  display: flex;
  justify-content: flex-start;
  margin-top: var(--space-10);
}

/* Social buttons */
.social-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease);
  text-decoration: none;
}

.social-btn:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-alt);
  border-color: var(--text-muted);
}

.social-btn__logo {
  width: 20px;
  height: 20px;
  display: block;
}

.social-btn--yandex,
.social-btn--vk,
.social-btn--mailru {
  background: var(--surface);
}

/* FAQ */
.faq-page__header {
  text-align: center;
  max-width: var(--prose-max);
  margin: 0 auto var(--space-12);
  padding-bottom: 0;
  border-bottom: none;
}

.faq-page__header .faq-page__title {
  margin-left: auto;
  margin-right: auto;
  max-width: none;
}

.faq-page__header .faq-page__lead {
  margin-left: auto;
  margin-right: auto;
}

.faq-page__panel {
  padding: 0;
  border: none;
  background: transparent;
}

.faq-page__list { display: grid; gap: 0; }

.faq-item {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--divider);
  background: transparent;
  overflow: hidden;
}

.faq-item:first-child {
  border-top: 1px solid var(--divider);
}

.faq-item__question {
  padding: var(--space-6) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.faq-item__question::-webkit-details-marker { display: none; }

.faq-item__index {
  color: var(--text-muted);
  padding-top: 2px;
  min-width: 1.5rem;
}

.faq-item__text { margin: 0; }

.faq-item__toggle {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  position: relative;
  flex-shrink: 0;
}

.faq-item__toggle::before,
.faq-item__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  background: var(--text);
  transform: translate(-50%, -50%);
}

.faq-item__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: opacity var(--duration-fast) var(--ease);
}

.faq-item[open] .faq-item__toggle::after { opacity: 0; }

.faq-item__answer {
  padding: 0 0 var(--space-6) 2.5rem;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: var(--prose-max);
}

/* Product detail */
.product-page__hero {
  text-align: center;
  max-width: var(--prose-max);
  margin: 0 auto var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--divider);
}

.product-page__hero .product-page__title,
.product-page__hero .product-page__lead,
.product-page__hero .product-page__subtitle {
  margin-left: auto;
  margin-right: auto;
}

.product-page__hero .product-page__title {
  max-width: none;
}

.product-page__hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-4);
}

.product-page__category { color: var(--text-muted); }

.product-page__badge {
  padding: 2px var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--badge-bg);
  color: var(--badge-text);
}

.product-page__badge--hit,
.product-page__badge--popular {
  background: var(--badge-bg);
  border-color: var(--border);
}

.product-page__quote {
  max-width: var(--prose-max);
  margin: var(--space-8) auto 0;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  border-left: none;
  text-align: center;
}

/* Закрывающая фраза: центрированное утверждение перед блоком «Рекомендуем».
   Тонкая линия сверху отбивает её от разделов — зеркально линии под шапкой. */
.product-page__closing {
  max-width: var(--prose-max);
  margin: var(--space-16) auto 0;
  /* padding: var(--space-12) 0 0; */
  border: none;
  /* border-top: 1px solid var(--divider); */
  text-align: center;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  text-wrap: balance;
}

.product-page__hud {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.product-page__modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: 0;
}

.product-module { padding: var(--space-8); }

.product-module__index {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.product-module__title { margin-bottom: var(--space-4); }

.product-module__list {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.product-module__list li {
  color: var(--text-secondary);
  padding-left: var(--space-4);
  position: relative;
}

.product-module__list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.product-page__extras { margin-top: var(--space-12); }

.product-page__extras-panel { padding: var(--space-8); }

.product-page__extras-title {
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.product-page__extras-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-8);
}

.product-page__extras-list li {
  color: var(--text-secondary);
  padding-left: var(--space-4);
  position: relative;
}

.product-page__extras-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.product-page__bonuses {
  margin-top: var(--space-10);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.product-page__bonuses-title {
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.product-page__bonuses-list {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.product-page__bonuses-list li {
  color: var(--text-secondary);
  padding-left: var(--space-4);
  position: relative;
}

.product-page__bonuses-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.product-page__upsell {
  margin-top: var(--space-10);
  padding: var(--space-10);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  text-align: left;
}

.product-page__upsell-label {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.product-page__upsell-title { margin-bottom: var(--space-4); }

.product-page__upsell-text {
  color: var(--text-secondary);
  max-width: var(--prose-max);
  margin: 0 0 var(--space-6);
}

.product-page__buy {
  margin-top: var(--space-16);
  text-align: center;
}

.product-page__buy-panel {
  padding: var(--space-10);
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid var(--border);
}

.product-page__buy-label {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.product-page__buy-price { margin-bottom: var(--space-2); }

.product-page__buy-note {
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.product-page__buy-btn { width: 100%; }

.product-page__disclaimer {
  color: var(--text-muted);
  margin: var(--space-4) auto 0;
  max-width: var(--prose-max);
}

/* Checkout */
.checkout-page {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
}

.checkout-page__header {
  text-align: left;
  margin-bottom: var(--space-10);
  max-width: var(--prose-max);
}

.checkout-page__title {
  font-size: var(--text-3xl);
  margin: 0;
}

.checkout-page__lead {
  max-width: var(--prose-max);
  margin: var(--space-4) 0 0;
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.checkout-page__panel {
  padding: var(--space-8);
  display: grid;
  gap: var(--space-8);
}

.checkout-order,
.checkout-user {
  display: grid;
  gap: var(--space-2);
}

.checkout-order__label,
.checkout-user__label {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
}

.checkout-order__product {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  color: var(--text);
}

.checkout-order__category {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.checkout-order__price,
.checkout-price-option__amount {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.checkout-order__price { margin-top: var(--space-2); }

.checkout-order__note,
.checkout-price-option__note,
.checkout-user__email,
.checkout-stub__text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.checkout-order__tariff {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  border: 0;
  padding: 0;
  min-width: 0;
}

.checkout-order__options { display: grid; gap: var(--space-3); }

.checkout-price-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--space-4);
  margin: 0;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--input-bg);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease);
}

.checkout-price-option:hover {
  border-color: var(--text-muted);
}

.checkout-price-option:has(.checkout-price-option__input:checked) {
  border-color: var(--text);
  box-shadow: none;
  background: var(--bg-alt);
}

.checkout-price-option:has(.checkout-price-option__input:focus-visible) {
  box-shadow: var(--ring);
}

.checkout-price-option__input {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  margin-top: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: grid;
  place-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease);
}

.checkout-price-option__input::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform var(--duration-fast) var(--ease);
  background: var(--text);
}

.checkout-price-option__input:checked {
  border-color: var(--text);
}

.checkout-price-option__input:checked::before {
  transform: scale(1);
}

.checkout-price-option__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.checkout-user {
  padding-top: var(--space-6);
  border-top: 1px solid var(--divider);
}

.checkout-user__name {
  margin: 0;
  font-weight: var(--weight-medium);
  color: var(--text);
}

.checkout-stub {
  padding-top: var(--space-6);
  border-top: 1px solid var(--divider);
  display: grid;
  gap: var(--space-5);
  justify-items: start;
  text-align: left;
}

.checkout-stub__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
}

.checkout-stub__text { max-width: var(--prose-max); }

.checkout-pay-form {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.checkout-stub__btn {
  width: 100%;
  max-width: 320px;
}

/* Legal */
.legal-page__header {
  width: 100%;
  max-width: none;
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--divider);
}

.legal-page__header .legal-page__title {
  max-width: none;
}

.legal-page__panel { padding: var(--space-8); }

.legal-section + .legal-section {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--divider);
}

.legal-section__title { margin-bottom: var(--space-4); }

.legal-section__text { color: var(--text-secondary); }

.legal-section__list {
  margin-left: var(--space-5);
  color: var(--text-secondary);
}

.legal-page__actions {
  margin-top: var(--space-12);
  display: flex;
  justify-content: flex-start;
}

/* Video */
.video-page__header {
  text-align: left;
  max-width: var(--prose-max);
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--divider);
}

.video-page__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.video-card { overflow: hidden; }

.video-card__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--divider);
}

.video-card__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4);
  text-align: center;
}

.video-card__placeholder::before { display: none; }

.video-card__play {
  position: relative;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--text);
  box-shadow: none;
  opacity: 1;
}

.video-card__play::after {
  content: "";
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.4rem 0 0.4rem 0.7rem;
  border-color: transparent transparent transparent var(--bg);
}

.video-card__signal {
  position: relative;
  z-index: 1;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

.video-card__test-label {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
  box-shadow: none;
  backdrop-filter: none;
}

.video-card__duration {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 2;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  backdrop-filter: none;
}

.video-card__body { padding: var(--space-5) var(--space-6) var(--space-6); }

.video-card__category {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.video-card__title { margin-bottom: var(--space-3); }

.video-card__text { color: var(--text-secondary); }

.video-page__notice {
  border-radius: var(--radius-lg);
  border: 1px solid var(--notice-border);
  background: var(--notice-bg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-8);
  text-align: left;
  color: var(--notice-text);
}

/* Course learning */
.course-welcome {
  text-align: center;
  max-width: var(--prose-max);
  margin: 0 auto var(--space-16);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--divider);
}

.course-welcome__code { margin-bottom: var(--space-3); }

.course-welcome__title {
  margin-bottom: var(--space-6);
  margin-left: auto;
  margin-right: auto;
  max-width: none;
}

.course-welcome__video {
  max-width: 100%;
  margin: 0 auto var(--space-8);
}

.course-welcome__description {
  color: var(--text-secondary);
  margin-left: auto;
  margin-right: auto;
}

.course-welcome .course-attachments__list {
  justify-content: center;
}

.course-module {
  padding: var(--space-12) 0 var(--space-10);
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.course-module + .course-module {
  border-top: 1px solid var(--divider);
  margin-top: var(--space-6);
  padding-top: var(--space-12);
}

.course-module__header {
  margin-bottom: var(--space-8);
  max-width: var(--prose-max);
}

.course-module__index {
  margin-bottom: var(--space-3);
  color: var(--text-muted);
}

.course-module__title { margin-bottom: var(--space-4); }

.course-module__description {
  color: var(--text-secondary);
}

.course-module > .course-attachments {
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.course-lessons { display: grid; gap: 0; }

.course-lesson {
  padding: var(--space-8) 0;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: var(--space-8);
  align-items: start;
  border: 0;
  background: none;
  box-shadow: none;
}

.course-lesson:not(:last-child) {
  border-bottom: 1px solid var(--divider);
  padding-bottom: var(--space-10);
}

.course-lesson--attachment {
  grid-template-columns: 1fr;
}

.course-lesson__media { position: relative; min-width: 0; }

.course-lesson__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.course-lesson > .course-attachments {
  grid-column: 1 / -1;
  margin-bottom: var(--space-2);
}

.course-lesson__title { margin: 0; }

.course-lesson__text { color: var(--text-secondary); }

.course-lesson__duration {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 2;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
}

.course-video {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-alt);
  box-shadow: none;
}

.course-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.course-video--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

.course-learning__empty {
  text-align: left;
  padding: var(--space-10);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  background: var(--bg-alt);
  color: var(--text-secondary);
}

.course-attachments { margin-top: var(--space-4); }

.course-attachments__label { margin-bottom: var(--space-3); }

.course-attachments__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-attachment {
  display: block;
  width: 5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease);
}

.course-attachment:hover {
  border-color: var(--text-muted);
  box-shadow: none;
  transform: none;
}

.course-attachment:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.course-attachment__thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--bg-alt);
}

.course-attachment--file {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 5rem;
  min-height: 5rem;
  padding: var(--space-2);
  text-decoration: none;
  color: var(--text);
  text-align: center;
  box-sizing: border-box;
}

.course-attachment__ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.course-attachment__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--text-2xs);
  line-height: 1.3;
  word-break: break-word;
}

/* Lightbox */
.course-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--space-8);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease);
}

.course-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.course-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: none;
}

.course-lightbox__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 1200px);
  max-height: 100%;
  margin: 0 auto;
  pointer-events: none;
}

.course-lightbox__close {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + var(--space-4));
  right: calc(env(safe-area-inset-right, 0px) + var(--space-4));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background var(--duration-fast) var(--ease);
}

.course-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: none;
}

.course-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  width: 100%;
  max-height: calc(100vh - var(--space-16));
  margin: 0;
  padding: 0;
  pointer-events: auto;
}

.course-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 1200px);
  max-height: calc(100vh - 5rem);
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.course-lightbox__caption {
  max-width: var(--prose-max);
  margin: 0;
  padding: 0 var(--space-2);
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-sm);
}

body.course-lightbox-open { overflow: hidden; }

/* Site messages */
.site-messages {
  position: fixed;
  top: calc(var(--header-height) + env(safe-area-inset-top, 0px) + var(--space-2));
  left: var(--page-padding);
  right: var(--page-padding);
  transform: none;
  z-index: 200;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: none;
  pointer-events: none;
}

.site-message {
  text-align: left;
  color: var(--text);
  font-size: var(--text-sm);
}

.site-message--success { color: var(--success-text); }
.site-message--error { color: var(--error-text); }
.site-message--info { color: var(--accent); }

.site-messages.is-hiding {
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  margin-top: auto;
  padding: 0 0 calc(var(--space-12) + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--divider);
  background: var(--bg);
}

.footer__watermark {
  container-type: inline-size;
  width: 100%;
  padding: var(--space-16) 0 var(--space-10);
  user-select: none;
  pointer-events: none;
  overflow: hidden;
}

.footer__watermark-text {
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: clamp(4rem, calc(100cqi / 6.5), 16rem);
  font-weight: var(--weight-bold);
  line-height: 0.82;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
  opacity: 0.09;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-10);
  width: 100%;
  padding: 0 var(--page-padding);
}

.footer__company { font-weight: var(--weight-semibold); }

.footer__meta { color: var(--text-secondary); }

.footer__disclaimer { color: var(--text-muted); }

.footer__nav { display: grid; gap: var(--space-3); }

.footer__nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease);
}

.footer__nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__social-label { color: var(--text-muted); }

.footer__social-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__col--left,
.footer__col--center,
.footer__col--right {
  align-items: flex-start;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

@keyframes editorial-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.editorial-enter {
  opacity: 0;
}

body.page-ready .editorial-enter {
  animation: editorial-fade-up var(--duration-slow) var(--ease) forwards;
  animation-delay: calc(80ms * var(--enter-order, 0));
}

.editorial-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--duration-slow) var(--ease),
    transform var(--duration-slow) var(--ease);
}

.editorial-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.editorial-reveal[data-delay="0"] { transition-delay: 0s; }
.editorial-reveal[data-delay="1"] { transition-delay: 60ms; }
.editorial-reveal[data-delay="2"] { transition-delay: 120ms; }
.editorial-reveal[data-delay="3"] { transition-delay: 180ms; }
.editorial-reveal[data-delay="4"] { transition-delay: 240ms; }
.editorial-reveal[data-delay="5"] { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .editorial-enter,
  body.page-ready .editorial-enter {
    opacity: 1;
    animation: none;
  }

  .hero-visual__image,
  body.page-ready .hero-visual__image {
    opacity: 1;
    transform: none;
    animation: none;
  }

  @media (min-width: 900px) {
    .hero-visual__image,
    body.page-ready .hero-visual__image {
      transform: scale(1);
      animation: none;
    }
  }

  .editorial-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .course-lightbox { transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .burger { display: inline-flex; }

  .nav {
    display: none;
    position: fixed;
    top: calc(var(--header-height) + env(safe-area-inset-top, 0));
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--page-padding) var(--space-6);
    border-radius: 0;
    background: var(--bg);
    border: none;
    border-bottom: 1px solid var(--border);
    max-height: calc(100dvh - var(--header-height));
    overflow-y: auto;
    z-index: 110;
  }

  .nav.is-open { display: flex; }

  .nav a {
    border-radius: var(--radius-sm);
    padding: var(--space-4);
  }

  .nav-courses__toggle {
    width: 100%;
    justify-content: flex-start;
    padding: var(--space-4);
  }

  .nav-courses__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 var(--space-2) var(--space-4);
    min-width: 0;
    max-width: none;
  }

  .nav-courses__menu::before { display: none; }

  .nav-courses__menu a { padding: var(--space-3) var(--space-4); }

  .header__actions {
    gap: var(--space-2);
  }

  .header__buttons .btn--header-login {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  .header__buttons .header-login__label,
  .header__buttons .header-user__name {
    display: none;
  }

  .header__buttons .header-login__icon {
    display: block;
  }

  .header-user__toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }

  .product-card--showcase:not(.product-card--reverse) .product-card__visual,
  .product-card--showcase.product-card--reverse .product-card__visual {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .product-card--showcase:not(.product-card--reverse) .product-card__body,
  .product-card--showcase.product-card--reverse .product-card__body {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .product-card--showcase {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding: var(--space-12) 0;
  }

  .product-card--showcase > .product-card__visual,
  .product-card--showcase > .product-card__body {
    grid-row: auto;
  }

  .product-card__visual {
    min-height: auto;
  }

  .product-card__body {
    gap: var(--space-5);
  }

  .product-card__title,
  .product-card__description,
  .product-card__subtitle {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .catalog {
    padding-top: var(--space-20);
  }

  .catalog__header {
    padding-bottom: var(--space-12);
  }

  .product-card--showcase {
    padding: var(--space-10) 0;
    gap: var(--space-5);
  }

  .product-card--showcase + .product-card--showcase {
    border-top: 1px solid var(--divider);
  }

  .product-card__visual-title {
    font-size: var(--text-2xs);
    padding: 0 0.85rem;
  }

  .product-card__body {
    gap: var(--space-4);
  }

  .product-card__title {
    font-size: clamp(1.375rem, 5vw, 1.75rem);
  }

  .product-card__description,
  .product-card__subtitle {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
  }

  .product-card__includes-list {
    grid-template-columns: 1fr;
  }

  .product-card__footer {
    gap: var(--space-4);
    margin-top: var(--space-2);
    padding-top: var(--space-5);
  }

  .product-card__btn {
    width: fit-content;
  }
}

@media (max-width: 769px) {
  :root {
    --header-height: 72px;
  }

  .catalog {
    padding-top: var(--space-16);
  }

  .catalog__header {
    padding-bottom: var(--space-10);
  }

  .catalog__title {
    max-width: none;
  }

  .product-card--showcase {
    padding: var(--space-8) 0;
    gap: var(--space-4);
  }

  .product-card__badge {
    padding: 0 0.75rem;
    font-size: var(--text-2xs);
  }

  .product-card__disclaimer {
    font-size: var(--text-2xs);
    line-height: 1.5;
  }

  .about-page__grid { grid-template-columns: 1fr; }
  .about-page__cards { grid-template-columns: 1fr; }

  .product-page__modules { grid-template-columns: 1fr; }
  .product-page__extras-list { grid-template-columns: 1fr; }

  .course-lesson { grid-template-columns: 1fr; }

  .video-page__grid { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; }

  .product-page__actions .btn,
  .faq-page__actions .btn,
  .video-page__actions .btn,
  .legal-page__actions .btn,
  .course-learning__actions .btn,
  .about-page__cta .btn,
  .checkout-page__actions .btn {
    width: 100%;
    max-width: none;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .home-hero {
    --hero-media-aspect: 3 / 4;
  }

  .home-hero__banner {
    /* 12% высоты при aspect 3/4 → 16% ширины */
    margin-top: -16%;
    padding-top: var(--space-10);
  }

  .home-hero__content {
    max-width: 18.5rem;
  }

  .home-hero__content .editorial-hero__title {
    font-size: clamp(3rem, 13.5vw, 3.75rem);
  }

  .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}

@media (hover: none) and (pointer: coarse) {
  .btn,
  .theme-toggle,
  .burger,
  .social-btn {
    min-height: 44px;
    min-width: 44px;
  }
}
