/* XIVOLTE home page. The fonts are the site's own copies. */
@font-face { font-family: "Nunito"; src: url("assets/nunito.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Michroma"; src: url("assets/michroma.woff2") format("woff2"); font-weight: 400; font-display: swap; }
/* anything marked hidden (the full-screen viewer until a wallpaper is opened) stays hidden, whatever its layout says */
[hidden] { display: none !important; }
/* Layout: lit phones in a dark room. A sticky stage the scroll drives through every world (one per category),
   then a 3D ring of live wallpapers you spin, then the call to get the app. Single dark look by design. */
:root {
  --night: #050913;
  --slate: #0d1524;
  --edge: #1e2a42;
  --electric: #2f8cff;
  --icy: #e3f2ff;
  --muted: #97a4be;
  --glow: 47, 140, 255;          /* the current world's light, as r,g,b (set by script) */
  --display: "Michroma", "Eurostile", "Arial Black", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
html { background: var(--night); }
body { margin: 0; background: var(--night); color: var(--icy); font-family: var(--body); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--electric); outline-offset: 3px; border-radius: 8px; }
.gut { padding-left: var(--gut-l); padding-right: var(--gut-r); }

/* ---------- top bar ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 14px); padding-bottom: 14px; padding-left: var(--gut-l); padding-right: var(--gut-r);
  background: linear-gradient(rgba(5, 9, 19, 0.85), rgba(5, 9, 19, 0)); pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 26px; height: 32px; }
.brand span { font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.08em; }
.chip { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--edge); border-radius: 999px; padding: 3px 9px; }
.get { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--electric); color: #fff; font-weight: 800; font-size: 0.86rem; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(47, 140, 255, 0.6), 0 0 22px rgba(47, 140, 255, 0.45); }
.get:hover { background: #4a9dff; }

/* ---------- the story stage ---------- */
.story { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.amb { position: absolute; inset: -18%; background-size: cover; background-position: center; filter: blur(70px) saturate(1.5) brightness(0.55); opacity: 0; transition: opacity 1.1s ease; }
.amb.on { opacity: 1; }
.vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 60% 50%, transparent 30%, rgba(5, 9, 19, 0.75) 75%, var(--night) 100%); }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
/* the side margin grows with the screen, up to 64px; the box counts its own margins, so it never runs wider than the screen */
.stage-grid { position: relative; z-index: 2; box-sizing: border-box; width: 100%; max-width: 1648px; padding-inline: max(var(--gut-l), clamp(16px, 4vw, 64px)); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(24px, 4vw, 72px); padding-block: 136px 56px; }
.copy { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 660px; container-type: inline-size; }
/* the app's name, as big as the column allows; its X takes the current world's colour */
.mark { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 13.6cqi, 9rem); line-height: 0.95; letter-spacing: 0.01em; margin: 0; white-space: nowrap; color: var(--icy);
  text-shadow: 0 0 46px rgba(var(--glow), 0.22); }
.mark .x { color: rgb(var(--glow)); text-shadow: 0 0 10px rgba(var(--glow), 0.95), 0 0 38px rgba(var(--glow), 0.6); transition: color 0.8s, text-shadow 0.8s; }
.tag { margin: 0 0 18px; color: var(--muted); font-weight: 800; letter-spacing: 0.34em; text-transform: uppercase; font-size: clamp(0.68rem, 1.9cqi, 1rem); }
.kicker { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: rgb(var(--glow)); transition: color 0.8s; }
.kicker b { color: var(--icy); font-weight: 800; }
.world { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 7.2cqi, 4rem); line-height: 1.02; letter-spacing: 0.02em; margin: 0; white-space: nowrap;
  text-shadow: 0 0 34px rgba(var(--glow), 0.55); }
.line { font-size: clamp(1.05rem, 1.8vw, 1.35rem); color: var(--icy); margin: 0; max-width: 32ch; }
.now { font-size: 0.92rem; color: var(--muted); margin: 0; }
.now b { color: var(--icy); }
.open { justify-self: start; display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 800;
  border: 1px solid rgba(var(--glow), 0.6); color: #fff; background: rgba(var(--glow), 0.12); transition: background 0.3s, border-color 0.8s; }
.open:hover { background: rgba(var(--glow), 0.28); }
.hint { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; margin-top: 12px; }
.hint i { width: 18px; height: 28px; border: 2px solid var(--muted); border-radius: 10px; position: relative; }
.hint i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: var(--icy); animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(9px); opacity: 0; } 100% { opacity: 0; } }

/* the world bar: every world on a sliding dial across the top. The current one sits in the middle,
   glows and fills as you scroll; the others fade towards the edges. */
.worlds { position: absolute; z-index: 4; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 82px); overflow: clip;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent); mask-image: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent); }
.worlds .track { display: flex; gap: clamp(22px, 3vw, 52px); width: max-content; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.worlds button { position: relative; flex: none; white-space: nowrap; background: none; border: 0; padding: 10px 2px 14px; cursor: pointer; color: rgba(227, 242, 255, 0.42);
  font-family: var(--display); font-size: clamp(0.62rem, 0.9vw, 0.82rem); letter-spacing: 0.22em; text-transform: uppercase; transition: color 0.4s, text-shadow 0.4s; }
.worlds button:hover { color: rgba(227, 242, 255, 0.8); }
.worlds button::before { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px; background: rgba(227, 242, 255, 0.10); }
.worlds button::after { content: ""; position: absolute; left: 0; bottom: 4px; height: 2px; border-radius: 2px; width: calc(var(--fill, 0) * 100%); background: rgb(var(--c)); box-shadow: 0 0 10px rgba(var(--c), 0.9); }
.worlds button.done::after { width: 100%; opacity: 0.35; box-shadow: none; }
.worlds button.on { color: #fff; text-shadow: 0 0 18px rgba(var(--c), 0.85); }
.dots { position: absolute; right: var(--gut-r); top: 50%; transform: translateY(-50%); z-index: 4; display: grid; gap: 12px; }
.dots button { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--muted); background: transparent; padding: 0; cursor: pointer; transition: background 0.3s, transform 0.3s, border-color 0.3s; }
.dots button.on { background: rgb(var(--glow)); border-color: rgb(var(--glow)); transform: scale(1.35); box-shadow: 0 0 12px rgba(var(--glow), 0.9); }

/* three solid phones on a turntable: point at one (or tap it) and it turns to the front.
   The front phone takes the S23 Ultra's squarer shape, the side ones the curved-edge look.
   Thickness comes from stacked metal slices, so the sides show as they turn. */
.phone-wrap { --pw: clamp(150px, min(17.5vw, 31vh), 330px); position: relative; width: calc(var(--pw) * 2.6); max-width: 100%; height: calc(var(--pw) * 2.2); perspective: 1500px; }
.spill { position: absolute; left: -20%; right: -20%; top: 6%; bottom: 6%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(var(--glow), 0.24), transparent 66%); filter: blur(24px); transition: background 0.9s; }
.float { position: absolute; inset: 0; transform-style: preserve-3d; animation: float 6s ease-in-out infinite; pointer-events: none; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.trio { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(4deg); pointer-events: none; }
.ground { position: absolute; left: 14%; right: 14%; bottom: -6%; height: 9%; background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.75), transparent 70%); filter: blur(8px); pointer-events: none; }
.ph { position: absolute; left: 50%; top: 50%; width: var(--pw); height: calc(var(--pw) * 2.15); margin-left: calc(var(--pw) / -2); margin-top: calc(var(--pw) * -1.075);
  transform-style: preserve-3d; cursor: pointer; pointer-events: auto; --rad: 20px; --srad: 14px; --bez: 6px; --d: 26px; }
.slab { position: absolute; inset: 0; border-radius: var(--rad); pointer-events: none;
  background: linear-gradient(90deg, #3a4150, #b8c0d2 2.5%, #5b6375 7%, #2a303d 22%, #20252f 50%, #2a303d 78%, #5b6375 93%, #b8c0d2 97.5%, #3a4150); }
.back { position: absolute; inset: 0; border-radius: var(--rad); background: linear-gradient(160deg, #262c3b, #0c0f16 55%, #191e2a); transform: translateZ(calc(var(--d) * -1)) rotateY(180deg); }
.back::before { content: ""; position: absolute; left: 9%; top: 4%; width: 18%; height: 23%; border-radius: 30%;
  background: radial-gradient(circle at 50% 18%, #05070c 0 20%, transparent 21%), radial-gradient(circle at 50% 50%, #05070c 0 20%, transparent 21%), radial-gradient(circle at 50% 82%, #05070c 0 20%, transparent 21%); }
.key { position: absolute; left: calc(100% + 0.5px); width: calc(var(--d) * 0.8); top: 20%; height: 12%; transform-origin: left center; transform: rotateY(90deg) translateX(calc(var(--d) * 0.1));
  background: linear-gradient(#7a8298, #2c3240); border-radius: 2px; pointer-events: none; }
.key.pow { top: 35%; height: 6%; }
.face { position: absolute; inset: 0; border-radius: var(--rad); padding: var(--bez); background: #05070b; transform: translateZ(0.6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.face .screen { border-radius: var(--srad); }
.curve { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: var(--curve, 0);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.65), rgba(255, 255, 255, 0.2) 2.6%, rgba(255, 255, 255, 0) 8.5%, rgba(255, 255, 255, 0) 91.5%, rgba(255, 255, 255, 0.2) 97.4%, rgba(0, 0, 0, 0.65)); }
.sheen { position: absolute; inset: -10% -60%; z-index: 7; pointer-events: none; mix-blend-mode: screen; transform: translateX(var(--sh, 0%));
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.13) 46%, rgba(255, 255, 255, 0.04) 51%, transparent 58%); }
.dev { position: relative; box-shadow: 0 28px 50px rgba(0, 0, 0, 0.55), 0 8px 18px rgba(0, 0, 0, 0.45);
  background: linear-gradient(150deg, #4a5163 0%, #171c27 14%, #0b0e15 50%, #161b26 86%, #3d4455 100%); }
.dev::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #000; }
.layer { position: absolute; inset: 0; opacity: 0; }
.layer.on { opacity: 1; z-index: 2; }
.layer.out { opacity: 1; z-index: 1; }
.layer video, .layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.layer .wait { opacity: 0; }
/* the phone swinging round behind the others goes into shadow. (Fading the whole phone instead would
   flatten it: a see-through 3D object is drawn as a flat picture, which is what made it look like a card.) */
.shade { position: absolute; inset: 0; z-index: 8; background: #000; opacity: var(--shade, 0); pointer-events: none; }
.layer.still img, .stills .layer img { animation: kenburns 14s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.14) translate(-2%, -3%); } }
.notch { position: absolute; top: 2.4%; left: 50%; width: 4.4%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: #05070c; z-index: 5; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.06); }
.clock { position: absolute; top: 16%; left: 0; right: 0; text-align: center; z-index: 4; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5); pointer-events: none; opacity: var(--front, 0); }
.clock b { display: block; font-family: var(--display); font-size: calc(var(--pw) * 0.15); font-weight: 400; letter-spacing: 0.04em; }
.clock small { font-size: calc(var(--pw) * 0.045); font-weight: 700; opacity: 0.9; }
.scan { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 255, 240, 0.16) 0 2px, transparent 2px 6px); mix-blend-mode: screen; }

/* ways a new world arrives */
.in-dissolve { animation: dissolve 0.95s ease both; }
@keyframes dissolve { from { opacity: 0; transform: scale(1.08); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.in-glitch { animation: glitch 0.7s steps(1, end) both; }
@keyframes glitch {
  0% { opacity: 1; clip-path: inset(42% 0 48% 0); transform: translateX(-14px); filter: hue-rotate(90deg) saturate(2); }
  12% { clip-path: inset(8% 0 74% 0); transform: translateX(12px); }
  24% { clip-path: inset(62% 0 18% 0); transform: translateX(-9px); filter: hue-rotate(-60deg) saturate(2); }
  36% { clip-path: inset(0 0 82% 0); transform: translateX(7px); }
  48% { clip-path: inset(24% 0 34% 0); transform: translateX(-5px); filter: none; }
  62% { clip-path: inset(0 0 0 0); transform: translateX(4px); }
  78% { transform: translateX(-2px); }
  100% { clip-path: inset(0 0 0 0); transform: none; opacity: 1; filter: none; }
}
.scan.flash { animation: scanflash 0.7s linear both; }
@keyframes scanflash { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.in-radial { animation: radial 1.15s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes radial { from { clip-path: circle(0% at 50% 55%); filter: brightness(2.2) sepia(0.6); } 60% { filter: brightness(1.3) sepia(0.2); } to { clip-path: circle(140% at 50% 55%); filter: none; } }
.in-warp { animation: warp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes warp { from { opacity: 0.2; transform: scale(1.45); filter: blur(12px) brightness(1.8); } to { opacity: 1; transform: none; filter: none; } }
.in-wipe { animation: wipe 1s cubic-bezier(0.6, 0, 0.2, 1) both; }
@keyframes wipe { from { clip-path: polygon(0 0, 0 0, 0 0, 0 0); filter: saturate(2) brightness(1.3); } to { clip-path: polygon(0 0, 220% 0, 0 220%, 0 0); filter: none; } }
.in-slide { animation: slide 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes slide { from { opacity: 0; transform: translateX(55%) skewX(-10deg); filter: blur(10px) brightness(1.4); } to { opacity: 1; transform: none; filter: none; } }
.in-pop { animation: pop 0.8s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.55); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }
.in-night { animation: night 1.4s ease both; }
@keyframes night { from { opacity: 0; filter: brightness(0); } 45% { opacity: 1; filter: brightness(0.2); } to { opacity: 1; filter: none; } }
.in-slash { animation: slash 0.8s cubic-bezier(0.7, 0, 0.2, 1) both; }
@keyframes slash { from { clip-path: polygon(100% 0, 100% 0, 0 100%, 0 100%); filter: brightness(2.4); } 55% { filter: brightness(1.3); }
  to { clip-path: polygon(0 -100%, 200% 100%, 100% 200%, -100% 0); filter: none; } }
.swap-out { animation: swapout 0.45s ease both; }
@keyframes swapout { to { opacity: 0; transform: translateY(-18px); filter: blur(4px); } }
.swap-in { animation: swapin 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes swapin { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- the ring ---------- */
.ring-sec { position: relative; padding-block: 90px 40px; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(47, 140, 255, 0.13), transparent 60%); }
.ring-head { max-width: 1180px; margin: 0 auto; display: grid; gap: 8px; text-align: center; justify-items: center; }
.ring-head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 4vw, 2.6rem); margin: 0; letter-spacing: 0.02em; text-wrap: balance; }
.ring-head p { margin: 0; color: var(--muted); max-width: 46ch; }
.ring-view { --item: clamp(120px, 12.5vw, 260px); position: relative; height: calc(var(--item) * 2.55); margin-top: 26px; perspective: 2200px; touch-action: pan-y; cursor: grab; user-select: none; }
.ring-view.dragging { cursor: grabbing; }
.ring { position: absolute; left: 50%; top: 50%; width: var(--item); height: calc(var(--item) * 2.1667); margin-left: calc(var(--item) / -2); margin-top: calc(var(--item) * -1.0833); transform-style: preserve-3d; }
.ri { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; border: 3px solid #10141d; background: #000; padding: 0; cursor: pointer; transition: box-shadow 0.4s; box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5); }
.ri video, .ri img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ri.front { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28), 0 24px 48px rgba(0, 0, 0, 0.6); }
.live { position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: rgba(5, 9, 19, 0.75); font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; color: var(--icy); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ff5a6e; box-shadow: 0 0 6px #ff5a6e; }
.ring-ctl { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.ring-ctl button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--edge); background: var(--slate); color: var(--icy); font-size: 1.3rem; cursor: pointer; }
.ring-ctl button:hover { border-color: var(--electric); }

/* ---------- open one wallpaper ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(3, 6, 14, 0.82); backdrop-filter: blur(14px);
  padding-top: calc(env(safe-area-inset-top, 0px) + 20px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); padding-left: var(--gut-l); padding-right: var(--gut-r); }
.viewer-in { display: flex; align-items: center; gap: clamp(20px, 5vw, 64px); flex-wrap: wrap; justify-content: center; max-width: 980px; }
.big { --pw: calc(min(76svh, 640px) * 0.466); height: min(76svh, 640px); aspect-ratio: 1440 / 3088; max-width: 100%; border-radius: calc(var(--pw) * 0.075); padding: calc(var(--pw) * 0.024); }
.big .screen { border-radius: calc(var(--pw) * 0.052); }
.big video, .big img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vinfo { display: grid; gap: 10px; max-width: 320px; min-width: 0; }
.vinfo h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 0; line-height: 1.2; text-wrap: balance; }
.vinfo p { margin: 0; color: var(--muted); }
.vbtns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.close { padding: 12px 18px; border-radius: 999px; border: 1px solid var(--edge); background: var(--slate); color: var(--icy); font-weight: 800; cursor: pointer; }
@media (max-width: 760px) {
  .viewer-in { flex-direction: column; gap: 16px; }
  .big { --pw: calc(min(62svh, 540px) * 0.466); height: min(62svh, 540px); }
  .vinfo { text-align: center; justify-items: center; }
}

/* ---------- closing ---------- */
.end { text-align: center; padding-block: 90px 70px; display: grid; justify-items: center; gap: 16px; }
.end h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 5.4vw, 3.6rem); margin: 0; line-height: 1.1; text-wrap: balance; }
.lit { color: var(--electric); text-shadow: 0 0 8px rgba(47, 140, 255, 0.9), 0 0 30px rgba(47, 140, 255, 0.7); }
.end p { margin: 0; color: var(--muted); max-width: 48ch; }
.end .get { padding: 14px 24px; font-size: 1rem; }
.foot { border-top: 1px solid var(--edge); padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.82rem; text-align: center; }

/* ---------- the opening: the X lights up and opens like a portal ---------- */
.portal { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.half { position: absolute; inset: 0; background: var(--night); }
.half.l { clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%); }
.half.r { clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%); }
.portal svg { position: absolute; left: 50%; top: 50%; width: min(34vw, 190px); height: auto; translate: -50% -50%; overflow: visible; filter: drop-shadow(0 0 10px #2f8cff) drop-shadow(0 0 30px rgba(47, 140, 255, 0.7)); }
.portal .skip { position: absolute; right: calc(var(--gut-r) + 4px); bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); pointer-events: auto; background: none; border: 1px solid var(--edge); color: var(--muted); border-radius: 999px; padding: 8px 16px; font: 700 0.85rem var(--body); cursor: pointer; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-block: 80px 28px; gap: 18px; align-content: center; }
  .phone-wrap { order: -1; --pw: min(34vw, 38svh * 0.465, 165px); }
  .copy { justify-items: center; gap: 8px; width: 100%; }
  /* on a phone a long name takes two lines; the space for two is always kept, so nothing jumps */
  .world { font-size: clamp(1.7rem, 10.6cqi, 2.6rem); white-space: normal; text-wrap: balance; justify-self: stretch; min-height: 2.04em; display: grid; align-items: center; }
  .mark { display: none; }
  .tag { margin: 0; font-size: 0.66rem; letter-spacing: 0.24em; }
  .line { font-size: 1rem; }
  .open { justify-self: center; padding: 10px 18px; }
  .hint { display: none; }
  .dots { right: auto; left: 50%; top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); transform: translateX(-50%); display: flex; }
  .worlds { top: calc(env(safe-area-inset-top, 0px) + 62px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); }
  .worlds .track { gap: 18px; }
  .worlds button { font-family: var(--body); font-weight: 800; font-size: 0.66rem; letter-spacing: 0.12em; padding: 8px 1px 12px; }
  .dots { display: none; }
  .brand span { font-size: 0.82rem; }
  .chip { display: none; }
}
@media (min-width: 761px) { .dots { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .float, .layer.still img, .hint i::after { animation: none; }
  .in-dissolve, .in-glitch, .in-radial, .in-warp, .in-wipe, .in-slide, .in-pop, .in-night, .in-slash, .swap-in { animation: fadeonly 0.4s ease both; }
  .swap-out { animation: none; opacity: 0; }
  @keyframes fadeonly { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- footer links ---------- */
.foot .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 10px; }
.foot .links a { color: var(--icy); font-weight: 700; text-decoration: none; }
.foot .links a:hover { text-decoration: underline; }
.foot p { margin: 0; }

