/* Apps & more: hub and app pages. Loads after warm.css. */
.ap-hero{padding:clamp(36px,6vw,72px) 0 8px}
.ap-hero h1{margin:0 0 14px;font-size:clamp(2.8rem,9vw,5.4rem);font-weight:800;line-height:.95;letter-spacing:-.045em}
.ap-hero p:last-child{margin:0;max-width:52ch;font-size:1.12rem;color:var(--text-2)}
.ap-sec{padding:clamp(40px,6vw,72px) 0}
.ap-band{background:var(--bg-2);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.ap-h2{margin:0 0 22px;font-size:clamp(1.6rem,3.6vw,2.3rem);font-weight:800;letter-spacing:-.035em;line-height:1.1}
.ap-glyph{display:grid;place-items:center;flex:none;width:72px;height:72px;border-radius:20px;background:#F0C544;color:#3A0A10;font-weight:700;font-size:1.5rem;line-height:1}

/* device */
.ap-stage{padding:28px 0 clamp(40px,6vw,64px)}
.ap-device{max-width:880px;margin:0 auto;padding:14px;border-radius:46px;background:#1E1A16;box-shadow:0 44px 80px -44px rgba(36,26,16,.7),inset 0 0 0 2px #40372F}
.ap-screen{position:relative;overflow:hidden;border-radius:33px;padding:16px clamp(18px,5vw,56px) 22px;background:linear-gradient(160deg,#FFF3D6,#E4F3EE 55%,#E9E6FB);min-height:420px;display:flex;flex-direction:column}
.ap-blob{position:absolute;width:340px;height:340px;border-radius:50%;filter:blur(50px);opacity:.55;background:#F2B21B;left:-90px;top:-110px;pointer-events:none}
.ap-blob+.ap-blob{background:#7C6AE6;left:auto;top:auto;right:-110px;bottom:-140px;opacity:.35}
.ap-status,.ap-group,.ap-homebar{position:relative}
.ap-status{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:.85rem;color:var(--text-2)}
.ap-cam{width:11px;height:11px;border-radius:50%;background:#1E1A16}
.ap-group h2{margin:26px 0 14px;font-family:var(--k-body);font-size:.95rem;font-weight:700;letter-spacing:0;color:var(--text-2)}
.ap-icons{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:18px 8px}
.ap-icon{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 4px;border-radius:18px;color:var(--text);text-decoration:none;font-weight:600;font-size:.92rem;text-align:center;line-height:1.2}
.ap-icon img,.ap-icon .ap-glyph{width:72px;height:72px;border-radius:20px;box-shadow:0 14px 22px -14px rgba(36,26,16,.75)}
.ap-icon:focus-visible{outline-offset:0}
.ap-homebar{width:120px;height:5px;border-radius:9px;background:rgba(36,26,16,.35);margin:auto auto 0}
.ap-group:last-of-type{margin-bottom:30px}
@media (max-width:640px){
  .ap-device{max-width:370px;padding:10px;border-radius:42px}
  .ap-screen{border-radius:32px;padding:14px 16px 18px;min-height:560px}
  .ap-icons{grid-template-columns:repeat(3,1fr)}
  .ap-icon img,.ap-icon .ap-glyph{width:64px;height:64px;border-radius:18px}
}

/* hub rows and cards */
.ap-rows{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ap-rows a{display:grid;grid-template-columns:52px 1fr;gap:2px 16px;align-items:center;min-height:84px;padding:14px 18px;border-radius:18px;background:var(--card);border:1.5px solid var(--line);color:var(--text);text-decoration:none}
.ap-rows a:hover{border-color:var(--accent)}
.ap-rows img,.ap-rows .ap-glyph{grid-row:1/3;width:52px;height:52px;border-radius:14px;font-size:1.1rem}
.ap-rows b{align-self:end;font-family:var(--k-display);font-size:1.2rem;letter-spacing:-.02em;line-height:1.2}
.ap-rows a>span:last-child{align-self:start;color:var(--muted);font-size:.95rem;line-height:1.35}
.ap-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.ap-card{background:var(--card);border:1.5px solid var(--line);border-radius:18px;padding:24px}
.ap-card h3{margin:0 0 8px;font-size:1.25rem;letter-spacing:-.02em}
.ap-card p{margin:0;color:var(--text-2)}
.ap-about{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,.6fr);gap:32px;align-items:center}
.ap-about p{color:var(--text-2);max-width:60ch}
.ap-links{display:grid;gap:12px;justify-items:start}
@media (max-width:820px){.ap-rows,.ap-cards,.ap-about{grid-template-columns:1fr}}

/* app page */
.ap-app{--accent:var(--a)}
.ap-top{position:relative;overflow:hidden;background:var(--at);border-bottom:1px solid var(--line)}
.ap-top .k-wrap{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:clamp(24px,5vw,64px);align-items:center;padding-top:clamp(28px,5vw,56px);padding-bottom:clamp(40px,6vw,72px)}
.ap-back{display:inline-flex;align-items:center;min-height:44px;margin-bottom:10px;font-weight:700;color:var(--text);text-decoration:underline;text-underline-offset:4px}
.ap-appicon{display:block;width:88px;height:88px;border-radius:24px;box-shadow:0 18px 28px -18px rgba(36,26,16,.8)}
.ap-top h1{margin:16px 0 10px;font-size:clamp(2.8rem,9vw,5rem);font-weight:800;line-height:.95;letter-spacing:-.045em}
.ap-tagline{margin:0 0 12px;font-family:var(--k-display);font-size:clamp(1.2rem,2.6vw,1.6rem);font-weight:700;line-height:1.25;color:var(--a)}
.ap-desc{margin:0;max-width:54ch;font-size:1.1rem;color:var(--text-2)}
.ap-dl{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;margin-top:24px}
.ap-dl .k-btn{background:var(--a);border-color:var(--a);color:#fff}
.ap-note{color:var(--text-2);font-size:.95rem;max-width:30ch}
.ap-phone{justify-self:center;width:min(250px,64vw);border:8px solid #1E1A16;border-radius:36px;background:#1E1A16;overflow:hidden;box-shadow:0 40px 60px -30px rgba(36,26,16,.7)}
.ap-phone img{display:block;width:100%;height:auto;min-height:120px;background:var(--card)}
@media (max-width:820px){.ap-top .k-wrap{grid-template-columns:1fr}.ap-phone{justify-self:start}}
.ap-feats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.ap-feat{background:var(--card);border:1.5px solid var(--line);border-top:5px solid var(--a);border-radius:18px;padding:22px 24px}
.ap-feat h3{margin:0 0 10px;font-size:1.3rem;letter-spacing:-.02em}
.ap-feat ul{margin:0;padding-left:1.1em;color:var(--text-2)}
.ap-feat li{margin:.3em 0}
.ap-feat li::marker{color:var(--a)}
@media (max-width:700px){.ap-feats{grid-template-columns:1fr}}
.ap-shots{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;padding:6px 4px 20px;scrollbar-width:thin}
.ap-shots figure{flex:none;width:clamp(190px,22vw,240px);margin:0;scroll-snap-align:start}
.ap-shots img{display:block;width:100%;height:auto;min-height:120px;border:6px solid #1E1A16;border-radius:28px;background:var(--card)}
.ap-shots figcaption{margin-top:10px;text-align:center;font-weight:600;color:var(--text-2);font-size:.95rem}
.ap-steps{list-style:none;counter-reset:s;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.ap-steps li{counter-increment:s;background:var(--at);border-radius:18px;padding:22px 24px}
.ap-steps li::before{content:counter(s);display:grid;place-items:center;width:38px;height:38px;border-radius:50%;margin-bottom:12px;background:var(--a);color:#fff;font-family:var(--k-display);font-weight:800}
.ap-steps b{display:block;font-family:var(--k-display);font-size:1.2rem;letter-spacing:-.02em;margin-bottom:4px}
.ap-steps span{color:var(--text-2)}
.ap-help{margin:22px 0 0;color:var(--text-2)}
@media (max-width:820px){.ap-steps{grid-template-columns:1fr}}
.ap-others{display:flex;flex-wrap:wrap;gap:10px 14px}
.ap-others .ap-icon{width:112px}

/* scenes behind each app's header */
.sc{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.sc-water span{position:absolute;bottom:-30px;border-radius:50%;border:2px solid var(--a);opacity:.35}
.sc-water span:nth-child(1){left:6%;width:16px;height:16px}
.sc-water span:nth-child(2){left:22%;width:9px;height:9px}
.sc-water span:nth-child(3){left:44%;width:22px;height:22px}
.sc-water span:nth-child(4){left:63%;width:11px;height:11px}
.sc-water span:nth-child(5){left:80%;width:15px;height:15px}
.sc-water span:nth-child(6){left:93%;width:8px;height:8px}
.sc-water svg{position:absolute;left:0;bottom:-1px;width:200%;height:70px;fill:var(--a);opacity:.16}
.sc-moon i{position:absolute;right:7%;top:26px;width:clamp(70px,9vw,120px);aspect-ratio:1;border-radius:50%;box-shadow:inset -24px 10px 0 0 var(--a);opacity:.4;transform:rotate(-15deg)}
.sc-moon span{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--a);opacity:.5}
.sc-moon span:nth-child(2){left:8%;top:18%}.sc-moon span:nth-child(3){left:24%;top:72%;width:5px;height:5px}.sc-moon span:nth-child(4){left:41%;top:12%;width:5px;height:5px}.sc-moon span:nth-child(5){left:56%;top:84%}.sc-moon span:nth-child(6){left:68%;top:30%;width:4px;height:4px}.sc-moon span:nth-child(7){left:83%;top:66%;width:5px;height:5px}.sc-moon span:nth-child(8){left:92%;top:44%}.sc-moon span:nth-child(9){left:48%;top:52%;width:4px;height:4px}
.sc-sky span{position:absolute;height:54px;width:180px;border-radius:999px;background:#fff;opacity:.8}
.sc-sky span:nth-child(1){left:4%;top:9%}
.sc-sky span:nth-child(2){left:38%;top:70%;width:130px;height:40px;opacity:.6}
.sc-sky span:nth-child(3){right:5%;top:22%;width:220px;height:62px}
.sc-road{top:auto;height:46px;background:rgba(11,107,102,.16);border-top:2px solid rgba(11,107,102,.3)}
.sc-road i{position:absolute;left:0;top:20px;width:200%;height:5px;background:repeating-linear-gradient(90deg,var(--a) 0 56px,transparent 56px 112px);opacity:.55}
.sc-shelf{background:repeating-linear-gradient(180deg,transparent 0 132px,rgba(15,140,110,.2) 132px 137px)}
.sc-shelf span{position:absolute;border:2px solid var(--a);border-radius:8px;opacity:.35;background:rgba(255,255,255,.4)}
.sc-shelf span:nth-child(1){left:5%;top:82px;width:40px;height:50px}
.sc-shelf span:nth-child(2){left:38%;top:228px;width:34px;height:34px;border-radius:50%}
.sc-shelf span:nth-child(3){right:7%;top:94px;width:56px;height:38px}
.sc-shelf span:nth-child(4){left:16%;top:360px;width:28px;height:36px}
.sc-shelf span:nth-child(5){right:30%;top:14px;width:30px;height:118px;top:auto;bottom:40px;height:44px}

/* motion */
@media (prefers-reduced-motion:no-preference){
  .k-js .ap-hero>.k-wrap>*,.k-js .ap-intro>*{opacity:0;transform:translateY(22px);animation:k-rise .8s cubic-bezier(.2,.7,.1,1) forwards}
  .k-js .ap-hero>.k-wrap>:nth-child(2),.k-js .ap-intro>:nth-child(2){animation-delay:.08s}
  .k-js .ap-hero>.k-wrap>:nth-child(3),.k-js .ap-intro>:nth-child(3){animation-delay:.16s}
  .k-js .ap-intro>:nth-child(4){animation-delay:.24s}
  .k-js .ap-intro>:nth-child(5){animation-delay:.32s}
  .k-js .ap-intro>:nth-child(6){animation-delay:.4s}
  .k-js .ap-device{opacity:0;transform:translateY(40px) scale(.96);animation:k-rise 1s cubic-bezier(.2,.7,.1,1) .2s forwards}
  .k-js .ap-screen .ap-icons li{opacity:0;transform:scale(.4);animation:ap-pop .55s cubic-bezier(.3,1.5,.5,1) forwards;animation-delay:calc(.75s + var(--i,0) * 90ms)}
  @keyframes ap-pop{to{opacity:1;transform:none}}
  .ap-blob{animation:ap-drift 14s ease-in-out infinite alternate}
  .ap-blob+.ap-blob{animation-duration:19s;animation-direction:alternate-reverse}
  @keyframes ap-drift{to{transform:translate(70px,50px) scale(1.15)}}
  .ap-icon img,.ap-icon .ap-glyph{transition:transform .3s cubic-bezier(.3,1.5,.5,1),opacity .3s}
  .ap-icon:hover img,.ap-icon:hover .ap-glyph{transform:translateY(-5px) scale(1.07)}
  .ap-icon.go img,.ap-icon.go .ap-glyph{transform:scale(1.9);opacity:0}
  .ap-screen.launch .ap-icon:not(.go){opacity:.25;transition:opacity .25s}
  .ap-rows a,.ap-card{transition:border-color .2s,transform .2s}
  .ap-rows a:hover{transform:translateX(6px)}
  .k-js .ap-phone{opacity:0;transform:translateY(40px) rotate(4deg);animation:k-rise 1s cubic-bezier(.2,.7,.1,1) .3s forwards,ap-bob 5s ease-in-out 1.4s infinite alternate}
  @keyframes ap-bob{from{transform:translateY(0) rotate(0)}to{transform:translateY(-12px) rotate(-1.5deg)}}
  .ap-appicon{animation:ap-wiggle 6s ease-in-out 2s infinite}
  @keyframes ap-wiggle{0%,88%,100%{transform:none}92%{transform:rotate(-7deg) scale(1.06)}96%{transform:rotate(5deg) scale(1.06)}}
  .ap-feat{transition:transform .25s,box-shadow .25s}
  .ap-feat:hover{transform:translateY(-5px);box-shadow:0 18px 30px -22px var(--a)}
  .ap-shots figure{transition:transform .3s cubic-bezier(.2,.7,.1,1)}
  .ap-shots figure:hover{transform:translateY(-8px)}
  .sc-water span{animation:sc-rise linear infinite}
  .sc-water span:nth-child(1){animation-duration:11s}.sc-water span:nth-child(2){animation-duration:8s;animation-delay:-3s}.sc-water span:nth-child(3){animation-duration:14s;animation-delay:-6s}.sc-water span:nth-child(4){animation-duration:9s;animation-delay:-1s}.sc-water span:nth-child(5){animation-duration:12s;animation-delay:-8s}.sc-water span:nth-child(6){animation-duration:7s;animation-delay:-4s}
  @keyframes sc-rise{to{transform:translateY(-760px);opacity:0}}
  .sc-water svg{animation:sc-slide 12s linear infinite}
  @keyframes sc-slide{to{transform:translateX(-50%)}}
  .sc-moon span{animation:sc-twinkle 2.6s ease-in-out infinite alternate}
  .sc-moon span:nth-child(odd){animation-delay:-1.3s;animation-duration:3.4s}
  @keyframes sc-twinkle{from{opacity:.12;transform:scale(.7)}to{opacity:.7;transform:scale(1.2)}}
  .sc-moon i{animation:sc-glow 7s ease-in-out infinite alternate}
  @keyframes sc-glow{to{opacity:.6;transform:rotate(-8deg) scale(1.06)}}
  .sc-sky span{animation:sc-cloud 16s ease-in-out infinite alternate}
  .sc-sky span:nth-child(2){animation-duration:11s;animation-delay:-4s}
  .sc-sky span:nth-child(3){animation-duration:21s;animation-direction:alternate-reverse}
  @keyframes sc-cloud{from{transform:translateX(-30px)}to{transform:translateX(60px)}}
  .sc-road i{animation:sc-slide 5s linear infinite}
  .sc-shelf span{animation:sc-item 9s ease-in-out infinite alternate}
  .sc-shelf span:nth-child(even){animation-delay:-4s;animation-duration:12s}
  @keyframes sc-item{from{transform:translateY(0) rotate(-5deg)}to{transform:translateY(-16px) rotate(5deg)}}
}
