/*
 * sections.css — стили конкретных секций v2.
 * Phase 2: hero (typewriter + gradient + noise + parallax + AI-demo + stats).
 */

/* ========== HERO ==========
 * Gradient с parallax (--gx/--gy), subtle noise, стеклянные карточки.
 * Старый hero в inline-style перекрыт тем что ниже: свежие классы .hero__*,
 * .tw-slot, .tw-caret, .hero__stats и т.д. выигрывают по specificity. */

.hero {
  --gx: 50%;
  --gy: 30%;
  position: relative;
  isolation: isolate;       /* локализуем z-index stacking */
  overflow: hidden;
  padding: 140px 0 80px;
  text-align: left;
  background: var(--bg);
}

/* Conic-gradient сердцевина (subtle, opacity 0.35 общая) —
   точка радиусом ~40vw с мягким feather, смещается за курсором. */
.hero::before {
  content: '';
  position: absolute;
  inset: -10%;
  z-index: -2;
  background:
    radial-gradient(
      40vw 40vw at var(--gx) var(--gy),
      rgba(108, 92, 231, 0.35) 0%,
      rgba(74, 63, 184, 0.22) 30%,
      transparent 70%
    );
  transition: background-position 0.6s var(--ease-quart);
  pointer-events: none;
}
/* Слабый лайт «рампа» сверху для глубины */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0) 0%,
    rgba(10, 10, 10, 0.45) 100%
  );
  pointer-events: none;
}

/* SVG noise — opacity 0.06, §12 §2.2 playbook */
.hero__noise {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero .hero-content {
  max-width: 900px;
  position: relative;
  z-index: 1;
}

/* ---- Badge ---- */
.hero__badge,
a.hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  background: linear-gradient(135deg, #6D28D9 0%, #EC4899 100%);
  color: #fff;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.3);
  margin-bottom: 20px;
}
a.hero__badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.45);
}

/* ---- H1 typewriter ---- */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  /* Anti-CLS: резервируем место под самую высокую ротацию. 2 строки на
     desktop, 3 строки на mobile (где текст переносится чаще). */
  min-height: calc(1.08em * 2);
  color: var(--ink);
}
@media (max-width: 640px) {
  .hero__title {
    min-height: calc(1.08em * 3);
  }
}
.hero__title .tw-slot {
  display: inline;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero__title .tw-caret {
  display: inline-block;
  width: 0.06em;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  animation: tw-blink 1s steps(2, start) infinite;
  margin-left: 0.05em;
}
@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title .tw-caret { display: none; }
  .hero__title { min-height: 0; }
}

/* ---- Lead ---- */
.hero__lead {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--ink-muted);
  max-width: 560px;
  margin: 0 0 32px;
  line-height: 1.55;
}

/* ---- Live-counter strip ---- */
.hero__stats {
  display: flex;
  gap: clamp(20px, 4vw, 48px);
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hero__stat { display: flex; flex-direction: column; gap: 2px; }
.hero__stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero__stat span {
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

/* «Последняя выдача» строка (статика, обновляется вручную через JSON) */
.hero__latest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin: 0 0 28px;
}
.hero__latest-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__latest-dot { animation: latest-pulse 2s ease-in-out infinite; }
}
@keyframes latest-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.06); }
}

/* ---- AI-demo placeholder ---- */
.hero__ai-demo {
  margin: 48px 0 28px;
  max-width: 560px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
}
.hero__ai-demo .ai-demo__label {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.ai-demo__field {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ai-demo__field input {
  flex: 1;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.ai-demo__field input::placeholder { color: var(--ink-dim); }
.ai-demo__field input[disabled] { cursor: not-allowed; opacity: 0.65; }
.ai-demo__field button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  padding: 11px 18px;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
}
.ai-demo__hint {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

/* ---- CTA-пара ---- */
.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero__actions .cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-md);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.hero__actions .cta--primary {
  background: var(--accent);
  color: var(--on-accent);
}
.hero__actions .cta--primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-cta);
}
.hero__actions .cta--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.hero__actions .cta--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hero { padding: 110px 0 60px; }
  .hero__stats { gap: 18px; padding: 16px 0; }
  .hero__stats .hero__stat strong { font-size: 1.3rem; }
  .hero__ai-demo { padding: 14px; margin-top: 32px; }
}

/* ========== PHILOSOPHY SECTION ========== */
.philosophy-section {
  padding: 96px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.philosophy-section .section-title {
  text-align: center;
  font-size: 36px;
  margin-bottom: 16px;
}
.philosophy-section .section-subtitle {
  text-align: center;
  font-size: 17px;
  opacity: 0.7;
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.5;
}
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.philosophy-card {
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  transition: transform 280ms ease, border-color 280ms ease;
}
.philosophy-card:hover {
  transform: translateY(-4px);
  border-color: rgba(109, 40, 217, 0.4);
}
.philosophy-card__icon {
  font-size: 36px;
  margin-bottom: 16px;
}
.philosophy-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}
.philosophy-card p {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.78;
}
@media (max-width: 900px) {
  .philosophy-grid { grid-template-columns: 1fr; gap: 20px; }
  .philosophy-section { padding: 64px 20px; }
  .philosophy-section .section-title { font-size: 28px; }
}

/* ========== EDUCATION TAGLINE ========== */
.edu-tagline {
  font-size: 13px;
  opacity: 0.6;
  margin-top: 8px;
  line-height: 1.5;
  text-align: center;
}

/* ========== EDUCATION PERKS (anti-cliché cards) ========== */
.education-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0 56px;
}
.education-perk {
  padding: 26px 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  transition: border-color 240ms ease, transform 240ms ease;
}
.education-perk:hover {
  border-color: rgba(236, 72, 153, 0.35);
  transform: translateY(-3px);
}
.education-perk h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
  line-height: 1.3;
}
.education-perk p {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.72;
  margin: 0;
}
@media (max-width: 768px) {
  .education-perks { grid-template-columns: 1fr; gap: 16px; margin: 28px 0 40px; }
}

/* ========== PRICING (Block 3) ==========
 * Block 3.5 redesign — 2 columns × 3 rows + 7th full-width.
 * Compact (~140-160px tall per card), header + price + 1-2 line desc + CTA. */
.pricing-section { padding: 64px 0 88px; }
.pricing-container {
  max-width: 1100px;
  padding: 0 24px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 40px auto 0;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  transition: border-color 220ms ease, transform 220ms ease, background 220ms ease;
}
.pricing-card:hover {
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-2px);
  background: rgba(139, 92, 246, 0.04);
}
.pricing-card--wide { grid-column: 1 / -1; }
.pricing-card__num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.32);
  letter-spacing: 0.05em;
  line-height: 1;
}
.pricing-card__name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin: 0;
  padding-right: 28px;
}
.pricing-card__price {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  background: linear-gradient(135deg, #e94560 0%, #8b5cf6 60%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pricing-card__desc {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
  margin: 0;
}
.pricing-card__cta {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  transition: background 200ms ease, border-color 200ms ease;
}
.pricing-card__cta:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.55);
}
@media (max-width: 700px) {
  .pricing-section { padding: 48px 0 64px; }
  .pricing-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .pricing-card { padding: 18px 20px; }
  .pricing-card__name { font-size: 17px; }
  .pricing-card__price { font-size: 22px; }
}

/* ========== PROCESS-STEP DESC (Block 3) ==========
 * Заменяет старый ul.process-step__bullets на одиночный параграф. */
.process-step__desc {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.78;
  margin: 12px 0 0;
}


/* ========== HERO v2 — VERBS BLOCK (sec 10.3) ========== */
.verbs-section {
  padding: 64px 0 32px;
}
.verbs-section .section-title {
  text-align: center;
  margin-bottom: 32px;
}
.verbs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.verb-card {
  position: relative;
  padding: 22px 22px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}
.verb-card:hover {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
}
.verb-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple, #8b5cf6);
}
.verb-card__icon svg { display: block; }
.verb-card__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.verb-card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.78;
}
@media (max-width: 900px) {
  .verbs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 480px) {
  .verbs-section { padding: 48px 0 24px; }
  .verbs-grid { grid-template-columns: 1fr; gap: 12px; }
  .verb-card { padding: 18px 18px 16px; }
}

/* ========== HERO v2 — PRICING GUARANTEE LINE (sec 10.2) ========== */
.pricing-card__guarantee {
  margin: 6px 0 12px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(34, 197, 94, 0.92);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 999px;
}
.pricing-card__guarantee[hidden] { display: none; }
.pricing-card__guarantee-mark {
  font-weight: 700;
}
.pricing-card__guarantee-note {
  margin-left: 2px;
  text-decoration: none;
  color: inherit;
  opacity: 0.75;
  font-size: 11px;
  vertical-align: super;
}
.pricing-card__guarantee-note:hover { opacity: 1; text-decoration: underline; }
