/* ==========================================================================
   ZmeuSolutions — лендинг мастер-класса
   ========================================================================== */

/* ---------- Переменные ---------- */
:root {
  --c-bg: #f7f4ef;
  --c-navy: #14253f;
  --c-navy-hover: #2b4c80;
  --c-blue: #cfe0f2;
  --c-sand: #ece5da;
  --c-gold: #b08a4e;
  --c-white: #ffffff;
  --c-text-muted: #4a5770;
  --c-text-soft: #5c6880;
  --c-text-on-blue: #2f3d57;
  --c-text-on-dark: #d3dbe7;
  --c-line: #e4ddd1;
  --c-line-footer: #ddd5c8;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1280px;
  --gutter: 24px;
  --section-gap: 112px;

  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --card-pad: clamp(32px, 5vw, 64px);
}

/* ---------- Базовые стили ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-navy);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--c-navy);
}

a:hover {
  color: var(--c-navy-hover);
}

:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-bottom: var(--section-gap);
}

.section-title {
  margin-bottom: 40px;
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-title--sm {
  margin-bottom: 0;
  font-size: clamp(28px, 3.3vw, 46px);
  line-height: 1.12;
}

/* ---------- Кнопка ---------- */
.button {
  display: inline-block;
  padding: 19px 34px;
  border-radius: var(--radius-pill);
  background: var(--c-navy);
  color: var(--c-white);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s, transform 0.2s;
}

.button:hover {
  background: var(--c-navy-hover);
  color: var(--c-white);
  transform: translateY(-1px);
}

.button--light {
  background: var(--c-white);
  color: var(--c-navy);
}

.button--light:hover {
  background: var(--c-blue);
  color: var(--c-navy);
}

/* ---------- Шапка ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
}

.logo {
  display: inline-block;
  padding-block: 28px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  min-height: 780px;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    var(--c-bg) 0%,
    rgba(247, 244, 239, 0.75) 14%,
    rgba(247, 244, 239, 0) 42%
  );
}

.hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 96px;
}

.hero__content {
  max-width: 560px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--c-blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__badge-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-gold);
}

.hero__title {
  margin-top: 28px;
  font-weight: 600;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero__lead {
  margin-top: 24px;
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
}

.hero__text {
  margin-top: 16px;
  color: var(--c-text-muted);
}

.hero__cta {
  margin-top: 28px;
}

.hero__features {
  margin-top: 20px;
  font-size: 14px;
  color: var(--c-text-soft);
}

/* ---------- Таймер ---------- */
.countdown {
  margin-top: 32px;
}

.countdown__list {
  display: flex;
  gap: 10px;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  padding: 12px 0;
  border-radius: var(--radius-sm);
  background: var(--c-white);
}

.countdown__value {
  font-weight: 600;
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-size: 12px;
  color: var(--c-text-soft);
}

.countdown__done {
  display: inline-block;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  background: var(--c-white);
  font-weight: 600;
  font-size: 18px;
}

.countdown__done[hidden],
.countdown__list[hidden] {
  display: none;
}

/* ---------- Для кого ---------- */
.audience {
  padding-top: 16px;
}

.audience__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  counter-reset: audience;
}

.audience__card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--c-white);
  counter-increment: audience;
}

.audience__card::before {
  content: counter(audience, decimal-leading-zero);
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--c-gold);
}

/* ---------- Карточки ---------- */
.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card--white {
  background: var(--c-white);
}

.card--blue {
  background: var(--c-blue);
}

.card--dark {
  background: var(--c-navy);
  color: var(--c-white);
}

.card--dark p {
  color: var(--c-text-on-dark);
}

.card--white,
.card--blue:not(.card--split) {
  padding: var(--card-pad);
}

.card__num {
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 15px;
  color: var(--c-gold);
}

.card--dark .card__num {
  color: var(--c-blue);
}

.card--blue .card__num {
  color: var(--c-navy);
}

.card__title {
  margin-bottom: 20px;
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.card__intro {
  margin-bottom: 12px;
  font-weight: 500;
}

.card__note {
  margin-top: 20px;
  color: var(--c-text-muted);
}

.card--blue .card__note {
  color: var(--c-text-on-blue);
}

/* Карточка «текст + фото» */
.card--split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}

.card--split-reverse {
  grid-template-columns: 1.2fr 1fr;
}

/* contain: size — фото не задаёт высоту карточки, а заполняет её по тексту */
.card__image {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  contain: size;
  aspect-ratio: auto;
}

.card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--card-pad);
}

.card__body > p + p {
  margin-top: 16px;
}

/* Карточка «заголовок слева, список справа» */
.card--columns {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px 56px;
}

.card--columns .card__title {
  margin-bottom: 0;
}

.card--columns .card__intro {
  margin-bottom: 16px;
}

/* ---------- Списки с тире ---------- */
.dash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-list li {
  position: relative;
  padding-left: 1.3em;
}

.dash-list li::before {
  content: "—";
  position: absolute;
  left: 0;
}

.dash-list--lined {
  gap: 0;
}

.dash-list--lined li {
  padding-block: 14px;
  border-top: 1px solid var(--c-line);
}

.dash-list--lined li::before {
  top: 14px;
}

/* ---------- Программа ---------- */
.program__stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.program__row {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.program__photo {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  contain: size;
  aspect-ratio: auto;
}

/* ---------- Эксперт ---------- */
.expert {
  padding-block: var(--section-gap);
  margin-bottom: var(--section-gap);
  background: var(--c-sand);
}

.expert__inner {
  display: grid;
  grid-template-columns: minmax(0, 500px) 1fr;
  gap: 56px;
  align-items: center;
}

.expert__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
}

.expert__name {
  margin-bottom: 24px;
  font-weight: 600;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

/* ---------- Заглушки ---------- */
.placeholder {
  padding: 28px;
  border: 2px dashed var(--c-gold);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
  color: var(--c-text-soft);
}

.placeholder p:first-child {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--c-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.placeholder--block {
  padding: 64px 24px;
  border-radius: var(--radius-lg);
  background: var(--c-white);
  text-align: center;
}

/* ---------- Оффер ---------- */
.offer__body,
.final__body {
  justify-content: flex-start;
  gap: 24px;
}

.offer__body .card__note {
  margin-top: 0;
}

.offer__body .button,
.final__body .button {
  align-self: flex-start;
}

.event-meta {
  font-weight: 600;
}

.card--dark .event-meta {
  color: var(--c-blue);
}

.offer__box {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--c-white);
}

.offer__box-title {
  margin-bottom: 12px;
  font-weight: 600;
  font-size: inherit;
}

/* ---------- Финал ---------- */
.final {
  padding-bottom: 96px;
}

.final__body {
  justify-content: center;
}

.final__image {
  max-height: 640px;
  object-position: center 20%;
}

/* ---------- Подвал ---------- */
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px;
  border-top: 1px solid var(--c-line-footer);
  font-size: 14px;
  color: var(--c-text-soft);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ==========================================================================
   Планшет
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__content {
    max-width: 480px;
  }

  .card--split,
  .card--split-reverse,
  .card--columns,
  .program__row {
    grid-template-columns: 1fr;
  }

  .card__image,
  .program__photo {
    min-height: 0;
    max-height: none;
    height: auto;
    aspect-ratio: 4 / 3;
    contain: none;
  }

  /* фото над текстом в оффере и финале */
  .card--split-reverse .card__image {
    order: -1;
  }

  .program__photo {
    object-position: center 40%;
  }

  .expert__inner {
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
  }
}

/* ==========================================================================
   Мобильная версия
   ========================================================================== */
@media (max-width: 760px) {
  :root {
    --gutter: 20px;
    --section-gap: 72px;
  }

  body {
    font-size: 16px;
  }

  .button {
    display: block;
    padding: 17px 14px;
    font-size: 15px;
  }

  .offer__body .button,
  .final__body .button {
    align-self: stretch;
  }

  /* Шапка: белый логотип поверх фото, под полосой с датой */
  .site-header {
    top: 36px;
  }

  .logo {
    padding-block: 16px;
    font-size: 18px;
    color: var(--c-white);
  }

  .logo:hover {
    color: var(--c-blue);
  }

  /* Hero: полоса с датой → фото → текст */
  .hero {
    flex-direction: column;
    min-height: 0;
    padding-top: 36px;
  }

  .hero__media {
    position: relative;
    width: 100%;
    height: 330px;
  }

  .hero__media img {
    object-position: 50% 22%;
  }

  .hero__media::after {
    background: linear-gradient(
      180deg,
      rgba(20, 37, 63, 0.45) 0%,
      rgba(20, 37, 63, 0) 28%,
      rgba(247, 244, 239, 0) 52%,
      rgba(247, 244, 239, 0.9) 84%,
      var(--c-bg) 100%
    );
  }

  .hero__inner {
    position: static;
    margin-top: -72px;
    padding-top: 0;
    padding-bottom: 20px;
  }

  .hero__content {
    max-width: none;
  }

  /* текст наезжает на низ фото — поднимаем его над фото */
  .hero__content > :not(.hero__badge) {
    position: relative;
  }

  /* позиционируется относительно .hero — полоса на всю ширину сверху */
  .hero__badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 12px;
    border-radius: 0;
    background: var(--c-navy);
    color: var(--c-white);
    font-size: 11px;
    letter-spacing: 0.03em;
  }

  .hero__title {
    margin-top: 0;
    font-size: 27px;
    line-height: 1.08;
  }

  .hero__lead {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.35;
  }

  .hero__text {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
  }

  .countdown {
    margin-top: 14px;
  }

  .countdown__list {
    gap: 8px;
  }

  .countdown__item {
    flex: 1;
    width: auto;
    padding: 6px 0;
    border-radius: 12px;
  }

  .countdown__value {
    font-size: 20px;
  }

  .countdown__label {
    font-size: 11px;
  }

  .countdown__done {
    display: block;
    text-align: center;
    font-size: 16px;
  }

  .hero__cta {
    margin-top: 12px;
    padding: 16px 20px;
  }

  .hero__features {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.4;
  }

  .audience {
    padding-top: 56px;
  }

  .audience__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .audience__card {
    padding: 22px;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .card {
    border-radius: 24px;
  }

  .card__body,
  .card--white,
  .card--blue:not(.card--split) {
    padding: 28px 22px;
  }

  .program__stack {
    gap: 16px;
  }

  .program__row {
    gap: 16px;
  }

  .program__photo {
    border-radius: 24px;
  }

  .expert__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .expert__photo {
    max-width: 420px;
  }

  .offer__box {
    padding: 22px;
  }

  .final {
    padding-bottom: 64px;
  }

  .site-footer__inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
