/* YeginEgg Landing — 2025: motion, product mockups, glass UI */
:root {
  --primary: #FF6A00;
  --primary-hover: #e55f00;
  --primary-light: rgba(255, 106, 0, 0.15);
  --tertiary: #8FBC8F;
  --tertiary-light: rgba(143, 188, 143, 0.25);
  --success: #4CAF50;
  --background: #FDF1EA;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.7);
  --text: #1F1B16;
  --text-muted: #4F4539;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-soft: 0 4px 24px rgba(31, 27, 22, 0.06);
  --shadow-glass: 0 8px 32px rgba(31, 27, 22, 0.08);
  --shadow-float: 0 24px 64px rgba(31, 27, 22, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Glass effect */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Background */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-image {
  position: absolute;
  inset: -10%;
  background-image: url('https://images.unsplash.com/photo-1548550023-2bdb3c5beed7?w=1920');
  background-size: cover;
  background-position: center;
  animation: bg-ken-burns 25s ease-in-out infinite alternate;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(253, 241, 234, 0.82);
}

@keyframes bg-ken-burns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.06) translate(-1%, -1%); }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 106, 0, 0.08);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.35rem;
  transition: var(--transition);
}

.logo-img {
  border-radius: 12px;
  object-fit: contain;
}

.logo img {
  border-radius: 12px;
  transition: var(--transition);
}

.logo:hover img {
  transform: scale(1.05);
}

.logo-text { color: var(--primary); }

.nav { display: flex; gap: 28px; }

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav a:hover { color: var(--primary); }

/* ═══════════════════════════════════════════════════════════
   HERO: сильный headline + phone mockup + CTA
   ═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  padding: 140px 0 120px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }
}

.hero-badge {
  display: inline-block;
  padding: 8px 18px;
  background: var(--tertiary-light);
  color: var(--tertiary);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(143, 188, 143, 0.4);
}

.hero-headline {
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-headline-accent {
  color: var(--primary);
}

.hero-subline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 420px;
}

@media (max-width: 960px) {
  .hero-subline { margin-left: auto; margin-right: auto; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-lg { padding: 18px 36px; font-size: 1.1rem; }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 24px rgba(255, 106, 0, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(255, 106, 0, 0.4);
}

.btn-primary svg { transition: transform var(--transition); }
.btn-primary:hover svg { transform: translateX(4px); }

/* Hero: камера справа — сразу показывает продукт */
.hero-camera {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-camera-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-float), 0 0 0 4px rgba(255, 106, 0, 0.15);
  animation: camera-float 6s ease-in-out infinite;
}

@keyframes camera-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-camera-timelapse {
  position: absolute;
  inset: 0;
}

.hero-camera-timelapse .timelapse-frame {
  animation: timelapse-fade 16s infinite;
}

.hero-camera-timelapse .timelapse-1 { animation-delay: 0s; }
.hero-camera-timelapse .timelapse-2 { animation-delay: 4s; }
.hero-camera-timelapse .timelapse-3 { animation-delay: 8s; }
.hero-camera-timelapse .timelapse-4 { animation-delay: 12s; }

.hero-camera-ui {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.hero-camera-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════════════
   Сегодня на ферме: живые цифры
   ═══════════════════════════════════════════════════════════ */
.section-live {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  margin: 0 24px 24px;
  padding: 60px 48px;
  border: 1px solid rgba(143, 188, 143, 0.3);
}

.live-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.live-stat {
  text-align: center;
}

.live-stat-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.live-stat-value {
  display: block;
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.live-stat-label {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   Карточки птиц: маркетплейс
   ═══════════════════════════════════════════════════════════ */
.chicken-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

@media (max-width: 900px) {
  .chicken-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .chicken-cards { grid-template-columns: 1fr; }
}

.chicken-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  border: 1px solid rgba(143, 188, 143, 0.2);
}

.chicken-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-float);
}

.chicken-card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.chicken-card-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chicken-card:hover .chicken-card-video {
  opacity: 1;
}

.chicken-card-body {
  padding: 20px;
}

.chicken-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.chicken-card-meta {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════ */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}

.section-chickens .section-subtitle { margin-bottom: 40px; }

/* ═══════════════════════════════════════════════════════════
   Реальная ферма: фото-галерея
   ═══════════════════════════════════════════════════════════ */
.section-farm .section-subtitle { margin-bottom: 40px; }

.farm-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

@media (max-width: 768px) {
  .farm-gallery { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

.farm-flip-card {
  perspective: 1000px;
  aspect-ratio: 4 / 3;
}

.farm-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.farm-flip-card:hover .farm-flip-inner {
  transform: rotateY(180deg);
}

.farm-flip-front,
.farm-flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.farm-flip-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.farm-flip-back {
  transform: rotateY(180deg);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px solid rgba(143, 188, 143, 0.3);
}

.farm-flip-back p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   Cameras: таймлапс
   ═══════════════════════════════════════════════════════════ */
.section-cameras .section-subtitle { margin-bottom: 40px; }

.camera-showcase {
  max-width: 560px;
  margin: 0 auto;
}

.camera-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.camera-timelapse { position: absolute; inset: 0; }

.timelapse-frame {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: timelapse-fade 16s infinite;
}

.timelapse-1 { background-image: url('/images/timelapse-1.jpg'), url('https://images.unsplash.com/photo-1548550023-2bdb3c5beed7?w=1280'); animation-delay: 0s; }
.timelapse-2 { background-image: url('/images/timelapse-2.jpg'), url('https://images.unsplash.com/photo-1507288859032-247e0c2c2e1b?w=1280'); animation-delay: 4s; }
.timelapse-3 { background-image: url('/images/timelapse-3.jpg'), url('https://images.unsplash.com/photo-1563281577-a7fe47d1b731?w=1280'); animation-delay: 8s; }
.timelapse-4 { background-image: url('/images/timelapse-4.jpg'), url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=1280'); animation-delay: 12s; }

@keyframes timelapse-fade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  20% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}

.camera-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 16px;
}

.camera-ui::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(0, 0, 0, 0.4);
}

.camera-ui::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: rgba(0, 0, 0, 0.3);
}

.camera-rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  animation: rec-blink 1.5s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.camera-rec::before {
  content: '';
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.camera-live {
  padding: 4px 10px;
  background: var(--success);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  position: relative;
  z-index: 1;
}

.camera-time {
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  position: relative;
  z-index: 1;
}

.camera-timelapse-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: var(--tertiary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 6px;
  z-index: 1;
}

/* How it works: визуально с фото */
.how-steps {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.how-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.how-step:nth-child(even) {
  direction: rtl;
}

.how-step:nth-child(even) > * {
  direction: ltr;
}

@media (max-width: 768px) {
  .how-step {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 24px;
  }
  .how-step:nth-child(even) { direction: ltr; }
}

.how-step-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.how-step-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.how-step-camera {
  aspect-ratio: 16 / 10;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--success);
  font-weight: 700;
  font-size: 1.25rem;
}

.camera-dot {
  width: 12px;
  height: 12px;
  background: var(--success);
  border-radius: 50%;
  animation: rec-pulse 1.5s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.how-step-content {
  padding: 0 16px;
}

.how-step-num {
  display: inline-block;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: white;
  background: var(--primary);
  border-radius: 12px;
  margin-bottom: 16px;
}

.how-step h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.how-step p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Download */
.section-download {
  background: var(--primary);
  color: white;
  border-radius: var(--radius-xl);
  margin: 0 24px 24px;
  padding: 80px 48px;
}

.section-download .section-title,
.section-download .section-subtitle {
  color: rgba(255, 255, 255, 0.98);
}

.section-download .section-subtitle { margin-bottom: 40px; }

.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 24px;
}

.btn-store {
  background: white;
  color: var(--text);
  padding: 16px 28px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-store:hover {
  background: var(--background);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.store-logo { width: 28px; height: 28px; }

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-text small { font-size: 0.7rem; opacity: 0.8; }
.store-text strong { font-size: 1.05rem; }

.download-note {
  font-size: 0.9rem;
  opacity: 0.9;
  text-align: center;
}

@media (max-width: 768px) {
  .section-live { margin: 0 16px 16px; padding: 40px 24px; }
  .live-stats { gap: 40px; }
  .section-download { margin: 0 16px 16px; padding: 56px 24px; }
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 106, 0, 0.1);
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}
