/* ==========================================================================
   AI-агенты для продактов — стили лендинга
   Зависит от css/tokens.css (цвета, типографика, отступы, эффекты).
   ========================================================================== */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg-page, #0d0d0d); }

body {
  color: #fff;
  font: var(--text-body-md);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-modal-open { overflow: hidden; }

a { color: var(--link-color); text-decoration: none; }
a:hover { color: var(--link-color-hover); }
::selection { background: #ceff8b; color: #000; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, ul { margin: 0; }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 96px 20px 0; }

.section-title {
  margin: 0 0 40px;
  font: 700 clamp(28px, 3.4vw, 48px)/1.1 'Inter', sans-serif;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 16px 24px; margin-bottom: 40px;
}
.section-head .section-title { margin: 0; }
.section-note { font: 400 15px/1.4 'Inter', sans-serif; color: #9a9a9a; }

.kicker {
  font: 500 13px/1 'Inter', sans-serif;
  letter-spacing: .14em; text-transform: uppercase; color: #ceff8b;
}
.kicker--magenta { color: #d26def; }

.label {
  font: 500 12px/1 'Inter', sans-serif;
  letter-spacing: .1em; text-transform: uppercase; color: #ceff8b;
}
.label--muted { color: #9a9a9a; font-weight: 400; }

.text { font: 400 16px/1.5 'Inter', sans-serif; color: #cfcfcf; }
.text--pretty { text-wrap: pretty; }

.list { padding-left: 20px; display: grid; gap: 8px; font: 400 16px/1.5 'Inter', sans-serif; color: #fff; }

/* ---------- Buttons (аналог компонента Button дизайн-системы) ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 500; font-size: 16px; line-height: 1;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  padding: 14px 28px;
  cursor: pointer;
  transition: var(--transition-interactive);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; white-space: nowrap;
  -webkit-appearance: none; appearance: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--sm { font-size: 13px; padding: 10px 18px; }
.btn--bevel { border-radius: 0; clip-path: var(--shape-bevel); padding: 18px 36px; }
.btn--sm.btn--bevel { padding: 12px 22px; }

.btn--primary { background: var(--accent-primary); color: var(--text-on-accent); }
.btn--primary:hover:not(:disabled) { background: var(--accent-primary-hover); color: var(--text-on-accent); }

.btn--outline { background: transparent; color: var(--accent-primary); border-color: var(--accent-primary); }
.btn--outline:hover:not(:disabled) { color: var(--accent-outline-hover); border-color: var(--accent-outline-hover); }

.btn--ghost { background: rgba(0,0,0,.2); color: var(--text-primary); }
.btn--ghost:hover:not(:disabled) { background: rgba(64,64,64,1); color: var(--text-primary); }

.btn:focus-visible { outline: 2px solid #ceff8b; outline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  padding: 12px 20px;
  background: rgba(13,13,13,.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid #2b2b2b;
}
.header__inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.header__logo { height: 19px; width: auto; flex: none; }
.nav { display: flex; gap: 22px; flex: 1; flex-wrap: wrap; font: 500 14px/1 'Inter', sans-serif; }
.nav a { color: #cfcfcf; }
.nav a:hover { color: #fff; }
.header__cta { display: flex; align-items: center; gap: 14px; flex: none; }
.header__stream {
  font: 500 13px/1 'Inter', sans-serif; letter-spacing: .04em;
  text-transform: uppercase; color: #ceff8b; white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: #0d0d0d; }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 60% center; opacity: .9;
}
.hero__fade-x {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #0d0d0d 0%, rgba(13,13,13,.92) 34%, rgba(13,13,13,.35) 62%, rgba(13,13,13,.75) 100%);
}
.hero__fade-y {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,.85) 0%, rgba(13,13,13,0) 22%, rgba(13,13,13,0) 62%, #0d0d0d 100%);
}
.hero__inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 120px 20px 96px; display: grid; gap: 28px; }
.hero__content { display: grid; gap: 28px; max-width: 720px; }
.hero__title {
  font: 700 clamp(40px, 6.4vw, 80px)/1 'Inter', sans-serif;
  letter-spacing: -.03em; text-transform: uppercase; text-wrap: balance;
}
.hero__lead { font: 400 clamp(17px, 1.8vw, 22px)/1.45 'Inter', sans-serif; color: #cfcfcf; max-width: 620px; text-wrap: pretty; }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 20px 0;
  border-top: 1px solid #2b2b2b; border-bottom: 1px solid #2b2b2b; max-width: 620px;
}
.fact { display: grid; gap: 6px; }
.fact__value { font: 600 17px/1 'Inter', sans-serif; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* ---------- Glass cards (аналог GlassCard) ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.glass-card {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  overflow: hidden; min-height: 220px;
}
.glass-card__glow {
  position: absolute; top: 18px; left: 24px; width: 34px; height: 34px;
  border-radius: 999px; background: var(--glow-lime); filter: var(--glow-blur); opacity: .6;
}
.glass-card__title { position: relative; font-family: var(--font-display); font-weight: 400; font-size: 20px; text-transform: uppercase; color: var(--text-primary); }
.glass-card__text { position: relative; font-family: var(--font-body); font-size: 13px; color: var(--text-secondary); line-height: 1.4; }

/* ---------- Panels ---------- */
.panel {
  position: relative; overflow: hidden;
  border: 1px solid #2d2a63; border-radius: 15px; background: #191919;
}
.panel--case { padding: clamp(28px, 4vw, 56px); }
.panel__glow-magenta {
  position: absolute; left: 0; bottom: 0; width: 340px; height: 340px;
  background: radial-gradient(circle at 0% 100%, rgba(210,109,239,.5), rgba(210,109,239,0) 70%);
}
.panel__body { position: relative; display: grid; gap: 22px; max-width: 820px; }
.panel__title { font: 700 clamp(24px, 2.6vw, 34px)/1.15 'Inter', sans-serif; letter-spacing: -.02em; text-transform: uppercase; }
.panel__text { font: 400 clamp(16px, 1.6vw, 19px)/1.5 'Inter', sans-serif; color: #cfcfcf; text-wrap: pretty; }

/* ---------- Audience ---------- */
.audience { display: grid; gap: 16px; }
.audience__row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px 40px; align-items: start; padding: 28px;
  border: 1px solid #2b2b2b; border-radius: 15px; background: #151515;
}
.audience__col { display: grid; gap: 22px; align-content: start; }
.audience__item { display: grid; gap: 10px; }

/* ---------- Program ---------- */
.program { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.module {
  position: relative; overflow: hidden; padding: 32px;
  border: 1px solid #2d2a63; border-radius: 15px; background: #191919;
  display: grid; gap: 16px; align-content: start;
}
.module__glow {
  position: absolute; left: 0; top: 0; width: 200px; height: 200px;
  background: radial-gradient(circle at 0% 0%, rgba(206,255,139,.34), rgba(206,255,139,0) 70%);
}
.module__num { position: relative; font: 700 34px/1 'Inter', sans-serif; color: #ceff8b; }
.module__title { position: relative; font: 600 20px/1.25 'Inter', sans-serif; }
.module__text { position: relative; }

/* ---------- Format ---------- */
.format {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1px; background: #2b2b2b; border: 1px solid #2b2b2b; border-radius: 15px; overflow: hidden;
}
.format__cell { background: #0d0d0d; padding: 32px; display: grid; gap: 10px; align-content: start; }
.format__big { font: 700 clamp(26px, 2.6vw, 34px)/1 'Inter', sans-serif; color: #ceff8b; }
.format__caption { font: 400 16px/1.4 'Inter', sans-serif; color: #cfcfcf; }

/* ---------- Teachers ---------- */
.teachers { display: grid; gap: 20px; }
.teacher { display: flex; flex-wrap: wrap; gap: 28px; padding: 28px; border: 1px solid #2d2a63; border-radius: 15px; background: #191919; }
.teacher__photo {
  flex: 0 0 auto; width: min(320px, 100%); aspect-ratio: 1/1;
  object-fit: cover; border-radius: 15px; filter: grayscale(.15);
}
.teacher__body { flex: 1 1 340px; min-width: 0; display: grid; gap: 14px; align-content: start; }
.teacher__head { display: grid; gap: 8px; }
.teacher__name { font: 700 26px/1.15 'Inter', sans-serif; letter-spacing: -.02em; }
.teacher__role { font: 500 14px/1.3 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #ceff8b; }
.teacher__bio { font: 400 16px/1.55 'Inter', sans-serif; color: #cfcfcf; text-wrap: pretty; }

.teachers-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; align-items: start; }
.teacher--compact { display: grid; gap: 18px; align-content: start; }
.teacher--compact .teacher__photo { width: 100%; max-width: 200px; }
.teacher--compact .teacher__name { font-size: 22px; }

/* ---------- Price ---------- */
.price-card {
  position: relative; overflow: hidden; max-width: 520px;
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid #2d2a63; border-radius: 15px; background: #191919;
  display: grid; gap: 24px;
}
.price-card__glow {
  position: absolute; right: 0; top: 0; width: 260px; height: 260px;
  background: radial-gradient(circle at 100% 0%, rgba(206,255,139,.3), rgba(206,255,139,0) 70%);
}
.price-card__head { position: relative; display: grid; gap: 10px; }
.price-card__amount { font: 700 clamp(34px, 4vw, 48px)/1 'Inter', sans-serif; letter-spacing: -.02em; }
.price-card__note { font: 400 15px/1.4 'Inter', sans-serif; color: #cfcfcf; }
.price-card .list { position: relative; gap: 10px; }
.price-card__action { position: relative; }

/* ---------- Final CTA ---------- */
.final {
  position: relative; overflow: hidden;
  border: 1px solid #2d2a63; border-radius: 15px; background: #191919;
  padding: clamp(32px, 4.4vw, 64px);
  display: grid; gap: 24px; justify-items: start;
}
.final__glow {
  position: absolute; right: 0; top: 0; width: 420px; height: 420px;
  background: radial-gradient(circle at 100% 0%, rgba(40,80,190,.55), rgba(40,80,190,0) 70%);
}
.final__title {
  position: relative; font: 700 clamp(26px, 3vw, 44px)/1.1 'Inter', sans-serif;
  letter-spacing: -.02em; text-transform: uppercase; max-width: 760px; text-wrap: balance;
}
.final__text { position: relative; font: 400 clamp(16px, 1.6vw, 19px)/1.5 'Inter', sans-serif; color: #cfcfcf; max-width: 560px; }
.final__action { position: relative; }

/* ---------- Footer ---------- */
.footer { max-width: 1180px; margin: 56px auto 0; padding: 80px 20px 56px; }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: center; justify-content: space-between;
  padding-top: 32px; border-top: 1px solid #2b2b2b;
}
.footer__logo { height: 17px; width: auto; }
.footer__text { font: 400 13px/1.4 'Inter', sans-serif; color: #9a9a9a; }
.footer__link { font: 500 14px/1 'Inter', sans-serif; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; }
.modal[data-open="true"] { display: block; }
.modal__overlay {
  position: absolute; inset: 0;
  background: rgba(3,0,47,.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal__dialog {
  width: min(100%, 520px); max-height: 90vh; overflow: auto;
  background: #131313; border: 1px solid #2d2a63; border-radius: 15px;
  padding: clamp(24px, 3vw, 40px); display: grid; gap: 20px;
}
.modal__head { display: grid; gap: 10px; }
.modal__title { font: 700 26px/1.15 'Inter', sans-serif; letter-spacing: -.02em; text-transform: uppercase; }
.modal__text { font: 400 15px/1.5 'Inter', sans-serif; color: #cfcfcf; }
.modal__success { font: 500 17px/1.5 'Inter', sans-serif; color: #ceff8b; }
.modal__error { font: 400 14px/1.4 'Inter', sans-serif; color: #ff8b8b; }
[hidden] { display: none !important; }

/* ---------- Form (аналог Input / Checkbox) ---------- */
.form { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.field__label { font-family: var(--font-body); font-size: 13px; color: var(--text-secondary); }
.field__input {
  font-family: var(--font-body); font-size: 15px; color: var(--text-primary);
  background: rgba(255,255,255,.06); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); padding: 14px 16px; outline: none; width: 100%;
}
.field__input:focus { border-color: var(--accent-primary); }
.field__input::placeholder { color: rgba(255,255,255,.35); }
.field.is-invalid .field__input { border-color: #ff8b8b; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--accent-primary); flex-shrink: 0; }
.checkbox span { font-family: var(--font-body); font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.checkbox.is-invalid span { color: #ff8b8b; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav { display: none; }
  .header__stream { display: none; }
  .header__cta { margin-left: auto; }
  .hero__inner { padding: 88px 20px 72px; }
  .container { padding-top: 72px; }
}

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