/* Editorial chapters. Desktop wheel gestures enhance the native document scroller. */
/* Photo anchors align with the navbar at every size, without the global reading gutter. */
html:has(.home-scenes) { scroll-padding-top: var(--site-navbar-height); }
.home-reveal-ready [data-home-reveal]:not([data-home-revealed]):not(:focus-within) { opacity: 0; }
.home-page-shell {
  max-width: none;
  padding: 0;
  overflow-x: clip;
}
.home-scenes {
  --home-scene-height: calc(100svh - var(--site-navbar-height));
  background: var(--color-soft);
}
.home-scenes > section { position: relative; }
.home-campaign { z-index: 1; }
.home-category-panels { z-index: 2; }
.home-selection { --selection-background: color-mix(in srgb, var(--color-champagne) 55%, var(--color-soft)); z-index: 3; background: var(--selection-background); box-shadow: 0 0 0 100vmax var(--selection-background); clip-path: inset(0 -100vmax); }
.home-piece { z-index: 5; }
.home-campaign { min-height: var(--home-scene-height); margin: 0; padding: 0; background: var(--color-coffee); }
.home-campaign-visual {
  --hero-lock-reserve: 68px;
  --hero-photo-height: max(calc((var(--home-scene-height) - var(--hero-lock-reserve)) / .52), 80vw);
  position: relative;
  height: var(--home-scene-height);
  min-height: 420px;
  margin: 0;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
}
.home-campaign-visual picture { display: block; height: 100%; }
/* Anchor this original's lock (47% across, 52% down) above the discovery link.
   The minimum overscan allows a rightward shift without exposing empty edges. */
.home-campaign-photo { position: absolute; top: calc(100% - var(--hero-lock-reserve) - var(--hero-photo-height) * .52); left: calc(50% - var(--hero-photo-height) * .626666667); display: block; width: calc(var(--hero-photo-height) * 1.333333333); max-width: none; height: var(--hero-photo-height); object-fit: cover; }
.home-campaign-visual::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(transparent, rgba(18, 14, 10, .18) 30%, rgba(18, 14, 10, .52) 100%);
  pointer-events: none;
  content: '';
}
.home-campaign-caption { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; padding: 64px 24px; text-align: center; }
.home-hero-copy { min-width: 0; }
.storefront .home-hero-copy h1 { margin: 0; color: #fff; font-size: clamp(40px, 4.2vw, 68px); font-weight: 500; line-height: 1.05; letter-spacing: -.035em; }
.home-hero-copy h1 em { font-weight: inherit; }
/* Only wide, shallow windows need the optional lift to clear the upper charms. */
@media (min-width: 768px) and (min-aspect-ratio: 2/1) {
  .home-hero-copy { position: relative; top: clamp(-88px, -12svh, -48px); }
}
.home-photo-link, .home-text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid currentColor;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.home-photo-link, .home-photo-link:hover { color: #fff; }
.home-text-link, .home-text-link:hover { color: var(--color-ink); }
.home-preview-note {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  left: 20px;
  padding: 4px 7px;
  background: rgba(18, 14, 10, .65);
  color: #fff;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .025em;
  pointer-events: none;
}
.home-scene-next, .home-scene-next:hover { position: absolute; bottom: 18px; display: flex; min-height: 52px; align-items: center; gap: 16px; padding: 4px; color: #fff; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.home-scene-next span { padding-block: 7px; border-bottom: 1px solid rgba(255, 255, 255, .65); transition: opacity 180ms ease, transform 180ms ease; }
.home-scene-next:active span { opacity: .75; transform: translateY(2px); }
@media (prefers-reduced-motion: reduce) { .home-scene-next span { transition: none; } .home-scene-next:active span { transform: none; } }

/* One desktop stop: compact spaced title plus five complete 9:16 photographs.
   Five photo widths = available photo height * 9/16 * 5, plus four 12px gaps.
   This viewport fit is home-only; catalog and detail retain their own sizing. */
.home-selection { --selection-title-height: clamp(36px, 4vw, 64px); display: flex; min-height: var(--home-scene-height); flex-direction: column; justify-content: center; align-items: center; width: calc(100% - 48px); margin-inline: auto; padding-block: 12px; }
.home-selection-content { width: 100%; max-width: calc((var(--home-scene-height) - var(--selection-title-height) - 32px) * 2.8125 + 48px); }
.storefront .home-selection-title { height: var(--selection-title-height); margin: 0 0 8px; color: var(--color-ink); font-family: var(--font-display); font-size: var(--selection-title-height); font-weight: 500; line-height: 1; letter-spacing: clamp(8px, 3vw, 64px); text-indent: clamp(8px, 3vw, 64px); text-align: center; text-transform: uppercase; white-space: nowrap; }
.home-selection-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.home-selection-item { min-width: 0; }
.home-selection-catalog { display: none; }
.home-selection-item .jewel-card-action-overlay .jewel-card-name { flex: 1 1 100px; min-width: 0; margin: 0; color: #fff; font-family: var(--font-body); font-size: 11px; font-weight: 500; line-height: 1.5; letter-spacing: 0; white-space: normal; }
.home-selection-item .jewel-card-price { margin: 0 0 0 auto; color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.home-selection-item .jewel-card-action-overlay { position: absolute; z-index: 2; right: 0; bottom: 0; left: 0; display: flex; min-height: 38px; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 8px 12px; background: rgba(36, 33, 30, .9); color: #fff; font-size: 11px; text-decoration: none; transition: none; }
.home-selection-item .jewel-card-stock { top: 12px; bottom: auto; z-index: 2; }

.home-piece { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: var(--home-scene-height); background: var(--color-coffee); }
.home-piece-copy { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; padding: 64px 40px; color: var(--color-soft); text-align: center; }
.home-eyebrow { margin: 0 0 28px; color: var(--color-champagne); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.storefront .home-piece-copy h2 { max-width: 460px; margin: 0 0 20px; color: var(--color-soft); font-size: clamp(32px, 3.5vw, 56px); font-weight: 500; line-height: 1.1; overflow-wrap: anywhere; }
.home-piece-copy > p:not(.home-eyebrow) { margin-bottom: 24px; font-size: 14px; line-height: 1.8; }
.home-piece-photo { display: flex; min-width: 0; align-items: center; justify-content: center; background: var(--color-champagne); }
.home-piece-photo img { display: block; width: 100%; height: var(--home-scene-height); min-height: 480px; object-fit: contain; }
.home-piece-photo--editorial { overflow: hidden; }
.home-piece-photo--editorial img { object-fit: cover; object-position: 38% 42%; }
.home-piece-mobile { display: none; }
.storefront :is(.home-campaign, .home-piece) a:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }

/* Snap only photographic chapters, with a gentle proximity rather than a scroll lock. */
@media (min-width: 1024px) and (min-height: 650px) and (prefers-reduced-motion: no-preference) {
  html:has(.home-scenes) { scroll-snap-type: y proximity; }
  [data-home-scene] { scroll-snap-align: start; }
  .home-scenes > [data-home-scene]:not(.home-piece) { position: sticky; top: var(--site-navbar-height); }
  .home-scenes > [data-home-scene]:focus-within { position: relative; top: auto; }
  /* Opaque full-width reading chapters cover the previous pinned scene. */
}
/* JS owns gesture stops only when eligible. Native anchors/keyboard/touch stay available. */
html.home-section-scroll-ready { scroll-snap-type: none; }
html.home-touch-scroll-ready { scroll-snap-type: none; }
html.home-touch-scroll-ready .home-scenes > [data-home-scene] { position: relative; top: auto; }
/* Stable small-viewport units avoid changing stops as mobile browser chrome retracts.
   Long product grids and the footer remain naturally readable, without clipping. */
html.home-touch-scroll-ready .home-campaign-visual { min-height: var(--home-scene-height); }
@media (max-width: 767.98px) {
  html.home-touch-scroll-ready .home-category-panel { height: var(--home-scene-height); min-height: 0; }
}
@media (max-width: 991.98px) {
  .home-selection { padding-block: 24px; }
  .home-selection-content { max-width: none; }
  .storefront .home-selection-title { height: auto; margin: 0 0 16px; font-size: 28px; letter-spacing: .2em; text-indent: .2em; }
  .home-selection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
}
@media (max-width: 767.98px) {
  .home-campaign-visual { --hero-lock-reserve: 112px; min-height: 380px; }
  /* Mobile must frame the necklace, not inherit the desktop lock overscan. */
  .home-campaign-photo { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 47% center; }
  .home-campaign-caption { padding: 48px 20px 100px; }
  .home-hero-copy { position: absolute; top: 57%; right: 20px; left: 20px; }
  .home-preview-note { bottom: 12px; left: 12px; font-size: 8px; }
  .home-scene-next { bottom: 48px; }
  .home-selection { width: calc(100% - 32px); padding-block: 16px 12px; justify-content: flex-start; }
  .home-selection-grid { gap: 28px 12px; }
  /* Four mobile cards in one chapter; preserve the photographs' original ratio. */
  .home-selection-item:nth-child(n + 5) { display: none; }
  .home-selection-content { max-width: calc((var(--home-scene-height) - 104px - 52px) * .5625 + 12px); }
  .home-selection-catalog { display: flex; justify-content: center; margin-top: 8px; }
  .home-selection-catalog .home-text-link { min-height: 48px; padding-inline: 12px; font-size: 14px; }
  .home-selection-grid { gap: 12px; }
  .home-piece { grid-template-columns: minmax(0, 1fr); }
  .home-piece { align-content: center; }
  .home-piece-photo { grid-row: 1; }
  .home-piece-copy { padding: 20px 24px; }
  .home-piece .home-eyebrow { margin-bottom: 10px; }
  .storefront .home-piece-copy h2 { margin-bottom: 10px; font-size: clamp(24px, 6vw, 32px); }
  .home-piece-copy > p:not(.home-eyebrow) { margin-bottom: 12px; font-size: 13px; line-height: 1.5; }
  .home-piece-photo img { height: clamp(180px, calc(var(--home-scene-height) - 260px), 480px); min-height: 0; }
  .home-piece:has(.home-piece-photo--editorial) { align-content: stretch; grid-template-rows: minmax(180px, 1fr) auto; }
  .home-piece-photo--editorial { position: relative; }
  .home-piece .home-piece-desktop { display: none; }
  .home-piece-copy h2 .home-piece-mobile { display: inline; }
  .home-piece-copy a.home-piece-mobile { display: inline-flex; }
  .home-piece-photo.home-piece-mobile { position: relative; display: flex; }
  .home-piece-photo.home-piece-mobile img { position: absolute; inset: 0; height: 100%; min-height: 0; object-fit: cover; object-position: center center; }
}
@media (max-width: 360px) {
  .storefront .home-selection-title { font-size: 22px; letter-spacing: .16em; text-indent: .16em; }
}
@media (prefers-reduced-motion: reduce) {
  .home-reveal-ready [data-home-reveal] { opacity: 1 !important; }
  html:has(.home-scenes) { scroll-behavior: auto; scroll-snap-type: none; }
}
@media print {
  .home-reveal-ready [data-home-reveal] { opacity: 1 !important; transform: none !important; }
  html:has(.home-scenes) { scroll-snap-type: none; }
  .home-scenes > [data-home-scene]:not(.home-piece) { position: relative; top: auto; }
  .home-campaign-visual { position: relative; }
}
