/* ============================================================
   NAVAM — PROVISIONS DESIGN SYSTEM
   A merge of two references, resolved against the Navam brand.

     Mercury (dark alpine banking)  -> restraint, single-accent
                                       discipline, pill geometry,
                                       value-lift elevation, the
                                       full-bleed photographic hero.
     Awesomic (light editorial zinc) -> the page skeleton, generous
                                       card rounding, hairline-border
                                       elevation, image-top cards,
                                       badge-only accent colour.
     Navam                           -> the warmth. Every neutral is
                                       re-tinted off the logo and the
                                       product photography.

   THE THREE RESOLUTIONS (read these before changing anything):

   1. DARK vs LIGHT — not a compromise, a division of labour.
      Awesomic's light canvas is the page skeleton. Mercury owns the
      hero and the inverted feature bands. Awesomic already alternates
      light sections with dark blocks, so both systems keep their
      strongest surfaces and neither is diluted.

   2. ELEVATION — both references reject drop shadows, for different
      reasons. One rule covers both:
         on light surfaces -> 1px hairline border   (Awesomic)
         on dark surfaces  -> one-step value lift   (Mercury)

   3. NEUTRALS — Awesomic's 11-step ramp structure is kept exactly,
      but re-tinted warm. Its zinc is blue-cold (#09090b -> #f4f4f5)
      and Mercury's onyx is blue-black (#171721); Navam sells food
      pressed in a kitchen, so every step is rebuilt on a warm hue.
      The brand's existing cream and ink drop into the ramp cleanly.
   ============================================================ */

:root {

  /* ---------- NEUTRAL RAMP (warm-tinted Awesomic zinc) ----------
     Awesomic: "do not use pure black — #09090b keeps warmth in the
     neutrals." Same principle, inverted at the top: the lightest step
     is #FFFDF8, never #ffffff, so nothing on the page goes cold. */
  --ink-950: #0F0C08;   /* deepest ink — display headlines on light   */
  --ink-900: #1A150F;   /* DARK CANVAS   — Mercury's onyx role         */
  --ink-850: #241E16;   /* DARK CARD     — Mercury's graphite role     */
  --ink-800: #2C2116;   /* body ink on light — brand's original ink    */
  --ink-700: #453829;   /* dark interactive surface — obsidian role    */
  --ink-600: #5A4A38;   /* muted text — brand's original ink-soft      */
  /* ink-500 is darker than the ramp's even spacing would suggest. It
     carries helper text and stat labels, which sit directly on the
     cream canvas — the lighter value tested at 4.23:1 there and had to
     come down to clear 4.5:1. Legibility outranks ramp symmetry. */
  --ink-500: #736352;   /* helper text, metadata — 4.69:1 on canvas    */
  --ink-400: #A2937E;   /* placeholder, disabled, light icon strokes   */
  --ink-300: #C9BCA6;   /* dividers on cream                           */
  --ink-200: #DED2BA;   /* HAIRLINE BORDER — the system's default rule */
  --ink-150: #EFE7D4;   /* CANVAS — brand cream                        */
  --ink-100: #F7F1E2;   /* recessed surface                            */
  --ink-50:  #FAF5E7;   /* soft surface                                */
  --paper:   #FFFDF8;   /* CARD — the "snow" step, never pure white    */

  /* ---------- ACCENTS — a strict three-tier hierarchy ----------
     Mercury allows exactly one chromatic action. Awesomic allows a
     dark CTA plus one badge-only colour. Navam's logo green does both
     jobs at once: it is dark enough to ground a filled button like
     Awesomic's obsidian, and vivid enough to be the single
     gravitational centre Mercury demands. */

  --forest:      #00613A;  /* TIER 1 — the only filled action. Straight
                              off the logo wordmark. One per view.     */
  --forest-deep: #004A2C;  /* pressed state                            */
  --forest-tint: #E6EFE9;  /* selected chips, focus wash on light      */

  --turmeric:      #E0A838; /* TIER 2 — BADGES ONLY. Awesomic's ember
                               role: "Small Batch", "Launching First",
                               "Cold-Pressed". Never a button. Never
                               body text. Never a large fill.          */
  --turmeric-soft: #F6DFA0;

  --chilli: #B24A2A;       /* TIER 3 — rare punctuation. Sale price,
                              "last batch", low stock. Max one per
                              viewport, mirroring Awesomic's single
                              magenta card.                            */

  --leaf: #62A23A;         /* FUNCTIONAL ONLY — sampled from the logo
                              leaf. The FSSAI veg mark and in-stock
                              dots. Never decorative, or the monochrome
                              discipline breaks.                       */

  /* ---------- ON-DARK FOREGROUNDS ----------
     Mercury: "never #ffffff for body text on dark — pure white is
     harsh and cold." Its ivory/ash pair, re-tinted warm. */
  --ivory: #F2ECE0;        /* primary text on dark                     */
  --ash:   #C4B9A6;        /* muted text on dark                       */
  --dark-hairline: rgba(242, 236, 224, 0.16);

  /* ---------- TYPOGRAPHY ----------
     Two faces, resolving Mercury's two-face intermediate-weight system
     against Awesomic's single-face bold-display system.

     WEIGHT: Mercury caps headings at 480 ("never bold"). Awesomic
     floors them at 600 ("never below"). Fraunces is a variable serif,
     so we land at 560 — literally between the two references, and
     authoritative at display size without going bold.

     Fraunces also carries an optical-size axis, which is the closest
     thing in a free face to Mercury's "calibrated" weight philosophy:
     large text gets high opsz and tightens optically. */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* The script role used to pull in Kalam — an entire extra family for a
     single decorative footer line. On a mobile-first site that is not a
     trade worth making, so it now borrows Tiro Devanagari's italic,
     which is already loaded for product names. */
  --font-script: "Tiro Devanagari Hindi", serif;
  /* NOTE: the coming-soon page set its Devanagari line in Caveat, which
     has no Devanagari glyphs — that text silently fell back to a system
     font. Kalam covers Devanagari + Latin. See the note in index.html. */

  /* Devanagari is a first-class layer here, not an ornament: every
     product carries its Hindi name beside the English one, the way it
     is actually printed on a tin in an Indian kitchen. Tiro Devanagari
     Hindi is a true serif Devanagari, so it sits beside Fraunces
     without either face looking borrowed. */
  --font-deva: "Tiro Devanagari Hindi", "Nirmala UI", serif;

  --wt-regular: 400;
  --wt-medium: 500;
  --wt-display: 560;   /* the signature weight — see above */

  /* Scale: Awesomic's compact sizes, Mercury's leading and tracking.
     Body lands at 15px/1.5 — Awesomic's density, Mercury's breathing. */
  --text-caption: 0.75rem;    --leading-caption: 1.5;   --tracking-caption: 0.11em;
  --text-small:   0.8125rem;  --leading-small: 1.5;
  --text-body:    0.9375rem;  --leading-body: 1.5;
  --text-body-lg: 1.125rem;   --leading-body-lg: 1.45;
  --text-sub:     1.25rem;    --leading-sub: 1.4;
  --text-h3:      1.5rem;     --leading-h3: 1.25;
  --text-h2:      clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);   --leading-h2: 1.18;
  --text-h1:      clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);   --leading-h1: 1.14;
  --text-display: clamp(2.75rem, 1.7rem + 4.4vw, 4.5rem);   --leading-display: 1.08;

  /* ---------- SPACING ----------
     Awesomic describes its own resolution: "spacious section gaps but
     compact internal card density." Mercury is spacious throughout, so
     Awesomic's dual-density model wins — it carries more information
     per screen, which a shop with 10-30 SKUs actually needs. */
  --space-4: 4px;    --space-8: 8px;    --space-12: 12px;
  --space-16: 16px;  --space-20: 20px;  --space-24: 24px;
  --space-28: 28px;  --space-32: 32px;  --space-40: 40px;
  --space-48: 48px;  --space-64: 64px;  --space-80: 80px;
  --space-120: 120px;

  --page-max: 1200px;                              /* both references agree */
  --section-gap: clamp(56px, 7vw, 80px);           /* Awesomic's 80         */
  --card-padding: var(--space-28);                 /* Awesomic's 28         */

  /* ---------- GEOMETRY ----------
     Cards: Mercury says 12px, Awesomic says 36px. We take 28px — which
     is not a split-the-difference guess, it is the radius Awesomic
     already uses on its own dark feature cards, so it is canon in one
     reference and closer to the other. Jars and bottles want softness.

     Controls: Mercury wins outright. Its pill radius is declared
     "non-negotiable", and Awesomic uses pills in its nav anyway. */
  --radius-card: 28px;
  --radius-control: 999px;   /* buttons, inputs, nav — pill */
  --radius-badge: 10px;
  --radius-media: 48px;      /* Awesomic's full-bleed photo dividers */
  --radius-structural: 6px;  /* tables, the label panel — the one place
                                sharp-ish corners are allowed, because
                                it is imitating a printed jar label */

  /* ---------- ELEVATION ----------
     No drop shadows anywhere. Resolution #2 in the header comment. */
  --hairline: 1px solid var(--ink-200);
  --hairline-dark: 1px solid var(--dark-hairline);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 320ms;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink-150);
  color: var(--ink-800);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: var(--wt-regular);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto is required — the HTML width/height attributes map to CSS
   presentation hints, which would otherwise override aspect-ratio. */
img, video { max-width: 100%; height: auto; display: block; }

/* The [hidden] attribute is styled by the UA as a plain `display: none`,
   which any class setting `display: grid/flex` silently outranks. Without
   this, hidden empty-states and conditional summary rows render anyway.
   !important is correct here: [hidden] is a statement of intent that no
   layout rule should be able to override. */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--wt-display);
  /* opsz is Fraunces' optical-size axis — large sizes get a higher
     value so the serifs thin and the counters open, the closest free
     analogue to Mercury's calibrated display face. */
  font-variation-settings: "opsz" 96, "SOFT" 20;
  color: var(--ink-950);
  margin: 0;
  letter-spacing: -0.012em;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

/* iOS Safari zooms the whole page when a field with a font-size under
   16px receives focus, and does not zoom back out. Body copy is 15px by
   design, so form controls are pinned to 16px on small screens — this
   affects every field in checkout, which is where it costs money.

   Keyed to width rather than `pointer: coarse`: that media feature is
   unreliable (touch laptops, hybrid devices, and several Android
   browsers report it inconsistently) and it cannot be verified in a
   desktop browser at a narrow viewport, so bugs in it stay invisible.
   Width is deterministic. The coarse-pointer rule is kept as a second
   net for touch devices above the breakpoint, e.g. tablets. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

/* Kill the grey flash on tap; the components define their own :active. */
* { -webkit-tap-highlight-color: transparent; }

/* Stop rubber-band scroll chaining out of scrollable panels. */
body { overscroll-behavior-y: none; }

/* Checkboxes and radios ship at ~13px, well under any usable touch size.
   Scaling them keeps the native control (and its free accessibility)
   while making it actually tappable. */
input[type="checkbox"], input[type="radio"] { min-width: 18px; min-height: 18px; }
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  input[type="checkbox"], input[type="radio"] { min-width: 24px; min-height: 24px; }
}

/* Text links need a real touch height even where their width follows the
   text. WCAG 2.5.8 exempts links inline in a paragraph, but breadcrumbs,
   card titles and footer columns are navigation, not prose. */
@media (max-width: 900px) {
  .crumbs a, .crumbs span[aria-current],
  .product-title a, .cart-info h3 a {
    display: inline-block;
    padding-block: 11px;
    min-height: 44px;
  }
  .crumbs ol { gap: 0 var(--space-8); }
  .crumbs li { align-items: center; }
}

::selection { background: var(--turmeric-soft); color: var(--ink-950); }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: var(--radius-badge);
}

.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;
}

/* ---------- BLOCK-PRINT RULE ----------
   The one ornament in the system. It is a Sanganeri-style repeating
   buti — the hand-block print carved in Rajasthan, which is also where
   the sesame comes from — reduced to a single-weight line drawing.

   Both source systems are near-monochrome and would reject decoration
   outright, so this survives only under their own terms: one colour,
   hairline weight, used as a RULE between sections and never as a
   fill, a background wash, or a border around content. That keeps it
   structural, which is the only way an ornament stays out of kitsch.

   The motif is inlined as a data URI with currentColor swapped in, so
   it inherits the surrounding text colour and works on both canvases. */
.blockprint {
  height: 22px;
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 22px;
  opacity: 0.4;
  /* mango buti (kairi) alternating with a four-petal flower and a dot */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='22' viewBox='0 0 96 22' fill='none' stroke='%23736352' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 5c6 1 9 5 9 9 0 3-3 5-6 4-3-1-4-4-2-6 1-1 3-1 4 0'/%3E%3Cpath d='M48 4v5M48 13v5M43 11h5M53 11h-5M44.5 7.5l3 3M51.5 7.5l-3 3M44.5 14.5l3-3M51.5 14.5l-3-3'/%3E%3Ccircle cx='48' cy='11' r='1.6'/%3E%3Cpath d='M78 5c-6 1-9 5-9 9 0 3 3 5 6 4 3-1 4-4 2-6-1-1-3-1-4 0'/%3E%3Ccircle cx='31' cy='11' r='1.2'/%3E%3Ccircle cx='65' cy='11' r='1.2'/%3E%3Ccircle cx='96' cy='11' r='1.2'/%3E%3Ccircle cx='0' cy='11' r='1.2'/%3E%3C/svg%3E");
}
/* On dark bands the stroke has to invert or the motif disappears. */
.section--dark .blockprint, .footer .blockprint {
  opacity: 0.34;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='22' viewBox='0 0 96 22' fill='none' stroke='%23C4B9A6' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 5c6 1 9 5 9 9 0 3-3 5-6 4-3-1-4-4-2-6 1-1 3-1 4 0'/%3E%3Cpath d='M48 4v5M48 13v5M43 11h5M53 11h-5M44.5 7.5l3 3M51.5 7.5l-3 3M44.5 14.5l3-3M51.5 14.5l-3-3'/%3E%3Ccircle cx='48' cy='11' r='1.6'/%3E%3Cpath d='M78 5c-6 1-9 5-9 9 0 3 3 5 6 4 3-1 4-4 2-6-1-1-3-1-4 0'/%3E%3Ccircle cx='31' cy='11' r='1.2'/%3E%3Ccircle cx='65' cy='11' r='1.2'/%3E%3Ccircle cx='96' cy='11' r='1.2'/%3E%3Ccircle cx='0' cy='11' r='1.2'/%3E%3C/svg%3E");
}

/* Hindi name paired with the English one. Set one step down in size and
   in the muted ink so it reads as a second voice, not a translation. */
.deva {
  font-family: var(--font-deva);
  font-size: 0.95em;
  color: var(--ink-600);
  line-height: 1.6;
}
.section--dark .deva, .footer .deva { color: var(--ash); }

/* Paper grain, carried over from the coming-soon page. It is the one
   texture both references would reject on their own — Mercury is
   digitally weightless, Awesomic is flat editorial — but it is what
   stops a food brand reading like a fintech dashboard. Kept very low. */
.grain {
  position: fixed; inset: 0; z-index: 900;
  pointer-events: none; opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@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;
  }
}
