/* =============================================
   FORMELLO — Онлайн-курсы изделий из фоамирана
   ============================================= */

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

:root {
  --cream: #FAF7F2;
  --clay: #B8714E;
  --clay-dark: #96573A;
  --clay-light: #D4967A;
  --warm-gold: #C9964F;
  --text: #2C2420;
  --text-mid: #5A4A42;
  --text-light: #8B7B74;
  --border: #E8DDD6;
  --white: #FFFFFF;
  --section-alt: #F5EDE5;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

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

a {
  color: var(--clay);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--clay-dark);
}

/* =============================================
   TYPOGRAPHY
   ============================================= */

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

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p { color: var(--text-mid); }

/* =============================================
   LAYOUT
   ============================================= */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 16px;
}

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

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

/* =============================================
   HEADER / NAV
   ============================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(44, 36, 32, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--clay);
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--text);
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-mid);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--clay);
}

.nav-cta {
  background: var(--clay);
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: var(--clay-dark) !important;
  color: var(--white) !important;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* =============================================
   HERO
   ============================================= */

.hero {
  padding-top: 68px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(250, 247, 242, 0.97) 0%,
    rgba(250, 247, 242, 0.88) 45%,
    rgba(250, 247, 242, 0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.hero-badge {
  display: inline-block;
  background: var(--clay-light);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: italic;
  color: var(--clay);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-mid);
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--clay);
  color: var(--white);
  padding: 16px 36px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-align: center;
}

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

.btn-secondary {
  display: inline-block;
  color: var(--clay);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  color: var(--clay-dark);
}

.hero-note {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* =============================================
   FOR WHOM
   ============================================= */

.for-whom {
  background: var(--section-alt);
}

.for-whom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.for-whom-card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  border: 1px solid var(--border);
}

.for-whom-card .icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.for-whom-card h3 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.for-whom-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
}

/* =============================================
   OUTCOMES
   ============================================= */

.outcomes-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.outcomes-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(44, 36, 32, 0.12);
}

.outcomes-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.outcomes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.outcomes-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.outcomes-list .check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--clay);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.outcomes-list .check::after {
  content: '';
  width: 6px;
  height: 10px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg) translate(-1px, -1px);
}

.outcomes-list li p {
  font-size: 0.97rem;
  color: var(--text-mid);
}

/* =============================================
   PROGRAM / COURSE OVERVIEW
   ============================================= */

.program {
  background: var(--section-alt);
}

.program-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.module-card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--clay);
}

.module-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--clay);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.module-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.module-card p {
  font-size: 0.88rem;
}

/* =============================================
   PROCESS / HOW IT WORKS
   ============================================= */

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-top: 48px;
  position: relative;
}

.step {
  text-align: center;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--clay);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.87rem;
}

/* =============================================
   MATERIALS
   ============================================= */

.materials-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.materials-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(44, 36, 32, 0.12);
  order: 2;
}

.materials-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.materials-text {
  order: 1;
}

.materials-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.materials-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text-mid);
}

.materials-list .dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--warm-gold);
  border-radius: 50%;
  margin-top: 8px;
}

.materials-note {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--section-alt);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-mid);
  border-left: 3px solid var(--warm-gold);
}

/* =============================================
   FAQ
   ============================================= */

.faq {
  background: var(--section-alt);
}

.faq-list {
  max-width: 760px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-sans);
}

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

.faq-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--section-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s, background 0.2s;
  font-style: normal;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  background: var(--clay);
  color: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.3s;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 24px 20px;
  font-size: 0.93rem;
  color: var(--text-mid);
}

/* =============================================
   LEAD FORM
   ============================================= */

.lead-form-section {
  background: var(--text);
  color: var(--white);
}

.lead-form-section .section-label {
  color: var(--clay-light);
}

.lead-form-section .section-title {
  color: var(--white);
}

.lead-form-section .section-subtitle {
  color: rgba(255,255,255,0.65);
}

.form-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  flex: 1 0 100%;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.97rem;
  color: var(--clay);
  font-family: var(--font-sans);
  width: 100%;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.35);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clay-light);
  background: rgba(255,255,255,0.12);
}

.form-group input.error,
.form-group select.error {
  border-color: #E07070;
}

.field-error {
  font-size: 0.78rem;
  color: #F4A1A1;
  display: none;
}

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

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 24px;
}

.form-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--clay);
  cursor: pointer;
}

.form-consent label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
}

.form-consent a {
  color: var(--clay-light);
}

.btn-submit {
  width: 100%;
  background: var(--clay);
  color: var(--white);
  padding: 18px 36px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font-sans);
}

.btn-submit:hover:not(:disabled) {
  background: var(--clay-dark);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =============================================
   FOOTER
   ============================================= */

.site-footer {
  background: #1E1812;
  color: rgba(255,255,255,0.55);
  padding: 48px 0 32px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.footer-brand .logo {
  font-size: 1.3rem;
  display: inline-block;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 0.82rem;
  max-width: 240px;
  color: rgba(255,255,255,0.45);
}

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
  font-family: var(--font-sans);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 0.87rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--clay-light);
}

.footer-bottom {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-company {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* =============================================
   COOKIE BANNER
   ============================================= */

.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 520px;
  background: var(--text);
  color: var(--white);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner.visible {
  display: flex;
}

.cookie-text {
  flex: 1;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.75);
  min-width: 200px;
}

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

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

.btn-cookie-accept {
  background: var(--clay);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: var(--font-sans);
}

.btn-cookie-accept:hover {
  background: var(--clay-dark);
}

.btn-cookie-decline {
  background: transparent;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: var(--font-sans);
}

.btn-cookie-decline:hover {
  border-color: rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.75);
}

/* =============================================
   LEGAL PAGES
   ============================================= */

.legal-page {
  padding-top: 120px;
  padding-bottom: 80px;
}

.legal-page h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 48px;
}

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

.legal-content h3 {
  font-size: 1rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  margin-bottom: 16px;
  font-size: 0.97rem;
}

.legal-content ul, .legal-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-content li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text-mid);
}

/* =============================================
   SUCCESS PAGE
   ============================================= */

.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.success-inner {
  max-width: 480px;
}

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

.success-inner h1 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.success-inner p {
  font-size: 1rem;
  margin-bottom: 32px;
}

.success-inner .btn-primary {
  display: inline-block;
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 900px) {
  .outcomes-layout {
    grid-template-columns: 1fr;
  }

  .materials-layout {
    grid-template-columns: 1fr;
  }

  .materials-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  section { padding: 60px 0; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    top: 68px;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    font-size: 1.1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .burger {
    display: flex;
  }

  .hero-desc { font-size: 1rem; }

  .form-row {
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .footer-top {
    flex-direction: column;
  }

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

  .process-steps {
    grid-template-columns: 1fr 1fr;
  }

  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .footer-links {
    gap: 32px;
  }
}
