/* The Great Expanse: game page. Neural Noir palette from the game (src/UI/Palette.cs). */

.tge {
  --void: #07060d;
  --ink: #0d0b18;
  --panel: #15122a;
  --line: rgba(123, 92, 255, .2);
  --line-2: rgba(123, 92, 255, .38);
  --text: #ece9ff;
  --muted: #9a95c4;
  --faint: #6f6a99;
  --signal: #2de2e6;
  --implant: #ff3f8e;
  --sodium: #ffb347;
  --acid: #9cff57;
  --violet: #7b5cff;
  --danger: #ff2e4d;
  --static: #ff8fbf;
  --ice: var(--signal);
  --frost: #d4f6ff;
  /* The game's own type and cut-corner buttons over the studio defaults. */
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: var(--display);
  --display-weight: 600;
  --label-font: 400 20px/1 var(--mono);
  --label-track: .12em;
  --btn-font: 600 14px/1 var(--display);
  --btn-case: uppercase;
  --btn-track: .16em;
  --btn-radius: 0;
  --btn-clip: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  --nav-font: 600 13px/1 var(--display);
  --nav-track: .18em;
  background: var(--void);
}
.tge .h-l { font-size: clamp(32px, 5.4vw, 72px); }
.tge .h-m { font-size: clamp(24px, 3vw, 38px); }
.tge ::selection { background: var(--implant); color: #fff; }
.tge :focus-visible { outline-color: var(--signal); }

/* Scanlines over the whole page. */
.tge .scan { position: fixed; inset: 0; z-index: 89; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }

/* ---------- Hero ---------- */
.xh { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: calc(var(--nav-h) + 40px) 0 clamp(72px, 10vh, 120px); overflow: hidden; isolation: isolate; view-transition-name: tge-art; }
.xh__city { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; background: #07060d; }
.xh::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(7, 6, 13, .55) 0%, transparent 22%, transparent 45%, rgba(7, 6, 13, .78) 78%, var(--void) 100%); }
.xh__inner { width: 100%; }
.xh__kicker { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-bottom: 18px; font: 400 clamp(18px, 2vw, 22px)/1 var(--mono); letter-spacing: .1em; color: var(--static); text-shadow: 0 0 12px rgba(255, 63, 142, .6); }
.xh__kicker .cursor { display: inline-block; width: .55em; height: 1em; background: currentColor; vertical-align: -.12em; animation: blinkC 1s steps(1) infinite; }
@keyframes blinkC { 50% { opacity: 0; } }

.logo-tge { position: relative; margin: 0; font: 700 clamp(46px, 12.5vw, 168px)/.84 var(--pixel); letter-spacing: .01em; text-transform: uppercase; color: var(--text); }
.logo-tge .row { display: block; position: relative; }
.logo-tge .row--sm { font-size: .42em; letter-spacing: .26em; color: var(--muted); margin-bottom: .18em; }
.logo-tge .row--glow { color: #c9fbff; text-shadow: 0 0 6px rgba(45, 226, 230, .9), 0 0 28px rgba(45, 226, 230, .55), 0 0 70px rgba(123, 92, 255, .45); }
.logo-tge .row--glow::before, .logo-tge .row--glow::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.logo-tge .row--glow::before { color: var(--implant); mix-blend-mode: screen; animation: glitchA 4.2s steps(1) infinite; clip-path: inset(0 0 100% 0); }
.logo-tge .row--glow::after { color: var(--signal); mix-blend-mode: screen; animation: glitchB 4.2s steps(1) infinite; clip-path: inset(0 0 100% 0); }
@keyframes glitchA {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  87% { clip-path: inset(12% 0 64% 0); transform: translate(-6px, 0); }
  89% { clip-path: inset(58% 0 22% 0); transform: translate(5px, 0); }
  91% { clip-path: inset(30% 0 48% 0); transform: translate(-3px, 0); }
  93% { clip-path: inset(80% 0 4% 0); transform: translate(7px, 0); }
}
@keyframes glitchB {
  0%, 86%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  88% { clip-path: inset(40% 0 40% 0); transform: translate(6px, 0); }
  90% { clip-path: inset(8% 0 78% 0); transform: translate(-5px, 0); }
  92% { clip-path: inset(66% 0 10% 0); transform: translate(4px, 0); }
}
.logo-tge .boot-in { display: inline-block; opacity: 0; animation: pxIn .7s steps(5) forwards; animation-delay: calc(var(--i, 0) * .08s + .2s + var(--boot, 0s)); }
@keyframes pxIn { 0% { opacity: 0; filter: blur(8px); transform: translateY(12px); } 100% { opacity: 1; filter: none; transform: none; } }

.xh__lede { margin: 26px 0 0; max-width: 40ch; text-shadow: 0 2px 14px #07060d, 0 0 4px #07060d; font-size: clamp(16px, 1vw + 12px, 21px); color: #cfcaf0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; font: 400 18px/1 var(--mono); letter-spacing: .08em; color: var(--muted); background: rgba(13, 11, 24, .7); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chip--live { color: var(--sodium); box-shadow: inset 0 0 0 1px rgba(255, 179, 71, .45); }
.chip--live::before { content: ""; width: 7px; height: 7px; background: var(--sodium); box-shadow: 0 0 10px var(--sodium); animation: pulse 1.6s ease-in-out infinite; }
.xh__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.tge .btn { --bg: var(--signal); --fg: #041013; box-shadow: 0 0 30px rgba(45, 226, 230, .25); }
.tge .btn--ghost { --bg: rgba(13, 11, 24, .55); --fg: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tge .btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--implant), 0 0 26px rgba(255, 63, 142, .25); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; min-height: 48px; color: var(--muted); background: rgba(7, 6, 13, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.store svg { width: 22px; height: 22px; flex: none; fill: currentColor; }
.store small { display: block; font: 400 15px/1 var(--mono); letter-spacing: .1em; color: var(--faint); }
.store b { display: block; font: 600 15px/1.2 var(--display); color: var(--text); }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; min-height: 44px; font: 400 20px/1 var(--mono); letter-spacing: .08em; color: var(--muted); text-decoration: none; transition: color .2s, gap .3s var(--ease); }
.back:hover { color: var(--signal); gap: 12px; }

/* ---------- Logline: words light up as you scroll ---------- */
.logline { padding: clamp(80px, 14vw, 180px) 0; }
.logline__text { font: 600 clamp(26px, 4.6vw, 64px)/1.12 var(--display); letter-spacing: -.01em; max-width: 22ch; }
.logline__text .w { color: rgba(236, 233, 255, .14); transition: color .35s, text-shadow .35s; }
.logline__text .w.on { color: var(--text); }
.logline__text .w.hl.on { color: var(--implant); text-shadow: 0 0 24px rgba(255, 63, 142, .5); }
.no-js .logline__text .w { color: var(--text); }
.terminal { position: relative; margin-top: clamp(36px, 5vw, 64px); max-width: 640px; padding: 20px 22px 22px; background: rgba(13, 11, 24, .9); box-shadow: inset 0 0 0 1px rgba(255, 63, 142, .35), 0 0 60px rgba(255, 63, 142, .08); font: 400 clamp(19px, 2vw, 24px)/1.35 var(--mono); color: var(--static); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); }
.terminal__bar { display: flex; justify-content: space-between; margin: -4px 0 12px; font-size: .78em; letter-spacing: .14em; color: var(--faint); }
.terminal p { margin: 0; min-height: 1.35em; }
.terminal p .who { color: var(--faint); }
.terminal p.cap { color: #d8d4f5; font-family: var(--body); font-style: italic; font-size: .72em; margin: 4px 0 8px; }

/* ---------- Features ---------- */
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.feat {
  --c: var(--signal);
  position: relative; padding: 26px 24px 28px; background: linear-gradient(160deg, rgba(21, 18, 42, .9), rgba(13, 11, 24, .9));
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  transition: transform .5s var(--ease), background .4s; overflow: hidden; isolation: isolate;
}
.feat::before { content: ""; position: absolute; inset: 0; z-index: -1; padding: 1px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 60%, transparent), var(--line) 40%, transparent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.feat::after { content: ""; position: absolute; left: -30%; top: -60%; width: 160%; height: 80%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 22%, transparent), transparent); opacity: 0; transition: opacity .5s, transform .8s var(--ease); transform: translateY(-20px); }
.feat:hover { transform: translateY(-6px); }
.feat:hover::after { opacity: 1; transform: none; }
.feat__icon { width: 48px; height: 48px; margin-bottom: 18px; background: var(--c); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; filter: drop-shadow(0 0 8px var(--c)); image-rendering: pixelated; }
.feat h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: .02em; }
.feat p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.feat__tag { position: absolute; top: 18px; right: 22px; font: 400 16px/1 var(--mono); color: var(--faint); letter-spacing: .08em; }

/* ---------- Loot ladder ---------- */
.loot { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rung { --c: #8a8a99; position: relative; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; background: rgba(13, 11, 24, .85); box-shadow: inset 3px 0 0 var(--c); overflow: hidden; }
.rung::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease); transition-delay: var(--d, 0s); }
.ladder.is-in .rung::before { transform: scaleX(1); }
.rung > * { position: relative; }
.rung__gem { width: 26px; height: 26px; background: var(--c); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); box-shadow: 0 0 16px var(--c); justify-self: center; }
.rung b { font: 600 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.rung span { font: 400 18px/1 var(--mono); color: var(--faint); letter-spacing: .06em; }
.rung--artifact { animation: artGlow 2.4s ease-in-out infinite; }
.rung--artifact .rung__gem { animation: spinGem 3s linear infinite; }
@keyframes artGlow { 50% { box-shadow: inset 3px 0 0 var(--c), 0 0 28px rgba(255, 46, 77, .35); } }
@keyframes spinGem { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .loot { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .rung { grid-template-columns: 30px 1fr; } .rung span { grid-column: 2; } }

/* ---------- Screens gallery (shared parts in site.css) ---------- */
.tge .gallery__track { grid-auto-columns: clamp(200px, 26vw, 300px); }
.phone {
  position: relative; aspect-ratio: 720 / 1560; border-radius: clamp(20px, 3vw, 32px); padding: clamp(5px, .7vw, 8px);
  background: linear-gradient(160deg, #26214a, #0d0b18 40%, #1b1533);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px rgba(0, 0, 0, .55);
  transition: transform .6s var(--ease), box-shadow .5s;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: clamp(15px, 2.4vw, 25px); background: #07060d; }
.phone::after { content: ""; position: absolute; inset: clamp(5px, .7vw, 8px); border-radius: clamp(15px, 2.4vw, 25px); background: linear-gradient(125deg, rgba(255, 255, 255, .14), transparent 35%); pointer-events: none; }
.shot:hover .phone, .shot button:focus-visible .phone { transform: translateY(-10px); box-shadow: 0 0 0 1px rgba(45, 226, 230, .5), 0 40px 70px rgba(0, 0, 0, .6), 0 0 50px rgba(45, 226, 230, .2); }
.tge .lightbox { width: min(92vw, 460px); }
.tge .lightbox img { border-radius: 18px; }

/* ---------- Crew ---------- */
.crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.member { --c: var(--signal); position: relative; background: var(--ink); overflow: hidden; isolation: isolate; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); }
.member::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent); transition: box-shadow .4s; }
.member:hover::after { box-shadow: inset 0 0 0 1px var(--c), inset 0 -80px 80px -60px color-mix(in srgb, var(--c) 40%, transparent); }
.member__art { position: relative; aspect-ratio: 1; overflow: hidden; background: radial-gradient(70% 60% at 50% 60%, color-mix(in srgb, var(--c) 25%, #07060d), #07060d); }
.member__art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transform: scale(1.05); transition: transform .8s var(--ease), filter .5s; filter: brightness(1.25) saturate(1.1); }
.member:hover .member__art img { transform: scale(1.14) translateY(-3%); filter: brightness(1.45) saturate(1.2); }
.member__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, var(--ink)), repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px); }
.member__body { position: relative; padding: 4px 18px 20px; }
.member__role { font: 400 17px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.member h3 { margin: 6px 0 8px; font: 700 26px/1 var(--pixel); text-transform: uppercase; letter-spacing: .02em; }
.member p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.member--static .member__art { display: grid; place-items: center; }
@media (min-width: 960px) {
  .crew { grid-template-columns: repeat(4, 1fr); }
  .member--static { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .member--static .member__art { height: 100%; aspect-ratio: auto; }
  .member--static .member__body { padding: 24px; }
  .member--static h3 { font-size: 34px; }
  .member--static p { font-size: 15px; }
}
.static-orb { position: relative; width: 46%; aspect-ratio: 1; }
.static-orb i { position: absolute; inset: 0; border: 2px solid var(--static); border-radius: 50%; opacity: .7; animation: orb 2.6s var(--ease) infinite; }
.static-orb i:nth-child(2) { animation-delay: .85s; }
.static-orb i:nth-child(3) { animation-delay: 1.7s; }
.static-orb b { position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle, #fff, var(--static) 40%, var(--implant)); box-shadow: 0 0 30px var(--implant), 0 0 70px rgba(255, 63, 142, .5); animation: orbCore 1.3s ease-in-out infinite alternate; }
@keyframes orb { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }
@keyframes orbCore { to { transform: scale(1.12); filter: brightness(1.3); } }

/* ---------- Fair deal ---------- */
.deal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.deal__cell { background: var(--void); padding: clamp(26px, 3.4vw, 44px); }
.deal__big { display: block; font: 700 clamp(44px, 6vw, 84px)/.9 var(--pixel); color: var(--c, var(--text)); text-shadow: 0 0 30px color-mix(in srgb, var(--c, #fff) 45%, transparent); margin-bottom: 16px; }
.deal__cell h3 { font-size: 19px; margin-bottom: 8px; }
.deal__cell p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .deal { grid-template-columns: 1fr; } }

/* ---------- Specs ---------- */
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.spec-list { margin: 0; padding: 22px 24px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font: 400 clamp(19px, 1.6vw, 22px)/1.25 var(--mono); }
.spec-list div { display: grid; grid-template-columns: 11ch 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.spec-list div:last-child { border: 0; }
.spec-list dt { color: var(--faint); letter-spacing: .08em; }
.spec-list dd { margin: 0; color: var(--text); }
.spec-list dd em { font-style: normal; color: var(--sodium); }
@media (max-width: 860px) { .specs { grid-template-columns: 1fr; } }
@media (max-width: 360px) { .spec-list div { grid-template-columns: 1fr; gap: 0; } }

.tge .cta { background: linear-gradient(120deg, #1a0d2a, #0d0b18 50%, #071a22); }
.tge .cta::before { background: repeating-linear-gradient(90deg, rgba(255, 63, 142, .07) 0 1px, transparent 1px 48px), repeating-linear-gradient(0deg, rgba(45, 226, 230, .06) 0 1px, transparent 1px 48px); }

@media (prefers-reduced-motion: reduce) {
  .logo-tge .boot-in { opacity: 1; }
  .logline__text .w { color: var(--text); }
}
