/* ==========================================================================
   Narangpur Agro and Dairy Products — Core Design Tokens & Stylesheet
   Designed with Stitch MCP (Theme: Narangpur Natural Harvest)
   ========================================================================== */

:root {
  /* Brand Color Palette */
  --color-primary: #155B3A;             /* Deep Forest Green */
  --color-primary-dark: #0F3D2A;        /* Dark Green */
  --color-primary-light: #286A48;       /* Medium Forest Green */
  --color-secondary: #4F8A3A;           /* Fresh Leaf Green */
  --color-secondary-container: #DCE8D5; /* Soft Sage */
  --color-cream: #F7F4EA;               /* Warm Cream */
  --color-surface: #FCFCF8;             /* Off-White Canvas */
  --color-surface-dim: #F2EFE5;         /* Muted Container */
  --color-charcoal: #1E2521;            /* High-Contrast Body Text */
  --color-muted: #66716B;               /* Secondary Text */
  --color-outline: #D2DAD4;             /* Delicate Border */
  --color-gold: #D8A63C;                /* Warm Accent Gold */
  --color-gold-hover: #C59329;          /* Gold Hover */

  /* Typography */
  --font-display: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Elevation */
  --shadow-subtle: 0 1px 3px rgba(15, 61, 42, 0.05), 0 1px 2px rgba(15, 61, 42, 0.03);
  --shadow-card: 0 4px 12px rgba(15, 61, 42, 0.06), 0 1px 3px rgba(15, 61, 42, 0.04);
  --shadow-hover: 0 12px 28px rgba(15, 61, 42, 0.12), 0 4px 8px rgba(15, 61, 42, 0.06);

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Base Smoothing */
html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background-color: var(--color-surface);
}

body {
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Material Symbols alignment */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #F7F4EA;
}
::-webkit-scrollbar-thumb {
  background: #AEC4B7;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Header Backdrop Blur */
.header-glass {
  background: rgba(252, 252, 248, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header-scrolled {
  box-shadow: 0 4px 20px rgba(15, 61, 42, 0.08);
  border-bottom-color: rgba(210, 218, 212, 0.8) !important;
}

/* Hero Section Panoramic Background (No Overlay) */
/* png base (works on any host) */
.hero-panoramic-bg {
  background-image: url('../hero%20image.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
/* webp upgrade when the browser can read it (faster) */
@supports (background-image: url("a.webp")) {
  .hero-panoramic-bg {
    background-image: url('../hero%20image.webp');
  }
}

/* Mobile: filter tab bar scroll hint (only visible on small screens) */
@media (max-width: 767px) {
  .filter-tabs-scroll {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
  }
}

/* Card Transitions (targeted properties, no layout thrash) */
.interactive-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
  will-change: transform;
}

.interactive-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(21, 91, 58, 0.28);
}

/* Scroll reveal (extends the process-step pattern to all sections) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .js .reveal.reveal-in {
    opacity: 1;
    transform: none;
  }
  /* stagger children of a reveal-group */
  .js .reveal-group .reveal {
    transition-delay: calc(var(--i, 0) * 90ms);
  }
}

/* Reduced-motion OR no-JS: never hide — content always visible */
@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal.reveal-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* Softer heritage images (replace heavy default shadow with the card token) */
.heritage-img {
  border: 1px solid rgba(210, 218, 212, 0.55);
  box-shadow: var(--shadow-card);
}

/* Process Timeline Connector (Perfect Center Alignment with 64px Icons) */
.timeline-track::before {
  content: '';
  position: absolute;
  top: 48px; /* Exact center: 16px p-4 padding-top + 32px half-height of 64px circle */
  left: 10%; /* Center of 1st column in 5-col grid */
  right: 10%; /* Center of 5th column in 5-col grid */
  height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, #155B3A, #155B3A 8px, transparent 8px, transparent 16px);
  z-index: 1;
}

@media (max-width: 1023px) {
  .timeline-track::before {
    display: none;
  }
}

/* Staggered reveal for the quality process timeline */
@media (prefers-reduced-motion: no-preference) {
  #quality-process.process-reveal-ready .process-step {
    opacity: 0;
    transform: translateY(40px) scale(0.94);
  }

  #quality-process.process-in-view .process-step {
    animation: processStepIn 850ms cubic-bezier(0.18, 0.75, 0.25, 1) both;
  }

  #quality-process.process-in-view .process-step:nth-child(2) { animation-delay: 260ms; }
  #quality-process.process-in-view .process-step:nth-child(3) { animation-delay: 520ms; }
  #quality-process.process-in-view .process-step:nth-child(4) { animation-delay: 780ms; }
  #quality-process.process-in-view .process-step:nth-child(5) { animation-delay: 1040ms; }

  #quality-process.process-in-view .process-step > div:first-child {
    animation: processIconPop 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  #quality-process.process-in-view .process-step:nth-child(2) > div:first-child { animation-delay: 260ms; }
  #quality-process.process-in-view .process-step:nth-child(3) > div:first-child { animation-delay: 520ms; }
  #quality-process.process-in-view .process-step:nth-child(4) > div:first-child { animation-delay: 780ms; }
  #quality-process.process-in-view .process-step:nth-child(5) > div:first-child { animation-delay: 1040ms; }
}

@keyframes processStepIn {
  0% { opacity: 0; transform: translateY(40px) scale(0.94); }
  72% { opacity: 1; transform: translateY(-4px) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes processIconPop {
  0% { transform: scale(0.65); }
  68% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

/* Modal Dialog */
.modal-overlay {
  background: rgba(15, 61, 42, 0.55);
  backdrop-filter: blur(6px);
}

.modal-content {
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #155B3A;
  color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 61, 42, 0.25);
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notice.show {
  transform: translateY(0);
}
