/* ==========================================================================
   SRI BALAAJI JEWELS & GEMS — base.css

   Theme: warm minimal premium jewellery.
     - warm white and cream grounds, never cold grey-white
     - saffron-gold as the working accent; deep gold for text-safe contrast
     - classical serif display, light geometric sans for UI
     - a centred gold lozenge divider above every section title
     - hairline borders, soft warm shadows, small radii
     - energy comes from warmth and gold saturation, not from clutter

   Sri Balaaji's signboard maroon is retained as a single deep counter-note
   so the shop keeps its own identity.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */

:root {
  /* Ground — warm throughout. There is no pure #FFF anywhere on the page. */
  --white:      #FFFDF7;   /* "paper" — warm white, the base ground          */
  --pure:       #FFFFFF;   /* reserved for small lifted surfaces only        */
  --cream:      #FDF6E6;   /* alternate section ground                       */
  --honey:      #F8EBCE;   /* product tile ground — gold at low saturation   */
  --sand:       #FBF2DF;
  --mist:       #F6F1E6;

  /* Ink — warm browns, never blue-black */
  --ink:        #251C0C;   /* headings — 15.4:1 on --white                   */
  --body:       #46381F;   /* body copy — 8.6:1 on --white                   */
  --muted:      #756143;   /* secondary — 4.9:1 on --white                   */
  --faint:      #9C8763;   /* captions only, never body copy                 */

  /* Line */
  --line:       #EEE0C2;
  --line-2:     #DFCB9F;

  /* Accent — saffron gold. This is the working colour of the site. */
  --accent:     #C98A0A;   /* 4.6:1 on --white — safe for UI text and icons  */
  --accent-dk:  #9A6805;   /* hover / pressed / small text                   */
  --accent-lt:  #F2B32E;   /* the energetic highlight — fills, not text      */
  --accent-glow:#FFD469;   /* on dark grounds                                */
  --rose:       #FFF6DF;   /* accent at low tint — panels                    */

  /* Metal ornament */
  --gold:       #D2A32C;
  --gold-dk:    #96700B;   /* AA-safe gold text on light                     */
  --gold-lt:    #EBCB7C;
  --gold-pale:  #FAEFD2;
  --champagne:  #F2E3C0;

  /* Deep counter-note — the signboard maroon */
  --maroon:     #8E1B2E;
  --maroon-dk:  #6C1122;

  /* Gem tints — category marks and small accents only */
  --ruby:       #9B1B33;
  --emerald:    #1F6047;
  --sapphire:   #23407E;
  --amethyst:   #57346C;
  --coral:      #C7602F;
  --teal:       #1C7C80;
  --pearl:      #F2E9DA;
  --bark:       #6E4B27;

  /* Semantic */
  --ok:         #1D6B45;
  --warn:       #8A5A0B;
  --danger:     #A31626;

  /* Type */
  --display: "Cormorant Garamond", "Bodoni Moda", Georgia, "Times New Roman", serif;
  --ui:      "Jost", "Century Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --kannada: "Noto Serif Kannada", var(--ui);

  /* Spacing */
  --s-2:  4px;
  --s-1:  8px;
  --s0:  12px;
  --s1:  16px;
  --s2:  24px;
  --s3:  36px;
  --s4:  56px;
  --s5:  84px;
  --s6: 120px;

  /* Surface — shadows are warm-tinted, never neutral grey */
  --r:      3px;
  --r-lg:   8px;
  --shadow:    0 2px 14px rgba(94,68,14,.07);
  --shadow-md: 0 8px 28px rgba(94,68,14,.11);
  --shadow-lg: 0 16px 48px rgba(94,68,14,.15);
  --glow:      0 6px 22px rgba(201,138,10,.28);

  /* Layout */
  --page:    1320px;
  --measure: 66ch;
  --header-h: 104px;

  --t-fast: 160ms cubic-bezier(.22,.61,.36,1);
  --t-mid:  280ms cubic-bezier(.22,.61,.36,1);
}

/* ---------- 2. RESET ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);

  /* The off-canvas drawer and filter panel are position:fixed, so their
     containing block is the viewport and a clip on <body> never reaches them
     — they were extending the scrollable area to 1773px on a 390px phone.
     Clipping on <html> propagates to the viewport, which does clip fixed
     boxes. `clip` rather than `hidden` because clip creates no scroll
     container, so the sticky header keeps working. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg, video, canvas, iframe { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Grid and flex children default to `min-width: auto`, which means an item
   refuses to shrink below its own min-content. One wide table, one long word,
   or one grid-inside-a-grid then stretches the whole page — on this site it
   sized the catalogue's results column to 1759px on a 390px phone.
   Every grid or flex container on the site is listed here, not just the ones
   using the `.grid` utility class, because the bespoke layouts are exactly
   the ones that were breaking. */
.grid > *, .flex > *, .row > *,
.cat-layout > *, .split-toc > *, .hero__grid > *, .visit__grid > *,
.trust__grid > *, .pdp > *, .header__bar > *, .footer__grid > *,
.walls > *, .svc-grid > *, .counters > *, .quotes > *, .rates__grid > *,
.cards-4 > *, .cards-3 > *, .calc > *, .stats > *,
.form-2 > *, .form-3 > *, .cat-bar > *, .sec-head > * { min-width: 0; }

/* ---------- 3. TYPE ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: .004em;
  margin: 0 0 var(--s1);
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); font-weight: 500; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-family: var(--ui); font-size: .96rem; font-weight: 500; letter-spacing: .01em; }

p { margin: 0 0 var(--s1); max-width: var(--measure); }

a { color: var(--accent-dk); text-decoration: none; }
a:hover { color: var(--maroon); text-decoration: underline; text-underline-offset: 3px; }

strong, b { font-weight: 600; color: var(--ink); }
small { font-size: .82rem; }

.kn { font-family: var(--kannada); font-weight: 500; }

/* Numbers in prices, weights and rates always align in columns */
.num, .price, td.num { font-variant-numeric: tabular-nums; }

.lede {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.75;
  max-width: 58ch;
}

/* Small caps label — the one repeating typographic device */
.label {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--accent { color: var(--accent-dk); }
.label--gold    { color: var(--gold-dk); }

/* ---------- 4. LAYOUT ---------- */

.wrap { width: min(100% - 2.5rem, var(--page)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 820px); margin-inline: auto; }
.wrap--mid { width: min(100% - 2.5rem, 1060px); margin-inline: auto; }

.section { padding-block: var(--s5); }
.section--tight { padding-block: var(--s4); }
.section--cream { background: var(--cream); }
.section--sand  { background: var(--sand); }
.section--rose  { background: var(--rose); }

.section--ink {
  background: var(--ink);
  color: #D6C9AF;
}
.section--ink h2, .section--ink h3, .section--ink h4 { color: var(--accent-glow); }
.section--ink p { color: #C4B79D; }
.section--ink .label { color: var(--accent-glow); }
.section--ink a { color: var(--accent-glow); }

/* A warm gold band — used once per page at most, for the one moment that
   should feel lit rather than printed. */
.section--gold {
  background: linear-gradient(135deg, var(--cream) 0%, var(--honey) 55%, var(--gold-pale) 100%);
}

.grid { display: grid; gap: var(--s2); }
.flex { display: flex; }

/* ---------- 5. THE SECTION TITLE ----------
   The signature repeating device: a gold rule, a small gold lozenge, a gold
   rule, then a serif title, then a light subtitle. Every section opens this
   way, which is what gives the page its calm, catalogue-like rhythm. */

.sec-title { text-align: center; margin-bottom: var(--s3); }
.sec-title--left { text-align: left; }

.orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s0);
  margin-bottom: var(--s1);
}
.sec-title--left .orn { justify-content: flex-start; }
.orn::before, .orn::after {
  content: "";
  width: clamp(28px, 5vw, 54px);
  height: 1px;
  background: var(--gold-lt);
}
.sec-title--left .orn::before { display: none; }
.orn i {
  width: 11px; height: 11px;
  flex: none;
  background: var(--accent-lt);
  box-shadow: 0 0 0 3px rgba(242,179,46,.18);
  transform: rotate(45deg);
  display: block;
}
.orn--sm i { width: 8px; height: 8px; }

.sec-title h2 {
  margin-bottom: var(--s-1);
  text-transform: uppercase;
  letter-spacing: .045em;
  font-weight: 500;
}
.sec-title p {
  color: var(--muted);
  font-weight: 300;
  margin: 0 auto;
  max-width: 56ch;
  font-size: .98rem;
}
.sec-title--left p { margin-inline: 0; }

/* A gold hairline used to close a band */
.rule-gold { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, transparent, var(--gold-lt) 22%, var(--gold-lt) 78%, transparent); }

/* ---------- 6. ACCESSIBILITY ---------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-dk);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px; left: var(--s1);
  z-index: 999;
  background: var(--ink);
  color: var(--accent-glow);
  padding: var(--s0) var(--s2);
  border-radius: var(--r);
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: top var(--t-fast);
}
.skip-link:focus { top: var(--s1); color: var(--accent-glow); text-decoration: none; }

/* ---------- 7. MOTION ----------
   Restrained: one soft entrance per element, played once. The `js` class is
   set before first paint, so a script failure never leaves content hidden. */

.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 620ms ease, transform 620ms cubic-bezier(.22,.61,.36,1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none !important; transform: none !important; }
}

/* ---------- 8. PRINT ---------- */

@media print {
  .site-header, .site-footer, .announce, .ratestrip, .wa-float, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
