/* Art direction: Indian heritage FMCG brand - premium, warm, trustworthy
   Palette: warm maroon + wheat gold on cream/off-white surfaces (light), dark brown surfaces (dark)
   Typography: Playfair Display (premium serif) + Plus Jakarta Sans (modern geometric) + Noto Sans Devanagari (Hindi)
   Density: spacious - luxury = generous whitespace, HNI-grade */

/* ===== TYPE SCALE ===== */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* ===== SPACING (4px base) ===== */
:root {
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* ===== FONTS ===== */
:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  --font-hindi: 'Noto Sans Devanagari', sans-serif;
}

/* ===== NANDI LIGHT MODE - Warm Cream + Maroon + Gold ===== */
:root, [data-theme="light"] {
  color-scheme: light only;
  /* Surfaces */
  --color-bg:             #FFFDF7;
  --color-surface:        #FAF5E8;
  --color-surface-2:      #F5EDD8;
  --color-surface-offset: #F0E8CE;
  --color-surface-offset-2: #EBE1C3;
  --color-surface-dynamic: #E3D8B5;
  --color-divider:        #D9CDA8;
  --color-border:         #CFC19A;

  /* Text */
  --color-text:           #2C1810;
  --color-text-muted:     #6B5744;
  --color-text-faint:     #A8977F;
  --color-text-inverse:   #FFFDF7;

  /* Primary - Maroon (heritage/trust) */
  --color-primary:        #7B1F2E;
  --color-primary-hover:  #5A1520;
  --color-primary-active: #3E0E16;
  --color-primary-highlight: #F0D8DC;

  /* Accent - Wheat Gold (premium/food) */
  --color-accent:         #C8A35F;
  --color-accent-hover:   #B8923E;
  --color-accent-active:  #9A7A2E;
  --color-accent-highlight: #F5ECDA;

  /* Green - Forest Green (natural/organic) */
  --color-green:          #2D5A3D;
  --color-green-hover:    #1E4230;
  --color-green-active:   #143024;
  --color-green-highlight: #D4E5DA;

  /* Error */
  --color-error:          #B8432B;
  --color-error-hover:    #8E3420;
  --color-error-active:   #6B2618;
  --color-error-highlight: #F5DDD6;

  /* Success */
  --color-success:        #2D5A3D;
  --color-success-hover:  #1E4230;
  --color-success-active: #143024;
  --color-success-highlight: #D4E5DA;

  /* Dark surface (for header/footer) */
  --color-dark:           #2C1810;
  --color-dark-surface:   #3A2419;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows - tone-matched to warm surfaces */
  --shadow-sm: 0 1px 2px oklch(0.2 0.03 60 / 0.08);
  --shadow-md: 0 4px 12px oklch(0.2 0.03 60 / 0.1);
  --shadow-lg: 0 12px 32px oklch(0.2 0.03 60 / 0.14);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ===== NANDI DARK MODE - Deep Brown + Warm Gold ===== */
[data-theme="dark"] {
  --color-bg:             #1A0F0A;
  --color-surface:        #221610;
  --color-surface-2:      #2C1E16;
  --color-surface-offset: #33241A;
  --color-surface-offset-2: #3A2B20;
  --color-surface-dynamic: #4A3828;
  --color-divider:        #3D2E22;
  --color-border:         #5A4838;

  --color-text:           #E8DFD4;
  --color-text-muted:     #A89880;
  --color-text-faint:     #6B5E4E;
  --color-text-inverse:   #1A0F0A;

  --color-primary:        #D4717F;
  --color-primary-hover:  #C45565;
  --color-primary-active: #A8404E;
  --color-primary-highlight: #3A2228;

  --color-accent:         #D4B06A;
  --color-accent-hover:   #C8A35F;
  --color-accent-active:  #B89245;
  --color-accent-highlight: #3A3220;

  --color-green:          #5DA87A;
  --color-green-hover:    #4A9468;
  --color-green-active:   #387A54;
  --color-green-highlight: #1E3028;

  --color-error:          #D4715A;
  --color-error-hover:    #C45540;
  --color-error-active:   #A84035;
  --color-error-highlight: #3A2220;

  --color-success:        #5DA87A;
  --color-success-hover:  #4A9468;
  --color-success-active: #387A54;
  --color-success-highlight: #1E3028;

  --color-dark:           #E8DFD4;
  --color-dark-surface:   #2C1E16;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}

/* System preference fallback removed - light mode is default.
   Dark mode only activates via explicit toggle (data-theme="dark"). */

/* ===== GLOBAL COMPONENT STYLES ===== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.2;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border: 1px solid var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); box-shadow: 0 8px 25px rgba(123,31,46,0.3); }

.btn-accent {
  background: var(--color-accent);
  color: #2C1810;
  border: 1px solid var(--color-accent);
}
.btn-accent:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); box-shadow: 0 8px 25px rgba(200,163,95,0.3); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-highlight); }

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

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 0.5);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

/* Section spacing */
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
  padding-inline: var(--space-6);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  width: 100%;
}

.container-narrow {
  max-width: var(--content-default);
  margin-inline: auto;
  width: 100%;
}

/* Scroll reveal animations */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

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

/* Dark mode button accent fix */
[data-theme="dark"] .btn-accent {
  background: var(--color-accent);
  color: #1A0F0A;
  border-color: var(--color-accent);
}
[data-theme="dark"] .btn-accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-gold {
  background: linear-gradient(135deg, #C8A35F, #D4B06A);
  color: #2C1810;
}

.badge-green {
  background: var(--color-green-highlight);
  color: var(--color-green);
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
a:hover {
  color: var(--color-primary-hover);
}

/* Form elements */
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  transition: border-color var(--transition-interactive),
              box-shadow var(--transition-interactive);
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-highlight);
}
.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* ===== V33 - HERO BACKGROUND IMAGE ===== */
.hero-with-bg {
  position: relative;
  overflow: hidden;
}
.hero-with-bg .hero-inner {
  position: relative;
  z-index: 2;
}
.hero-bg-image {
  position: absolute;
  inset: 0;
  background-image: url('./hero-bg.webp');
  background-size: cover;
  background-position: center;
  animation: kenBurns 20s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(44,24,16,0.82) 0%, rgba(123,31,46,0.65) 100%);
  z-index: 1;
}
@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}
.hero-with-bg .btn-outline:hover {
  background: rgba(255,253,247,0.12);
}
.hero-with-bg .hero-badge {
  background: linear-gradient(135deg, #C8A35F, #D4B06A);
  color: #2C1810;
}

/* ===== V33 - PARALLAX STRIP ===== */
.parallax-strip {
  height: 300px;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.parallax-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44,24,16,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}
.parallax-text {
  color: #FFFDF7;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  text-align: center;
  padding: 0 var(--space-6);
  letter-spacing: 0.01em;
}
@media (max-width: 768px) {
  .parallax-strip {
    background-attachment: scroll;
    height: 200px;
  }
  .parallax-text {
    font-size: var(--text-lg);
  }
}

/* ===== V33 - HEALTH PURITY LAYOUT ===== */
@media (max-width: 768px) {
  .health-purity-layout {
    grid-template-columns: 1fr !important;
  }
  .health-purity-image img {
    min-height: 220px !important;
    max-height: 280px;
  }
}

/* ===== V33 - RECIPES WHEAT PATTERN ===== */
.recipes-with-pattern {
  position: relative;
}
.recipes-with-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('./wheat-pattern.webp');
  background-repeat: repeat;
  background-size: 200px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}
.recipes-with-pattern > * {
  position: relative;
  z-index: 1;
}

/* ===== V33 - ENHANCED SCROLL REVEALS ===== */
.reveal-v33 {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-v33.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Blur-in reveal animation */
.blur-in {
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.blur-in.revealed {
  opacity: 1;
  filter: blur(0);
}

/* ===== TESTIMONIAL CAROUSEL ===== */
.testimonial-carousel {
  position: relative;
  max-width: 700px;
  margin: var(--space-8) auto 0;
}

.testimonial-slide-wrap {
  display: block !important;
  position: relative;
  min-height: 180px;
}

.testimonial-slide {
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.testimonial-slide.active {
  display: block;
  opacity: 1;
  position: relative;
}

/* Ensure the single visible card fills the carousel */
.testimonial-slide-wrap .consumer-quote-card {
  margin: 0 auto;
  max-width: 100%;
}

/* Arrow buttons */
.testimonial-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  z-index: 2;
}
.testimonial-arrow:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.testimonial-prev {
  left: -52px;
}
.testimonial-next {
  right: -52px;
}

@media (max-width: 900px) {
  .testimonial-prev { left: -8px; }
  .testimonial-next { right: -8px; }
  .testimonial-carousel { padding: 0 40px; }
}

@media (max-width: 600px) {
  .testimonial-carousel {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
  }
  .testimonial-slide-wrap {
    width: 100%;
    order: 1;
    min-height: 140px;
  }
  .testimonial-arrow {
    position: static;
    transform: none;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  .testimonial-prev { order: 2; }
  .testimonial-next { order: 3; }
  .testimonial-dots { order: 4; width: 100%; }
}

/* Cert badge items alignment */
.cert-badge-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Blinkit images - support 4 product images */
.blinkit-images {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-end;
  justify-content: center;
}
.blinkit-images img {
  flex-shrink: 0;
}
