@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url(./fonts/SpaceGrotesk-700.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url(./fonts/SpaceGrotesk-500.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url(./fonts/JetBrainsMono-400.woff2) format('woff2'); }

:root { --teal: #00d68f; --cream: #ece4d3; --bg: #0c0e11; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  overflow: hidden;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: crosshair;
  user-select: none;
}

/* ---------- capturable stage ---------- */
#stage { position: fixed; inset: 0; }
.bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 45% at 50% 78%, rgba(0,214,143,.13), transparent 70%),
    radial-gradient(50% 40% at 50% -10%, rgba(236,228,211,.05), transparent 70%),
    var(--bg);
}
#bg3d {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 2s ease;
}
#bg3d.on { opacity: 1; }
.dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(236,228,211,.07) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 70% at 50% 50%, black, transparent 85%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, black, transparent 85%);
}

/* ---------- capturable lab artifacts ---------- */
.art { position: absolute; }
.art.machine {
  left: -3%; bottom: -6%; width: min(34vw, 420px); height: auto;
  opacity: .14; transform: rotate(-4deg);
  pointer-events: none;
}
.art.keycap {
  top: 12%; left: 6%; width: min(20vw, 230px); height: auto;
  transform: rotate(-2deg);
}
.art.log {
  right: 6%; bottom: 12%;
  display: flex; flex-direction: column; gap: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .05em;
  color: rgba(0,214,143,.6);
  background: rgba(8,10,12,.55);
  border: 1px solid rgba(0,214,143,.16);
  border-radius: 8px; padding: 14px 18px;
}
.art.log .t { color: rgba(0,214,143,.9); animation: blink 1.1s steps(1) infinite; }
.art.orb {
  left: 12%; top: 52%;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(0,214,143,.5), rgba(0,214,143,.12) 45%, transparent 70%);
  filter: blur(2px);
}
.art.tag {
  left: 50%; bottom: 5.5%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; letter-spacing: .45em; text-indent: .45em;
  color: rgba(236,228,211,.3);
}
@media (max-width: 760px) {
  .art.keycap, .art.orb { display: none; }
  .art.log { font-size: 9px; right: 4%; bottom: 10%; }
}

.copy {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%);
  text-align: center;
}
.copy h1, .copy .soon { display: grid; justify-content: center; }
.copy .sizer { grid-area: 1 / 1; visibility: hidden; white-space: pre; }
.copy .typed { grid-area: 1 / 1; text-align: left; white-space: pre; justify-self: start; }
.copy h1 {
  color: var(--cream);
  font-size: clamp(42px, 8vw, 92px);
  font-weight: 700; letter-spacing: -0.045em; line-height: 1;
  text-shadow: 0 0 70px rgba(0,214,143,.18);
  position: relative;
}
.copy .by {
  margin-top: 30px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .5em; text-indent: .5em;
  color: rgba(236,228,211,.45);
  opacity: 0;
}
.copy .by.in { animation: blurIn .5s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes blurIn {
  from { opacity: 0; filter: blur(10px); transform: translateY(6px); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
.copy .soon {
  margin-top: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: .3em; text-indent: .3em;
  color: var(--teal);
}
.cursor { animation: blink 1.1s steps(1) infinite; font-size: 10px; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- viewfinder chrome ---------- */
.frame { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.frame i { position: absolute; width: 26px; height: 26px; border: 0 solid rgba(236,228,211,.35); }
.frame .tl { top: 18px; left: 18px; border-top-width: 1.5px; border-left-width: 1.5px; }
.frame .tr { top: 18px; right: 18px; border-top-width: 1.5px; border-right-width: 1.5px; }
.frame .bl { bottom: 18px; left: 18px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.frame .br { bottom: 18px; right: 18px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.hud {
  position: fixed; z-index: 12; pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .08em; color: var(--teal);
  background: rgba(10,12,14,.75);
  border: 1px solid rgba(0,214,143,.25);
  padding: 3px 8px; border-radius: 4px;
  transform: translate(14px, 18px);
  opacity: 0; transition: opacity .3s ease;
  white-space: nowrap;
}
.hud.on { opacity: 1; }

.hint {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%);
  z-index: 6; pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; letter-spacing: .4em; text-indent: .4em;
  color: rgba(236,228,211,.28);
  opacity: 0; transition: opacity 1s ease;
}
.hint.on { opacity: 1; }

/* ---------- selection ---------- */
#selection {
  position: fixed; z-index: 12; pointer-events: none;
  border: 1px dashed rgba(0,214,143,.9);
  background: rgba(0,214,143,.05);
  box-shadow: 0 0 0 9999px rgba(5,6,8,.35);
}
#selection .h {
  position: absolute; width: 7px; height: 7px;
  background: var(--bg); border: 1.5px solid var(--teal);
}
.h-tl { top: -4px; left: -4px; } .h-tm { top: -4px; left: calc(50% - 4px); } .h-tr { top: -4px; right: -4px; }
.h-ml { top: calc(50% - 4px); left: -4px; } .h-mr { top: calc(50% - 4px); right: -4px; }
.h-bl { bottom: -4px; left: -4px; } .h-bm { bottom: -4px; left: calc(50% - 4px); } .h-br { bottom: -4px; right: -4px; }
#selection .dims {
  position: absolute; right: 0; bottom: -26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .08em; color: var(--teal);
  background: rgba(10,12,14,.85); padding: 3px 8px; border-radius: 4px;
  white-space: nowrap;
}

/* ---------- flash + captured cards ---------- */
#flash {
  position: fixed; inset: 0; z-index: 13; pointer-events: none;
  background: #fff; opacity: 0;
}
#flash.pop { animation: flashpop .32s ease-out; }
@keyframes flashpop { 0% { opacity: .75; } 100% { opacity: 0; } }

.shot {
  position: fixed; z-index: 8; overflow: hidden;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(236,228,211,.14),
    0 24px 60px rgba(0,0,0,.65),
    0 4px 14px rgba(0,0,0,.5);
  transition: transform .8s cubic-bezier(.16,1,.3,1), left .8s cubic-bezier(.16,1,.3,1),
              top .8s cubic-bezier(.16,1,.3,1), width .8s cubic-bezier(.16,1,.3,1),
              height .8s cubic-bezier(.16,1,.3,1), opacity .5s ease;
}
.shot .inner { position: absolute; pointer-events: none; }
.shot.fade { opacity: 0; }

/* hero capture floats above the wordmark */
.shot.hero { animation: heroFloat 7s ease-in-out 1s infinite alternate; }
@keyframes heroFloat {
  from { transform: rotate(-1.6deg) translateY(0); }
  to   { transform: rotate(1.2deg) translateY(-8px); }
}

/* ---------- film ---------- */
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 10;
  background:
    radial-gradient(120% 95% at 50% 45%, transparent 45%, rgba(0,0,0,.5) 100%),
    linear-gradient(180deg, rgba(0,0,0,.28), transparent 16%, transparent 82%, rgba(0,0,0,.4));
}
.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 11; opacity: .05;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='170'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2'/%3E%3C/filter%3E%3Crect width='170' height='170' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); } 80% { transform: translate(3%,3%); }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .cursor, .shot.hero { animation: none; }
}
