/* ═══ appad. — story layer ═══
   A scroll story (pixel-icon headline → app cards → sky + iPhone → manifesto)
   and a 3D shelf of app boxes, drawn on the foez system: white, sky, Instrument
   Serif, appad blue. No opacity-only fades on the shelf: masks, clips and scales. */
:root { --blue: #1f7a63; --blue-2: #8fd0bd; --paper: #f6f8fa; --sheet: #fbfcfd; --muted: #95968d; }
html.is-site body { overscroll-behavior-y: none; }

/* ══ STORY ══ */
#story { position: relative; height: 1500vh; }
.s-hero { position: absolute; top: 0; left: 0; right: 0; height: 100vh; height: 100svh; z-index: 9; pointer-events: none; }
.s-head { position: absolute; left: 0; right: 0; top: 41%; height: 0; font-family: var(--serif); font-size: var(--hfs); line-height: 1; letter-spacing: -.035em; color: var(--ink); }
.s-word, .s-icons { position: absolute; left: 50%; top: 0; height: 1em; transform: translateY(-50%); }
.s-word { white-space: pre; }
.s-word span { display: inline-block; clip-path: inset(-20% 100% -20% 0); }
.s-icons i { position: absolute; top: 50%; width: var(--ic); height: var(--ic); margin-top: calc(var(--ic) / -2); transform-origin: 50% 60%; opacity: 0; }
.s-icons svg, .s-fly svg { width: 100%; height: 100%; display: block; shape-rendering: crispEdges; }
.s-fly { position: absolute; left: 0; top: 0; width: var(--ic); height: var(--ic); margin: calc(var(--ic) / -2) 0 0 calc(var(--ic) / -2); opacity: 0; z-index: 3; }
.s-sub { position: absolute; left: 0; right: 0; top: calc(41% + var(--hfs) * .78); text-align: center; color: var(--ink-2); font-size: clamp(14px, 1.15vw, 17px); padding: 0 24px; opacity: 0; }

.s-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--sky-3) 60%, #fff 100%); }
.s-proc { position: absolute; z-index: 4; left: 0; right: 0; top: 20%; text-align: center; padding: 0 16px; opacity: 0; pointer-events: none; }
.s-proc.is-on { pointer-events: auto; }
.s-proc h2 { font-family: var(--serif); font-size: calc(var(--pfs) * 1.25); line-height: 1.05; letter-spacing: -.025em; }
.s-proc h2 .g { color: var(--ink-3); font-style: italic; }
.s-proc .wd { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(6px); }
.s-chip { display: inline-block; width: 1.05em; height: .82em; border-radius: .16em; vertical-align: -.08em; margin: 0 .14em; background: url(/assets/keys/youtube.jpg) center / 120% auto no-repeat, linear-gradient(180deg, var(--sky-1), var(--sky-2)); background-blend-mode: multiply; box-shadow: 0 .06em .18em rgba(20,40,70,.18); }
.s-proc p { margin: calc(var(--pfs) * .42) 0 0; font-size: max(14px, calc(var(--pfs) * .3)); color: var(--ink-2); opacity: 0; }
.s-proc .btn { margin-top: calc(var(--pfs) * .38); height: 42px; padding: 0 18px; opacity: 0; }

.s-cards { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.s-card { position: absolute; left: 0; top: 0; width: calc(var(--cw) * 1px); height: calc(var(--cw) * 1.32px); margin: calc(var(--cw) * -.66px) 0 0 calc(var(--cw) * -.5px); border-radius: calc(var(--cw) * .075px); overflow: hidden; will-change: transform, opacity; box-shadow: 0 calc(var(--cw) * .03px) calc(var(--cw) * .09px) rgba(20,40,70,.18), inset 0 0 0 1px rgba(255,255,255,.4); opacity: 0; }
.s-card svg { width: 100%; height: 100%; display: block; }

.s-sky { position: absolute; inset: 0; z-index: 6; overflow: hidden; clip-path: inset(28% 41.5% 52% 41.5% round 14px); visibility: hidden; }
.s-sky-plate { position: absolute; inset: -4%; background: linear-gradient(180deg, var(--sky-1) 0%, #cdeee5 32%, var(--sky-2) 58%, #fbfcfb 82%, var(--peach) 100%); }
.s-sky-cloud { position: absolute; inset: -10%; background: url(/img/texture.jpg) center / cover; mix-blend-mode: soft-light; opacity: .55; animation: drift 38s linear infinite alternate; }
@keyframes drift { to { transform: translateX(-6%) scale(1.08); } }
.s-phone { position: absolute; left: 50%; top: 51%; width: var(--phw); aspect-ratio: 9 / 19; margin-left: calc(var(--phw) / -2); transform: translateY(-50%); perspective: 900px; }
.s-phone-in { position: absolute; inset: 0; border-radius: 16% / 7.6%; background: #111; padding: 4.2%; box-shadow: 0 calc(var(--phw) * .14) calc(var(--phw) * .12) rgba(20,40,70,.2), 0 30px 60px -30px rgba(20,40,70,.4); transform-origin: 50% 50%; }
.s-scr { position: relative; height: 100%; border-radius: 13% / 6.2%; background: #fff; overflow: hidden; padding: 22% 9% 9%; display: flex; flex-direction: column; gap: 5%; font-size: calc(var(--phw) * .06); }
.s-scr::before { content: ""; position: absolute; top: 3.2%; left: 50%; width: 30%; height: 3.6%; margin-left: -15%; border-radius: 99px; background: #111; }
.s-scr .s-k { font-size: .62em; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.s-scr .s-t { font-family: var(--serif); font-size: 2.1em; line-height: .95; letter-spacing: -.02em; }
.s-scr .s-hc { flex: none; height: 30%; border-radius: 10px; background: url(/img/texture.jpg) center / cover; color: #fff; padding: 8%; display: flex; flex-direction: column; justify-content: flex-end; font-size: .9em; }
.s-scr .s-hc b { font-family: var(--serif); font-weight: 400; font-size: 1.9em; line-height: 1; }
.s-scr .s-r { display: flex; justify-content: space-between; padding-bottom: 4%; border-bottom: 1px solid var(--hair); font-size: .82em; }
.s-scr .s-tabs { margin-top: auto; display: flex; justify-content: space-around; font-size: .7em; padding: 4%; border-radius: 12px; background: var(--sky-3); }
.s-scr .s-tabs .s-on { font-weight: 600; }
.s-words { position: absolute; font-family: var(--serif); font-size: var(--sfs); line-height: 1.02; letter-spacing: -.025em; color: var(--ink); }
.s-words .g { color: #6b7d92; font-style: italic; }
.s-words .wd { display: inline-block; opacity: 0; transform: translateY(.3em); filter: blur(6px); }
.s-w1 { left: calc(var(--n) * 40px); top: calc(var(--n) * 104px); }
.s-w2 { right: calc(var(--n) * 40px); bottom: calc(var(--n) * 46px); text-align: right; }
.s-white { position: absolute; inset: 0; z-index: 8; background: #fff; opacity: 0; pointer-events: none; }

/* ══ MANIFESTO (light) ══ */
#manifesto { position: relative; height: 800vh; background: #fff; }
.m-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: linear-gradient(180deg, #fff, var(--sky-3) 50%, #fff); }
.m-track { position: absolute; left: 0; top: 50%; display: flex; align-items: center; gap: calc(var(--mfs) * .32); white-space: nowrap; font-family: var(--serif); font-size: var(--mfs); line-height: 1; letter-spacing: -.025em; color: var(--ink); will-change: transform; }
.m-track .g { color: var(--muted); font-style: italic; }
.m-w { display: inline-block; }
.m-w > span { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(14deg); transform-origin: 0 100%; }
.m-intro { position: relative; display: flex; flex-direction: column; gap: .26em; font-size: .72em; }
.m-row { display: flex; gap: .26em; }
.m-lab { position: absolute; font-family: var(--sans); font-size: .24em; letter-spacing: 0; padding: .3em .6em; border-radius: .3em; color: var(--ink); box-shadow: 0 .12em .3em rgba(20,40,70,.18); white-space: nowrap; }
.m-big { position: relative; display: inline-block; font-family: var(--sans); font-size: .42em; letter-spacing: -.01em; padding: .28em .62em .3em; border-radius: .3em; color: var(--ink); box-shadow: 0 .12em .3em rgba(20,40,70,.16); }
.m-big .dot { position: absolute; top: -.18em; right: -.18em; width: .36em; height: .36em; border-radius: 50%; background: var(--ink); }
.m-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .1em; }
.m-stack .m-big.small { font-size: .3em; }
.m-obj { flex: none; mix-blend-mode: multiply; }
.m-obj img { width: 100%; display: block; }
.m-pop { transform: scale(0); }
.m-spark { width: .34em; height: .34em; flex: none; }
.m-spacer { flex: none; width: 30vw; }

/* ══ SHELF ══ */
.shelf-sec { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: var(--paper); --H: min(42vh, 28vw); --cy: 54%; }
.shelf-sec::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--sky-2) 0%, rgba(230,246,241,0) 38%), linear-gradient(0deg, #fbefe6 0%, rgba(251,239,230,0) 30%); pointer-events: none; }
.grain { position: absolute; inset: 0; z-index: 40; pointer-events: none; opacity: .5; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .42 0 0 0 0 .38 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); }
.sh-top { position: absolute; z-index: 5; left: 0; right: 0; top: clamp(78px, 11vh, 110px); text-align: center; padding: 0 20px; }
.sh-top .label { margin-bottom: 10px; }
.sh-top h2 { font-size: clamp(36px, 4vw, 64px); }
.lbl { font: 600 10.5px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; }
.box { display: inline-flex; align-items: center; height: 23px; padding: 0 11px; border: 1px solid rgba(13,13,12,.9); color: var(--ink); background: none; cursor: pointer; white-space: nowrap; }
.sh-tabs { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); top: calc(var(--cy) - var(--H) / 2 - 76px); display: flex; }
.sh-tabs .box { position: relative; z-index: 1; margin-left: -1px; transition: color .45s var(--ease); }
.sh-tabs .box.on { color: #fff; }
.sh-ind { position: absolute; top: 0; left: 0; height: 23px; background: var(--blue); transition: transform .6s var(--ease), width .6s var(--ease); }
.sh-shelf { position: absolute; z-index: 3; left: 0; right: 0; top: calc(var(--cy) - var(--H) / 2 - 40px); height: calc(var(--H) + 80px); perspective: 2200px; perspective-origin: 50% 50%; touch-action: pan-y; }
.sh-stage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.tape { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.tape .f { position: absolute; top: calc(var(--Hp) * -.5px); height: calc(var(--Hp) * 1px); border-radius: 2px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.tape .f svg { width: 100%; height: 100%; display: block; }
.tape .f::after { content: ""; position: absolute; inset: 0; background: #0a1220; opacity: var(--shade, 0); pointer-events: none; }
.tape .sp { width: var(--ws); left: calc(var(--ws) / -2); transform: translateZ(calc(var(--d) / 2)); }
.tape .cv { width: var(--d); left: calc(var(--d) / -2); transform: rotateY(90deg) translateZ(calc(var(--ws) / 2)); box-shadow: 0 30px 60px -28px rgba(20,30,50,.5); }
.sh-play { position: absolute; z-index: 6; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; border: 1px solid var(--blue); background: rgba(246,248,250,.8); color: var(--blue); display: grid; place-items: center; cursor: pointer; transform: scale(0); padding: 0; }
.sh-play svg { width: 12px; height: 12px; margin-left: 2px; }
.sh-cap { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--cy) + var(--H) / 2 + 30px); display: flex; flex-direction: column; align-items: center; gap: 9px; pointer-events: none; }
.mask { position: relative; overflow: hidden; width: min(92vw, 760px); text-align: center; }
.mask > span { display: block; }
.mask > span + span { position: absolute; left: 0; right: 0; top: 0; }
.cap-t { font-family: var(--serif); font-size: 34px; line-height: 1.12; letter-spacing: -.01em; }
.cap-s { color: var(--blue); font-weight: 500; }
.cap-y { font: 500 11px/1.4 var(--sans); letter-spacing: .08em; color: var(--ink-2); }
.sh-arrow { position: absolute; z-index: 6; top: calc(var(--cy) + var(--H) / 2 + 36px); width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.sh-arrow svg { width: 18px; height: 10px; }
.sh-prev { left: 20px; } .sh-next { right: 20px; }
.sh-foot { position: absolute; z-index: 5; left: 32px; right: 32px; bottom: 24px; display: flex; justify-content: space-between; color: var(--ink-2); }
.sh-foot a { color: var(--ink); }

/* cursor */
.cur { position: fixed; left: 0; top: 0; z-index: 100; width: 58px; height: 58px; margin: -29px 0 0 -29px; pointer-events: none; display: none; }
.cur-r { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--ink); transition: transform .5s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease); }
.cur-d { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--ink); transition: transform .4s var(--ease); }
.cur-l { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 600 10px/1.25 var(--sans); letter-spacing: .1em; color: #fff; transform: scale(0); transition: transform .45s var(--ease); }
.cur.spine .cur-r { transform: scale(.72); }
.cur.btn .cur-r { transform: scale(.55); } .cur.btn .cur-d { transform: scale(0); }
.cur.open .cur-r { transform: scale(1.75); background: var(--blue); border-color: var(--blue); }
.cur.open .cur-d { transform: scale(0); } .cur.open .cur-l { transform: scale(1); }
@media (pointer: fine) { .cur.on { display: block; } .shelf-sec, .shelf-sec * { cursor: none !important; } }

/* detail sheet */
.detail { position: fixed; inset: 0; z-index: 60; background: var(--sheet); visibility: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; padding: 110px 6vw 56px 7vw; overflow: hidden; }
.detail .d-close { position: absolute; left: 32px; top: 31px; z-index: 2; }
.detail .d-logo { position: absolute; left: 0; right: 0; top: 0; height: 84px; display: grid; place-items: center; pointer-events: none; }
.detail .d-logo img { width: 34px; }
.d-l { align-self: center; max-width: 520px; display: flex; flex-direction: column; gap: 18px; }
.d-l .mask { width: auto; text-align: left; }
.d-l .mask > span { transform: translateY(110%); }
.d-sub { color: var(--blue); }
.d-title { font-family: var(--serif); font-size: clamp(48px, 5.6vw, 92px); line-height: 1; letter-spacing: -.025em; }
.d-meta { color: var(--muted); }
.d-syn { font-family: var(--serif); font-size: 20px; line-height: 1.45; max-width: 40ch; }
.d-cred { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); max-width: 46ch; }
.d-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.d-acts .box { height: 44px; padding: 0 20px; }
.d-acts .box.blue { border-color: var(--blue); color: #fff; background: var(--blue); }
.d-r { display: grid; place-items: center; min-height: 0; }
.d-r svg { height: min(100%, 78vh); aspect-ratio: 474 / 900; width: auto; }

@media (max-width: 767px) {
  .shelf-sec { --H: min(60vw, 38svh); --cy: 56%; }
  .sh-tabs { top: calc(var(--cy) - var(--H) / 2 - 62px); }
  .sh-tabs .box { padding: 0 7px; font-size: 9px; }
  .cap-t { font-size: 24px; }
  .sh-prev { left: 6px; } .sh-next { right: 6px; }
  .sh-foot { left: 16px; right: 16px; bottom: 18px; font-size: 9px; }
  .sh-top { top: 74px; } .sh-top h2 { font-size: 34px; }
  .detail { grid-template-columns: 1fr; padding: 84px 22px 40px; gap: 24px; overflow-y: auto; }
  .d-r { order: -1; } .d-r svg { height: 46svh; }
  .d-title { font-size: 42px; } .d-syn { font-size: 16px; }
  .detail .d-close { left: 16px; top: 21px; } .detail .d-logo { height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  #story { height: auto; } .s-stage { position: relative; }
  #manifesto { height: auto; } .m-stage { position: relative; height: auto; padding: 120px 0; } .m-track { position: relative; flex-wrap: wrap; white-space: normal; padding: 0 6vw; transform: none !important; }
  .m-w > span, .m-pop, .s-proc .wd, .s-words .wd { opacity: 1 !important; transform: none !important; filter: none !important; }
}
