/* The download page: a warm, filmic journal in front of four drawn scenes. */
body.home{background:#1c1519;overflow-x:hidden}
body.home .wrap{position:relative;z-index:1;max-width:1160px}

/* ---- the stage: scenes, the rewind ripple, light, grain, the photo-mode edge ---- */
.stage{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:#1c1519}
.scene{position:absolute;inset:0;background:center/cover no-repeat;opacity:0;transition:opacity 1s ease;will-change:opacity}
.scene video{display:block;width:100%;height:100%;object-fit:cover}
.scene.on{opacity:1}
.scene.leaving{opacity:0}
/* two rings of light that sweep out when the scene changes, like time folding back */
.ripple{position:absolute;left:50%;top:50%;width:150vmax;height:150vmax;margin:-75vmax 0 0 -75vmax;border-radius:50%;opacity:0;transform:scale(.05);
  background:radial-gradient(circle,transparent 50%,rgba(255,244,225,.22) 55%,rgba(180,205,255,.16) 58%,transparent 63%,transparent 70%,rgba(255,244,225,.10) 73%,transparent 77%)}
.ripple.go{animation:ripple 1.25s cubic-bezier(.2,.6,.2,1)}
@keyframes ripple{0%{opacity:1;transform:scale(.05)}70%{opacity:.8}100%{opacity:0;transform:scale(1)}}
.stage .tint{position:absolute;inset:0;background:
  radial-gradient(120% 90% at 50% 30%,rgba(20,14,22,0) 0%,rgba(20,14,22,.25) 60%,rgba(14,10,16,.75) 100%),
  linear-gradient(to bottom,rgba(20,14,22,.1),rgba(20,14,22,.35) 60%,rgba(14,10,16,.7))}
.stage .glow{position:absolute;left:0;top:0;width:640px;height:640px;margin:-320px 0 0 -320px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,214,150,.16) 0%,rgba(255,190,130,.06) 35%,rgba(255,190,130,0) 70%);opacity:0;transition:opacity .6s;will-change:transform}
body.pointer .stage .glow{opacity:1}
/* a soft, washed-out border, like a photo taken in the moment */
.stage .edge{position:absolute;inset:0;background:radial-gradient(140% 120% at 50% 50%,transparent 62%,rgba(255,240,222,.08) 100%)}

.ring{position:fixed;left:0;top:0;z-index:5;width:34px;height:34px;margin:-17px 0 0 -17px;border-radius:50%;border:1.5px solid rgba(255,248,235,.6);
  pointer-events:none;opacity:0;transition:width .25s,height .25s,margin .25s,background .25s,border-color .25s,opacity .3s;will-change:transform}
body.pointer .ring{opacity:1}
.ring.on{width:62px;height:62px;margin:-31px 0 0 -31px;background:rgba(242,193,78,.10);border-color:rgba(242,193,78,.8)}

/* ---- header ---- */
body.home header.top{padding:26px 0;position:relative;z-index:2}
body.home .logo{font-size:36px;text-shadow:0 2px 18px rgba(242,193,78,.35)}
body.home .lang{background:rgba(20,14,26,.55);border-color:rgba(243,239,230,.2)}

/* ---- the string of paper lanterns ---- */
.lights{position:relative;height:110px;margin:0 -40px}
.lights svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.lights path{fill:none;stroke:rgba(20,14,16,.75);stroke-width:1.6}
.lantern{position:absolute;width:30px;height:30px;margin-left:-15px;transform-origin:50% -18px;transform:rotate(var(--tilt,0deg))}
.lantern::before{content:"";position:absolute;left:50%;top:-18px;width:1px;height:18px;background:rgba(20,14,16,.75)}
.lantern i{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 38% 35%,#fffbe8 0%,#ffe3a6 45%,#f0aa58 100%);
  box-shadow:0 0 18px 6px rgba(255,200,125,.45)}
.lantern i::after{content:"";position:absolute;inset:0;border-radius:50%;background:repeating-linear-gradient(to bottom,transparent 0 4px,rgba(200,130,60,.25) 4px 5px)}

/* ---- hero ---- */
body.home .hero{position:relative;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:40px 56px;align-items:center;padding:0 0 70px;min-height:calc(100vh - 100px);align-content:start}
.hero > .lights{grid-column:1/-1;margin-bottom:-30px}
.hero-text{order:2}
.collage{order:3}
body.home .hero h1{font-size:clamp(38px,5.4vw,66px);line-height:1.18;margin:0 0 20px;text-shadow:0 4px 30px rgba(0,0,0,.45)}
.split .w{display:inline-block;opacity:0;transform:translateY(22px) rotate(2deg);animation:word .9s cubic-bezier(.2,.7,.2,1) forwards;animation-delay:calc(var(--i) * 90ms + 200ms)}
@keyframes word{to{opacity:1;transform:none}}
body.home .hero p.lead{color:#eee3d6;font-size:19px;text-shadow:0 1px 12px rgba(0,0,0,.5)}
.dl-row{display:flex;align-items:center;gap:22px;flex-wrap:wrap}
body.home .dl{position:relative;overflow:hidden;padding:16px 28px;border-radius:14px;box-shadow:0 8px 24px rgba(242,193,78,.28),inset 0 -2px 0 rgba(0,0,0,.15)}
body.home .dl .ic{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
body.home .dl::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.45) 50%,transparent 65%);transform:translateX(-120%);animation:shine 5s ease-in-out 2.4s infinite}
@keyframes shine{0%,70%{transform:translateX(-120%)}100%{transform:translateX(120%)}}
.magnet{transition:transform .35s cubic-bezier(.2,.7,.2,1)}
body.home .meta{color:#d2c6b9;margin-top:18px}

/* the collage of photos */
.collage{position:relative;min-height:430px}
.collage .p-main{position:relative;width:88%;margin-inline-start:4%;z-index:2}
.collage .p-side{position:absolute;width:42%;z-index:3}
.collage .p-a{inset-inline-end:-4%;top:-26px}
.collage .p-b{inset-inline-start:-6%;bottom:-36px}
.collage .p-side figcaption{font-size:15px}

/* ---- hand-drawn white hints, like the ones drawn over a game scene ---- */
.hint{display:flex;align-items:center;gap:6px;color:#fff;filter:drop-shadow(0 0 6px rgba(255,255,255,.35)) drop-shadow(0 1px 2px rgba(0,0,0,.5))}
.hint-dot{flex:none;width:46px;height:46px;border:2px solid #fff;border-radius:50%;display:grid;place-items:center}
.hint-dot svg{width:24px;height:24px;fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hint-line{flex:none;width:80px;height:34px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round}
html[dir=rtl] .hint-line{transform:scaleX(-1)}
.hint-label{font-size:20px;white-space:nowrap}
.hint-label .keys{font-family:'Tajawal',sans-serif;font-weight:700;font-size:17px;letter-spacing:.5px}
.hint-look{position:absolute;inset-inline-end:2%;bottom:-74px;z-index:4;transform:rotate(-3deg)}
.hint-keys{margin-top:18px}

/* handwritten notes, drawn arrows, underlined section names */
.note{position:relative;display:flex;align-items:center;gap:6px;color:#ffe3a8;font-size:20px;transform:rotate(-4deg)}
.note .arrow{width:74px;height:44px;flex:none;fill:none;stroke:#ffe3a8;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
html[dir=ltr] .note .arrow{transform:scaleX(-1)}
.draw{stroke-dasharray:200;stroke-dashoffset:200}
.in .draw{animation:draw 1.1s ease forwards .5s}
@keyframes draw{to{stroke-dashoffset:0}}
.kicker{display:inline-block;font-size:32px;font-weight:400;color:#ffe3a8;transform:rotate(-2deg);position:relative;text-shadow:0 2px 14px rgba(0,0,0,.45)}
.kicker::after{content:"";position:absolute;inset-inline:0;bottom:-6px;height:10px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 C 40 2, 80 9, 120 5 S 180 3, 198 6' fill='none' stroke='%23F2C14E' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;opacity:.85}

/* ---- polaroids ---- */
.polaroid{--r:0deg;--rx:0deg;--ry:0deg;--lift:0px;margin:0;background:#f4efe4;padding:10px 10px 40px;border-radius:2px;position:relative;
  box-shadow:0 14px 28px rgba(0,0,0,.42),0 2px 6px rgba(0,0,0,.25);
  transform:perspective(900px) rotate(var(--r)) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));transition:transform .5s cubic-bezier(.2,.7,.2,1)}
.polaroid img{display:block;width:100%;height:auto;aspect-ratio:auto;object-fit:cover}
.polaroid figcaption{position:absolute;inset-inline:12px;bottom:8px;color:#3b3140;font-size:17px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.polaroid .tape{position:absolute;top:-13px;left:50%;width:96px;height:28px;margin-left:-48px;background:rgba(255,236,190,.6);transform:rotate(-3deg);box-shadow:0 1px 3px rgba(0,0,0,.15);z-index:1}
.polaroid.hover{--lift:-8px;z-index:6}
.polaroid::after{content:"";position:absolute;inset:10px 10px 40px;pointer-events:none;opacity:0;transition:opacity .4s;
  background:radial-gradient(360px circle at var(--gx,50%) var(--gy,50%),rgba(255,240,210,.24),transparent 45%)}
.polaroid.hover::after{opacity:1}

/* ---- sections ---- */
body.home section.block{border-top:0;padding:90px 0 40px;content-visibility:auto;contain-intrinsic-size:auto 900px}
body.home section.block h2{margin:0 0 30px}

/* the notebook pages */
.pages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:34px 30px}
.page{--r:0deg;position:relative;padding:30px 26px 26px;color:#2b2530;border-radius:2px;
  background:linear-gradient(to left,transparent 0 calc(100% - 46px),rgba(214,90,90,.35) calc(100% - 46px) calc(100% - 44px),transparent calc(100% - 44px)),
    repeating-linear-gradient(to bottom,#f3ecdd 0 29px,#c9d6e6 29px 30px);
  background-position:0 0,0 14px;
  box-shadow:0 14px 26px rgba(0,0,0,.38);transform:rotate(var(--r));transition:transform .45s cubic-bezier(.2,.7,.2,1)}
html[dir=ltr] .page{background:linear-gradient(to right,transparent 0 44px,rgba(214,90,90,.35) 44px 46px,transparent 46px),repeating-linear-gradient(to bottom,#f3ecdd 0 29px,#c9d6e6 29px 30px);background-position:0 0,0 14px}
.page::before{content:"";position:absolute;inset-inline:0;top:-6px;height:10px;background:radial-gradient(circle at 6px 0,transparent 5px,#f3ecdd 5.5px) 0 0/14px 10px repeat-x}
.page .tape{position:absolute;top:-14px;inset-inline-start:18px;width:80px;height:26px;background:rgba(255,236,190,.65);transform:rotate(-4deg);box-shadow:0 1px 3px rgba(0,0,0,.15)}
.page b{display:block;font-size:24px;font-weight:400;color:#2f2a52;margin-bottom:6px;line-height:1.4}
.page p{margin:0;font-size:16px;line-height:30px;color:#3a3340}
.page:hover{transform:rotate(0) translateY(-6px)}

/* the photo wall */
.wall .lights{margin-bottom:6px}
.photos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:34px 28px;align-items:start}
.photos .w2{grid-column:span 2}
.photos .polaroid:nth-child(3n+2){margin-top:22px}
.photos img{aspect-ratio:16/10}
.photos .w2 img{aspect-ratio:16/9}

/* the comparison */
.vs{border-radius:16px;background:rgba(24,18,30,.82);border:1px solid rgba(243,239,230,.12);overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.35)}
.vs-row{display:grid;grid-template-columns:minmax(0,1.5fr) repeat(3,minmax(0,1fr));align-items:stretch;border-top:1px solid rgba(243,239,230,.07);transition:background .25s}
.vs-row:first-child{border-top:0}
.vs-row:not(.vs-head):hover{background:rgba(243,239,230,.04)}
.vs-row>span{padding:15px 18px;font-size:15px;color:#d8cdc0;display:flex;align-items:center;justify-content:center;text-align:center}
.vs-row>span:first-child{justify-content:flex-start;text-align:start;color:#f3efe6}
.vs-head>span{padding-block:18px 12px}
.vs-head b{font-size:16px;color:#f3efe6;font-weight:700}
.vs .us{background:rgba(242,193,78,.09);box-shadow:inset 1px 0 0 rgba(242,193,78,.28),inset -1px 0 0 rgba(242,193,78,.28)}
.vs-head .us{flex-direction:column}
.vs-head .us b{color:var(--lamp);font-size:19px}
.note-us{font-style:normal;color:#ffe3a8;font-size:15px;transform:rotate(-5deg);display:inline-block}
.vs .no{color:#a99d92;font-size:14px}
.vs .dim{color:#6f655f}
.vs i.ok,.vs i.nope{display:inline-block;width:22px;height:22px;background:center/contain no-repeat}
.vs i.ok{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CD39A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E")}
.vs .us i.ok{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2C14E' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E")}
.vs i.nope{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a99d92' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E")}
.vs-sum{margin:22px 0 6px;font-size:17px;color:#eee3d6;max-width:46em;text-shadow:0 1px 10px rgba(0,0,0,.5)}
.vs-fine{margin:0;font-size:13px;color:#a2978e}

/* install: steps and needs beside the drawn warning */
.install-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:40px;align-items:center;padding:30px;border-radius:16px;background:rgba(24,18,30,.72);border:1px solid rgba(243,239,230,.1)}
.install h2.need{margin-top:34px!important}
body.home ol.steps,body.home ul.req{color:#e0d5c8}
.ss-wrap{position:relative}
.hint-ss{position:absolute;inset-inline-start:-8px;bottom:-62px;transform:rotate(-2deg)}

/* the last call */
.final{display:flex;flex-direction:column;align-items:center;gap:20px;padding:110px 0 90px;text-align:center}
.final-note{font-size:clamp(34px,5vw,56px);color:#fff;margin:0;text-shadow:0 0 24px rgba(255,255,255,.25),0 2px 18px rgba(0,0,0,.5);transform:rotate(-2deg)}
body.home .dl.big{font-size:21px;padding:18px 36px}
body.home footer{border-top-color:rgba(243,239,230,.12);color:#b3a79c}

/* things appear as they come into view */
[data-reveal]{opacity:0;transform:translateY(26px);transition:opacity .9s ease,transform .9s cubic-bezier(.2,.7,.2,1)}
[data-reveal].in{opacity:1;transform:none}
.polaroid[data-reveal],.page[data-reveal]{transform:rotate(calc(var(--r) * 3)) translateY(40px) scale(.95)}
.polaroid[data-reveal].in{transform:perspective(900px) rotate(var(--r)) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift))}
.page[data-reveal].in{transform:rotate(var(--r))}
.page[data-reveal].in:hover{transform:rotate(0) translateY(-6px)}
.pages .page:nth-child(3n+2),.photos .polaroid:nth-child(4n+2){transition-delay:.08s}
.pages .page:nth-child(3n),.photos .polaroid:nth-child(4n+3){transition-delay:.16s}
.photos .polaroid:nth-child(4n){transition-delay:.24s}

@media (max-width:900px){
  body.home .hero{grid-template-columns:minmax(0,1fr);min-height:0;gap:70px}
  .hero-text{order:-1}
  .hero > .lights{order:-2}
  .collage{min-height:0;margin:20px 6px 60px}
  .pages{grid-template-columns:minmax(0,1fr)}
  .photos{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px 18px}
  .install-grid{grid-template-columns:minmax(0,1fr);padding:22px}
  .hint-ss{position:static;margin-top:16px}
  .lights{margin:0 -16px;height:80px}
  .stage .tint{background:linear-gradient(to bottom,rgba(20,14,22,.35),rgba(20,14,22,.55) 50%,rgba(14,10,16,.8))}
  .vs-row{grid-template-columns:repeat(3,minmax(0,1fr))}
  .vs-row>span:first-child{grid-column:1/-1;padding:14px 14px 2px;font-weight:500}
  .vs-head>span:first-child{display:none}
  .vs-row>span{padding:8px 8px 14px;font-size:13px}
  .vs-head>span{padding:14px 6px 10px}
  .vs-head b{font-size:14px}
  .vs .no{font-size:12.5px}
  .hint-look{bottom:-64px}
  .hint-label{font-size:17px}
}
@media (hover:none){.ring,.stage .glow,.hint-look{display:none}}
@media (max-width:600px){.collage .p-side figcaption{font-size:13px}}
@media (prefers-reduced-motion:reduce){
  .scene video{display:none}
  .scene,.scene.leaving{transition:opacity .01s}
  .ripple{display:none}
  .lantern,.lantern i{animation:none}
  body.home .dl::after{animation:none}
  .split .w{animation:none;opacity:1;transform:none}
  [data-reveal],.polaroid[data-reveal],.page[data-reveal]{opacity:1;transition:none}
  .polaroid[data-reveal],.page[data-reveal]{transform:rotate(var(--r))}
  .draw{stroke-dashoffset:0;animation:none!important}
  .ring,.stage .glow{display:none}
}

/* Light mode: picked automatically when the first seconds run slow (old or busy PCs, no graphics acceleration).
   Still pictures instead of videos, no ripple, no pointer light. */
body.lite .scene video{display:none}
body.lite .ripple,body.lite .stage .glow,body.lite .ring{display:none}
body.lite .dl::after{animation:none}
body.lite .polaroid,body.lite .page{box-shadow:0 6px 14px rgba(0,0,0,.4)}

/* ---- caught with laqta: frames from real clips, in straight rows of glass ---- */
.shot-wall .frames-note{max-width:62ch;margin:0 0 18px;color:rgba(255,244,230,.75)}
.frames{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.frames img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:10px;border:2px solid rgba(255,255,255,.14);
  box-shadow:0 10px 26px rgba(0,0,0,.45);transition:transform .25s,border-color .25s}
.frames img:hover{transform:translateY(-3px);border-color:rgba(242,193,78,.6)}
@media (max-width:800px){.frames{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (prefers-reduced-motion:reduce){.frames img{transition:none}.frames img:hover{transform:none}}
