/* ============================================================
   DECORFORM — Главный стилевой файл
   ============================================================ */

/* ── Сброс и базовые настройки ─────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cream:       #FAF7F2;
  --cream-mid:   #F0E8DC;
  --cream-deep:  #E8DDD0;
  --terracotta:  #C4633A;
  --terra-dark:  #A04E29;
  --terra-light: #F0C4A8;
  --brown:       #2C2118;
  --brown-mid:   #6B5B4E;
  --brown-light: #9B8B80;
  --border:      #DDD5C8;
  --white:       #FFFFFF;

  --font-serif:  Georgia, 'Times New Roman', serif;
  --font-sans:   'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;

  --shadow-card: 0 2px 16px rgba(44, 33, 24, 0.08);
  --shadow-btn:  0 4px 20px rgba(196, 99, 58, 0.30);

  --max-w:       1120px;
  --section-pad: 80px 24px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--brown);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

/* ── Вспомогательные ────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad);
}

.section--alt {
  background-color: var(--cream-mid);
}

.section--dark {
  background-color: var(--brown);
  color: var(--cream);
}

.label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 12px;
}

.label--light {
  color: var(--terra-light);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--brown);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--cream);
}

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

.section-subtitle {
  font-size: 1.05rem;
  color: var(--brown-mid);
  max-width: 640px;
  margin-bottom: 48px;
}

.section--dark .section-subtitle {
  color: var(--cream-deep);
}

/* ── Кнопки ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--terra-dark);
  border-color: var(--terra-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--terracotta);
  border-color: var(--terracotta);
}

.btn-outline:hover {
  background: var(--terracotta);
  color: var(--white);
}

.btn-outline--light {
  color: var(--cream);
  border-color: rgba(250, 247, 242, 0.5);
}

.btn-outline--light:hover {
  background: rgba(250, 247, 242, 0.12);
  border-color: var(--cream);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

/* ── Шапка ──────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brown);
  letter-spacing: -0.01em;
}

.logo span {
  color: var(--terracotta);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brown-mid);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--terracotta);
}

.header-cta {
  padding: 9px 22px;
  font-size: 0.9rem;
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.burger-line {
  width: 100%;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--cream);
}

.mobile-nav a {
  display: block;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brown-mid);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-nav a:hover { color: var(--terracotta); }

.mobile-nav.is-open {
  display: flex;
}

/* ── Герой ──────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 60px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.hero-title {
  margin-bottom: 20px;
  color: var(--brown);
}

.hero-title em {
  font-style: normal;
  color: var(--terracotta);
}

.hero-text {
  font-size: 1.05rem;
  color: var(--brown-mid);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-form-wrapper {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.hero-form-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--brown);
  margin-bottom: 6px;
}

.hero-form-sub {
  font-size: 0.88rem;
  color: var(--brown-light);
  margin-bottom: 20px;
}

.hero-image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 5/4;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: rgba(44, 33, 24, 0.85);
  backdrop-filter: blur(6px);
  color: var(--cream);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── Форма ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown-mid);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--terracotta);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--brown-light);
}

.form-submit {
  width: 100%;
  margin-top: 6px;
}

.form-note {
  font-size: 0.78rem;
  color: var(--brown-light);
  text-align: center;
  margin-top: 10px;
}

.form-note a {
  color: var(--terracotta);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}

.form-note a:hover {
  text-decoration-color: var(--terracotta);
}

.form-error {
  font-size: 0.82rem;
  color: #c0392b;
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* ── Для кого курс ──────────────────────────────────────────── */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.audience-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.audience-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.audience-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.audience-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.audience-card p {
  font-size: 0.9rem;
  color: var(--brown-mid);
  line-height: 1.6;
}

/* ── Программа ──────────────────────────────────────────────── */
.program-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.program-item {
  border-bottom: 1px solid var(--border);
}

.program-item:last-child {
  border-bottom: none;
}

.program-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  cursor: pointer;
  background: var(--white);
  transition: background 0.2s;
  user-select: none;
}

.program-header:hover {
  background: var(--cream);
}

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

.program-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--terracotta);
  background: var(--cream-mid);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.program-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
}

.program-arrow {
  width: 20px;
  height: 20px;
  color: var(--brown-light);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.program-item.is-open .program-arrow {
  transform: rotate(180deg);
}

.program-body {
  display: none;
  padding: 0 28px 22px 76px;
  background: var(--cream);
}

.program-item.is-open .program-body {
  display: block;
}

.program-body p {
  font-size: 0.9rem;
  color: var(--brown-mid);
  line-height: 1.7;
}

/* ── Работы ─────────────────────────────────────────────────── */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.work-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.work-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.work-card:hover .work-img {
  transform: scale(1.04);
}

.work-img-wrap {
  overflow: hidden;
}

.work-label {
  padding: 14px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brown-mid);
}

/* ── Формат ─────────────────────────────────────────────────── */
.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.format-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.format-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.format-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.format-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.format-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.format-text h4 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.format-text p {
  font-size: 0.88rem;
  color: var(--brown-mid);
  line-height: 1.6;
}

/* ── Отзывы ─────────────────────────────────────────────────── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
}

.review-quote {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--terra-light);
  font-family: var(--font-serif);
  margin-bottom: 12px;
}

.review-text {
  font-size: 0.92rem;
  color: var(--brown-mid);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.review-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brown);
}

.review-city {
  font-size: 0.8rem;
  color: var(--brown-light);
}

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--brown);
  gap: 16px;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--terracotta);
}

.faq-icon {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brown-light);
  flex-shrink: 0;
  transition: transform 0.25s;
  line-height: 1;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  color: var(--terracotta);
}

.faq-answer {
  display: none;
  padding: 0 28px 20px;
  font-size: 0.9rem;
  color: var(--brown-mid);
  line-height: 1.7;
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* ── CTA-секция ─────────────────────────────────────────────── */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  color: var(--cream);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(250,247,242,0.75);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.cta-form {
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 32px;
}

.cta-form .form-group input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: var(--cream);
}

.cta-form .form-group input::placeholder {
  color: rgba(250,247,242,0.4);
}

.cta-form .form-group input:focus {
  border-color: var(--terra-light);
}

.cta-form .form-group label {
  color: rgba(250,247,242,0.7);
}

.cta-form .form-note {
  color: rgba(250,247,242,0.4);
}

.cta-form .form-note a {
  color: var(--terra-light);
}

/* ── Футер ──────────────────────────────────────────────────── */
.site-footer {
  background: #1C1510;
  color: rgba(250,247,242,0.65);
  padding: 48px 0 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: var(--cream);
  font-size: 1.3rem;
  display: inline-block;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.87rem;
  line-height: 1.7;
  color: rgba(250,247,242,0.5);
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250,247,242,0.4);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(250,247,242,0.6);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--terra-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal {
  font-size: 0.8rem;
  color: rgba(250,247,242,0.3);
}

/* ── Cookie-баннер ──────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  box-shadow: 0 -4px 24px rgba(44,33,24,0.12);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-text {
  font-size: 0.88rem;
  color: var(--brown-mid);
  max-width: 680px;
}

.cookie-text a {
  color: var(--terracotta);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: center;
}

.cookie-reject {
  font-size: 0.85rem;
  color: var(--brown-light);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
  transition: color 0.2s;
  padding: 4px;
}

.cookie-reject:hover { color: var(--terracotta); }

/* ── Страница Успеха ─────────────────────────────────────────── */
.success-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.success-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--cream-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 28px;
  color: var(--terracotta);
}

.success-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 14px;
}

.success-hero p {
  font-size: 1.05rem;
  color: var(--brown-mid);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* ── Юридические страницы ────────────────────────────────────── */
.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-hero {
  background: var(--cream-mid);
  padding: 56px 24px 40px;
}

.legal-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 8px;
}

.legal-date {
  font-size: 0.85rem;
  color: var(--brown-light);
}

.legal-content {
  flex: 1;
  padding: 48px 24px;
  max-width: 840px;
  margin: 0 auto;
  width: 100%;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  font-size: 0.95rem;
  color: var(--brown-mid);
  line-height: 1.8;
  margin-bottom: 14px;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  color: var(--brown-mid);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

.legal-company {
  background: var(--cream-mid);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.9rem;
  color: var(--brown-mid);
  line-height: 1.8;
  margin-top: 32px;
}

/* ── Адаптив ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-content { max-width: 100%; }

  .hero-image-wrap {
    order: -1;
    aspect-ratio: 16/9;
  }

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

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

  .format-image {
    aspect-ratio: 16/9;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  :root {
    --section-pad: 56px 20px;
  }

  .header-nav {
    display: none;
  }

  .burger {
    display: flex;
  }

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

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

  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .program-body {
    padding-left: 28px;
  }

  .legal-content h2 {
    font-size: 1.15rem;
  }
}
