/* === Переменные === */
:root {
  --chocolate-dark: #3E1F0D;
  --chocolate: #5C2E0E;
  --chocolate-light: #8B4513;
  --chocolate-medium: #6B3A1F;
  --gold: #D4A527;
  --gold-light: #F0D060;
  --gold-dark: #B8860B;
  --cream: #FFF8F0;
  --cream-dark: #F5E6D3;
  --white: #FFFFFF;
  --text: #2D1810;
  --text-light: #6B5B50;
  --purple: #6B2FA0;
  --purple-light: #9B59B6;
  --green: #2E8B57;
  --shadow: rgba(62, 31, 13, 0.15);
  --shadow-strong: rgba(62, 31, 13, 0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Raleway', sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

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

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

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

/* === Частицы === */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    opacity: 0;
    transform: translateY(100vh) rotate(0deg);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) rotate(360deg);
  }
}

/* === Хедер === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(62, 31, 13, 0.95);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: 0 4px 20px var(--shadow);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 101;
}

.logo-icon {
  font-size: 32px;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 8px;
}

.nav-link {
  padding: 8px 20px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 15px;
  color: var(--white);
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(212, 165, 39, 0.2);
  color: var(--gold);
}

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

.burger span {
  width: 28px;
  height: 3px;
  background: var(--gold);
  border-radius: 3px;
  transition: all var(--transition);
}

.burger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(62, 31, 13, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: var(--white);
  transition: color var(--transition);
}

.mobile-link:hover {
  color: var(--gold);
}

/* === Секции === */
.section {
  min-height: 100vh;
  padding: 120px 0 80px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--chocolate-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-title.center {
  text-align: center;
}

.section-subtitle {
  text-align: center;
  font-size: 18px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 60px;
}

/* === Hero === */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--chocolate-dark) 0%, var(--chocolate) 40%, var(--chocolate-light) 100%);
  padding: 0;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(212, 165, 39, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(155, 89, 182, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(212, 165, 39, 0.1) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  margin-bottom: 24px;
}

.hero-title-line {
  display: block;
  font-size: clamp(40px, 7vw, 80px);
  color: var(--white);
  line-height: 1.1;
}

.hero-title-line.accent {
  color: var(--gold);
  font-size: clamp(48px, 8vw, 96px);
  text-shadow: 0 4px 30px rgba(212, 165, 39, 0.4);
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 40px;
  font-weight: 300;
  line-height: 1.6;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  transform: rotate(45deg);
  margin: 10px auto 0;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
  40% { transform: rotate(45deg) translateY(10px); }
  60% { transform: rotate(45deg) translateY(5px); }
}

/* === Кнопки === */
.btn {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 50px;
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--chocolate-dark);
  box-shadow: 0 4px 20px rgba(212, 165, 39, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(212, 165, 39, 0.5);
}

/* === О фабрике === */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px var(--shadow-strong);
}

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

.about-image-decor {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius);
  z-index: -1;
}

.about-desc {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 40px;
}

.about-stats {
  display: flex;
  gap: 40px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 900;
  color: var(--gold-dark);
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
  display: block;
}

/* === История (таймлайн) === */
.history {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--chocolate-light), var(--gold));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  left: -33px;
  top: 5px;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 50%;
  border: 4px solid var(--cream);
  box-shadow: 0 0 0 3px var(--gold);
}

.timeline-content {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px var(--shadow);
  transition: transform var(--transition);
}

.timeline-content:hover {
  transform: translateY(-5px);
}

.timeline-year {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--chocolate-dark);
  padding: 4px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.timeline-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--chocolate-dark);
  margin-bottom: 10px;
}

.timeline-content p {
  color: var(--text-light);
  line-height: 1.7;
}

/* === Продукты === */
.products {
  background: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow);
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(30px);
}

.product-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 50px var(--shadow-strong);
}

.product-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--chocolate-dark), var(--chocolate));
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--chocolate);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.product-badge.gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--chocolate-dark);
}

.product-info {
  padding: 24px;
}

.product-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--chocolate-dark);
  margin-bottom: 10px;
}

.product-info p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.product-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(212, 165, 39, 0.15);
  color: var(--gold-dark);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* === Контакты === */
.contacts {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 60px;
}

.contact-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 8px 30px var(--shadow);
  transition: all var(--transition);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px var(--shadow-strong);
}

.contact-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.contact-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--chocolate-dark);
  margin-bottom: 12px;
}

.contact-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}

.contact-form-wrap {
  background: var(--white);
  padding: 50px;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--chocolate-dark);
  text-align: center;
  margin-bottom: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--cream);
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
}

.form-textarea {
  margin-bottom: 20px;
  resize: vertical;
}

.contact-form .btn {
  width: 100%;
}

/* === Футер === */
.footer {
  background: var(--chocolate-dark);
  color: var(--white);
  padding: 60px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-desc {
  margin-top: 16px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
}

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

.footer-links h4 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 8px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
}

/* === Анимации появления === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Адаптивность === */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .section {
    padding: 100px 0 60px;
  }

  .section-title {
    font-size: 36px;
  }

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .about-stats {
    justify-content: center;
  }

  .contact-form-wrap {
    padding: 30px 20px;
  }

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

  .timeline {
    padding-left: 30px;
  }
}
