/* LUX 2.0 gem UI: homepage journey "La Luce Viaggia" + product-page 3D stone.
   Brand book v1: velluto #241A15, moka #3A2C22, notte #1A1310 (darkest allowed, never pure black), oro-luce #D4A62A on dark,
   text on dark #F3EADC / #B9AB98. Stone stage tints from §3.5. Display type: Bodoni Moda (already loaded). */
:root{--velluto:#241A15;--moka:#3A2C22;--notte:#1A1310;--oro-luce:#D4A62A;--on-dark:#F3EADC;--on-dark-2:#B9AB98;--bodoni:"Bodoni Moda","Instrument Serif","Times New Roman",serif}

/* the ◇ tag: small, always readable */
.gem-tag{position:absolute;z-index:3;display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border:1px solid rgba(243,234,220,.32);border-radius:999px;background:rgba(26,19,16,.55);color:var(--on-dark);font:500 11px/1.2 var(--body);letter-spacing:.08em;text-transform:uppercase;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);pointer-events:auto}
.gem-motion{border:1px solid rgba(243,234,220,.35);background:transparent;color:var(--on-dark-2);border-radius:999px;padding:6px 14px;font:500 12px/1.2 var(--body);letter-spacing:.04em;cursor:pointer}
.gem-motion:hover{color:var(--on-dark);border-color:var(--oro-luce)}
.gem-motion:focus-visible,.lj :focus-visible,.gem3d :focus-visible{outline:2px solid var(--oro-luce);outline-offset:3px}

/* ---------------- homepage journey ---------------- */
.lj{--stage:#241A15;position:relative;height:calc(100svh + (var(--lj-n) - 1) * 88svh);background:var(--velluto);color:var(--on-dark)}
.lj-stick{position:sticky;top:0;height:100svh;overflow:hidden;background:radial-gradient(110% 90% at 70% 45%,var(--stage) 0%,var(--velluto) 60%,var(--notte) 100%);transition:background .8s}
.lj-gl{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:pan-y}
.lj-stills{position:absolute;inset:0;pointer-events:none}
.lj-stills img{position:absolute;left:70%;top:46%;width:min(62vh,46vw);aspect-ratio:1;object-fit:cover;transform:translate(-50%,-50%);border-radius:50%;opacity:0;transition:opacity .6s;-webkit-mask-image:radial-gradient(closest-side,#fff 62%,transparent 100%);mask-image:radial-gradient(closest-side,#fff 62%,transparent 100%)}
.lj-stills img.on{opacity:1}
.lj.gem-live .lj-stills{display:none}
.lj[data-tier="C"] .lj-gl{display:none}
.lj-tag{left:70%;top:min(calc(46% + 42vh),calc(100% - 64px));transform:translateX(-50%)}
.lj-copy{position:absolute;left:var(--gutter);top:50%;transform:translateY(-50%);width:min(30em,42vw);height:min(420px,60svh)}
.lj-ch{position:absolute;inset:auto 0 50% 0;transform-origin:left;translate:0 50%;opacity:0;visibility:hidden;will-change:opacity,transform}
.lj-ch:first-child{opacity:1;visibility:visible}
.lj-ch>*{opacity:var(--ob,1)}
.lj-ch>.lj-name{opacity:var(--on,1)}
/* the stone's name is written letter by letter out of a mask, scrubbed by the scroll (gem-ui.js splits it) */
.lj-ch>.lj-name.lj-split{opacity:1}
.lj-w{display:inline-block;white-space:nowrap}
.lj-m{display:inline-block;overflow:hidden;vertical-align:bottom;padding:.08em .01em .12em;margin:-.08em -.01em -.12em}
.lj-c{display:inline-block;--p:clamp(0,calc(var(--on,1) * 2.1 - var(--i,0) * .075),1);transform:translateY(calc((1 - var(--p)) * 112%)) rotate(calc((1 - var(--p)) * 7deg));transform-origin:0 100%;will-change:transform}
/* progress: a hairline in the stone's colour and "2 / 7" (as in the owner's reference) */
.lj-prog{position:absolute;left:calc(var(--gutter) + 236px);right:calc(var(--gutter) + 8px);bottom:calc(clamp(16px,3svh,30px) + 13px);display:flex;align-items:center;gap:14px;z-index:3;pointer-events:none}
.lj-prog b{font:500 11px/1 var(--body);letter-spacing:.2em;color:var(--on-dark-2);min-width:4.2em;font-variant-numeric:tabular-nums}
.lj-prog span{flex:1;height:1px;background:rgba(243,234,220,.14);overflow:hidden}
.lj-prog i{display:block;height:100%;background:var(--gem-accent,var(--oro-luce));transform:scaleX(0);transform-origin:0 50%;box-shadow:0 0 8px var(--gem-accent,var(--oro-luce))}
.lj-kicker{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:var(--oro-luce);font:500 12px/1.4 var(--body);letter-spacing:.18em;text-transform:uppercase}
.lj-kicker .th{display:inline;margin:0;color:var(--on-dark-2);letter-spacing:.02em;text-transform:none;font-size:12px}
.lj-dot{width:9px;height:9px;border-radius:50%;background:var(--glow);box-shadow:0 0 12px var(--glow)}
.lj-name{margin-top:14px;font-family:var(--bodoni);font-weight:400;font-size:clamp(44px,6.4vw,96px);line-height:.98;letter-spacing:-.01em;color:var(--on-dark)}
.lj-ch:last-child .lj-name{font-size:clamp(38px,4.6vw,68px)}
.lj-name .th{color:var(--on-dark-2)}
.lj-line{margin-top:18px;max-width:26em;font-size:clamp(16px,1.35vw,19px);line-height:1.55;color:var(--on-dark)}
.lj .th{color:var(--on-dark-2)}
.lj-link{display:inline-block;margin-top:22px;color:var(--on-dark);text-decoration:none;font-weight:600;font-size:15px;border-bottom:1px solid var(--oro-luce);padding-bottom:3px}
.lj-link .th{display:inline;margin-left:8px;font-size:13px}
.lj-link:hover{color:var(--oro-luce)}
.lj-doors{display:flex;flex-wrap:wrap;align-items:center;gap:14px 26px;margin-top:26px}
.lj-doors .lj-link{margin-top:0}
.lj .btn.solid{background:var(--oro-luce);border-color:var(--oro-luce);color:#241A15}
.lj-dots{position:absolute;right:clamp(14px,2.4vw,34px);top:50%;transform:translateY(-50%);list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;z-index:3}
.lj-dots button{display:grid;place-items:center;width:28px;height:28px;border:0;background:none;cursor:pointer;padding:0}
.lj-dots i{width:7px;height:7px;border-radius:50%;background:rgba(243,234,220,.35);transition:transform .3s,background .3s}
.lj-dots [aria-current] i{background:var(--c);transform:scale(1.6);box-shadow:0 0 10px var(--c)}
.lj-foot{position:absolute;left:var(--gutter);bottom:clamp(16px,3svh,30px);display:flex;align-items:center;gap:18px;z-index:3}
.lj-skip{color:var(--on-dark-2);font-size:13px}
.lj-skip:focus{color:var(--on-dark)}
@media (max-width:899px){
  .lj-stick{background:radial-gradient(120% 70% at 50% 30%,var(--stage) 0%,var(--velluto) 62%,var(--notte) 100%)}
  .lj-stills img{left:50%;top:27%;width:min(78vw,44svh)}
  .lj-tag{left:var(--gutter);top:112px;transform:none}
  .lj-copy{left:var(--gutter);right:var(--gutter);top:auto;bottom:calc(64px + env(safe-area-inset-bottom));transform:none;width:auto;height:auto;min-height:44svh}
  .lj-ch{inset:auto 0 0 0;translate:none}
  .lj-name{font-size:clamp(40px,11vw,60px)}
  .lj-line{margin-top:12px;font-size:16px}
  .lj-dots{top:27%;right:8px}
  .lj-copy{min-height:40svh}
  .lj-dots button{width:24px;height:24px}
}
@media (prefers-reduced-motion:reduce){.lj-stick,.lj-stills img,.lj-dots i{transition:none}.lj-c{transform:none}}
/* tier C: the still picture of each stone, with one slow sweep of light across it (no script, no WebGL) */
.lj-stills::after,.gem3d-stage[data-tier="C"]::after,.gem-mount[data-tier="C"]::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 42%,rgba(255,250,240,.16) 50%,transparent 58%) 0 0/300% 100% no-repeat;mix-blend-mode:screen;animation:gem-shimmer 5.5s ease-in-out infinite}
.lj-stills::after{inset:auto;left:calc(70% - min(31vh,23vw));top:calc(46% - min(31vh,23vw));width:min(62vh,46vw);height:min(62vh,46vw);border-radius:50%;-webkit-mask-image:radial-gradient(closest-side,#fff 45%,transparent 92%);mask-image:radial-gradient(closest-side,#fff 45%,transparent 92%)}
.lj.gem-live .lj-stills::after{display:none}
@media (max-width:899px){.lj-stills::after{left:calc(50% - min(39vw,22svh));top:calc(27% - min(39vw,22svh));width:min(78vw,44svh);height:min(78vw,44svh)}}
@keyframes gem-shimmer{0%,55%{background-position:100% 0}100%{background-position:0 0}}
@media (prefers-reduced-motion:reduce){.lj-stills::after,.gem3d-stage[data-tier="C"]::after,.gem-mount[data-tier="C"]::after{animation:none;opacity:0}}
[data-gem-tier="C"] .lj{height:calc(100svh + (var(--lj-n) - 1) * 46svh)}
@media (prefers-reduced-motion:reduce){.lj{height:calc(100svh + (var(--lj-n) - 1) * 46svh)}}

/* ---------------- product page: the stone in 3D ---------------- */
.gem3d{margin-top:28px}
.gem3d-stage{--stage:#241A15;position:relative;aspect-ratio:1/1;max-height:520px;width:100%;border-radius:18px;overflow:hidden;background:radial-gradient(110% 90% at 50% 40%,var(--moka) 0%,var(--velluto) 60%,var(--notte) 100%);touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none}
.gem3d-stage:active{cursor:grabbing}
.gem3d-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.gem3d-still{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.gem3d-stage.gem-live .gem3d-still{display:none}
.gem3d-stage[data-tier="C"] canvas{display:none}
.gem3d-stage[data-tier="C"] .gem3d-ctl{display:none}
.gem3d-stage[data-tier="C"]{cursor:default}
[data-gem-tier="C"] .gem3d-drag{display:none}
.gem3d-stage .gem-tag{left:14px;top:14px}
.gem3d-ctl{position:absolute;right:12px;bottom:12px;display:flex;gap:6px;z-index:3}
.gem3d-ctl button{width:38px;height:38px;border-radius:50%;border:1px solid rgba(243,234,220,.3);background:rgba(26,19,16,.55);color:var(--on-dark);font-size:17px;line-height:1;cursor:pointer;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.gem3d-ctl button:hover{border-color:var(--oro-luce)}
.gem3d h2{margin-top:16px;font-family:var(--body);font-size:15px;font-weight:600;letter-spacing:.01em;line-height:1.4}
.gem3d-it{display:block;font-family:var(--bodoni);font-weight:400;font-size:28px;letter-spacing:-.005em;margin-bottom:2px}
.gem3d h2 .th{font-size:13px;margin-top:2px}
.gem3d-note{margin-top:6px;font-size:13px;color:var(--cocoa);line-height:1.5}
.gem3d .gem-motion{margin-top:10px;color:var(--cocoa);border-color:var(--sand)}
.gem3d .gem-motion:hover{color:var(--espresso)}
.gem3d :focus-visible{outline-color:var(--gold)}

/* ---------------- a stone mounted by another module (window.LUXGem.mount) ---------------- */
.gem-mount{position:relative;overflow:hidden;background:radial-gradient(110% 90% at 50% 40%,var(--moka) 0%,var(--velluto) 60%,var(--notte) 100%);touch-action:pan-y}
.gem-mount>canvas,.gem-mount-still{position:absolute;inset:0;width:100%;height:100%;display:block}
.gem-mount-still{object-fit:cover}
.gem-mount.gem-live .gem-mount-still{display:none}
.gem-mount[data-tier="C"]>canvas{display:none}
.gem-mount>.gem-tag{left:12px;top:12px}

/* ---------------- site-wide gem identity (gem-fx.js) ---------------- */
/* the touch trail: over the page, never in its way */
.gem-trail{position:fixed;inset:0;width:100%;height:100%;z-index:70;pointer-events:none}
/* the page-change veil: a gemstone passes for about a third of a second; the page under it is already there */
.gem-veil{--c:#F3EADC;position:fixed;inset:0;z-index:90;display:grid;place-items:center;pointer-events:none;opacity:0;visibility:hidden;background:radial-gradient(60% 46% at 50% 50%,rgba(36,26,21,.94) 0%,rgba(26,19,16,.86) 55%,rgba(26,19,16,.62) 100%)}
.gem-veil.on{visibility:visible;animation:gem-veil .38s cubic-bezier(.16,1,.3,1) both}
.gem-veil.on.hold{animation:gem-veil-in .16s ease-out both}
.gem-veil-stone{position:relative;width:min(58vw,260px);aspect-ratio:1;border-radius:50%;overflow:hidden;-webkit-mask-image:radial-gradient(closest-side,#fff 62%,transparent 96%);mask-image:radial-gradient(closest-side,#fff 62%,transparent 96%)}
.gem-veil-stone img{width:100%;height:100%;object-fit:cover;display:block}
.gem-veil-stone i{position:absolute;inset:0;background:linear-gradient(105deg,transparent 42%,rgba(255,250,240,.2) 50%,transparent 58%) 0 0/300% 100% no-repeat;mix-blend-mode:screen}
.gem-veil.on .gem-veil-stone{animation:gem-veil-stone .38s cubic-bezier(.16,1,.3,1) both}
.gem-veil.on .gem-veil-stone i{animation:gem-veil-sweep .38s ease-out both}
@keyframes gem-veil{0%{opacity:0}22%{opacity:1}62%{opacity:1}100%{opacity:0}}
@keyframes gem-veil-in{from{opacity:0}to{opacity:1}}
@keyframes gem-veil-stone{0%{transform:scale(.72) rotate(-14deg)}60%{transform:scale(1) rotate(0)}100%{transform:scale(1.12) rotate(5deg)}}
@keyframes gem-veil-sweep{from{background-position:100% 0}to{background-position:0 0}}
@media (prefers-reduced-motion:reduce){.gem-veil,.gem-trail{display:none}}
/* the active stone's colour (--gem-accent) echoes through the page: selection, focus, dividers, hover */
html[data-gem-stone] ::selection{background:var(--gem-accent);color:#241A15}
html[data-gem-stone] .lj-dot{background:var(--gem-accent);box-shadow:0 0 12px var(--gem-accent)}
html[data-gem-stone] .gem3d-stage,html[data-gem-stone] .gem-mount{box-shadow:0 0 0 1px rgba(243,234,220,.08),0 18px 50px -24px var(--gem-glow)}
/* a small faceted divider under section titles; absolutely placed in the title's own gap, so nothing moves when it appears */
html.lux2[data-gem-stone] .sec-head h2,html.lux2[data-gem-stone] .l2-doors-head h2{position:relative}
html.lux2[data-gem-stone] .sec-head h2::after,html.lux2[data-gem-stone] .l2-doors-head h2::after{content:"";position:absolute;left:0;bottom:-12px;width:58px;height:9px;background:var(--gem-accent);clip-path:polygon(0 50%,4.5px 0,9px calc(50% - .5px),100% calc(50% - .5px),100% calc(50% + .5px),9px calc(50% + .5px),4.5px 100%);filter:saturate(1.15) brightness(.82);transition:background .6s}
html.lux2[data-gem-stone] .sec-head.center h2::after{left:calc(50% - 29px)}
html.lux2[data-gem-stone] .pc{transition:box-shadow .5s cubic-bezier(.16,1,.3,1)}
@media (hover:hover){
  html.lux2[data-gem-stone] .pc:hover{box-shadow:0 18px 40px -22px var(--gem-glow),0 0 0 1px var(--gem-glow)}
  html.lux2[data-gem-stone] .l2-door:hover{box-shadow:inset 0 0 0 1px var(--gem-accent),0 22px 50px -26px var(--gem-glow)}
  html.lux2[data-gem-stone] .quiet:hover{border-color:var(--gem-accent)}
}
html.lux2[data-gem-stone] .lj :focus-visible,html.lux2[data-gem-stone] .gem3d :focus-visible{outline-color:var(--gem-accent)}

/* a real photograph or loop behind the stage while a rough crystal grows (gem-media.js; none listed today).
   The 3D stage is drawn over a dark ground, so the plate is laid over it softly (screen) and never over the text. */
.lj-plate{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none;mix-blend-mode:screen;-webkit-mask-image:radial-gradient(70% 60% at 50% 45%,#fff 30%,transparent 100%);mask-image:radial-gradient(70% 60% at 50% 45%,#fff 30%,transparent 100%)}
.lj-plate img,.lj-plate video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.lj-plate video{opacity:.9}
.lj-copy,.lj-foot,.lj-prog,.lj-dots,.lj-tag{z-index:3}
@media (prefers-reduced-motion:reduce){.lj-plate video{display:none}}

/* LUX 2.0 (MotionFlags 'journey'): the journey through every stone. A shorter stretch of scroll per stone (ten
   chapters), the stone's name beside the house line in the hero. */
.lj.lj-all{height:calc(100svh + (var(--lj-n) - 1) * 66svh)}
.lj-kick-stone{color:var(--on-dark-2);letter-spacing:.14em}
.lj:not(.lj-all) .lj-kick-stone{display:none}
[data-gem-tier="C"] .lj.lj-all{height:calc(100svh + (var(--lj-n) - 1) * 40svh)}
@media (prefers-reduced-motion:reduce){.lj.lj-all{height:calc(100svh + (var(--lj-n) - 1) * 40svh)}}
