/* ============================================================
   Arthea GameLab, gamelab.arthea.ai
   One viewport, no scroll. A 3D shelf of productions.
   Tokens mirror the main site: Satoshi, #34d399 green, #010101
   stage black, white-8 glass surfaces, pill radii.
   ============================================================ */

@font-face {
  font-family: Satoshi;
  src: url("/fonts/Satoshi-Regular.woff2") format("woff2"), url("/fonts/Satoshi-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Satoshi;
  src: url("/fonts/Satoshi-Medium.woff2") format("woff2"), url("/fonts/Satoshi-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Satoshi;
  src: url("/fonts/Satoshi-Bold.woff2") format("woff2"), url("/fonts/Satoshi-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #34d399;
  --green-bright: #34e6a0;
  --green-deep: #04130b;
  --stage: #010101;
  --bg: #050807;
  --white-70: rgba(255, 255, 255, .7);
  --white-40: rgba(255, 255, 255, .4);
  --white-20: rgba(255, 255, 255, .2);
  --white-8: rgba(255, 255, 255, .08);
  --card-h: clamp(340px, 58vh, 640px);
  --card-w: calc(var(--card-h) * .5625);
  --cardw-l: min(clamp(560px, 52vw, 800px), 99vh);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: #fff;
  font-family: Satoshi, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a { text-decoration: none; color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---- background fx ---- */
#fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.fx__glow, .fx__grid { will-change: transform; }
.fx__glow--core {
  position: absolute;
  left: 50%; top: 44%;
  width: 96vmin; height: 96vmin;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(52, 211, 153, .14), rgba(52, 211, 153, .045) 46%, transparent 72%);
}
.fx__glow--horizon {
  position: absolute;
  left: -12vw; right: -12vw; bottom: -13vh;
  height: 36vh;
  background: radial-gradient(58% 100% at 50% 100%, rgba(52, 211, 153, .12), transparent 72%);
}
.fx__grid {
  position: absolute;
  left: -18vw; right: -18vw; bottom: -7vh;
  height: 46vh;
  background-image:
    repeating-linear-gradient(90deg, rgba(52, 211, 153, .075) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(52, 211, 153, .05) 0 1px, transparent 1px 72px);
  transform: perspective(720px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, .85), transparent 76%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, .85), transparent 76%);
}
.fx__grain {
  position: fixed; inset: 0;
  z-index: 40;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E") repeat;
  background-size: 160px 160px;
  opacity: .05;
}

/* ---- header ---- */
#top {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 28px 0 calc(28px + env(safe-area-inset-left));
  padding-top: calc(22px + env(safe-area-inset-top));
}
.lockup {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: .98;
  font-weight: 700;
  letter-spacing: -.005em;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: 0 0;
  cursor: default;
}
.lockup__row { display: inline-flex; align-items: baseline; white-space: nowrap; }
.lockup__flask {
  width: .92em; height: 1.08em;
  margin-left: .2em;
  align-self: center;
  transform: translateY(-4%);
  color: var(--green-bright);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--white-8);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.pill:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-1px); }
.pill__arrow { font-size: .82em; opacity: .6; }

/* ---- stage ---- */
#stage {
  position: relative;
  z-index: 10;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2vh, 22px);
  padding-bottom: clamp(6px, 1.6vh, 18px);
}
.deck {
  position: relative;
  align-self: stretch;
  flex: 1;
  min-height: 0;
  perspective: 1700px;
  perspective-origin: 50% 44%;
  touch-action: none;
  cursor: grab;
}
.deck.is-drag { cursor: grabbing; }

/* ---- cards ---- */
.card {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--cardw-l);
  height: calc(var(--cardw-l) * .5625);
  border-radius: 24px;
  will-change: transform;
  transform: translate(-50%, -50%);
}
@media (max-width: 700px) {
  .card { width: var(--card-w); height: var(--card-h); }
}
.card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, .10);
  pointer-events: none;
  z-index: 4;
}
.card__tilt { position: absolute; inset: 0; border-radius: inherit; }
.card__float { position: absolute; inset: 0; border-radius: inherit; }
.card--live .card__float { animation: cardFloat 7.5s ease-in-out infinite; }
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.card__link, .ghost {
  position: absolute; inset: 0;
  border-radius: inherit;
  overflow: hidden;
  display: block;
}
.card--live {
  box-shadow:
    0 34px 90px -22px rgba(0, 0, 0, .8),
    0 0 130px -42px rgba(52, 211, 153, .3);
}
.card__art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.card__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 56%, rgba(1, 5, 3, .74) 96%);
}
.card__foot {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.card__icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .7);
}
.card__live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(2, 12, 7, .55);
  border: 1px solid rgba(52, 211, 153, .35);
  color: #86eec4;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.card__livedot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 0 rgba(52, 230, 160, .5);
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 230, 160, .45); }
  70% { box-shadow: 0 0 0 7px rgba(52, 230, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 230, 160, 0); }
}
.card__sheen {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .1) 50%, transparent 58%);
  transform: translateX(-140%);
}
.card--live:hover .card__sheen { transform: translateX(140%); transition: transform .95s ease; }
.card__shade {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: #010403;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

/* ---- ghost cards ---- */
.card--ghost {
  box-shadow: 0 26px 70px -26px rgba(0, 0, 0, .7);
}
.card--ghost .ghost {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(52, 211, 153, .05), transparent 55%),
    linear-gradient(160deg, #0b100e, #060a09 55%, #040706);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.ghost__flask {
  width: 30px; height: 34px;
  color: rgba(52, 211, 153, .22);
}
.ghost__num {
  font-size: clamp(44px, 7.4vh, 68px);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .16);
}
.ghost__cap {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .32em;
  text-indent: .32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .32);
}
.card__hit { position: absolute; inset: 0; border-radius: inherit; z-index: 5; }

/* ---- meta ---- */
.meta {
  position: relative;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  min-height: 128px;
  padding: 0 20px;
}
.meta__eyebrow {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .3em;
  text-indent: .3em;
  text-transform: uppercase;
  color: var(--green);
}
.meta__title {
  font-size: clamp(21px, 3.1vh, 27px);
  font-weight: 700;
  letter-spacing: -.01em;
}
.meta__line { font-size: 13.5px; color: rgba(255, 255, 255, .55); }
.meta__ctawrap {
  height: 46px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity .25s ease;
}
.meta__ghostcta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--white-8);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.meta__ghostcta:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-1px); }
.meta__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-deep);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1;
  box-shadow: 0 10px 32px -10px rgba(52, 211, 153, .55);
  transition: transform .25s ease, filter .25s ease;
}
.meta__cta .pill__arrow { opacity: .75; }
.meta__cta:hover { transform: translateY(-1px); filter: brightness(1.07); }
.meta__cta:active { transform: scale(.97); }
.meta.is-swap .meta__eyebrow,
.meta.is-swap .meta__title,
.meta.is-swap .meta__line,
.meta.is-swap .meta__ctawrap {
  opacity: 0;
  transform: translateY(7px);
}
.meta__eyebrow, .meta__title, .meta__line, .meta__ctawrap {
  transition: opacity .24s ease, transform .24s ease;
}

/* ---- dots ---- */
.dots {
  position: relative;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 2px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  transition: background .3s ease, width .3s var(--ease-out);
}
.dot:hover { background: rgba(255, 255, 255, .45); }
.dot.is-on {
  width: 22px;
  background: var(--green-bright);
  box-shadow: 0 0 14px -2px rgba(52, 230, 160, .6);
}

/* ---- footer ---- */
#foot {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px calc(16px + env(safe-area-inset-bottom));
  font-size: 11.5px;
  color: var(--white-40);
}
.foot__link { transition: color .25s ease; display: inline-flex; align-items: center; gap: 5px; }
.foot__link:hover { color: #fff; }

/* ---- hint, under the dots ---- */
.hint {
  position: relative;
  z-index: 45;
  font-size: 11px;
  color: rgba(255, 255, 255, .32);
  transition: opacity .9s ease;
}
.hint.is-used { opacity: 0; }
.hint--coarse { display: none; }
@media (pointer: coarse) {
  .hint--fine { display: none; }
  .hint--coarse { display: inline; }
}

/* ---- intro ---- */
#intro {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--stage);
  display: grid;
  place-items: center;
}
#splash {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  object-fit: contain;
  transition: opacity .26s ease;
}
#intro.is-vidout #splash { opacity: 0; }
body.is-ready #intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .6s ease .1s, visibility 0s .75s;
}
html.skip-intro #intro, html:not(.js) #intro { display: none; }

/* ---- choreography: hidden while loading, staggered reveal ---- */
html.js body.is-loading .lockup { opacity: 0; }
html.js body.is-loading .card__tilt,
html.js body.is-loading .meta,
html.js body.is-loading .dots,
html.js body.is-loading .pill,
html.js body.is-loading #foot,
html.js body.is-loading .fx__glow,
html.js body.is-loading .fx__grid {
  opacity: 0;
}
html.js body.is-loading .card__tilt { transform: translateY(46px) scale(.94); }
html.js body.is-loading .meta { transform: translateY(18px); }
html.js body.is-loading .dots { transform: translateY(12px); }

body.is-ready .lockup { opacity: 1; }
body.is-ready .card__tilt,
body.is-ready .meta,
body.is-ready .dots,
body.is-ready .pill,
body.is-ready #foot,
body.is-ready .fx__glow,
body.is-ready .fx__grid {
  opacity: 1;
  transform: none;
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
body.is-ready .card--live .card__tilt { transition-delay: .1s; }
body.is-ready .card--ghost[data-i="1"] .card__tilt { transition-delay: .2s; }
body.is-ready .card--ghost[data-i="2"] .card__tilt { transition-delay: .28s; }
body.is-ready .meta { transition-delay: .34s; }
body.is-ready .dots { transition-delay: .42s; }
body.is-ready .pill { transition-delay: .38s; }
body.is-ready #foot { transition-delay: .48s; }
body.is-ready .fx__glow, body.is-ready .fx__grid { transition-duration: 1.4s; }

/* safety: if gamelab.js never runs, force everything visible */
html.js body.is-loading .lockup,
html.js body.is-loading .card__tilt,
html.js body.is-loading .meta,
html.js body.is-loading .dots,
html.js body.is-loading .pill,
html.js body.is-loading #foot,
html.js body.is-loading .fx__glow,
html.js body.is-loading .fx__grid {
  animation: aglSafety .7s ease 6s forwards;
}
html.js body.is-loading #intro { animation: aglSafetyOut .6s ease 6s forwards; }
@keyframes aglSafety { to { opacity: 1; transform: none; } }
@keyframes aglSafetyOut { to { opacity: 0; visibility: hidden; } }

/* ---- responsive ---- */
@media (max-width: 700px) {
  :root { --card-h: min(54dvh, 128vw); }
  #top { padding: 16px 18px 0 calc(18px + env(safe-area-inset-left)); padding-top: calc(16px + env(safe-area-inset-top)); }
  .lockup { font-size: 11.5px; }
  .pill { padding: 8px 13px; font-size: 12px; }
  .meta { min-height: 118px; }
  .meta__line { font-size: 12.5px; }
  #foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); font-size: 10.5px; }
  .card__icon { width: 46px; height: 46px; border-radius: 12px; }
  .card__foot { left: 13px; right: 13px; bottom: 13px; }
}
@media (max-width: 560px) {
  .foot__hint {
    position: fixed;
    left: 0; right: 0;
    bottom: calc(46px + env(safe-area-inset-bottom));
    text-align: center;
    pointer-events: none;
  }
}
@media (max-height: 600px) {
  :root { --card-h: clamp(280px, 52vh, 640px); }
  .meta { min-height: 104px; gap: 4px; }
  .meta__ctawrap { height: 40px; }
  .meta__cta { padding: 11px 20px; font-size: 13px; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .card--live .card__float, .card__livedot { animation: none; }
  .card--live:hover .card__sheen { transition: none; transform: translateX(-140%); }
  body.is-ready .card__tilt,
  body.is-ready .meta,
  body.is-ready .dots,
  body.is-ready .pill,
  body.is-ready #foot,
  body.is-ready .fx__glow,
  body.is-ready .fx__grid { transition-duration: .3s; transition-delay: 0s; }
  .dot.is-on { transition: none; }
}

/* ============================================================
   Contact: work with the studio
   ============================================================ */
.lockup--link { cursor: pointer; }
.lockup--link .lockup__flask { transition: filter .3s ease; }
.lockup--link:hover .lockup__flask { filter: drop-shadow(0 0 7px rgba(52, 230, 160, .8)); }

.c-hero {
  position: relative;
  z-index: 10;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 13px;
  padding: 0 24px 5vh;
}
.c-flask {
  position: absolute;
  left: 50%; top: 52%;
  width: 64vh; height: 64vh;
  transform: translate(-50%, -50%);
  color: #34d399;
  opacity: .05;
  pointer-events: none;
}
.c-bub {
  position: absolute;
  left: 50%;
  bottom: 30%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}
.c-bub--1 { width: 5px; height: 5px; margin-left: 34px; background: rgba(52, 230, 160, .35); animation: bubRise 7s ease-in infinite .6s; }
.c-bub--2 { width: 4px; height: 4px; margin-left: -44px; background: rgba(52, 230, 160, .28); animation: bubRise 8.5s ease-in infinite 2.6s; }
.c-bub--3 { width: 3px; height: 3px; margin-left: 6px; background: rgba(52, 230, 160, .22); animation: bubRise 10s ease-in infinite 4.8s; }
@keyframes bubRise {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  85% { opacity: .25; }
  100% { transform: translateY(-36vh); opacity: 0; }
}
body:not(.is-ready) .c-bub { animation-play-state: paused; }

.c-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  text-indent: .3em;
  text-transform: uppercase;
  color: var(--green);
}
.c-title {
  font-size: clamp(38px, 8.4vh, 66px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.02;
}
.c-line {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .55);
}
.c-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.c-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--white-8);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .85);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.c-copy:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-1px); }
.c-copy.is-done { color: #7dedbf; border-color: rgba(52, 211, 153, .45); }
.c-copy__ic { width: 13px; height: 13px; opacity: .6; }

html.js body.is-loading .c-stag { opacity: 0; transform: translateY(16px); }
html.js body.is-loading .c-flask { opacity: 0; }
body.is-ready .c-stag {
  opacity: 1;
  transform: none;
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
body.is-ready .c-eyebrow { transition-delay: .05s; }
body.is-ready .c-title { transition-delay: .12s; }
body.is-ready .c-line { transition-delay: .22s; }
body.is-ready .c-actions { transition-delay: .32s; }
body.is-ready .c-flask { opacity: .06; transition: opacity 1.6s ease .2s; }
html.js body.is-loading .c-stag { animation: aglSafety .7s ease 6s forwards; }

@media (max-width: 560px) {
  .c-line br { display: none; }
  .c-line { max-width: 30ch; }
  .c-flask { width: 78vw; height: 78vw; }
}
@media (prefers-reduced-motion: reduce) {
  .c-bub { display: none; }
  body.is-ready .c-stag { transition-duration: .3s; transition-delay: 0s; }
}
html.rm .c-bub { display: none; }
