/* ==========================================================================
   Farmato Landing Page - Color Palette from Mobile App
   ========================================================================== */

:root {
  /* Brand colors */
  --sage-green: #8FAE9E;
  --sage-green-dark: #6B8B7A;
  --light-taupe: #C8C1B8;
  --off-white: #F7F6F2;
  --soft-mustard: #D6A93B;
  --warm-grey: #7A746B;

  /* Functional */
  --background: var(--off-white);
  --text-primary: var(--warm-grey);
  --text-secondary: #9A9490;
  --border: var(--light-taupe);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Animation */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-fade-in-up {
  animation: fadeInUp var(--transition-slow) ease forwards;
}

.animate-fade-in {
  animation: fadeIn var(--transition-slow) ease forwards;
}

/* Staggered animations */
.hero-content { animation: fadeInUp 0.6s ease 0.1s both; }
.phone-mockup { animation: fadeInUp 0.6s ease 0.2s both; }
.features { animation: fadeInUp 0.6s ease 0.3s both; }
.download { animation: fadeInUp 0.6s ease 0.4s both; }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xl);
}

/* Desktop: no scroll, everything fits */
@media (min-width: 768px) and (min-height: 700px) {
  body {
    overflow: hidden;
  }

  .container {
    max-width: 600px;
    justify-content: center;
    padding: var(--space-xl);
  }
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */

.lang-switcher {
  position: fixed;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  gap: var(--space-xs);
  z-index: 100;
  animation: fadeIn 0.6s ease 0.5s both;
}

.lang-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  border-color: var(--sage-green);
  color: var(--sage-green);
}

.lang-btn.active {
  background: var(--sage-green);
  border-color: var(--sage-green);
  color: white;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  text-align: center;
}

.hero-content {
  margin-bottom: var(--space-lg);
}

.logo {
  height: 48px;
  width: auto;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sage-green-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   Phone Mockup & Carousel
   ========================================================================== */

.phone-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.phone-frame {
  position: relative;
  width: 220px;
  height: 440px;
  background: #1C1B1F;
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 25px 50px -12px rgba(107, 139, 122, 0.25),
    0 0 0 1px rgba(200, 193, 184, 0.3);
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #1C1B1F;
  border-radius: 12px;
  z-index: 10;
}

.carousel {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--off-white);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-dots {
  display: flex;
  gap: var(--space-sm);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--light-taupe);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dot:hover {
  background: var(--sage-green);
  transform: scale(1.2);
}

.dot.active {
  background: var(--sage-green);
  width: 24px;
  border-radius: 4px;
}

/* ==========================================================================
   Features
   ========================================================================== */

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--sage-green);
  transition: all var(--transition-fast);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature:hover .feature-icon {
  background: var(--sage-green);
  border-color: var(--sage-green);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(143, 174, 158, 0.3);
}

.feature span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==========================================================================
   Download Buttons
   ========================================================================== */

.download {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 400px) {
  .download {
    flex-direction: row;
    justify-content: center;
  }
}

.store-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: #1C1B1F;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  transition: all var(--transition-fast);
}

.store-btn:hover {
  background: var(--sage-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(107, 139, 122, 0.3);
}

.store-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.store-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-label {
  font-size: 0.65rem;
  opacity: 0.8;
}

.store-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: var(--space-md);
  z-index: 1000;
  animation: slideUp 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-align: center;
}

@media (min-width: 500px) {
  .cookie-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
}

.cookie-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cookie-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  padding: var(--space-sm) var(--space-md);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
}

.btn-primary {
  background: var(--sage-green);
  color: white;
}

.btn-primary:hover {
  background: var(--sage-green-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--sage-green);
  color: var(--sage-green);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: var(--space-md);
  text-align: center;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.6s ease 0.6s both;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.footer a {
  color: var(--sage-green);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--sage-green-dark);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 360px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .phone-frame {
    width: 180px;
    height: 360px;
  }

  h1 {
    font-size: 1.25rem;
  }
}

/* Larger screens */
@media (min-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  .phone-frame {
    width: 260px;
    height: 520px;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
  }

  .feature-icon svg {
    width: 24px;
    height: 24px;
  }

  .feature span {
    font-size: 0.8rem;
  }
}
