/* ==========================================================================
   HOME — marble hero + overlap scroll. index.html only.

   Marble: three crops of the supplied artwork (left, right, bottom edges —
   the parts without type) laid over a pale lilac base, each faded on its inner
   edge. The hero is sticky; the products section that follows rides over it as
   a rounded sheet. home-hero.js writes --hp (0 → 1 as the sheet covers the
   hero) on .hh, which drives the hero's lift, fade and marble zoom.
   ========================================================================== */
.hh { --hh-ease: cubic-bezier(.22, 1, .36, 1); --hp: 0;
  position: sticky; top: var(--nav-h, 72px); z-index: 0; isolation: isolate; overflow: hidden;
  min-height: min(880px, calc(100svh - var(--nav-h, 72px)));
  display: grid; place-items: center; padding: clamp(60px, 9vh, 110px) 0 clamp(90px, 13vh, 150px);
  background: radial-gradient(70% 70% at 50% 45%, #fbf9ff 0%, #f3eeff 55%, #e9e0ff 100%); color: #0b1533; }

/* --- Marble -------------------------------------------------------------- */
.hh-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hh-marble { position: absolute; inset: 0;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(calc(1 + var(--hp) * .1));
  transition: transform 900ms var(--hh-ease); transform-origin: 50% 40%; }
.hh-m { position: absolute; background-repeat: no-repeat; will-change: transform; }
.hh-m--left { left: 0; top: 0; bottom: 0; width: min(44vw, 720px); background-image: url(/assets/hero-marble-left.webp); background-size: cover; background-position: right center;
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent);
  animation: hh-sway-l 26s ease-in-out infinite alternate; }
.hh-m--right { right: 0; top: 0; bottom: 0; width: min(44vw, 720px); background-image: url(/assets/hero-marble-right.webp); background-size: cover; background-position: left center;
  -webkit-mask-image: linear-gradient(-90deg, #000 55%, transparent); mask-image: linear-gradient(-90deg, #000 55%, transparent);
  animation: hh-sway-r 30s ease-in-out infinite alternate; }
.hh-m--bottom { left: 18%; right: 18%; bottom: 0; height: 22%; background-image: url(/assets/hero-marble-bottom.webp); background-size: cover; background-position: center bottom;
  -webkit-mask-image: linear-gradient(0deg, #000 40%, transparent), linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(0deg, #000 40%, transparent), linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask-composite: intersect;
  animation: hh-sway-b 22s ease-in-out infinite alternate; }
@keyframes hh-sway-l { to { transform: translate3d(-1.5%, 1%, 0) scale(1.05); } }
@keyframes hh-sway-r { to { transform: translate3d(1.5%, -1%, 0) scale(1.05); } }
@keyframes hh-sway-b { to { transform: translate3d(0, 4%, 0) scale(1.04); } }
.hh-wash { position: absolute; inset: 0; background: radial-gradient(46% 52% at 50% 48%, rgb(255 255 255 / 78%) 0%, rgb(255 255 255 / 40%) 50%, rgb(255 255 255 / 0%) 80%); }
/* Dims a touch as the sheet covers the hero — the eye moves on. */
.hh-bg::after { content: ''; position: absolute; inset: 0; background: #1b1440; opacity: calc(var(--hp) * .18); }
.hh-spark { position: absolute; left: var(--x); top: var(--y); width: 6px; height: 6px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 10px 3px rgb(226 185 106 / 70%), 0 0 22px 8px rgb(150 110 255 / 30%); opacity: 0; animation: hh-twinkle 5.5s ease-in-out var(--d) infinite; }
@keyframes hh-twinkle { 0%, 100% { opacity: 0; transform: scale(.4) translateY(0); } 40% { opacity: 1; transform: scale(1) translateY(-10px); } 70% { opacity: .2; transform: scale(.7) translateY(-18px); } }

/* --- Copy ---------------------------------------------------------------- */
.hh-inner { display: flex; flex-direction: column; align-items: center; text-align: center;
  transform: translate3d(0, calc(var(--hp) * -90px - clamp(10px, 1.5vh, 16px)), 0) scale(calc(1 - var(--hp) * .06)); opacity: calc(1 - var(--hp) * 1.15); will-change: transform, opacity; }
.hh-eyebrow { display: inline-flex; align-items: center; padding: 11px 26px; border-radius: 999px; font-size: clamp(12.5px, .9vw, 15px); font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: #3b3f5c;
  background: linear-gradient(90deg, rgb(255 255 255 / 70%), rgb(240 228 255 / 85%)); border: 1px solid rgb(255 255 255 / 85%); box-shadow: 0 8px 22px -14px rgb(90 60 180 / 45%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hh-title { margin: clamp(22px, 3vh, 34px) 0 0; font-size: clamp(42px, 5.6vw, 104px); font-weight: 800; line-height: 1.02; letter-spacing: -.05em; color: #070d22; }
.hh-line { display: block; }
.hh-grad { background: linear-gradient(90deg, #1667ff 0%, #6a31ee 30%, #d22fbf 58%, #ff5a5f 78%, #ff8a00 100%); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; animation: hh-shine 9s ease-in-out 1.6s infinite alternate; }
@keyframes hh-shine { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.hh-lede { margin: clamp(20px, 3vh, 30px) auto 0; max-width: 880px; font-size: clamp(16px, 1.25vw, 22px); line-height: 1.55; color: #3d4562; }
.hh-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: clamp(28px, 4vh, 44px); }
.hh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-width: 260px; min-height: 64px; padding: 0 32px; border-radius: 12px;
  font-size: clamp(17px, 1.2vw, 20px); font-weight: 600; text-decoration: none; transition: transform 280ms var(--hh-ease), box-shadow 280ms var(--hh-ease), background-color 280ms ease, border-color 280ms ease; }
.hh-btn svg { width: 22px; height: 22px; transition: transform 280ms var(--hh-ease); }
.hh-btn--primary { color: #fff; background: linear-gradient(180deg, #1d78ff, #0a66f0); box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), 0 16px 32px -14px rgb(10 102 240 / 70%); }
.hh-btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), 0 22px 40px -14px rgb(10 102 240 / 80%); }
.hh-btn--ghost { color: #0b1533; background: rgb(255 255 255 / 88%); border: 1px solid #d6dbea; box-shadow: 0 8px 22px -16px rgb(30 40 90 / 40%); }
.hh-btn--ghost:hover { color: #0b1533; transform: translateY(-2px); background: #fff; border-color: #b9c3dd; }
.hh-btn:hover svg { transform: translateX(5px); }
.hh-btn:active { transform: translateY(0) scale(.98); }
.hh-btn:focus-visible { outline: 2px solid #1667ff; outline-offset: 3px; }

/* --- Entrance ------------------------------------------------------------ */
.hh-a { animation: hh-up 900ms var(--hh-ease) var(--d, 0ms) backwards; }
.hh-title .hh-a { animation-name: hh-rise; }
.hh-bg { animation: hh-fade 1400ms ease both; }
.hh-m--left { animation: hh-in-l 1600ms var(--hh-ease) both, hh-sway-l 26s ease-in-out 1.6s infinite alternate; }
.hh-m--right { animation: hh-in-r 1600ms var(--hh-ease) both, hh-sway-r 30s ease-in-out 1.6s infinite alternate; }
@keyframes hh-up { from { opacity: 0; transform: translateY(22px); } }
@keyframes hh-rise { from { opacity: 0; transform: translateY(40px); filter: blur(6px); } }
@keyframes hh-fade { from { opacity: 0; } }
@keyframes hh-in-l { from { opacity: 0; transform: translate3d(-8%, 0, 0) scale(1.08); } }
@keyframes hh-in-r { from { opacity: 0; transform: translate3d(8%, 0, 0) scale(1.08); } }

/* Keep the complete hero composition in view on shorter desktop screens. */
@media (min-width: 641px) and (max-height: 900px) {
  .hh { padding: clamp(36px, 6vh, 56px) 0 clamp(72px, 10vh, 90px); }
  .hh-inner { transform: translate3d(0, calc(var(--hp) * -90px - clamp(18px, 2.5vh, 22px)), 0) scale(calc(1 - var(--hp) * .06)); }
}

/* --- The sheet that rides over the hero ---------------------------------- */
.hh + .product-showcase { position: relative; z-index: 2; margin-top: -48px; border-radius: 36px 36px 0 0;
  box-shadow: 0 -30px 60px -30px rgb(40 30 110 / 35%), 0 -1px 0 rgb(255 255 255 / 80%);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 22%, #f8faff 100%); }
.hh + .product-showcase::before { content: ''; position: absolute; left: 50%; top: 14px; width: 56px; height: 5px; margin-left: -28px; border-radius: 5px; background: #d9def0; }
/* Everything after the hero must paint above the sticky hero. */
.hh ~ section, .hh ~ footer, .hh ~ div { position: relative; z-index: 2; }
.hh ~ .site-footer { position: relative; z-index: 2; }

@media (max-width: 640px) {
  .hh { position: relative; top: 0; min-height: 0; }
  .hh-inner { transform: none; opacity: 1; }
  .hh-eyebrow { letter-spacing: .22em; padding: 9px 18px; }
  .hh-actions { flex-direction: column; width: 100%; gap: 12px; }
  .hh-btn { width: 100%; min-width: 0; min-height: 56px; }
  .hh-m--left, .hh-m--right { width: 70vw; opacity: .8; }
  .hh + .product-showcase { margin-top: -28px; border-radius: 26px 26px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hh { position: relative; top: 0; }
  .hh *, .hh-bg { animation: none !important; }
  .hh-marble, .hh-inner { transition: none; transform: none !important; opacity: 1 !important; }
  .hh-bg::after { opacity: 0; }
  .hh-btn:hover, .hh-btn:hover svg { transform: none; }
}

/* The sheet starts a touch narrower and widens to full as it covers the hero.
   --hp defaults to 1 so it is simply full width without JS. */
.hh + .product-showcase { transform: scale(calc(.95 + var(--hp, 1) * .05)); transform-origin: 50% 0; will-change: transform; }
@media (max-width: 640px), (prefers-reduced-motion: reduce) { .hh + .product-showcase { transform: none; } }
.hh.is-covered { visibility: hidden; }
