/* NoorKara — Indian Heritage Modern */
:root {
  --paper: #F7F2E9;
  --paper-2: #EFE7D6;
  --ink: #1A1410;
  --ink-2: #3A2F26;
  --maroon: #6B1F2A;
  --maroon-deep: #4A1119;
  --saffron: #E08A1F;
  --saffron-soft: #F3C77B;
  --forest: #2A4A3A;
  --gold: #B8923D;
  --gold-soft: #D9B86A;
  --rule: rgba(26, 20, 16, 0.14);
  --rule-strong: rgba(26, 20, 16, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: rgba(107, 31, 42, 0.18);
}

/* Skip-to-content link for keyboard users / screen readers */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 1000;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
}
.skip-link:focus { left: 16px; top: 12px; }

/* Visible focus ring for keyboard navigation */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible, .pill:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

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

.serif { font-family: 'Cormorant Garamond', 'Times New Roman', serif; font-weight: 500; letter-spacing: -0.01em; }
.deva { font-family: 'Tiro Devanagari Hindi', serif; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; font-weight: 500; letter-spacing: -0.015em; margin: 0; line-height: 1.15; }
h1 { line-height: 1.08; }
h2 { line-height: 1.15; }
h1 { font-size: clamp(48px, 7vw, 96px); }
h2 { font-size: clamp(36px, 5vw, 64px); }
h3 { font-size: clamp(24px, 3vw, 36px); }
p { margin: 0; }

a { color: inherit; text-decoration: none; }

/* Site chrome */
/* Use `overflow-x: clip` instead of `hidden`. `hidden` creates a containing
   block which breaks `position: sticky` on descendants (the site nav).
   `clip` does NOT create a containing block — best of both worlds. */
html { overflow-x: clip; }
body { overflow-x: clip; }
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  /* note: avoid backdrop-filter — it creates a containing block that traps
     position:fixed descendants (the mobile drawer) inside the header. */
}
.site-nav__brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0.02em;
}
.site-nav__brand .deva { font-size: 18px; color: var(--maroon); opacity: 0.85; }
.site-nav__links { display: flex; gap: 32px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.site-nav__links a { position: relative; padding: 4px 0; color: var(--ink-2); transition: color 0.2s; }
.site-nav__links a:hover, .site-nav__links a.active { color: var(--maroon); }
.site-nav__links a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--maroon); }
.site-nav__cta { display: flex; gap: 12px; align-items: center; }

.icon-btn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; cursor: pointer; color: var(--ink);
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s;
  border-radius: 0;
}
.btn:hover { background: var(--maroon); border-color: var(--maroon); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--maroon { background: var(--maroon); border-color: var(--maroon); }
.btn--maroon:hover { background: var(--maroon-deep); border-color: var(--maroon-deep); }
.btn--whatsapp { background: #1F7A3A; border-color: #1F7A3A; }
.btn--whatsapp:hover { background: #155A2A; border-color: #155A2A; }

.eyebrow {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--maroon); font-weight: 500;
}

.divider-ornate {
  display: flex; align-items: center; gap: 16px; color: var(--gold);
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
}
.divider-ornate::before, .divider-ornate::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-soft), transparent);
}

/* Footer */
.site-foot {
  background: var(--ink); color: var(--paper);
  padding: 80px 48px 32px;
  margin-top: 120px;
}
.site-foot__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  max-width: 1400px; margin: 0 auto 64px;
}
.site-foot h4 { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 18px; font-weight: 500; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; opacity: 0.85; }
.site-foot ul a:hover { color: var(--saffron-soft); }
.site-foot__brand { font-family: 'Cormorant Garamond', serif; font-size: 40px; margin-bottom: 14px; }
.site-foot__legal { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; padding-top: 24px; border-top: 1px solid rgba(247,242,233,0.14); font-size: 12px; opacity: 0.6; letter-spacing: 0.06em; }

/* Page wrapper */
.page { min-height: 100vh; }
.section { padding: 120px 48px; max-width: 1400px; margin: 0 auto; }
.section--narrow { max-width: 980px; }
.section-head { display: flex; flex-direction: column; gap: 20px; margin-bottom: 64px; }
.section-head__title { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; row-gap: 6px; padding-bottom: 4px; }
.section-head__title .deva { font-size: 28px; color: var(--maroon); opacity: 0.6; }

/* Cards */
.gem-card {
  display: flex; flex-direction: column; gap: 14px;
  cursor: pointer;
}
.gem-card__media {
  position: relative; aspect-ratio: 4/5;
  background: var(--paper-2);
  overflow: hidden;
  border: 1px solid var(--rule);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.gem-card__media > img, .gem-card__media .gem-photo {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.gem-card:hover .gem-card__media {
  border-color: var(--gold);
  box-shadow: 0 24px 50px -16px rgba(107, 31, 42, 0.18);
}
.gem-card:hover .gem-card__media > img, .gem-card:hover .gem-card__media .gem-photo {
  transform: scale(1.04);
}
.gem-card:active .gem-card__media { transform: scale(0.99); }
.gem-card__wishlist {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(247, 242, 233, 0.92);
  border-radius: 999px;
  cursor: pointer; transition: all 0.2s;
  border: none;
}
.gem-card__wishlist:hover { background: var(--paper); }
.gem-card__wishlist svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 1.5; transition: all 0.2s; }
.gem-card__wishlist.active svg { fill: var(--maroon); stroke: var(--maroon); }
.gem-card__tag {
  position: absolute; bottom: 12px; left: 12px;
  background: var(--ink); color: var(--paper);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 6px 10px;
}
.gem-card__name { font-family: 'Cormorant Garamond', serif; font-size: 24px; line-height: 1.1; }
.gem-card__meta { font-size: 12px; color: var(--ink-2); display: flex; gap: 12px; letter-spacing: 0.04em; }
.gem-card__meta span:not(:first-child)::before { content: '·'; margin-right: 12px; }

/* SVG gem placeholder paint */
.gem-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.gem-bg svg { width: 64%; height: 64%; }

/* form bits */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-strong);
  padding: 10px 0; font-size: 16px;
  font-family: inherit; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--maroon); }

/* Pill */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  min-height: 44px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  font-size: 12px; letter-spacing: 0.06em;
  background: transparent; cursor: pointer;
  color: var(--ink); transition: all 0.2s;
}
.pill:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill.active { background: var(--maroon); color: var(--paper); border-color: var(--maroon); }

/* Jali ornament */
.jali-row {
  display: flex; gap: 6px; opacity: 0.5;
}
.jali-row .jali-cell {
  width: 12px; height: 12px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  background: var(--paper);
}
.marquee__track {
  display: inline-flex; gap: 56px;
  animation: marquee 60s linear infinite;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; color: var(--ink-2);
  align-items: center;
}
.marquee__track span.deva { color: var(--maroon); }
.marquee__track .dot { width: 6px; height: 6px; background: var(--gold); border-radius: 999px; display: inline-block; }

/* Hover reveal */
.hover-reveal { position: relative; overflow: hidden; }
.hover-reveal__hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 20, 16, 0.65); color: var(--paper);
  opacity: 0; transition: opacity 0.3s;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
}
.hover-reveal:hover .hover-reveal__hint { opacity: 1; }

/* Floating WhatsApp FAB — persistent inquiry CTA */
.nk-whatsapp-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px 14px 16px; border-radius: 999px;
  background: #1F7A3A; color: #fff;
  box-shadow: 0 14px 36px -8px rgba(31, 122, 58, 0.55), 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.2s ease;
  text-decoration: none; font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
}
.nk-whatsapp-fab:hover { background: #1A6932; transform: translateY(-2px); box-shadow: 0 18px 42px -8px rgba(31,122,58,0.6), 0 6px 18px rgba(0,0,0,0.22); }
.nk-whatsapp-fab:active { transform: translateY(0) scale(0.97); }
.nk-whatsapp-fab svg { flex-shrink: 0; }
.nk-whatsapp-fab__label { white-space: nowrap; }
@media (max-width: 560px) {
  .nk-whatsapp-fab { padding: 14px; right: 14px; bottom: 14px; }
  .nk-whatsapp-fab__label { display: none; }
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 14px 24px; font-size: 13px; letter-spacing: 0.06em;
  z-index: 200;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Mobile menu */
.site-nav__toggle {
  display: none;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border: 1px solid var(--rule); border-radius: 999px;
  background: transparent; cursor: pointer; color: var(--ink);
}
.site-nav__toggle svg { width: 16px; height: 16px; }
.site-nav__drawer {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: flex; flex-direction: column;
  padding: 24px 24px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.site-nav__drawer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}
.site-nav__drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.site-nav__drawer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.site-nav__drawer a {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px; line-height: 1.3;
  color: var(--ink); padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.site-nav__drawer a.active { color: var(--maroon); }
.site-nav__drawer-foot { margin-top: auto; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }

/* Tablet & below */
@media (max-width: 900px) {
  .site-nav { padding: 14px 20px; }
  .site-nav__links { display: none; }
  .site-nav__toggle { display: inline-flex; }
  .section { padding: 64px 20px !important; max-width: 100% !important; }
  .section--narrow { padding: 64px 20px !important; }
  .site-foot { padding: 60px 20px 24px; margin-top: 64px; }
  .site-foot__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .site-foot__legal { flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; }
  .section-head { margin-bottom: 40px; }

  /* Override inline grid templates from React inline styles.
     `minmax(0, 1fr)` instead of `1fr` so columns can shrink below their
     content's min-content width (otherwise fixed-size SVGs / long words
     force the column to expand and overflow the viewport). */
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 20px !important;
  }
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 1.4fr 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 32px !important;
  }
  /* Constrain fixed-size SVGs / images so they cannot push their grid column
     wider than the viewport (e.g. the product hero GemSvg is size={420}). */
  img, svg { max-width: 100%; }
  [style*="aspect-ratio"] svg,
  .gem-bg svg { width: auto; height: auto; max-width: 100%; max-height: 100%; }
  /* Shop list view */
  [style*="grid-template-columns: 80px"] {
    grid-template-columns: 56px 1fr !important;
    gap: 12px !important;
  }
  [style*="grid-template-columns: 80px"] > :nth-child(n+3) { display: none !important; }

  /* Override inline section paddings (horizontal) */
  [style*="padding: 120px 48px"],
  [style*="padding: 100px 48px"],
  [style*="padding: 80px 48px"],
  [style*="padding: 64px 48px"],
  [style*="padding: 60px 48px"],
  [style*="padding: 48px 48px"],
  [style*="padding: 40px 48px"],
  [style*="padding: 32px 48px"],
  [style*="padding: 24px 48px"],
  [style*="padding: 20px 48px"],
  [style*="padding: 18px 48px"],
  [style*="padding:'120px 48px'"],
  [style*="padding: '60px 48px 100px'"],
  [style*="padding: '60px 48px 32px'"],
  [style*="padding: '40px 48px 100px'"],
  [style*="padding: '64px 48px 32px'"],
  [style*="padding: '32px 48px 100px'"],
  [style*="padding: '24px 48px 80px'"],
  [style*="padding: '48px 48px 80px'"],
  [style*="padding: '40px 48px 80px'"],
  [style*="padding: '40px 48px 60px'"],
  [style*="padding: '40px 48px'"],
  [style*="padding: '80px 48px'"],
  [style*="padding: '20px 48px'"],
  [style*="padding: '24px 48px'"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  /* Compress huge vertical paddings */
  [style*="padding: 120px 48px"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  [style*="padding: 100px 48px"] { padding-top: 52px !important; padding-bottom: 52px !important; }
  [style*="padding: 80px 48px"]  { padding-top: 44px !important; padding-bottom: 44px !important; }

  /* Hero editorial — hide floating gem stack on mobile (right column with
     position:relative + height:78vh); collapse min-heights on outer wrappers. */
  [style*="position: relative"][style*="height: 78vh"]:not([style*="min-height"]) {
    display: none !important;
  }
  [style*="min-height: 78vh"], [style*="min-height: 88vh"] {
    min-height: 0 !important;
  }
  [style*="min-height: 88vh"] { padding-top: 60px !important; padding-bottom: 60px !important; }

  /* Stat rows / hero CTAs / shop filter selects / product gallery rows — wrap */
  [style*="display: flex"][style*="gap: 36"],
  [style*="display: flex"][style*="gap: 32"],
  [style*="display: flex"][style*="gap: 24"],
  [style*="display: flex"][style*="align-items: center"][style*="gap: 16"],
  [style*="display: flex"][style*="align-items: center"][style*="gap: 12"] {
    flex-wrap: wrap !important;
  }
  /* Product page — 360° slider row: slider takes full width, thumbs below */
  [style*="display: flex"][style*="align-items: center"][style*="gap: 16"] > [style*="flex: 1"] {
    flex: 1 1 100% !important;
  }
  /* Selects in shop should fill their row */
  select.field { min-width: 0 !important; width: 100%; max-width: 280px; }

  /* Hero almanac inner card */
  [style*="padding: 48px 56px"] {
    padding: 24px 18px !important;
  }
  [style*="padding: '48px 56px'"] {
    padding: 24px 18px !important;
  }

  /* Big bordered cards */
  [style*="padding: 40px 32px"] { padding: 28px 20px !important; }
  [style*="padding: 32px 24px"] { padding: 24px 16px !important; }
  [style*="padding: '40px 32px'"] { padding: 28px 20px !important; }

  /* Newsletter / by-planet darker sections */
  [style*="padding: '120px 48px'"] {
    padding: 56px 20px !important;
  }

  /* Contact form padding */
  [style*="padding: 40"][style*="background: var(--paper-2)"],
  div[style*="padding:40"][style*="background:'var(--paper-2)'"] {
    padding: 24px 18px !important;
  }

  /* Image stacks in story / founder portrait — drop max widths */
  .marquee__track { gap: 28px; font-size: 16px; }

  /* Borders that lose meaning when items stack — soften */
  [style*="border-right: 1px solid var(--rule)"] {
    border-right: none !important;
    border-bottom: 1px solid var(--rule);
  }
  [style*="borderRight: '1px solid var(--rule)'"] {
    border-right: none !important;
  }

  /* (overflow-x: clip already set globally; no extra body rule needed here) */
}

@media (max-width: 560px) {
  /* Keep 4-col grids at 2 cols on small phones (was collapsing to 1; made the
     navaratna quiz month/sign picker scroll 12 buttons high). Cards still
     readable at this width. */
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  /* 3-col grids (home navaratna 9-tile list) keep 2 cols on phones too. */
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 14px !important;
  }
  /* Footer single column */
  .site-foot__grid { grid-template-columns: 1fr; }
  /* Smaller headings inside cards */
  .gem-card__name { font-size: 22px; display: block; }
  .gem-card__name .deva { display: block; margin-top: 4px; }
  /* Smaller section heads */
  .section-head__title .deva { font-size: 20px; }
}

/* Keep the floating WhatsApp FAB from sitting on top of trailing copy. */
.site-foot { padding-bottom: 96px !important; }
@media (max-width: 560px) {
  .site-foot { padding-bottom: 88px !important; }
  /* Testimonials should stack on phones — 2-col made each card 140px wide. */
  .nk-testimonials-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }
}

/* iOS touch targets — pills & buttons larger tap area */
@media (max-width: 900px) {
  .btn { padding: 14px 22px; }
  .pill { padding: 10px 16px; font-size: 13px; }
}
