/* StellarTweaks – motion layer 3: intro, scroll-driven motion, warp stars */
:root{--e:cubic-bezier(.16,1,.3,1)}
@property --r{syntax:"<percentage>";inherits:false;initial-value:0%}

/* ---------- intro: logo ignites, then an iris opens onto the page */
.intro-screen{position:fixed;inset:0;z-index:300;display:grid;place-content:center;justify-items:center;gap:26px;pointer-events:none;background:var(--bg);
  -webkit-mask:radial-gradient(circle at 50% 50%,transparent var(--r),#000 calc(var(--r) + 2%));mask:radial-gradient(circle at 50% 50%,transparent var(--r),#000 calc(var(--r) + 2%));
  animation:iris 1.1s 1.15s var(--e) forwards}
@keyframes iris{to{--r:150%}}
.intro-screen img{border-radius:24px;box-shadow:0 0 80px -6px var(--accent-glow);animation:logoIn 1s var(--e) backwards}
@keyframes logoIn{from{opacity:0;transform:scale(.4) rotate(-120deg);filter:blur(10px)}}
.intro-screen .ln{width:170px;height:2px;border-radius:2px;background:var(--line);overflow:hidden}
.intro-screen .ln::after{content:"";display:block;height:100%;background:linear-gradient(90deg,var(--accent),#fff);transform:translateX(-100%);animation:ld 1s .15s var(--e) forwards}
@keyframes ld{to{transform:none}}
html.intro{overflow:hidden}
html.intro .hero-text *,html.intro .window,html.intro .fbadge{animation-play-state:paused!important}

/* ---------- warp stars (streaks follow scroll speed) */
#warp{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:0}

/* ---------- springy tab indicator */
.tabs{position:relative}.tab{position:relative}
.tabpill{position:absolute;left:0;top:0;list-style:none;border-radius:12px;pointer-events:none;
  background:var(--accent-soft);border:1px solid rgba(var(--accent-rgb),.55);box-shadow:0 0 18px -4px var(--accent-glow);
  transition:transform .55s cubic-bezier(.3,1.35,.5,1),width .4s var(--e),height .4s var(--e)}
.has-pill .tab[aria-selected="true"]{background:transparent;border-color:transparent;box-shadow:none}

/* ---------- lines that draw themselves */
.feat{position:relative}
.feat::before{content:"";position:absolute;top:-1px;left:0;width:100%;height:1px;background:linear-gradient(90deg,var(--accent),transparent 70%);
  transform:scaleX(0);transform-origin:0 50%;transition:transform 1.3s .25s var(--e)}
.feat.in::before{transform:scaleX(1)}

/* ---------- scroll-driven motion (Chrome, Edge, Safari 26+; others keep the earlier reveal) */
@supports (animation-timeline:view()){
  .window{animation:winIn 1.1s .35s cubic-bezier(.2,.8,.2,1) backwards,winScroll linear both;animation-timeline:auto,view();animation-range:normal,exit 0% exit 100%}
  @keyframes winScroll{to{translate:0 -50px;scale:.88;opacity:.3}}
  .feat-copy{animation:copyL linear both;animation-timeline:view();animation-range:entry 0% cover 45%}
  .feat.flip .feat-copy{animation-name:copyR}
  .feat>:not(.feat-copy){animation:visP linear both;animation-timeline:view();animation-range:entry 0% cover 50%}
  @keyframes copyL{from{translate:-48px 0;opacity:.15}}
  @keyframes copyR{from{translate:48px 0;opacity:.15}}
  @keyframes visP{from{translate:0 60px;scale:.88;opacity:.15}}
  .logo-wrap{animation:logoS linear both;animation-timeline:view();animation-range:entry 0% cover 55%}
  @keyframes logoS{from{scale:.4;opacity:.1;rotate:-120deg}}
  .build .steps li{animation:stepIn linear both;animation-timeline:view();animation-range:entry 0% entry 90%}
  @keyframes stepIn{from{translate:60px 0;opacity:0}}
}
html.rm .intro-screen,html.rm #warp{display:none}html.rm .window,html.rm .feat-copy,html.rm .feat>*,html.rm .logo-wrap,html.rm .steps li{animation:none!important}
