/* =====================================================================
   time2flow motion layer (Nov 2026 upgrade)
   Loaded after t2f-theme.css. Adds: brand intro, two-column hero with
   the 3D wordmark, scroll reveals, flowing section transitions, 3D icons,
   refined hover. Every rule here is presentation only: copy and links
   are untouched. prefers-reduced-motion turns all movement off.
   ===================================================================== */

:root{
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-io: cubic-bezier(.65,0,.35,1);
  --t2f-intro-bg: radial-gradient(170% 120% at 50% 47%, #EAF3FC 0%, #D6E7F7 26%, #D6E7F7 58%, #C4DCF2 100%);
}

/* ---------------------------------------------------------------
   1. Intro (first visit per session; decided in <head>)
   --------------------------------------------------------------- */
#t2f-intro{display:none}
html.intro-on #t2f-intro{display:block;position:fixed;inset:0;z-index:200;background:var(--t2f-intro-bg);overflow:hidden}
html.intro-on, html.intro-on body{overflow:hidden}
html.intro-on #home.hero .wrap,html.intro-on #home .hero-visual{z-index:auto}
#t2f-intro .ti-light{position:absolute;inset:-20%;pointer-events:none;
  background:radial-gradient(40% 32% at 50% 44%, rgba(255,255,255,.85), rgba(255,255,255,0) 70%);
  opacity:.0;transition:opacity 1.2s ease}
html.intro-run #t2f-intro .ti-light{opacity:1}
#t2f-intro .ti-ripple{position:absolute;left:50%;top:46%;width:min(56vmin,440px);aspect-ratio:1;margin:calc(min(56vmin,440px) / -2) 0 0 calc(min(56vmin,440px) / -2);
  border-radius:50%;border:1px solid rgba(34,125,195,.28);opacity:0;transform:scale(.4);pointer-events:none}
html.intro-run #t2f-intro .ti-ripple{animation:tiRipple 2.6s var(--ease-out) .25s both}
html.intro-run #t2f-intro .ti-ripple.r2{animation-delay:.65s}
html.intro-run #t2f-intro .ti-ripple.r3{animation-delay:1.05s}
@keyframes tiRipple{0%{opacity:0;transform:scale(.4)}18%{opacity:.9}100%{opacity:0;transform:scale(1.9)}}
#t2f-intro .ti-skip{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:3;
  font:600 .8125rem/1 "Hanken Grotesk",system-ui,sans-serif;letter-spacing:.04em;color:#16497C;background:rgba(255,255,255,.72);
  border:1px solid rgba(22,73,124,.22);border-radius:999px;padding:.85em 1.25em;min-height:44px;cursor:pointer;
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:background .2s,border-color .2s}
#t2f-intro .ti-skip:hover{background:#fff;border-color:rgba(22,73,124,.45)}
#t2f-intro .ti-skip:focus-visible{outline:2px solid #1A66A6;outline-offset:3px}
html.intro-out #t2f-intro{opacity:0;transition:opacity .8s ease .05s}
html.intro-out #t2f-intro .ti-skip{opacity:0;transition:opacity .2s}

/* ---------------------------------------------------------------
   2. Hero: existing copy left, 3D wordmark right
   --------------------------------------------------------------- */
#home.hero{min-height:calc(100svh - 64px);align-items:center;padding-block:clamp(40px,6vw,88px) clamp(56px,7vw,96px)}
#home.hero .wrap{grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:clamp(24px,4vw,64px);align-items:center;position:relative;z-index:1}
#home .hero-text{max-width:600px;margin:0;text-align:left}
#home.hero h1{font-size:clamp(2.35rem,1.2rem + 2.9vw,4rem);line-height:1.04;letter-spacing:-.02em;font-weight:700;color:var(--t2f-deep)}
#home .lede{margin-inline:0;margin-top:22px;font-size:clamp(1.1rem,1rem + .35vw,1.3rem)}
#home .fine{margin-top:12px;color:var(--ink-2);font-size:var(--s-sm)}
#home.hero .ctas{justify-content:flex-start}
#home .hero-visual{position:relative;min-width:0;aspect-ratio:3.5/1;width:146%;margin-left:-14%;margin-right:-32%}
#home .hero-visual::before{content:"";position:absolute;inset:-48% 4% -48% 8%;pointer-events:none;
  background:radial-gradient(closest-side,rgba(214,231,247,.95) 0%,rgba(214,231,247,.7) 46%,rgba(214,231,247,0) 100%)}

/* the floating 3D wordmark (also the intro stage) */
.wm3d{position:absolute;inset:0;perspective:1400px;pointer-events:none}
.wm3d-float{position:absolute;inset:0;transform:translate3d(0,var(--wm-fy,0px),0)}
.wm3d-tilt{position:absolute;inset:0;transform-style:preserve-3d;transform:rotateX(var(--wm-rx,0deg)) rotateY(var(--wm-ry,0deg))}
.wm3d-plate{position:absolute;inset:0;width:100%;height:100%;display:block}
.wm3d-plate img{width:100%;height:100%;display:block;object-fit:cover}
.wm3d-plate{
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 13%,#000 87%,transparent 100%),linear-gradient(180deg,transparent 0%,#000 26%,#000 72%,transparent 100%);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(90deg,transparent 0%,#000 13%,#000 87%,transparent 100%),linear-gradient(180deg,transparent 0%,#000 26%,#000 72%,transparent 100%);
  mask-composite:intersect}
/* live 3D symbol sits exactly over the "o" */
.wm3d-orb{position:absolute;left:56.100%;top:15.441%;width:20.268%;aspect-ratio:1;transform-origin:50% 50%;
  transform:translate3d(var(--orb-tx,0px),var(--orb-ty,0px),0) scale(var(--orb-s,1));opacity:0;transition:opacity .35s ease}
.wm3d-orb canvas{width:100%;height:100%;display:block}
.wm3d.orb-on .wm3d-orb{opacity:1}
.wm3d-light{position:absolute;inset:0;pointer-events:none;mix-blend-mode:soft-light;opacity:.55;
  background:radial-gradient(30% 60% at var(--wm-lx,40%) var(--wm-ly,35%),rgba(255,255,255,.9),rgba(255,255,255,0) 70%)}

/* intro stage: the same element is lifted above the intro backdrop and centred */
.wm3d.is-intro{position:fixed;inset:auto;z-index:201;left:var(--wi-x);top:var(--wi-y);width:var(--wi-w);height:var(--wi-h);transform-origin:0 0}
.wm3d.is-intro .wm3d-plate{
  -webkit-mask-image:linear-gradient(90deg,transparent calc(var(--rv-l,50%) - 7%),#000 var(--rv-l,50%),#000 var(--rv-r,50%),transparent calc(var(--rv-r,50%) + 7%)),linear-gradient(180deg,transparent 0%,#000 26%,#000 72%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent calc(var(--rv-l,50%) - 7%),#000 var(--rv-l,50%),#000 var(--rv-r,50%),transparent calc(var(--rv-r,50%) + 7%)),linear-gradient(180deg,transparent 0%,#000 26%,#000 72%,transparent 100%)}
.wm3d.is-intro .wm3d-light{opacity:0}
.wm3d.is-intro .wm3d-plate--full{opacity:var(--plate-o,0)}
.wm3d.is-intro .wm3d-orb{transition:none}

/* hero copy entrance (after the intro, or on load) */
@media (prefers-reduced-motion: no-preference){
  html.js-motion #home .hero-text > *{opacity:0;transform:translate3d(0,26px,0)}
  html.js-motion #home .hero-text h1{opacity:1;transform:none}
  html.js-motion #home .hero-text h1:not(.t2f-split){opacity:0}
  html.js-motion #home .hero-text h1 .w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.08em;margin-bottom:-.08em}
  html.js-motion #home .hero-text h1 .w > span{display:inline-block;transform:translate3d(0,108%,0)}
  html.js-motion.hero-in #home .hero-text h1 .w > span{transform:none;transition:transform 1s var(--ease-out) calc(var(--i) * 45ms)}
  html.js-motion.hero-in #home .hero-text > *{opacity:1;transform:none;transition:opacity .9s ease, transform 1s var(--ease-out)}
  html.js-motion.hero-in #home .hero-text > :nth-child(2){transition-delay:.38s}
  html.js-motion.hero-in #home .hero-text > :nth-child(3){transition-delay:.5s}
  html.js-motion.hero-in #home .hero-text > :nth-child(4){transition-delay:.62s}
  html.js-motion #home .hero-visual{opacity:0}
  html.js-motion.hero-in #home .hero-visual,html.intro-on #home .hero-visual{opacity:1;transition:opacity 1s ease .1s}
}
#home .hero .rise,#home .rise{animation:none}

/* atmospheric planes (behind/in front of the wordmark, parallax on scroll) */
.hero-atmos{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.hero-atmos i{position:absolute;border-radius:50%;display:block;will-change:transform}
.hero-atmos .a1{width:46vw;height:46vw;right:-12vw;top:-8vw;background:radial-gradient(closest-side,rgba(108,210,252,.20),rgba(108,210,252,0))}
.hero-atmos .a2{width:30vw;height:30vw;left:-8vw;bottom:-10vw;background:radial-gradient(closest-side,rgba(34,125,195,.12),rgba(34,125,195,0))}
.hero-drops{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}
.hero-drops i{position:absolute;display:block;border-radius:50%;
  background:radial-gradient(circle at 34% 30%,rgba(255,255,255,.95) 0 14%,rgba(255,255,255,.35) 26%,rgba(108,210,252,.22) 58%,rgba(34,125,195,.32) 100%);
  box-shadow:inset -2px -3px 6px rgba(22,73,124,.25),0 6px 14px -6px rgba(22,73,124,.35);will-change:transform}
.hero-drops .d1{width:18px;height:18px;right:6%;top:18%;filter:blur(.3px)}
.hero-drops .d2{width:34px;height:34px;right:42%;bottom:12%;filter:blur(2.2px);opacity:.75}
.hero-drops .d3{width:11px;height:11px;right:27%;top:30%}
.hero-drops .d4{width:56px;height:56px;right:-14px;bottom:24%;filter:blur(5px);opacity:.55}

@media (max-width: 900px){
  #home.hero{min-height:0;padding-top:clamp(20px,5vw,40px)}
  #home.hero .wrap{grid-template-columns:minmax(0,1fr);gap:8px}
  #home .hero-visual{order:-1;width:128vw;margin-left:calc(50% - 66vw);margin-right:0;aspect-ratio:3.5/1}
  #home .hero-visual::before{inset:-30% 6%}
  #home .hero-text{max-width:640px}
  .hero-drops .d2,.hero-drops .d4{display:none}
}
@media (max-width: 560px){
  #home.hero h1{font-size:clamp(2rem,1.2rem + 4.6vw,2.6rem)}
  #home.hero .ctas .btn{flex:1 1 auto}
}

/* ---------------------------------------------------------------
   3. Scroll reveals and animated headings (site wide)
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference){
  html.js-motion [data-rv]{opacity:0;transform:translate3d(0,28px,0);transition:opacity .9s ease, transform 1.1s var(--ease-out);transition-delay:calc(var(--rv-i,0) * 80ms)}
  html.js-motion [data-rv="fade"]{transform:none}
  html.js-motion [data-rv="left"]{transform:translate3d(-34px,0,0)}
  html.js-motion [data-rv="scale"]{transform:scale(.94)}
  html.js-motion [data-rv].in{opacity:1;transform:none}

  html.js-motion .h-split .w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.1em;margin-bottom:-.1em}
  html.js-motion .h-split .w > span{display:inline-block;transform:translate3d(0,105%,0);transition:transform .95s var(--ease-out);transition-delay:calc(var(--i) * 38ms)}
  html.js-motion .h-split.in .w > span{transform:none}

  /* image reveal: a soft wipe */
  html.js-motion [data-wipe]{clip-path:inset(0 0 100% 0 round 14px);transition:clip-path 1.2s var(--ease-out)}
  html.js-motion [data-wipe].in{clip-path:inset(0 0 0 0 round 14px)}
}

/* ---------------------------------------------------------------
   4. Flowing section edge (brand wave), drawn between bands
   --------------------------------------------------------------- */
.flow-edge{position:absolute;left:0;right:0;top:-1px;height:clamp(36px,5vw,72px);pointer-events:none;z-index:0;overflow:hidden}
.flow-edge svg{position:absolute;left:-10%;width:120%;height:100%;display:block}
.flow-edge .fe1{fill:#ffffff}
.flow-edge .fe2{fill:rgba(255,255,255,.55)}
.flow-edge .fe-line{fill:none;stroke:url(#t2f-flow-stroke);stroke-width:1.5;opacity:.7}
section.has-flow{position:relative}
section.has-flow > .wrap{position:relative;z-index:1}

/* ---------------------------------------------------------------
   5. Custom 3D icons (glossy water glass, same light as the logo)
   --------------------------------------------------------------- */
.ico3d{--s:64px;width:var(--s);height:var(--s);display:block;margin-bottom:18px;position:relative;transform-style:preserve-3d;
  transition:transform .6s var(--ease-out);filter:drop-shadow(0 10px 12px rgba(22,73,124,.22)) drop-shadow(0 2px 3px rgba(22,73,124,.18))}
.ico3d svg{width:100%;height:100%;display:block;overflow:visible}
@media (prefers-reduced-motion: no-preference){
  html.js-motion .ico3d{transform:perspective(500px) rotateX(18deg) rotateY(-22deg) translateZ(-10px) scale(.86);opacity:0;transition:transform 1.2s var(--ease-out),opacity .8s ease}
  html.js-motion .in .ico3d, html.js-motion .ico3d.in{transform:perspective(500px) rotateX(0) rotateY(0) translateZ(0) scale(1);opacity:1}
  .tilt-card:hover .ico3d{transform:perspective(500px) rotateX(-6deg) rotateY(14deg) translateZ(12px) scale(1.04)!important}
  .ico3d .ic-float{animation:icFloat 6s ease-in-out infinite;transform-origin:50% 50%}
  @keyframes icFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
}

/* ---------------------------------------------------------------
   6. Cards: depth on hover (pointer-tilt set from JS)
   --------------------------------------------------------------- */
.tilt-card{transform-style:preserve-3d;transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out)}
@media (hover:hover) and (prefers-reduced-motion: no-preference){
  .tilt-card.is-tilting{transition:transform .12s linear,box-shadow .3s}
  .tilt-card:hover{box-shadow:0 30px 60px -32px rgba(22,73,124,.45)}
}
.pains article,.out-grid > div{border-radius:16px}
.pains article{position:relative}

/* ---------------------------------------------------------------
   7. How it works: the flow line fills as you scroll, steps light up
   --------------------------------------------------------------- */
.steps{--flow:0}
.steps .flow-fill{position:absolute;left:0;top:22px;height:2px;width:100%;transform-origin:0 50%;transform:scaleX(var(--flow));
  background:linear-gradient(90deg,#6CD2FC,#3EB5F3 45%,#1A66A6);border-radius:2px;z-index:0;box-shadow:0 0 0 0 transparent}
.steps .num{z-index:1;transition:transform .7s var(--ease-out),background .5s ease,color .5s ease,border-color .5s ease,box-shadow .7s var(--ease-out)}
.steps li.lit .num{background:radial-gradient(circle at 32% 28%,#BDEBFF 0%,#6CD2FC 28%,#227DC3 70%,#16497C 100%);color:#fff;border-color:transparent;
  box-shadow:inset -3px -5px 8px rgba(10,40,90,.35),inset 3px 4px 6px rgba(255,255,255,.55),0 10px 18px -8px rgba(22,73,124,.55);transform:translateY(-2px) scale(1.06)}
@media (max-width: 1080px){ .steps .flow-fill{display:none} }
@media (max-width: 700px){
  .steps li::after{transform-origin:50% 0;transform:scaleY(var(--seg,0));background:linear-gradient(180deg,#3EB5F3,#1A66A6)!important;width:2px!important;left:21px!important}
}

/* ---------------------------------------------------------------
   8. Warranty seal turns into a coin
   --------------------------------------------------------------- */
.w-seal{transition:transform 1.4s var(--ease-out);transform-style:preserve-3d}
@media (prefers-reduced-motion: no-preference){
  html.js-motion .warranty .w-seal{transform:perspective(700px) rotateY(-80deg)}
  html.js-motion .warranty.in .w-seal{transform:perspective(700px) rotateY(0)}
  .warranty .w-seal:hover{transform:perspective(700px) rotateY(16deg) rotateX(-6deg)!important}
}

/* ---------------------------------------------------------------
   9. Stats count, FAQ open, buttons
   --------------------------------------------------------------- */
.ws-card{transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out)}
@media (hover:hover){ .ws-card:hover{transform:translateY(-4px);box-shadow:0 24px 44px -30px rgba(22,73,124,.5)} }
@media (prefers-reduced-motion: no-preference){
  .faq details[open] > :not(summary){animation:faqIn .55s var(--ease-out) both}
  @keyframes faqIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
  /* light sweep: the highlight moves inside the button (no overflow clipping, so the label can never be squeezed) */
  .btn-gold{position:relative}
  .btn-gold::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
    background:linear-gradient(105deg,transparent 38%,rgba(255,255,255,.38) 50%,transparent 62%) no-repeat;background-size:260% 100%;background-position:135% 0;
    transition:background-position .8s var(--ease-out)}
  .btn-gold:hover::after{background-position:-35% 0}
}

/* gallery tiles: lift with depth */
@media (hover:hover) and (prefers-reduced-motion: no-preference){
  .g-tile{transition:transform .5s var(--ease-out),box-shadow .5s var(--ease-out)}
}

/* mission line draws a wave under the quote */
.mission-wave{display:block;width:min(420px,80%);height:28px;margin:18px auto 0;overflow:visible}
.mission-wave path{fill:none;stroke:url(#t2f-flow-stroke);stroke-width:2.5;stroke-linecap:round;stroke-dasharray:520;stroke-dashoffset:520;transition:stroke-dashoffset 2s var(--ease-io)}
.mission-strip.in .mission-wave path{stroke-dashoffset:0}
@media (prefers-reduced-motion: reduce){ .mission-wave path{stroke-dashoffset:0} }

/* preview-only replay control (never shown on the live domain) */
.t2f-replay{position:fixed;left:12px;bottom:12px;z-index:60;font:600 12px/1 "Hanken Grotesk",system-ui,sans-serif;color:#16497C;background:rgba(255,255,255,.85);
  border:1px solid rgba(22,73,124,.25);border-radius:999px;padding:9px 12px;cursor:pointer;backdrop-filter:blur(6px)}

/* safety net if scripts never run */
html.rv-all [data-rv],html.rv-all .ico3d{opacity:1!important;transform:none!important}
html.rv-all #home .hero-text > *,html.rv-all #home .hero-text h1,html.rv-all #home .hero-visual{opacity:1!important;transform:none!important}
html.rv-all #home .hero-text h1 .w > span{transform:none!important}

/* small phones: the header (logo, Apply Now, Log In, menu) must fit without sideways scrolling.
   It overflowed by up to 68px at 320-375px wide on the live site too. Sizes only; nothing removed. */
@media (max-width: 400px){
  .top .brand img{height:32px}
  .top .top-cta{padding-inline:.75em}
  .top .top-login{padding-inline:.75em;margin-left:6px}
  .top .menu-btn{margin-left:6px}
}
@media (max-width: 370px){ .top .brand img{height:30px} }
@media (max-width: 345px){
  .top .brand img{height:24px}
  .top .top-cta,.top .top-login{padding-inline:.6em;font-size:.72rem}
}

/* reduced motion: everything visible and still */
@media (prefers-reduced-motion: reduce){
  html.intro-on #t2f-intro{display:none}
  .ico3d{opacity:1;transform:none}
  .wm3d-float,.wm3d-tilt{transform:none!important}
}
