:root {
  color-scheme: dark;
  --ink: #0b141b;
  --white: #f5f6f7;
  --dim: #bfc5ca;
  --line: rgb(227 236 239 / 26%);
  --glass: rgb(32 37 39 / 73%);
  --gutter: clamp(18px, 3.75vw, 84px);
  --nav-top: clamp(18px, 6.65svh, 74px);
  --nav-height: clamp(52px, 4.1vw, 82px);
  --footer-height: clamp(53px, 6.65svh, 96px);
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  background: var(--ink);
  color: var(--white);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
img { display: block; }
a, button { color: inherit; -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #f1dfbf; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

.site-header { position: fixed; z-index: 5; inset: var(--nav-top) 0 auto; display: flex; justify-content: center; padding-inline: 15px; pointer-events: none; }
.navigation {
  pointer-events: auto;
  display: grid;
  grid-template-columns: .53fr 1.02fr 1fr 1.15fr 1.48fr;
  align-items: stretch;
  width: min(100%, clamp(460px, 38vw, 770px));
  min-height: var(--nav-height);
  padding: 4px;
  gap: 4px;
  border: 1px solid rgb(231 216 205 / 24%);
  border-radius: 27px;
  background: var(--glass);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%);
  backdrop-filter: blur(14px) saturate(.85);
}
.navigation a { border-radius: 22px; display: grid; place-content: center; text-align: center; border: 1px solid transparent; }
.nav-link { text-transform: uppercase; font-size: clamp(12px, .92vw, 17px); font-weight: 400; letter-spacing: .065em; color: #d0d3d5; transition: color .2s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.nav-link:hover { border-color: var(--line); color: white; background: rgb(255 255 255 / 4%); }
.nav-link[aria-current="page"] { border-color: #f2f3f2; background: #f2f3f2; color: #38393a; box-shadow: 0 0 22px 5px rgb(249 247 231 / 46%); }
.nav-explore { line-height: 1.1; }
.nav-explore small { font-size: clamp(9px, .45vw, 12px); letter-spacing: .19em; }
.nav-explore[aria-current="page"] small { color: #55585b; }
.nav-explore strong { margin-top: 3px; font-size: clamp(14px, 1vw, 22px); font-weight: 650; letter-spacing: .22em; padding-left: .22em; }
.nav-home:hover { background: rgb(255 255 255 / 10%); }
.brand-ring { width: clamp(22px, 2.04vw, 36px); aspect-ratio: 1; display: block; position: relative; }
.brand-ring i { position: absolute; top: 50%; left: 50%; width: 19%; aspect-ratio: 1; border-radius: 50%; background: #f4f5f4; transform: translate(-50%, -50%) rotate(var(--orbit-angle)) translateY(-210%); }

.scene { min-height: 100svh; position: relative; isolation: isolate; overflow: clip; }
.scene.is-entering { animation: reveal-scene .58s cubic-bezier(.18,.72,.2,1) both; }
.scene.is-entering::after { content: ""; position: absolute; z-index: 4; inset: 0; pointer-events: none; background: radial-gradient(ellipse at var(--entry-x, 50%) var(--entry-y, 14%), rgb(224 239 249 / 36%), transparent 60%); animation: fade-light .64s ease-out both; }
@keyframes reveal-scene { from { opacity: .38; filter: blur(7px); } to { opacity: 1; filter: none; } }
@keyframes fade-light { from { opacity: .85; } to { opacity: 0; } }

.hero { min-height: max(590px, 100svh); background: var(--ink); }
.hero-art, .hero-image, .hero-light, .hero-shafts, .atmosphere { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { --art: url("character-hero.webp"); --art-x: 50%; --art-y: 46%; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: var(--art-x) var(--art-y); }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgb(5 11 15 / 44%), transparent 31%); }
.hero-light {
  background: var(--art) var(--art-x) var(--art-y) / cover no-repeat;
  filter: brightness(1.65) saturate(.74);
  mix-blend-mode: screen;
  opacity: var(--light-opacity, .25);
  mask-image: radial-gradient(ellipse 24% 33% at var(--light-x, 53%) var(--light-y, 34%), #000 0%, rgb(0 0 0 / 64%) 35%, transparent 100%);
}
.hero-shafts {
  mix-blend-mode: screen;
  filter: blur(clamp(7px, 1vw, 20px));
  background:
    radial-gradient(ellipse 36% 33% at 96% -5%, rgb(166 205 232 / 25%), transparent 91%),
    radial-gradient(ellipse 22% 27% at 62% 34%, rgb(152 190 216 / 10%), transparent 93%);
}
.hero-shafts::before, .hero-shafts::after { content: ""; position: absolute; inset: -4% 0 0; }
.hero-shafts::before {
  clip-path: polygon(89% 0, 95% 0, 61% 61%, 34% 64%, 52% 38%);
  background: linear-gradient(rgb(195 225 245 / 38%), rgb(156 196 226 / 15%) 28%, transparent 65%);
}
.hero-shafts::after {
  clip-path: polygon(96% 0, 99% 0, 84% 39%, 66% 54%, 72% 37%);
  background: linear-gradient(rgb(205 229 245 / 29%), rgb(151 191 221 / 9%) 24%, transparent 55%);
}
.atmosphere { pointer-events: none; z-index: 1; }
.hero-brand { position: absolute; z-index: 2; bottom: max(13.3%, calc(var(--footer-height) + 29px)); left: 50%; transform: translateX(-50%); text-align: center; width: calc(100% - 36px); }
.hero-brand img { width: clamp(144px, 12.05vw, 258px); height: auto; margin-inline: auto; }
.hero-action { margin-top: clamp(15px, 2.55svh, 31px); display: flex; justify-content: center; align-items: center; gap: .65em; text-transform: uppercase; color: #e0e4e7; font-size: clamp(13px, .86vw, 17px); font-weight: 350; letter-spacing: .015em; }
.outline-button { display: inline-grid; place-content: center; min-height: 36px; padding: 6px 14px; border: 1px solid rgb(241 246 248 / 42%); border-radius: 8px; text-align: center; font-size: inherit; transition: background .25s, border-color .25s, box-shadow .25s; }
.outline-button:hover { background: rgb(243 247 251 / 12%); border-color: #e7edf0; box-shadow: 0 0 20px rgb(198 210 217 / 15%); }

.site-footer { position: relative; z-index: 5; height: var(--footer-height); margin-top: calc(-1 * var(--footer-height)); padding-inline: var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: #edf0f1; background: rgb(10 14 17 / 39%); font-size: clamp(11px, .76vw, 15px); line-height: 1.35; letter-spacing: .095em; }
.site-footer::before { content: ""; position: absolute; inset: 0 var(--gutter) auto; height: 1px; background: rgb(244 248 249 / 59%); }
.site-footer b { font-weight: inherit; padding-inline: .55em; }
.footer-center { display: grid; justify-items: center; gap: 3px; }
.icp-filing { color: #d9dee1; font-size: clamp(10px, .65vw, 13px); letter-spacing: .035em; white-space: nowrap; }
.icp-filing:hover, .icp-filing:focus-visible { color: #fff; text-decoration: underline; }
.motion-button { display: grid; place-items: center; justify-self: end; width: 34px; height: 34px; background: rgb(24 33 40 / 36%); border: 1px solid rgb(221 230 235 / 20%); border-radius: 50%; }
.motion-button:hover { border-color: #d0d8de; }
.motion-button span { width: 8px; height: 9px; border-inline: 2px solid #e3e9ed; }
.motion-button[aria-pressed="true"] span { width: 0; height: 0; border: 0; border-block: 5px solid transparent; border-left: 8px solid #e3e9ed; margin-left: 2px; }

.presence, .friends, .explore, .mech { padding: calc(var(--nav-top) + var(--nav-height) + 42px) var(--gutter) calc(var(--footer-height) + 38px); }
.presence, .friends, .explore { display: grid; place-items: center; }
.presence { background: #08090a; text-align: center; }
.presence-content { display: grid; justify-items: center; gap: 14px; }
.orb { width: clamp(190px, min(29vw, 39svh), 390px); aspect-ratio: 1; position: relative; border-radius: 50%; display: grid; place-items: center; overflow: hidden; isolation: isolate; margin-bottom: 12px; box-shadow: inset 0 0 2px #fff7, 0 0 55px #d77a2a23; }
.orb-color { position: absolute; inset: -16%; background:
  radial-gradient(ellipse at 29% 22%, #250d06 0%, #220d09 12%, transparent 45%),
  radial-gradient(ellipse at 83% 25%, #4c7889 0%, #9eafb2 23%, transparent 47%),
  radial-gradient(ellipse at 25% 34%, #b33607 0%, #ff9f37 30%, transparent 48%),
  radial-gradient(ellipse at 63% 72%, #ffdfb8 0%, #ffe2ad 43%, #e3a35f 68%);
  animation: orb-drift 11s ease-in-out infinite alternate;
}
.orb::after { content: ""; position: absolute; z-index: 1; border-radius: inherit; inset: 0; box-shadow: inset 0 1px 5px rgb(245 224 202 / 48%), inset 0 -14px 40px rgb(255 207 133 / 38%); pointer-events: none; }
.orb img { width: 38%; height: auto; z-index: 2; filter: drop-shadow(0 1px 8px #482b2480); }
.presence.is-entering .orb { animation: orb-awaken .95s cubic-bezier(.2,.75,.18,1) both; }
@keyframes orb-drift { from { transform: translate(-1%, 1%) rotate(-6deg); } to { transform: translate(6%, -7%) rotate(17deg); } }
@keyframes orb-awaken { from { transform: scale(.55); opacity: .15; filter: blur(15px) brightness(1.5); } to { transform: scale(1); opacity: 1; filter: none; } }
.presence-content > p:first-of-type { font-size: clamp(19px, 2.12vw, 29px); font-weight: 400; }
.scene-description { max-width: 490px; color: var(--dim); font-size: 16px; line-height: 1.6; }
.presence .outline-button, .explore .outline-button { margin-top: 6px; font-size: 14px; min-height: 42px; }

.friends { background: radial-gradient(ellipse at 29% 45%, #24272b, #101112 68%); }
.friends::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle, #e1e4ea46 1px, transparent 2px) 0 0 / 18px 18px; mask-image: linear-gradient(110deg, #000, transparent 65%); }
.friends-panel { width: min(100%, 760px); border-radius: clamp(24px, 4.3vw, 53px); padding: clamp(22px, 5vw, 69px); border: 1px solid var(--line); background: radial-gradient(ellipse at 6% 27%, #939dac1f, transparent 50%), linear-gradient(120deg, #242829e0, #101010f0 75%); box-shadow: 0 24px 75px #0006, inset 0 1px 2px #ffffff0c; }
.friend-message { min-height: 115px; display: flex; align-items: center; gap: clamp(12px, 3vw, 31px); padding-bottom: 20px; }
.friend-orbs { width: clamp(50px, 8vw, 100px); aspect-ratio: 1; flex: none; position: relative; }
.friend-orbs i { position: absolute; top: 14%; left: 10%; width: 63%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 16px #e5f1ff28, inset 0 0 14px #eff8ff79; background: radial-gradient(circle at 70% 72%, #fff9, #dce6fa21 49%, transparent 73%); animation: think 4s ease-in-out infinite alternate; }
.friend-orbs i + i { top: 35%; left: 33%; background: radial-gradient(circle at 35% 33%, #fcf4f9be, #e0f4ff34 53%, transparent 73%); animation-delay: -.55s; }
.friends.is-entering .friend-orbs { animation: friend-awaken 1s ease-out both; }
.friends-panel.is-thinking .friend-orbs i { animation-duration: .75s; box-shadow: 0 0 31px #ddeeff7a, inset 0 0 19px #fff9; }
@keyframes think { from { transform: translate(-10%, -8%) scale(.91); } to { transform: translate(10%, 8%) scale(1.07); } }
@keyframes friend-awaken { from { opacity: .2; transform: scale(.62); } 45% { filter: brightness(1.9) drop-shadow(0 0 15px #d8ebfa); } to { opacity: 1; transform: scale(1); } }
.friend-text { font-size: clamp(20px, 3vw, 38px); line-height: 1.3; color: #edf0f1; font-weight: 350; overflow-wrap: anywhere; }
.friend-text.has-answer { font-size: clamp(16px, 2vw, 22px); }
.friend-text a { text-decoration: underline; text-underline-offset: 4px; }
.friend-input { display: flex; gap: 8px; align-items: center; padding: 7px 7px 7px 20px; border-radius: 36px; border: 1px solid #d2d9e648; background: #ffffff08; }
.friend-input:focus-within { border-color: #d7dfe4a3; }
.friend-input input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 9px 0; color: var(--white); font-size: clamp(16px, 2vw, 22px); outline: none; }
.friend-input input::placeholder { color: #a0a6ab; }
.round-button { width: 48px; height: 48px; flex: none; display: inline-grid; place-content: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #4b535a80; color: #f4f6f7; transition: background .22s, box-shadow .22s; }
.round-button:hover { background: #737e87; box-shadow: 0 0 20px #d3e5ed28; }
.friend-input button { background: #eee; color: #141619; font-size: 21px; }
.friend-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.friend-suggestions button { min-height: 36px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 20px; background: #13151677; font-size: 13px; }
.friend-suggestions button:hover { background: #343a3c; }
.preview-note { color: #b3bbc0; font-size: 12px; letter-spacing: .08em; }
.friends-panel > .preview-note { margin-top: 16px; }

.mech { display: grid; align-items: center; background: radial-gradient(ellipse at 52% 38%, #343d43, #1b2327 43%, #090f12 82%); }
.mech-terrain { position: absolute; z-index: -1; left: 0; top: 50%; width: clamp(620px, 88vw, 1440px); height: min(60%, 440px); transform: translateY(-50%); opacity: .78; background: url("mech-terrain.webp") left center / cover no-repeat; mask-image: radial-gradient(ellipse 75% 50% at 0% 50%, #000 21%, #000b 47%, transparent 100%); }
.mech-layout { width: min(100%, 1260px); margin: auto; display: grid; grid-template-columns: minmax(265px, .92fr) minmax(300px, 1.5fr) 75px; align-items: center; gap: clamp(10px, 3vw, 50px); }
.mech-interface { position: relative; z-index: 1; }
.viewer-label { border-radius: 20px; background: #45505790; border: 1px solid var(--line); padding: 7px 13px; width: fit-content; font-size: 12px; text-transform: uppercase; }
.mech h2 { margin-top: 15px; text-transform: uppercase; font-weight: 400; line-height: 1.08; font-size: clamp(34px, 4.1vw, 67px); letter-spacing: -.04em; }
.mech-subtitle { margin-top: 9px; text-transform: uppercase; color: #d0d6d9; font-size: 13px; letter-spacing: .08em; line-height: 1.5; }
.mech-controls { margin-top: 23px; display: grid; gap: 8px; max-width: 450px; }
.control-row { gap: 10px; display: grid; grid-template-columns: auto minmax(33px, 1fr) minmax(44px, auto); align-items: center; width: 100%; min-height: 49px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(100deg, #3c474ede, #30373c9c); font-size: 14px; text-align: left; }
.control-row output, #view-label { justify-self: end; font-variant-numeric: tabular-nums; }
.view-mode:hover { border-color: #e2eaf099; }
.control-track { height: 12px; min-width: 20px; background: radial-gradient(circle, #a9b0b875 2px, transparent 2.5px) left center / 23px 100% repeat-x; }
.rotation-row input { width: 100%; margin: 0; appearance: none; height: 21px; background: radial-gradient(circle, #a9b0b875 2px, transparent 2.5px) left center / 23px 100% repeat-x; cursor: ew-resize; }
.rotation-row input::-webkit-slider-thumb { appearance: none; width: 5px; height: 19px; border-radius: 4px; background: #edf4f7; box-shadow: 0 0 13px #d9edff8a; }
.rotation-row input::-moz-range-thumb { width: 5px; height: 19px; border-radius: 4px; border: 0; background: #edf4f7; }
.mech-buttons { display: flex; justify-content: center; gap: 7px; margin-top: 8px; }
.mech-buttons button { width: 53px; height: 53px; text-align: center; }
.mech-buttons button > span { font-size: 23px; line-height: .9; }
.mech-buttons button > small { font-size: 11px; margin-top: 3px; }
.play-button { background: var(--white); color: #141619; box-shadow: 0 0 13px #eaf3f440; }
.play-button:hover { background: #cdd9df; }
.play-button span { width: 0; height: 0; border-block: 7px solid transparent; border-left: 11px solid #1d252b; margin-left: 3px; }
.play-button[aria-pressed="true"] span { width: 11px; height: 13px; border: 0; border-inline: 3px solid #1d252b; margin-left: 0; }
.mech-stage { position: relative; min-height: 270px; aspect-ratio: 1.16; border-radius: 30px; background: radial-gradient(ellipse at 50% 57%, #a4bbc118, transparent 61%); }
.mech-stage canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.mech-stage .preview-note { position: absolute; right: 15px; bottom: 0; }
.view-rail { display: grid; border-right: 1px solid #c9d2d575; width: 100%; }
.view-rail button { border: 0; min-height: 42px; background: none; position: relative; padding: 0 12px 0 0; font-size: 12px; color: #c9d2d5; text-align: right; white-space: nowrap; }
.view-rail button::after { content: ""; position: absolute; right: -2px; top: 0; height: 100%; width: 3px; border-radius: 3px; background: transparent; }
.view-rail button:hover::after { background: #f2f5f588; }
.view-rail button[aria-pressed="true"]::after { background: #f2f5f5; }

.explore { background: radial-gradient(ellipse at 50% 22%, #30414bbf, #0c151dee 64%), url("character-hero-small.webp") center / cover; text-align: center; }
.explore-content { display: grid; justify-items: center; width: min(100%, 900px); gap: 15px; }
.explore-label { color: #d9dfe2; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; }
.explore h2 { font-size: clamp(33px, 6vw, 81px); font-weight: 400; letter-spacing: -.05em; line-height: 1.02; }
.world-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; margin-block: 16px 7px; }
.world-links a { min-height: 115px; padding: 15px; display: grid; align-content: center; gap: 8px; border-radius: 20px; border: 1px solid var(--line); background: #333b4190; transition: background .2s, border-color .2s; }
.world-links a:hover { background: #546771a6; border-color: #d1dde8; }
.world-links strong { letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.world-links span { color: #e1e6e9; font-size: 14px; line-height: 1.45; }

.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation: none !important; transition: none !important; }

@media (max-width: 960px) {
  .hero-art { --art: url("character-hero-small.webp"); }
}

@media (max-width: 760px) {
  :root { --nav-top: 20px; }
  .mech-layout { grid-template-columns: 1fr 57px; gap: 20px 12px; }
  .mech-interface { grid-column: 1 / -1; grid-row: 2; }
  .mech-stage { grid-row: 1; min-height: 205px; max-height: 41svh; }
  .view-rail { grid-row: 1; }
  .mech-controls { max-width: none; }
}

@media (max-width: 540px) {
  :root { --nav-height: 49px; }
  .navigation { grid-template-columns: .57fr 1fr .92fr .82fr 1.32fr; gap: 1px; padding: 3px; border-radius: 23px; }
  .navigation a { border-radius: 19px; }
  .nav-link { font-size: 11px; letter-spacing: .045em; }
  .nav-explore strong { font-size: 12px; letter-spacing: .11em; }
  .nav-explore small { font-size: 8px; letter-spacing: .13em; }
  .hero-art { --art-x: 41%; --art-y: 50%; }
  .hero-brand { bottom: max(15%, calc(var(--footer-height) + 36px)); }
  .hero-action { flex-direction: column; gap: 11px; margin-top: 17px; }
  .site-footer { grid-template-columns: 1fr auto; grid-template-rows: 24px 16px; align-content: center; gap: 0 7px; font-size: 10px; }
  .footer-center { grid-area: 2 / 1 / 3 / -1; justify-self: center; }
  .site-footer .motion-button { grid-area: 1 / 2 / 3 / 3; }
  .site-footer .brand-world { display: none; }
  .world-links { grid-template-columns: 1fr; gap: 7px; margin-block: 4px; }
  .world-links a { min-height: 62px; gap: 3px; }
  .mech-stage { min-height: 180px; }
  .view-rail button { min-height: 33px; }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.motion-enabled) *, body:not(.motion-enabled) *::before, body:not(.motion-enabled) *::after { animation: none !important; transition: none !important; }
}
.mech-stage canvas { cursor: grab; touch-action: pan-y; }
.mech-stage canvas:active { cursor: grabbing; }
