/* =====================================================
   Ambica Haldi Farm — Design System
   Premium modern Indian farm ecommerce
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Marcellus&display=swap');

:root {
  /* Brand — Primary */
  --color-turmeric: #E8A317;
  --color-turmeric-deep: #C4840A;
  --color-turmeric-soft: #F7E4B8;
  --color-saffron: #D46A1E;
  --color-saffron-deep: #B45309;

  /* Brand — Secondary */
  --color-forest: #2F5D3A;
  --color-forest-deep: #1F3F28;
  --color-forest-soft: #E4EFE6;
  --color-earth: #6B4F2E;
  --color-earth-soft: #EDE4D6;

  /* Neutrals / Backgrounds */
  --color-cream: #F8F4EC;
  --color-offwhite: #FCFBF8;
  --color-white: #FFFFFF;
  --color-sand: #F0EADF;
  --color-charcoal: #1C1917;
  --color-ink: #2A2622;
  --color-muted: #6B6560;
  --color-subtle: #9A948C;
  --color-line: #E5DFD4;
  --color-line-strong: #D0C8BA;

  /* Semantic */
  --color-success: #2F6B3A;
  --color-warning: #C4840A;
  --color-error: #B42318;
  --color-info: #1D5A7A;

  /* Text */
  --text-primary: var(--color-charcoal);
  --text-secondary: var(--color-muted);
  --text-inverse: var(--color-offwhite);
  --text-brand: var(--color-forest-deep);
  --text-accent: var(--color-saffron-deep);

  /* Borders */
  --border-default: var(--color-line);
  --border-strong: var(--color-line-strong);
  --border-focus: var(--color-turmeric);

  /* Typography */
  --font-display: 'Marcellus', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', system-ui, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;
  --fs-5xl: 3.75rem;
  --fs-hero: clamp(2.5rem, 5vw, 4.25rem);

  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-normal: 1.55;
  --lh-relaxed: 1.7;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing */
  --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;

  /* Radius — restrained, premium */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Shadows — subtle */
  --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 16px 40px rgba(28, 25, 23, 0.12);
  --shadow-drawer: -8px 0 32px rgba(28, 25, 23, 0.14);

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --transition-base: var(--duration-base) var(--ease-out);
  --transition-fast: var(--duration-fast) var(--ease-out);

  /* Layout */
  --container-xs: 480px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  --container-pad: clamp(1rem, 4vw, 2rem);

  /* Header / drawers */
  --header-height: 72px;
  --announcement-height: 40px;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-drawer: 400;
  --z-modal: 500;
  --z-toast: 600;

  /* Breakpoints (for reference in JS) */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: var(--color-offwhite);
  -webkit-font-smoothing: antialiased;
}
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
img { object-fit: cover; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
fieldset { border: none; margin: 0; padding: 0; }
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typography */
.display-hero,
.display-1,
.display-2,
.display-3 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.display-hero { font-size: var(--fs-hero); }
.display-1 { font-size: clamp(2rem, 4vw, var(--fs-4xl)); }
.display-2 { font-size: clamp(1.75rem, 3vw, var(--fs-3xl)); }
.display-3 { font-size: clamp(1.35rem, 2.5vw, var(--fs-2xl)); }

.heading-sm {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}
.body-lg { font-size: var(--fs-md); line-height: var(--lh-relaxed); color: var(--text-secondary); }
.body-sm { font-size: var(--fs-sm); color: var(--text-secondary); }
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-saffron);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--narrow { max-width: var(--container-md); }
.container--wide { max-width: var(--container-2xl); }

.section {
  padding-block: var(--space-16);
}
.section--tight { padding-block: var(--space-12); }
.section--loose { padding-block: var(--space-24); }
.section--cream { background: var(--color-cream); }
.section--sand { background: var(--color-sand); }
.section--forest {
  background: var(--color-forest-deep);
  color: var(--text-inverse);
}
.section--forest .display-1,
.section--forest .display-2,
.section--forest .display-3,
.section--forest .heading-sm { color: var(--text-inverse); }
.section--forest .body-lg,
.section--forest .body-sm { color: rgba(252, 251, 248, 0.78); }

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}
.section-header__text { max-width: 36rem; }
.section-header__text .eyebrow { margin-bottom: var(--space-3); }
.section-header__text .display-2 { margin-bottom: var(--space-3); }

.grid-2 { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-2--asymmetric { grid-template-columns: 1.15fr 0.85fr; }
  .grid-2--reverse { direction: rtl; }
  .grid-2--reverse > * { direction: ltr; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: calc(var(--z-toast) + 1);
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-4); }

/* Page shell */
.site-main { min-height: 50vh; }
.page-hero {
  padding-block: var(--space-12) var(--space-10);
  background:
    linear-gradient(135deg, rgba(247, 228, 184, 0.45), transparent 55%),
    var(--color-cream);
  border-bottom: 1px solid var(--border-default);
}
.page-hero__title { margin-bottom: var(--space-3); }
.page-hero__desc { max-width: 40rem; color: var(--text-secondary); }

/* Utility */
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-16); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.w-full { width: 100%; }
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Organic shape helpers */
.organic-blob {
  border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
}
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--color-sand);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}
.media-frame:hover img { transform: scale(1.04); }

/* Placeholder image tones */
.img-ph {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--color-earth);
  background:
    radial-gradient(circle at 30% 20%, rgba(232, 163, 23, 0.28), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(47, 93, 58, 0.18), transparent 45%),
    var(--color-sand);
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
.animate-fade-up {
  animation: fadeUp 0.6s var(--ease-out) both;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
