/* SiNLESS7 V3.9 CINEMA LAYER: living universe, display type, motion direction. */
@font-face{font-family:'Archivo SiNLESS';src:url('assets/fonts/archivo-variable.woff2') format('woff2');font-weight:100 900;font-stretch:62% 125%;font-display:swap}
:root{--world:#5aa8ff;--world-2:#9fe6ff;--cine-ink:#03060b;--ease-out:cubic-bezier(.23,1,.32,1);--ease-expo:cubic-bezier(.16,1,.3,1);--display-x:'Archivo SiNLESS','Arial Narrow','Helvetica Neue',Arial,sans-serif}
html[data-world=devil]{--world:#3b6dff;--world-2:#c9d9ff}
html[data-world=productions]{--world:#ffb347;--world-2:#ff4f6d}
html[data-world=granada]{--world:#ff7a2f;--world-2:#ffd2a1}
html[data-world=music]{--world:#a37bff;--world-2:#2ff0a8}
html[data-world=games],html[data-world=play]{--world:#2ff08a;--world-2:#e9fff2}
html[data-world=technology]{--world:#24d6ff;--world-2:#d7f7ff}html[data-world=studio]{--world:#ffe066;--world-2:#ff7ad9}
html[data-world=partners]{--world:#7fb0ff;--world-2:#fff}
html[data-world=shop]{--world:#ffcf5a;--world-2:#ff8a3d}
html[data-world=membership]{--world:#c58bff;--world-2:#7fd9ff}
html[data-world=community]{--world:#ff6fb5;--world-2:#ffd1e8}
html[data-world=contact]{--world:#5ee2f4;--world-2:#fff}
html[data-world=privacy],html[data-world=terms]{--world:#8fb0cf;--world-2:#d9e4ee}

/* Living universe sits behind everything. */
html.has-universe,html.has-universe body{background:var(--cine-ink)}
#sinless-universe{position:fixed;inset:0;width:100vw;height:100vh;height:100lvh;z-index:0;pointer-events:none;transition:opacity .4s linear}
html.has-universe .preview-bar,html.has-universe main,html.has-universe footer{position:relative;z-index:1}
html.has-universe header{position:relative;z-index:20}
html.has-universe body.game-playing #sinless-universe{opacity:.25!important}

/* Browser surfaces carry the brand too. */
::selection{background:var(--world);color:#03060b}
html{scrollbar-color:color-mix(in srgb,var(--world) 55%,#1b2633) #05080d;accent-color:var(--world)}
input,textarea{caret-color:var(--world)}
:focus-visible{outline:2px solid var(--world);outline-offset:3px}

/* Page intros become cinematic title sequences over the universe. */
html.has-universe .page-intro{position:relative;background:transparent;min-height:min(70vh,660px);display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;isolation:isolate;overflow:hidden}
html.has-universe .page-intro::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(520px circle at var(--mx,70%) var(--my,30%),color-mix(in srgb,var(--world) 16%,transparent),transparent 70%),linear-gradient(180deg,transparent 35%,rgba(3,6,11,.72) 100%)}
.page-intro h1{font-family:var(--display-x);font-stretch:72%;font-weight:820;letter-spacing:-.025em;line-height:.9;font-size:clamp(3rem,8.2vw,6rem);text-wrap:balance;max-width:16ch}
.page-intro .lead{max-width:60ch;color:#d3dee8;text-wrap:pretty}
.page-intro .status{border-color:color-mix(in srgb,var(--world) 70%,transparent);color:var(--world-2)}
.page-intro .breadcrumb a:hover{color:var(--world)}
.section h2,.section h3,.granada-cameo h2{font-family:var(--display-x);font-stretch:80%;letter-spacing:-.015em;text-wrap:balance}
header nav a[aria-current=page]{color:var(--world-2)}
header nav a[aria-current=page]::after{background:var(--world)}

/* Word-by-word headline reveal. */
.page-intro h1 .w,.section h2 .w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.06em;margin-bottom:-.06em}
.page-intro h1 .w>span,.section h2 .w>span{display:inline-block}
html[data-motion=on] .world-enter .page-intro h1 .w>span{animation:word-rise 1s var(--ease-expo) both;animation-delay:calc(180ms + var(--wi,0) * 70ms)}
html[data-motion=on] .world-enter .page-intro .lead,html[data-motion=on] .world-enter .page-intro .status,html[data-motion=on] .world-enter .page-intro .breadcrumb{animation:fade-up .9s var(--ease-out) both;animation-delay:.5s}
html[data-motion=on] .section h2.is-in .w>span,html[data-motion=on] .is-in .section h2 .w>span,html[data-motion=on] .section.is-in h2 .w>span{animation:word-rise .9s var(--ease-expo) both;animation-delay:calc(var(--wi,0) * 55ms)}
@keyframes word-rise{from{transform:translateY(105%) rotate(4deg);opacity:0}to{transform:none;opacity:1}}
@keyframes fade-up{from{opacity:0;transform:translateY(16px);filter:blur(4px)}to{opacity:1;transform:none;filter:none}}

/* Scroll reveals. Visible by default; only hidden-then-revealed when motion is on. */
html[data-motion=on] .reveal{opacity:0;transform:translateY(34px) scale(.985);filter:blur(6px);transition:opacity .9s var(--ease-out),transform 1s var(--ease-expo),filter .9s var(--ease-out);transition-delay:calc(var(--ri,0) * 60ms)}
html[data-motion=on] .reveal.is-in{opacity:1;transform:none;filter:none}
html[data-motion=on] main.world-enter{animation:world-in .7s var(--ease-out) both}
@keyframes world-in{from{opacity:0;transform:scale(.99);filter:blur(8px)}to{opacity:1;transform:none;filter:none}}

/* 3D card tilt on fine pointers. */
@media (hover:hover) and (pointer:fine){
 html[data-motion=on] .tilt{transform:perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .35s var(--ease-out),border-color .3s,box-shadow .35s var(--ease-out);transform-style:preserve-3d;will-change:transform}
 html[data-motion=on] .tilt.reveal.is-in{transform:perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))}
 .tilt:hover{border-color:color-mix(in srgb,var(--world) 65%,transparent);box-shadow:0 24px 60px -24px color-mix(in srgb,var(--world) 45%,transparent)}
}

/* World arrival title card. */
.warp-card{position:fixed;inset:0;z-index:40;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:22px;padding:0 6vw;pointer-events:none;opacity:0}
.warp-card b{font-family:var(--display-x);font-stretch:125%;font-weight:300;letter-spacing:.42em;font-size:clamp(.9rem,2.2vw,1.5rem);color:#fff;white-space:nowrap;text-shadow:0 0 24px var(--world)}
.warp-line{height:1px;background:linear-gradient(90deg,transparent,var(--world),transparent);transform:scaleX(0)}
.warp-card.show{animation:warp-card 1.45s var(--ease-out) both}
.warp-card.show .warp-line{animation:warp-line 1.45s var(--ease-expo) both}
@keyframes warp-card{0%{opacity:0;letter-spacing:.9em}18%{opacity:1}70%{opacity:1}100%{opacity:0}}
@keyframes warp-line{0%{transform:scaleX(0)}45%{transform:scaleX(1)}100%{transform:scaleX(1);opacity:0}}

.scroll-progress{position:fixed;left:0;top:0;height:2px;width:100%;z-index:60;pointer-events:none;background:var(--world);transform-origin:0 50%;transform:scaleX(var(--p,0));opacity:.85}
.motion-hint{margin-left:.4em;color:#a9b8c6;font-size:.85em}

@media (max-width:760px){
 html.has-universe .page-intro{min-height:58vh;min-height:58svh}
 .page-intro h1{font-size:clamp(2.6rem,12.5vw,4.2rem);max-width:none}
 .warp-card{gap:12px}
}
@media (prefers-reduced-motion:reduce){.warp-card{display:none}.reveal{opacity:1!important;transform:none!important;filter:none!important}}
/* Football full screen: the shell becomes the whole screen; Esc returns to the site. */
.football-frame-shell:fullscreen{border-radius:0;border:0;display:flex;flex-direction:column;background:#05080a}
.football-frame-shell:fullscreen iframe{flex:1;width:100%;height:100%;min-height:0}
.football-fs-hint{margin:.6rem 0 0;color:#9fd9bd;font-size:.85rem}
body.saving-game{cursor:progress}
.football-fs-exit{display:none}
.football-frame-shell:fullscreen .football-fs-exit{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;margin-right:auto;background:#d4f0ff;color:#04110b;border:0;border-radius:6px;font:700 .8rem/1 var(--display-x);letter-spacing:.08em;cursor:pointer}
.football-frame-shell:fullscreen .football-frame-note{display:flex;align-items:center;gap:16px;padding:8px max(12px,env(safe-area-inset-left))}
/* Live audio visualiser in the Music Desk artwork. */
.music-deck-art.has-viz{position:relative;overflow:hidden}
.music-viz{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;mix-blend-mode:screen}
/* DEViL chapter: embers rise behind the approved artwork. Keeps its lighter headline weight. */
html.has-universe .creator-chapter{background:radial-gradient(60% 80% at 75% 45%,rgba(31,92,255,.16),transparent 70%)}
.creator-chapter h1{font-family:var(--display-x);font-stretch:78%}
html[data-motion=on] .world-enter .creator-chapter h1 .w>span{animation:word-rise 1s var(--ease-expo) both;animation-delay:calc(180ms + var(--wi,0) * 80ms)}
.creator-chapter h1 .w{display:inline-block;overflow:hidden;vertical-align:top;padding-bottom:.06em;margin-bottom:-.06em}.creator-chapter h1 .w>span{display:inline-block}
/* Legibility over the universe. */
.page-intro .lead,.page-intro .breadcrumb{text-shadow:0 1px 14px #03060b,0 0 2px #03060b}
@media (max-width:760px){html.has-universe .page-intro::before{background:linear-gradient(180deg,rgba(3,6,11,.05) 0%,rgba(3,6,11,.5) 40%,rgba(3,6,11,.92) 100%)}}
@media (max-width:760px){html.has-universe .creator-chapter{background:linear-gradient(180deg,rgba(3,6,11,.25),rgba(3,6,11,.82) 45%,rgba(3,6,11,.9))}.creator-chapter p{text-shadow:0 1px 12px #03060b}}

/* ---------- V4.0 Mini Granada bot ---------- */
.mascot-slot{position:absolute;right:4%;top:50%;width:min(40vw,460px);aspect-ratio:1;transform:translateY(-46%);pointer-events:none}
.creator-chapter{position:relative}
.mascot-slot.small{top:6%;bottom:auto;right:1%;width:min(18vw,230px);transform:none}
#sinless-mascot{position:fixed;left:0;top:0;width:var(--size,460px);height:var(--size,460px);z-index:30;pointer-events:none;transform-origin:50% 50%;transform:translate(var(--tx,-999px),var(--ty,0)) scale(var(--sc,.3));will-change:transform;filter:drop-shadow(0 18px 30px rgba(0,0,0,.45))}
#sinless-mascot.off{display:none}
#sinless-mascot-hit{position:fixed;left:0;top:0;width:var(--hs,80px);height:var(--hs,80px);transform:translate(var(--hx,-999px),var(--hy,0));z-index:31;border:0;border-radius:50%;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent}
#sinless-mascot-hit:focus-visible{outline:2px solid var(--world);outline-offset:4px}
#sinless-mascot-bubble{position:fixed;left:0;top:0;z-index:32;margin:0;max-width:min(260px,58vw);padding:10px 14px;border-radius:16px 16px 16px 4px;background:#f4f1ea;color:#0b0e13;font:600 .88rem/1.35 var(--display-x);font-stretch:95%;box-shadow:0 12px 30px rgba(0,0,0,.4);transform:translate(var(--bx,-999px),var(--by,0)) translate(-20%,-100%) scale(.6);opacity:0;pointer-events:none;transition:opacity .25s var(--ease-out),transform .35s var(--ease-expo)}
#sinless-mascot-bubble.show{opacity:1;transform:translate(var(--bx,-999px),var(--by,0)) translate(-20%,-100%) scale(1)}
body.game-playing #sinless-mascot,body.game-playing #sinless-mascot-hit{display:none}

/* ---------- Cinematic grade: black and white while travelling, colour blooms on arrival ---------- */
html.grade-bw main,html.grade-bw #sinless-universe,html.grade-bw header{filter:grayscale(1) brightness(.62) contrast(1.25);transition:filter .22s linear}
html.grade-bloom main,html.grade-bloom #sinless-universe,html.grade-bloom header{transition:filter 1.2s var(--ease-out)}
main,#sinless-universe,header{transition:filter 1.2s var(--ease-out)}
html.grade-bw #sinless-mascot{filter:grayscale(.85) contrast(1.3) drop-shadow(0 18px 30px rgba(0,0,0,.45))}
.light-sweep{position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.10) 45%,rgba(255,255,255,.22) 50%,rgba(255,255,255,.08) 55%,transparent 65%);background-size:250% 100%;background-position:120% 0;mix-blend-mode:overlay;opacity:0}
html[data-motion=on] .world-enter .light-sweep{animation:light-sweep 1.6s var(--ease-out) 1.25s both}
@keyframes light-sweep{0%{opacity:1;background-position:120% 0}100%{opacity:0;background-position:-40% 0}}
/* Horror world: the page lights flicker now and then. */
html[data-motion=on][data-world=devil] .creator-chapter{animation:horror-flicker 9s steps(1) infinite}
@keyframes horror-flicker{0%,93%,100%{filter:none}94%{filter:brightness(.35)}95%{filter:none}96.5%{filter:brightness(.5) grayscale(1)}97%{filter:none}}
@media (max-width:760px){
 .mascot-slot{top:12px;right:8px;width:44vw;transform:none}
 html.has-universe .page-intro{padding-top:max(46vw,180px)}
 .mascot-slot.small{width:34vw;bottom:auto;top:12px}
 #sinless-mascot{filter:drop-shadow(0 10px 18px rgba(0,0,0,.45))}
}
@media (prefers-reduced-motion:reduce){html.grade-bw main,html.grade-bw #sinless-universe,html.grade-bw header{filter:none}}
/* V6.2 (founder corrections §6): one floating robot control. The bottom-left "Meet SiNLESS7" duplicate is
   retired; the robot stays reachable from the floating "Talk to our bot" button, the preview bar and the footer. */
#studio-bot-open{display:none!important}
/* V6.2: footer About block */
.footer-about{max-width:420px}.footer-about h2{margin:0 0 8px;font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:#8dc9ed}.footer-about p{margin:0 0 10px;font-size:14px;line-height:1.5;color:#c3d3df}.footer-about .text-link{margin-right:14px}
/* V6.3 mobile polish (founder corrections §6) */
@media(max-width:760px){
 /* The mascot's speech bubbles no longer cover text on phones: it speaks only when tapped. */
 #sinless-mascot-bubble:not(.asked){display:none!important}
 /* Slimmer private-preview bar: one line, smaller robot shortcut. */
 .preview-bar{padding:6px 14px;gap:10px;align-items:center}
 .preview-bar span{font-size:8px;line-height:1.3;letter-spacing:.1em}
 .preview-bar button{flex:none;min-height:36px;padding:6px 10px;font-size:8px;letter-spacing:.08em}
}
@media(max-width:760px) and (orientation:landscape){
 /* Landscape phones: keep the floating controls out of the short viewport's way. */
 #concierge-open{transform:scale(.85);transform-origin:100% 100%}
 #sinless-mascot,#sinless-mascot-hit{opacity:.85}
}
@media(max-height:480px) and (orientation:landscape){
 /* Short landscape screens (phones turned sideways): the bot button shrinks to a small round icon. */
 #concierge-open{width:48px;min-width:48px;height:48px;min-height:48px;padding:0;justify-content:center;border-radius:50%;right:10px;bottom:10px;gap:0;font-size:0}
 #concierge-open small,#concierge-open::after{display:none}
 #concierge-open .concierge-mark{font-size:20px}
}
/* V6.4: ten Granada paint colours with a colour dot on each choice */
.swatch{display:inline-flex;align-items:center;gap:8px}
.swatch-dot{width:16px;height:16px;border-radius:50%;background:var(--sw,#888);box-shadow:inset 0 0 0 1px #ffffff55,0 0 0 1px #0008;flex:none}
/* V6.4 (review): short landscape phones get the same quiet mascot and a slimmer header band */
@media(max-height:480px) and (orientation:landscape){#sinless-mascot-bubble:not(.asked){display:none!important}.preview-bar{padding:4px 14px}.preview-bar span{font-size:8px}.preview-bar button{min-height:32px;padding:4px 10px;font-size:8px}}
