/* ============================================================
   Tinvero — frames.html only: the light stage and the five windows.
   Page-scoped (loaded from the page's preload slot), mobile-first.
   Every token comes from site.css; nothing here invents a colour.

   The idea on this page is that choosing a lens IS the page. The
   stage shows one world through one lens and swaps worlds when you
   pick a tint; the five windows below show all of them at once.
   ============================================================ */

/* ---------- the stage ---------- */
.lstage{position:relative;min-height:100svh;display:flex;flex-direction:column;justify-content:flex-end;
  overflow:hidden;isolation:isolate;background:var(--ink);--t:#4A4D52}
.lstage_scenes{position:absolute;inset:0;z-index:0;will-change:transform}
.lstage_scene{position:absolute;inset:0;opacity:0;transition:opacity 1.1s var(--ease)}
.lstage_scene img{width:100%;height:100%;object-fit:cover;object-position:50% 62%;display:block}
/* The hazy "without" frame shows at once for the active tint; the "through the lens"
   frame lies over it and fades in when the stage is .is-clear. That fade is the
   promise of the product made visible, so it is the first thing that moves on load. */
.lstage_scene.is-on{opacity:1}
.lstage_scene--lens.is-on{opacity:0}
.lstage.is-clear .lstage_scene--lens.is-on{opacity:1}
/* On a phone the headline spans the full width over the brightest part of the sky,
   so the scrim is a bottom-up wash: sky stays visible, type sits on ink. */
.lstage_scrim{position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(12,13,15,.66) 0%,rgba(12,13,15,.34) 24%,rgba(12,13,15,.5) 46%,rgba(12,13,15,.86) 70%,var(--ink) 100%)}
.lstage_h,.lstage_lede,.lstage_copy .eyebrow{text-shadow:0 1px 2px rgba(12,13,15,.55),0 8px 28px rgba(12,13,15,.45)}
.lstage_in{position:relative;z-index:2;width:100%;display:grid;gap:clamp(.9rem,2.2vh,1.5rem);
  padding-top:clamp(5.4rem,13vh,8rem);padding-bottom:clamp(1.1rem,3vh,2rem)}
.lstage_copy{display:grid;gap:.75rem}
.lstage_copy .crumbs{margin:0}
.lstage_h{font-size:clamp(2.55rem,11.5vw,7rem);line-height:.9;max-width:9ch}
.lstage_lede{margin-top:.2rem;min-height:3.2em;transition:opacity .32s var(--ease)}
.lstage_lede.is-swap{opacity:0}
/* the pair floats in the scene */
.lstage_pair{position:relative;width:min(100%,560px);aspect-ratio:1066/348;justify-self:center}
.lstage_pair picture{position:absolute;inset:0;opacity:0;transform:translateY(16px) scale(.96);
  transition:opacity .55s var(--ease),transform .95s var(--ease);pointer-events:none}
.lstage_pair picture.is-on{opacity:1;transform:none}
.lstage_pair img{width:100%;height:auto;filter:drop-shadow(0 30px 34px rgba(0,0,0,.62))}
/* the rail: five tints, each a 44px target, scrolling sideways on a phone */
.lstage_rail{display:flex;gap:.4rem;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;
  margin-inline:calc(var(--gut) * -1);padding-inline:var(--gut);padding-block:.2rem}
.lstage_rail::-webkit-scrollbar{display:none}
.tintstep{position:relative;flex:0 0 auto;display:flex;align-items:center;gap:.6rem;min-height:44px;
  padding:.4rem .9rem .4rem .45rem;border:1px solid var(--line-2);border-radius:999px;color:var(--bone-2);
  font-size:.86rem;line-height:1.15;scroll-snap-align:start;text-align:left;
  background:rgba(12,13,15,.38);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  transition:border-color .3s var(--ease),color .3s var(--ease),background .3s var(--ease)}
.tintstep i{flex:0 0 auto;width:24px;height:24px;border-radius:50%;background:var(--t);
  box-shadow:inset 0 0 0 1px rgba(244,241,234,.28)}
.tintstep span{display:grid}
.tintstep em{font-style:normal;white-space:nowrap;font-weight:500}
.tintstep small{display:none;font-family:var(--mono);font-size:.62rem;letter-spacing:.06em;opacity:.72;white-space:nowrap}
.tintstep:hover{color:var(--bone);border-color:var(--bone-3)}
.tintstep.is-on{color:var(--ink);background:var(--bone);border-color:var(--bone)}
.tintstep.is-on i{box-shadow:inset 0 0 0 1px rgba(0,0,0,.35)}
/* The ring fills around the active swatch while the stage advances on its own, so the
   motion is announced rather than surprising. JS writes --adv from 0 to 1. */
.tintstep .ring{position:absolute;left:calc(.45rem - 4px);top:50%;width:32px;height:32px;margin-top:-16px;border-radius:50%;
  background:conic-gradient(var(--amber) calc(var(--adv,0) * 1turn),transparent 0);
  -webkit-mask:radial-gradient(circle,transparent 13px,#000 14px);mask:radial-gradient(circle,transparent 13px,#000 14px);
  opacity:0;transition:opacity .3s;pointer-events:none}
.tintstep.is-on .ring{opacity:1}
.lstage_cta{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.lstage_cta .btn{flex:1 1 auto;justify-content:center;white-space:nowrap}
.lstage_cta .btn--ghost{flex:0 0 auto}

@media (min-width:900px){
  .lstage{justify-content:center}
  .lstage_in{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);grid-template-areas:"copy pair" "cta pair" "rail rail";
    align-items:center;column-gap:clamp(1.5rem,4vw,4rem);row-gap:clamp(1rem,2.4vh,1.8rem);padding-top:clamp(6.5rem,12vh,9rem)}
  .lstage_copy{grid-area:copy;align-self:end}
  .lstage_cta{grid-area:cta;align-self:start}
  .lstage_pair{grid-area:pair;width:min(100%,640px);justify-self:end}
  .lstage_rail{grid-area:rail;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;margin-inline:0;padding-inline:0;gap:.55rem}
  .tintstep{min-width:0}
  .tintstep small{white-space:normal;line-height:1.3}
  .tintstep span{min-width:0}
  .lstage_cta .btn{flex:0 0 auto}
  .lstage_lede{min-height:4.6em}
  /* the headline scales with the column, not the viewport: at 1280 wide the copy column is
     ~560px and a 7rem line broke "Which light" into four lines, pushing the CTA under the fold */
  .lstage_h{font-size:clamp(3rem,5.2vw,7rem)}
  .tintstep small{display:block}
  /* on a wide screen the copy sits left, so the scrim is left-weighted and the world stays open on the right */
  .lstage_scrim{background:
    linear-gradient(90deg,rgba(12,13,15,.84) 0%,rgba(12,13,15,.5) 38%,rgba(12,13,15,.14) 64%,rgba(12,13,15,0) 100%),
    linear-gradient(180deg,rgba(12,13,15,.5) 0%,transparent 26%,transparent 68%,var(--ink) 100%)}
}

/* ---------- the five windows ---------- */
.five{padding-block:clamp(2.6rem,7vw,5.5rem) clamp(1.6rem,4vw,3rem);position:relative}
.five_head{display:flex;flex-wrap:wrap;align-items:end;justify-content:space-between;gap:1rem 2rem;margin-bottom:clamp(1.3rem,3vw,2.4rem)}
.five_head .lede{margin:0;max-width:34ch}
.five_rail{display:flex;gap:clamp(.8rem,1.6vw,1.2rem);overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;
  margin-inline:calc(var(--gut) * -1);padding-inline:var(--gut);padding-bottom:.4rem;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.five_rail::-webkit-scrollbar{display:none}
.win{flex:0 0 min(78vw,360px);scroll-snap-align:center;position:relative;--t:#4A4D52}
.win_link{display:flex;flex-direction:column;height:100%;color:inherit}
.win_media{position:relative;display:block;aspect-ratio:3/4;border-radius:var(--r-lg);overflow:hidden;border:1px solid var(--line);isolation:isolate;background:var(--ink-2)}
.win_scene{position:absolute;inset:0;display:block;transition:opacity .9s var(--ease),transform 1.6s var(--ease);will-change:transform}
.win_scene img{width:100%;height:100%;object-fit:cover;object-position:50% 55%}
.win_scene--lens{opacity:0}
.win_media::after{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(12,13,15,0) 42%,rgba(12,13,15,.78) 100%)}
.win_pair{position:absolute;left:5%;right:5%;top:50%;z-index:2;transform:translateY(-50%) scale(.98);transition:transform 1s var(--ease)}
.win_pair img{width:100%;height:auto;filter:drop-shadow(0 22px 26px rgba(0,0,0,.62))}
.win_tag{position:absolute;left:.85rem;top:.85rem;z-index:3;font-family:var(--mono);font-size:.64rem;letter-spacing:.12em;text-transform:uppercase;color:var(--bone);
  background:rgba(12,13,15,.5);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);padding:.36rem .62rem;border-radius:999px;border:1px solid var(--line-2)}
.win_light{position:absolute;left:.85rem;right:.85rem;bottom:.85rem;z-index:3;color:var(--amber);font-family:var(--mono);font-size:.7rem;letter-spacing:.05em;line-height:1.4}
.win_body{padding-top:.95rem;display:grid;gap:.4rem}
.win_top{display:flex;justify-content:space-between;align-items:baseline;gap:1rem}
.win_name{font-family:var(--display);font-weight:700;font-size:1.22rem;letter-spacing:-.015em}
.win_price{font-family:var(--mono);font-size:.86rem;color:var(--bone-2)}
.win_lead{color:var(--bone-2);font-size:.92rem;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.win_cta{margin-top:.45rem;justify-self:start}
/* The scene sharpens behind the pair: on hover where there is a pointer, and on the
   centred card where there is not, so a thumb gets the same moment a cursor does. */
.win:hover .win_scene--lens,.win:focus-within .win_scene--lens,.win.is-in .win_scene--lens{opacity:1}
.win:hover .win_scene,.win:focus-within .win_scene,.win.is-in .win_scene{transform:scale(1.05)}
.win:hover .win_pair,.win:focus-within .win_pair,.win.is-in .win_pair{transform:translateY(-52%) scale(1.035)}
.five_dots{display:flex;justify-content:center;gap:.55rem;margin-top:.9rem}
.five_dots i{width:7px;height:7px;border-radius:50%;background:var(--bone-3);transition:background .3s,transform .3s;cursor:pointer}
.five_dots i.is-on{background:var(--amber);transform:scale(1.35)}
@media (min-width:1100px){
  .five_rail{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;margin-inline:0;padding-inline:0;scroll-snap-type:none}
  .win{flex:none}
  .win_name{font-size:1.08rem}
  .five_dots{display:none}
}

/* ---------- the measurements band ---------- */
.specband{padding-block:clamp(2rem,6vw,5rem)}
.specband .wrap{display:grid;gap:clamp(1.4rem,4vw,3rem)}
.specband .pending{margin-top:0}
@media (min-width:900px){.specband .wrap{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:start}}

/* ---------- motion off, or no script: the clear scene as a still ---------- */
.reduced .lstage_scene,.no-js .lstage_scene,.reduced .win_scene,.no-js .win_scene,.reduced .lstage_pair picture,.no-js .lstage_pair picture{transition:none}
.reduced .lstage_scene--lens.is-on,.no-js .lstage_scene--lens.is-on{opacity:1}
.no-js .lstage_scene[data-i="0"]{opacity:1}
.no-js .lstage_pair picture:first-child{opacity:1;transform:none}
.reduced .win_scene--lens,.no-js .win_scene--lens{opacity:1}
.reduced .tintstep .ring{display:none}

/* short desktop windows (1280x800 laptops): tighter top padding, no reserved lede height */
@media (min-width:900px) and (max-height:820px){
  .lstage_in{padding-top:clamp(5rem,9vh,6.5rem);row-gap:.8rem}
  .lstage_lede{min-height:0}
  .lstage_pair{width:min(100%,560px)}
}
