/* Moonlit — base layer: reset, the Figma type styles, and the primitives every screen reuses
   (eyebrow, display headings, buttons, text links, chips, prices, media frame, arrows). */

/* light-mode-only-rule.md (30 Oct): every page looks as it does in light mode whatever the device is set to — form
   fields, scrollbars and browser auto-dark included. The canvas is the theme's own pearl, as body already was. */
:root { color-scheme: light only; }
html { background-color: var(--ml-pearl); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ml-pearl);
  color: var(--ml-text);
  font-family: var(--ml-sans);
  font-size: 15px; font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;                /* 0 horizontal page scroll at every width; clip, not hidden: hidden makes body a scroll container and kills every position: sticky (the PDP gallery) */
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:where(h1,h2,h3,h4,h5,h6) { margin: 0; font-weight: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 1.5px solid var(--ml-lunar); outline-offset: 2px; }
.ml-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.ml-wrap { width: 100%; max-width: var(--ml-max); margin-inline: auto; padding-inline: var(--ml-gutter); }

/* ---------------------------------------------------------------- Figma text styles */
.ml-eyebrow { font-family: var(--ml-sans); font-weight: 600; font-size: 11px; line-height: 1.3; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ml-accent); }
.ml-on-dark .ml-eyebrow, .ml-eyebrow--lunar { color: var(--ml-lunar); }
.ml-caption { font-weight: 500; font-size: 11px; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; }
.ml-label { font-weight: 500; font-size: 12px; line-height: 1.3; letter-spacing: 0.12em; text-transform: uppercase; }
.ml-btn-t { font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase; }
.ml-nav-t { font-weight: 500; font-size: 12px; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; }
.ml-small { font-size: 13px; line-height: 1.55; }
/* 3 Nov (RESPONSIVE): body text on a phone is at least 14px; the 13px small text stays on tablet and desktop */
@media (max-width: 767px) { .ml-small { font-size: 14px; } }
.ml-small-strong { font-size: 13px; line-height: 1.55; font-weight: 600; }
.ml-body { font-size: 15px; line-height: 1.6; }
.ml-body-l { font-size: 17px; font-weight: 300; line-height: 1.65; }
.ml-body-strong { font-size: 15px; font-weight: 600; line-height: 1.6; }
.ml-muted { color: var(--ml-text-2); }

/* display — Cormorant Garamond Light; the second phrase of a heading is Light Italic in text/accent
   (on dark: brand/moon). Sizes are Desktop→Mobile frame values, fluid between. */
.ml-d, .ml-d1, .ml-d2, .ml-d3, .ml-d4, .ml-d5, .ml-hero-h, .ml-dxl {
  font-family: var(--ml-display); font-weight: 300; font-feature-settings: 'liga' 1, 'dlig' 1;
}
.ml-hero-h { font-size: clamp(46px, 5.417vw, 78px); line-height: 1; letter-spacing: -0.015em; }
.ml-dxl { font-size: clamp(40px, 5.000vw, 72px); line-height: 1; letter-spacing: -0.015em; }
.ml-d1 { font-size: clamp(40px, 4.167vw, 60px); line-height: 1.04; letter-spacing: -0.01em; }
.ml-d2 { font-size: clamp(32px, 3.472vw, 50px); line-height: 1.04; letter-spacing: -0.01em; }
.ml-d3 { font-size: clamp(32px, 3.194vw, 46px); line-height: 1.04; letter-spacing: -0.01em; }
.ml-d4 { font-size: 28px; line-height: 1.1; letter-spacing: 0; }
.ml-d5 { font-size: clamp(26px, 2.222vw, 32px); line-height: 1.05; letter-spacing: -0.005em; }
.ml-it { font-style: italic; color: var(--ml-accent); }
.ml-on-dark .ml-it { color: var(--ml-moon); }
.ml-h-pair { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.24em; }

/* ---------------------------------------------------------------- buttons
   Button/Primary (midnight → indigo on hover), Button/Light (moon → lunar), Button/Secondary
   (outline → midnight fill), Button/Outline Light (hero). The arrow slides in on hover (0 → 14px). */
.ml-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  min-height: 48px; padding: 0 34px;
  font-family: var(--ml-sans); font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--ml-midnight); color: var(--ml-inverse); border: 1px solid var(--ml-midnight); border-radius: 0;
  transition: background .3s ease, color .3s ease, border-color .3s ease, gap .3s ease;
  white-space: nowrap;
}
.ml-btn__a { display: inline-flex; width: 0; overflow: hidden; opacity: 0; transition: width .3s ease, opacity .3s ease; }
.ml-btn__a svg { flex: 0 0 auto; }
.ml-btn:hover { background: var(--ml-indigo); border-color: var(--ml-indigo); gap: 10px; }
.ml-btn:hover .ml-btn__a { width: 14px; opacity: 1; }
.ml-btn--light { background: var(--ml-moon); border-color: var(--ml-moon); color: var(--ml-text); }
.ml-btn--light:hover { background: var(--ml-lunar); border-color: var(--ml-lunar); }
.ml-btn--ghost { background: transparent; color: var(--ml-text); border-color: var(--ml-line-strong); min-height: 50px; }
.ml-btn--ghost:hover { background: var(--ml-midnight); border-color: var(--ml-midnight); color: var(--ml-inverse); }
.ml-btn--outline-light { background: transparent; color: var(--ml-inverse); border: 1.2px solid var(--ml-inverse); min-height: 50px; padding: 0 32px; }
.ml-btn--outline-light:hover { background: var(--ml-inverse); color: var(--ml-midnight); border-color: var(--ml-inverse); gap: 0; }
.ml-btn--outline-light:hover .ml-btn__a { width: 0; opacity: 0; }
.ml-btn--block { width: 100%; }
.ml-btn--tall { min-height: 54px; }
.ml-btn[disabled], .ml-btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; }

/* Text link — Button text + 13px arrow, a 24px underline that grows to full width on hover and the
   label turns text/accent (light tone: brand/lunar). */
.ml-link {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding-bottom: 6px;
  font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ml-text); transition: color .3s ease;
}
.ml-link::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 24px; background: currentColor; transition: width .3s ease; }
.ml-link:hover { color: var(--ml-accent); }
.ml-link:hover::after { width: 100%; }
.ml-link--light { color: var(--ml-inverse); }
.ml-link--light:hover { color: var(--ml-lunar); }

/* ---------------------------------------------------------------- chips (pill, 42px) */
.ml-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px; border-radius: 99px;
  border: 1px solid var(--ml-line); background: var(--ml-white); color: var(--ml-text);
  font-size: 13px; line-height: 1.55; white-space: nowrap;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.ml-chip:hover { border-color: var(--ml-icon); }
.ml-chip[aria-pressed='true'], .ml-chip.is-on, .ml-chip[aria-current='true'], .ml-chip[aria-selected='true'] {
  background: var(--ml-midnight); border-color: var(--ml-midnight); color: var(--ml-inverse);
}
.ml-chip--sm { min-height: 36px; padding: 0 12px; font-size: 12px; }

/* ---------------------------------------------------------------- price (Price style) */
.ml-pricebox { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; }
.ml-price { font-weight: 600; font-size: 15px; line-height: 1.3; }
.ml-price-was { color: var(--ml-text-2); font-size: 13px; line-height: 1.55; }
.ml-price-save { color: var(--ml-sale); font-size: 13px; line-height: 1.55; }

/* ---------------------------------------------------------------- stars */
.ml-stars { display: inline-flex; gap: 3px; color: var(--ml-lunar); }

/* ---------------------------------------------------------------- media frame */
.ml-media { position: relative; overflow: hidden; background: var(--ml-image); container-type: inline-size; }
.ml-media > img { width: 100%; height: 100%; object-fit: cover; }
.ml-media--4x5 { aspect-ratio: 4 / 5; }
.ml-media--1x1 { aspect-ratio: 1 / 1; }
.ml-media--card { aspect-ratio: 310 / 340; }

/* Figma image-fill filters, as CSS. Hero/Cinema shots: exposure −0.12, contrast +0.25, saturation −1,
   temperature −0.15. Every other lifestyle photo ("moon tone"): exposure −0.05, contrast +0.12,
   saturation −0.25, temperature −0.40. Product photos carry none. */
.ml-tone-mono { filter: grayscale(1) contrast(1.25) brightness(.9); }
.ml-tone { filter: saturate(.75) contrast(1.12) brightness(.96) hue-rotate(-4deg); }

/* the wordmark placeholder — a product with no photo (540 of 2,070 here) never borrows another's */
.ml-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--ml-image); text-align: center; padding: 12%; color: var(--ml-text); }
.ml-ph .ml-mark { width: clamp(16px, 10cqw, 28px); height: auto; color: var(--ml-text); }
.ml-ph__mark { font-family: var(--ml-display); font-weight: 500; font-size: clamp(13px, 9cqw, 24px); letter-spacing: 0.06em; }
.ml-ph__sub { font-size: 9px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ml-text-2); }

/* ---------------------------------------------------------------- section rhythm (Figma: 96–110 top/bottom) */
.ml-sec { padding-block: clamp(48px, 7.639vw, 110px); }
.ml-sec--96 { padding-block: clamp(48px, 6.667vw, 96px); }

/* horizontal rails */
.ml-rail { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: smooth; }
.ml-rail::-webkit-scrollbar { display: none; }
.ml-rail > * { scroll-snap-align: start; flex: 0 0 auto; }

/* shape tile */
.ml-stile {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-width: 56px; padding: 9px 12px 7px; border: 1px solid var(--ml-line); background: var(--ml-white);
  color: var(--ml-text); transition: border-color .2s ease, box-shadow .2s ease;
}
.ml-stile:hover { border-color: var(--ml-icon); }
.ml-stile.is-on { border-color: var(--ml-line-strong); box-shadow: inset 0 0 0 .5px var(--ml-line-strong); }
.ml-stile .ml-caption { white-space: nowrap; }
.ml-sh, .ml-st { flex: 0 0 auto; }
.ml-sh--img { display: inline-block; object-fit: contain; vertical-align: middle; }   /* the real diamond photos (30 Oct) */
/* "bada karo" (user, 30 Oct): the photos read bigger than the line glyphs they replaced, spot by spot */
.ml-panel__col--shapes img.ml-sh--img { width: 28px; height: 28px; }              /* header mega menu, was 18 */
.ml-mm__shapes img.ml-sh--img { width: 32px; height: 32px; }                      /* phone menu tiles, was 18 */
.ml-stile img.ml-sh--img { width: 34px; height: 34px; }                           /* builder step 2 + refine tiles, was 22 */
[data-ml-rb-sfilter] img.ml-sh--img { width: 24px; height: 24px; }                /* builder step 1 chips, was 18 */
.ml-otile img.ml-sh--img { width: 36px; height: 36px; }                           /* PDP shape tiles, was 26 */
.ml-drow__sh img.ml-sh--img { width: 24px; height: 24px; }                        /* builder list rows, was 16 */
.ml-tp__shapes img.ml-sh--img { width: 52px; height: 52px; }                      /* /diamond-shapes page, was 34 */
/* the bigger photo made some labels wrap beside it and some under it (desktop too) — one stack, centred, in every tile */
.ml-tp__shapes a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }

/* round prev / next — 44px, 1px border/strong; hover fills midnight with a pearl arrow */
.ml-arrow {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 44px; height: 44px; border-radius: 99px; border: 1px solid var(--ml-line-strong); color: var(--ml-text);
  transition: background .3s ease, color .3s ease;
}
.ml-arrow:hover { background: var(--ml-midnight); color: var(--ml-inverse); }
.ml-arrow[disabled] { opacity: .35; pointer-events: none; }
.ml-on-dark .ml-arrow { border-color: var(--ml-inverse); color: var(--ml-inverse); }

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

/* ---------------------------------------------------------------- gem glyph (snippets/mlt-gem): fancy colours and gemstones
   in the header, product-page colour / stone tiles and the ring builder's fancy chips */
.ml-gem { flex: none; display: block; }
.ml-chip--gem { display: inline-flex; align-items: center; gap: 6px; }
