/**
 * Chennimalai Andavar Agro Agency
 * Main Stylesheet
 */

:root {
  --bg: #ffffff;
  --ink: #111e15;
  --muted: #516356;
  --card: #ffffff;
  --line: #e2e7e0;
  --brand: #1a6336;
  --brand2: #0d2916;
  --accent: #f0b429;
  --accentink: #2b2000;
  --soft: #ffffff;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

/* Organic non-AI theme overrides (replaces AI-mint rgb(167 243 208) and rgb(236 253 245)) */
.border-emerald-200,
.border-emerald-200\/90,
.border-emerald-200\/80,
.border-emerald-200\/70,
.border-emerald-200\/60 {
  border-color: #dbe2d8 !important;
}

.bg-emerald-50 {
  background-color: #f7f8f6 !important;
}

.bg-emerald-50\/40 {
  background-color: rgba(247, 248, 246, 0.75) !important;
}

.bg-emerald-50\/60 {
  background-color: rgba(247, 248, 246, 0.85) !important;
}

.bg-emerald-50\/70 {
  background-color: #f4f6f3 !important;
}

.bg-emerald-50\/80 {
  background-color: #f4f6f3 !important;
}

.border-emerald-100 {
  border-color: #e5eae3 !important;
}

.bg-emerald-100 {
  background-color: #edf1ec !important;
}

html {
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 110px);
  scroll-behavior: smooth;
}

html, body {
  background: #ffffff;
  color: var(--ink);
  font-family: 'Mukta', system-ui, sans-serif;
  font-size: 17px;
}

h1, h2, h3, .disp {
  font-family: 'Bricolage Grotesque', 'Mukta', sans-serif;
  letter-spacing: -0.02em;
}

.ta {
  font-family: 'Noto Sans Tamil', 'Mukta', sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: #0d2916;
  z-index: 60;
  transition: background 0.3s ease;
}

body.scrolled::before {
  background: rgba(255, 255, 255, 0.96);
}

/* Website Top Bar */
.top-bar {
  background: #0d2916;
  color: rgba(255, 255, 255, 0.92);
  max-height: 80px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s ease,
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
  will-change: max-height, opacity, transform;
}

header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}

header.hide-topbar {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
}

header.hide-topbar .top-bar {
  max-height: 0;
  opacity: 0;
  transform: translateY(-100%);
  border-bottom-color: transparent !important;
  pointer-events: none;
}

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-a {
  background: var(--accent);
  color: var(--accentink);
  box-shadow: 0 8px 24px -4px rgba(240, 180, 41, 0.4);
}
.btn-a:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn-g {
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
}
.btn-g:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
  transform: translateY(-1px);
}
.btn-glass:active {
  transform: translateY(0) scale(0.98);
}

.btn-b {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px -2px rgba(26, 99, 54, 0.35);
}
.btn-b:hover {
  background: #134c29;
  transform: translateY(-1px);
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Slider & Modern Crossfade Ken Burns Effect */
.hero-slider-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: clamp(280px, 62vw, 360px);
}
@media (min-width: 640px) {
  .hero-slider-wrap {
    height: clamp(360px, 42vw, 440px);
  }
}
@media (min-width: 1024px) {
  .hero-slider-wrap {
    height: clamp(500px, 36vw, 580px);
  }
}
@media (min-width: 1280px) {
  .hero-slider-wrap {
    height: clamp(550px, 34vw, 640px);
  }
}
@media (min-width: 1536px) {
  .hero-slider-wrap {
    height: clamp(600px, 32vw, 700px);
  }
}

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

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  pointer-events: none;
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

.slide-img {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1);
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.slide:nth-child(1) .slide-img {
  transform-origin: 65% 30%;
}
.slide:nth-child(2) .slide-img {
  transform-origin: 55% 30%;
}
.slide:nth-child(3) .slide-img {
  transform-origin: 42% 30%;
}

.slide.is-active .slide-img {
  transform: scale(1.055);
  transition: transform 6.5s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* Slider Pagination Dots */
.slider-dot {
  cursor: pointer;
  border: none;
  outline: none;
}
.slider-dot:focus-visible {
  box-shadow: 0 0 0 2px #fbbf24;
}

/* Brand Showcase & Movement Styles */
.brand-scroll-track {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: auto;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}
.brand-scroll-track::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Infinite Brand Marquee (CSS fallback) */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes marqueeRev {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

.marquee-track {
  display: flex;
  width: max-content;
}

.animate-marquee {
  animation: marquee 45s linear infinite;
}

.animate-marquee-rev {
  animation: marqueeRev 45s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .slide {
    transition: opacity 0.2s ease;
  }
  .slide-img,
  .slide.is-active .slide-img {
    transition: none;
    transform: none;
  }
  .animate-marquee,
  .animate-marquee-rev {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Custom Card & Category Tab Styles */
.card {
  background: var(--card);
  border: 1px solid var(--line);
}

.tab {
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid #a7d7b5;
  background: #eef7f1;
  font-weight: 700;
  color: #134c29;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab:hover {
  background: #dcf0e2;
  border-color: #1a6336;
}

.tab[aria-selected="true"] {
  background: #1a6336;
  color: #fff;
  border-color: #1a6336;
  box-shadow: 0 4px 14px -2px rgba(26, 99, 54, 0.35);
}

.scroller::-webkit-scrollbar {
  display: none;
}
.scroller {
  scrollbar-width: none;
}

/* Product Family Category Cards */
.catbtn {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}
.catbtn:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px -10px rgba(26, 99, 54, 0.16), 0 6px 16px -4px rgba(0, 0, 0, 0.05);
}

/* Header Navigation Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  min-width: 17rem;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Gallery Photo Cards */
.gallery-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -8px rgba(13, 41, 22, 0.15);
}


