/* Cyberia in 3D (/3d) — resources/views/landing/temple.blade.php, public/js/cyberia-3d.js, public/js/cyberia-3d-swap.js */
:root {
  --bg: #05090a;
  --bg-2: #0a1213;
  --ink: #e6f4f2;
  --ink-2: #b4c7c5;
  --muted: #7c9391;
  --line: rgba(0, 229, 209, .16);
  --line-2: rgba(230, 244, 242, .1);
  --cyan: #00e5d1;
  --cyan-2: #00c8b8;
  --magenta: #ff2bd6;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --band: 46svh;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
::selection { background: var(--cyan); color: #000; }
a { color: inherit; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; touch-action: pan-y; cursor: grab; }
#scene.dragging { cursor: grabbing; }
#scene.pointing { cursor: pointer; }
body.no-gl #scene { display: none; }

/* The layer the swap window stands in when it is part of the scene (CSS3DRenderer). */
.css3d { position: fixed; left: 0; top: 0; z-index: 3; pointer-events: none; }

/* Labels pinned to things in the scene. */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.lbl {
  position: absolute; left: 0; top: 0; white-space: nowrap; font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  color: var(--ink); padding: 5px 8px; border-left: 2px solid var(--cyan); background: rgba(5, 9, 10, .72);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: opacity .35s; will-change: transform, opacity;
}
.lbl small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.lbl.dev { border-left-color: var(--magenta); }
.lbl.hot { border-left-color: #fff; }
.lbl.big { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: 0; padding: 7px 10px; }
.lbl.soon { border-left-color: #8fd8ff; }

#tip {
  position: fixed; z-index: 30; max-width: 280px; pointer-events: none; padding: 10px 12px; border: 1px solid var(--line);
  background: rgba(5, 9, 10, .92); font-size: 13px; line-height: 1.45; color: var(--ink-2);
}
#tip b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
#tip .k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
#tip .go { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--cyan); }

/* Navigation */
.nav {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 3vw, 36px); background: linear-gradient(rgba(5, 9, 10, .88), rgba(5, 9, 10, 0));
}
.mark { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.mark b { font-weight: 800; letter-spacing: .2em; font-size: 15px; padding-bottom: 3px; border-bottom: 3px solid var(--cyan); }
.mark span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.nav nav { margin-left: auto; display: flex; gap: 22px; }
.nav nav a { text-decoration: none; font-size: 14px; color: var(--ink-2); }
.nav nav a:hover, .nav nav a.on { color: var(--cyan); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  font: 600 15px var(--sans); color: var(--ink); text-decoration: none; background: rgba(5, 9, 10, .55);
  border: 1px solid rgba(230, 244, 242, .28); cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn.cyan { background: var(--cyan); color: #021210; border-color: var(--cyan); }
.btn.cyan:hover { background: #5ff3e6; color: #021210; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn:focus-visible, .nav a:focus-visible, .door:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* Sections */
main { position: relative; z-index: 2; pointer-events: none; }
main a, main button, main .copy, main .swap { pointer-events: auto; }
section { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 96px clamp(16px, 3vw, 36px) 64px; }
.copy { width: min(500px, 42vw); position: relative; }
.copy.wide { width: min(560px, 46vw); }
.panel .copy { padding: 26px 26px 28px; background: linear-gradient(90deg, rgba(5, 9, 10, .88), rgba(5, 9, 10, .64)); border-left: 1px solid var(--line); }
.hero { flex-direction: column; align-items: flex-start; justify-content: center; }
.hero .copy { margin-top: auto; }
.hero::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 58vw; pointer-events: none; z-index: -1;
  background: linear-gradient(90deg, rgba(5, 9, 10, .9) 0%, rgba(5, 9, 10, .55) 60%, rgba(5, 9, 10, 0) 100%);
}

.live { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 0 rgba(0, 229, 209, .6); }
.live.on i { background: var(--cyan); animation: beat 1s ease-out infinite; }
.live.off i { background: var(--magenta); }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(0, 229, 209, .55); } 100% { box-shadow: 0 0 0 9px rgba(0, 229, 209, 0); } }

h1 { margin: 0; font-weight: 800; font-size: clamp(34px, 4.1vw, 60px); line-height: 1.02; letter-spacing: -.025em; }
h1 em { font-style: normal; color: var(--cyan); text-shadow: 2px 0 0 rgba(255, 43, 214, .55), -2px 0 0 rgba(0, 229, 209, .35); }
h2 { margin: 0 0 14px; font-weight: 800; font-size: clamp(28px, 3.1vw, 44px); line-height: 1.06; letter-spacing: -.02em; }
h3 { margin: 18px 0 8px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
p { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.lede { margin-top: 22px; font-size: 17px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.eyebrow { margin: 0 0 12px; font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hint { margin-top: 18px; font: 12px/1.6 var(--mono); color: var(--muted); max-width: 440px; }

.pulse { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; margin: 48px 0 0; border-top: 1px solid var(--line-2); background: rgba(5, 9, 10, .7); }
.pulse div { padding: 14px 18px 4px; border-right: 1px solid var(--line-2); }
.pulse div:last-child { border-right: 0; }
.pulse dt { font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pulse dd { margin: 6px 0 0; font: 700 clamp(22px, 2.3vw, 32px) var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.params { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 0 0; background: var(--line-2); border: 1px solid var(--line-2); }
.params div { padding: 10px 12px; background: var(--bg); }
.params dt { font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.params dd { margin: 4px 0 0; font: 500 13px var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.params dd span { color: var(--muted); }

.tenets { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: t; }
.tenets li { counter-increment: t; position: relative; padding: 10px 0 10px 40px; border-top: 1px solid var(--line-2); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tenets li::before { content: '0' counter(t); position: absolute; left: 0; top: 12px; font: 500 11px var(--mono); color: var(--cyan); }
.tenets b { color: var(--ink); }

.doors ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; padding: 0; list-style: none; }
.door { display: block; padding: 8px 10px; border: 1px solid var(--line-2); text-decoration: none; background: rgba(5, 9, 10, .6); transition: border-color .2s; }
.door b { display: block; font-size: 14px; font-weight: 700; }
.door span { font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
a.door[href]:hover, .door.hover { border-color: var(--cyan); }
.door:not([href]) { opacity: .62; cursor: default; }
.door[data-status='dev'] span { color: var(--magenta); }

.road { margin: 18px 0 0; padding: 0; list-style: none; }
.road li { position: relative; padding: 9px 0 9px 22px; border-top: 1px solid var(--line-2); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.road li::before { content: ''; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border: 1px solid #8fd8ff; border-radius: 50%; }
.road li.done::before { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px rgba(0, 229, 209, .7); }
.road b { display: block; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8fd8ff; margin-bottom: 2px; }
.road li.done b { color: var(--cyan); }
.hl { color: var(--ink); }

/* Cyberia 2.0, said on the first screen */
.relaunch {
  display: flex; align-items: flex-start; gap: 12px; max-width: 480px; margin-top: 22px; padding: 12px 14px; text-decoration: none;
  border: 1px solid rgba(255, 43, 214, .34); background: linear-gradient(90deg, rgba(255, 43, 214, .12), rgba(5, 9, 10, .5)); transition: border-color .2s, background .2s;
}
.relaunch:hover, .relaunch:focus-visible { border-color: var(--magenta); outline: none; background: linear-gradient(90deg, rgba(255, 43, 214, .2), rgba(5, 9, 10, .55)); }
.relaunch-tag { flex: none; margin-top: 1px; padding: 4px 7px; font: 500 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #fff; background: rgba(255, 43, 214, .24); border: 1px solid rgba(255, 43, 214, .55); }
.relaunch-text { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.relaunch-text b { color: var(--ink); font-weight: 700; }

/* The swap window. A card in the page; in the scene (.in-scene) its glass is drawn by WebGL behind it. */
.swap-home { position: absolute; z-index: 3; right: clamp(16px, 4.5vw, 72px); top: 50%; transform: translateY(-50%); }
.swap {
  position: relative; width: 380px; max-width: 100%; padding: 20px 20px 16px; border-radius: 16px; color: var(--ink); text-align: left;
  background: linear-gradient(180deg, rgba(8, 20, 23, .95), rgba(3, 9, 11, .95)); border: 1px solid rgba(0, 229, 209, .3);
  box-shadow: 0 0 0 1px rgba(255, 43, 214, .06), 0 24px 80px rgba(0, 0, 0, .55), 0 0 40px rgba(0, 229, 209, .08);
}
.swap:not(.in-scene) { position: relative !important; transform: none !important; left: auto !important; top: auto !important; }
.swap.in-scene { background: none; border-color: transparent; box-shadow: none; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: opacity .2s; }
.swap.in-scene .swap-coin { background-image: none !important; box-shadow: none; }
.swap-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.swap-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.swap-kicker { margin: 0; font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); white-space: nowrap; }
.swap-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 11px 12px 9px 10px;
  border-radius: 12px; background: rgba(230, 244, 242, .045); border: 1px solid rgba(230, 244, 242, .08); transition: border-color .2s;
}
.swap-row:focus-within { border-color: rgba(0, 229, 209, .5); }
.swap-coin { width: 46px; height: 46px; border-radius: 50%; background: center / cover no-repeat; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 18px rgba(0, 0, 0, .5); }
.swap-label { display: block; font: 500 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.swap-line { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.swap-amount {
  flex: 1; min-width: 0; padding: 0; border: 0; outline: none; background: none; color: var(--ink);
  font: 700 24px/1.25 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.swap.busy output.swap-amount { opacity: .5; }
.swap-sub { display: block; min-height: 17px; margin-top: 1px; font: 12px/1.4 var(--mono); color: var(--muted); }
.swap-asset {
  display: inline-flex; flex: none; align-items: center; gap: 6px; min-height: 38px; padding: 0 9px 0 5px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(230, 244, 242, .18); background: rgba(5, 9, 10, .7); color: var(--ink); font: 700 14px var(--sans); transition: border-color .2s;
}
.swap-asset img { width: 24px; height: 24px; border-radius: 50%; }
.swap-asset-name { display: grid; line-height: 1.1; text-align: left; }
.swap-asset-name span { font: 500 9.5px var(--mono); letter-spacing: .02em; color: var(--muted); }
.swap-asset i { font-style: normal; font-size: 9px; color: var(--muted); }
.swap-asset:hover, .swap-asset:focus-visible { border-color: var(--cyan); outline: none; }
.swap-mid { position: relative; z-index: 1; display: flex; justify-content: center; height: 8px; }
.swap-flip {
  width: 32px; height: 32px; margin-top: -12px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1;
  border: 1px solid rgba(0, 229, 209, .45); background: #041114; color: var(--cyan); transition: transform .25s, border-color .2s;
}
.swap-flip:hover:not(:disabled), .swap-flip:focus-visible { border-color: var(--cyan); transform: rotate(180deg); outline: none; }
.swap-flip:disabled { opacity: .35; cursor: not-allowed; }
.swap-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 2px 0; }
.swap-facts dt { font: 500 9.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.swap-facts dd { margin: 3px 0 0; font: 600 13px var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swap-note { margin: 10px 2px 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.swap-note:empty { display: none; }
.swap-note.bad { color: #ff9ad9; }
.swap-go { width: 100%; margin-top: 14px; }
.swap-small { margin: 10px 2px 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.swap-pick { position: absolute; inset: 0; z-index: 5; padding: 16px; border-radius: inherit; background: rgba(3, 9, 11, .97); overflow: auto; }
.swap-pick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.swap-pick-head b { font-size: 16px; }
.swap-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(230, 244, 242, .2); background: none; color: var(--ink); font-size: 18px; cursor: pointer; }
.swap-x:hover, .swap-x:focus-visible { border-color: var(--cyan); outline: none; }
.swap-pick ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; padding: 0; list-style: none; }
.swap-pick [data-asset] {
  display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: center; width: 100%; padding: 8px 10px; text-align: left; cursor: pointer;
  border-radius: 10px; border: 1px solid rgba(230, 244, 242, .1); background: rgba(230, 244, 242, .03); color: var(--ink);
}
.swap-pick [data-asset] img { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; }
.swap-pick [data-asset] b { font-size: 14px; }
.swap-pick [data-asset] span { font: 10px var(--mono); color: var(--muted); }
.swap-pick [aria-selected='true'], .swap-pick [data-asset]:hover, .swap-pick [data-asset]:focus-visible { border-color: var(--cyan); outline: none; }

.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 22px 0 0; padding: 0; list-style: none; }
.links a { font: 12px var(--mono); color: var(--muted); text-decoration: none; letter-spacing: .06em; }
.links a:hover { color: var(--cyan); }

.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 3vw, 36px); font: 11px var(--mono); color: var(--muted); border-top: 1px solid var(--line-2); background: var(--bg); }

/* Phones and narrow windows: the scene is a band at the top, the copy scrolls under it. */
@media (max-width: 940px) {
  #scene { height: var(--band); bottom: auto; z-index: 5; box-shadow: 0 1px 0 var(--line); }
  #labels { bottom: auto; height: var(--band); z-index: 6; }
  body:not(.no-gl)::after { content: ''; position: fixed; z-index: 5; left: 0; right: 0; top: var(--band); height: 26px; pointer-events: none; background: linear-gradient(var(--bg), rgba(5, 9, 10, 0)); }
  .nav { padding: 10px 16px; gap: 12px; }
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  main { padding-top: var(--band); }
  section { min-height: auto; padding: 28px 16px 36px; display: block; }
  .copy, .copy.wide { width: 100%; }
  .panel .copy { padding: 0; background: none; border: 0; }
  .hero::before { display: none; }
  .hero .copy { margin-top: 0; }
  section + section { border-top: 1px solid var(--line-2); }
  section.end { padding-bottom: 30vh; }
  h1 { font-size: clamp(32px, 9vw, 44px); }
  .lede { margin-top: 16px; font-size: 16px; }
  .pulse { grid-template-columns: 1fr 1fr; margin-top: 28px; }
  .pulse div { border-bottom: 1px solid var(--line-2); }
  .pulse div:nth-child(2n) { border-right: 0; }
  .pulse div:last-child { grid-column: 1 / -1; }
  .lbl { font-size: 10px; padding: 3px 6px; }
  .lbl small { display: none; }
  .lbl.big { font-size: 13px; }
  .hint { display: none; }
  body.no-gl main { padding-top: 64px; }
  .swap-home { position: static; transform: none; width: 100%; margin-top: 26px; }
  .swap { width: 100%; }
  .relaunch { margin-top: 18px; }
}
@media (max-width: 420px) {
  .doors ul { grid-template-columns: 1fr; }
  .params { grid-template-columns: 1fr; }
  .swap { padding: 16px 14px 14px; }
  .swap-amount { font-size: 22px; }
  .swap-asset-name span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live.on i { animation: none; }
}
