@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/geist-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/geist-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #f8f3ea;
  --muted: rgba(248, 243, 234, 0.64);
  --ember: #ff6b19;
  --gold: #ffc455;
  --void: #090504;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--ink);
  font-family: "Geist", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.experience {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(105, 27, 8, 0.3), transparent 34%),
    radial-gradient(circle at 72% 78%, rgba(255, 78, 12, 0.1), transparent 22%),
    #090504;
}

.experience::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, black, transparent 74%);
}

.camera-stage,
.effects-canvas,
.camera-vignette,
.world-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.camera-stage {
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 650ms ease;
}

.phase-active .camera-stage,
.phase-loading .camera-stage {
  opacity: 1;
}

.camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(0.86) contrast(1.06) brightness(0.82);
}

.camera-feed.is-mirrored {
  transform: scaleX(-1);
}

.camera-vignette {
  background:
    radial-gradient(circle at center, transparent 36%, rgba(6, 2, 0, 0.26) 74%, rgba(6, 2, 0, 0.72) 100%),
    linear-gradient(180deg, rgba(9, 5, 4, 0.44), transparent 22%, transparent 72%, rgba(9, 5, 4, 0.7));
}

.world-grid {
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 169, 84, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 169, 84, 0.3) 1px, transparent 1px);
  background-size: 72px 72px;
  perspective: 400px;
  mask-image: radial-gradient(circle at 50% 52%, black, transparent 72%);
}

.effects-canvas {
  z-index: 3;
  pointer-events: none;
}

.brand-mark {
  position: absolute;
  z-index: 10;
  top: max(22px, env(safe-area-inset-top));
  left: max(22px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-rune {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 196, 85, 0.42);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(13, 6, 3, 0.52);
  box-shadow: inset 0 0 18px rgba(255, 94, 17, 0.12), 0 0 24px rgba(255, 91, 16, 0.08);
  font-family: serif;
  font-size: 17px;
}

.brand-name {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 620;
}

.intro-panel,
.loading-panel,
.error-panel {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  width: min(100%, 720px);
  margin: auto;
  padding: max(78px, calc(env(safe-area-inset-top) + 62px)) 28px max(30px, env(safe-area-inset-bottom));
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.intro-orb {
  position: relative;
  width: clamp(126px, 22vh, 190px);
  height: clamp(126px, 22vh, 190px);
  margin-bottom: clamp(26px, 5vh, 48px);
  animation: orb-float 4.8s ease-in-out infinite;
}

.orb-core {
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, #fffbe0 0 8%, #ffd45f 20%, #ff6417 52%, rgba(155, 18, 0, 0.2) 78%, transparent 80%);
  box-shadow:
    0 0 22px #ff7a19,
    0 0 68px rgba(255, 74, 7, 0.68),
    0 0 120px rgba(255, 45, 0, 0.24);
  animation: core-pulse 1.7s ease-in-out infinite alternate;
}

.orb-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(255, 189, 90, 0.42);
  border-radius: 48% 52% 46% 54%;
  box-shadow: 0 0 16px rgba(255, 85, 18, 0.18);
}

.orb-ring::after,
.orb-ring::before {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd26a;
  box-shadow: 0 0 10px #ff8a20;
  content: "";
}

.orb-ring::before { top: 9%; left: 24%; }
.orb-ring::after { right: 13%; bottom: 21%; }
.orb-ring-one { animation: ring-spin 8s linear infinite; }
.orb-ring-two {
  inset: 0;
  opacity: 0.45;
  transform: rotate(64deg) scaleY(0.72);
  animation: ring-spin-reverse 11s linear infinite;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.intro-panel h1 {
  margin: 0;
  font-size: clamp(42px, 8.4vw, 72px);
  font-weight: 600;
  letter-spacing: -0.068em;
  line-height: 0.92;
  white-space: nowrap;
}

.intro-copy {
  max-width: 410px;
  margin: 22px 0 28px;
  color: var(--muted);
  font-size: clamp(14px, 2.6vw, 17px);
  line-height: 1.55;
}

.primary-button {
  position: relative;
  display: inline-flex;
  min-width: 230px;
  min-height: 56px;
  padding: 0 26px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 223, 151, 0.42);
  border-radius: 999px;
  color: #170702;
  background: linear-gradient(135deg, #ffe190 0%, #ffb33f 42%, #ff6d18 100%);
  box-shadow: 0 10px 42px rgba(255, 82, 10, 0.25), inset 0 1px rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 14px 52px rgba(255, 82, 10, 0.34); }
.primary-button:active { transform: translateY(1px) scale(0.985); }
.button-spark { font-size: 18px; }

.text-button {
  margin-top: 13px;
  padding: 8px 12px;
  border: 0;
  color: rgba(248, 243, 234, 0.62);
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 196, 85, 0.3);
  text-underline-offset: 4px;
  cursor: pointer;
}

.external-link {
  display: inline-flex;
}

.privacy-note {
  display: flex;
  margin: clamp(24px, 4vh, 40px) 0 0;
  align-items: center;
  gap: 8px;
  color: rgba(248, 243, 234, 0.35);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.privacy-note span { color: #5de4a1; font-size: 8px; }

.loading-panel,
.error-panel {
  backdrop-filter: blur(24px);
  background: rgba(9, 5, 4, 0.7);
}

.loader-rune {
  color: var(--gold);
  text-shadow: 0 0 30px var(--ember);
  font-family: serif;
  font-size: 62px;
  animation: core-pulse 900ms ease-in-out infinite alternate;
}

.loading-bar {
  width: min(250px, 70vw);
  height: 2px;
  margin: 26px 0 16px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: loading-sweep 1.1s ease-in-out infinite;
}

.loading-panel p { color: var(--muted); font-size: 13px; }

.error-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 121, 72, 0.44);
  border-radius: 50%;
  color: #ff9464;
  font-size: 24px;
}

.error-panel h2 { margin: 22px 0 10px; font-size: 28px; }
.error-panel p { max-width: 390px; margin: 0 0 26px; color: var(--muted); line-height: 1.55; }

.hud {
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.status-pill {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  min-height: 34px;
  padding: 0 14px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(8, 5, 4, 0.58);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.22);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.assist-indicator {
  position: absolute;
  top: max(68px, calc(env(safe-area-inset-top) + 46px));
  left: 50%;
  display: flex;
  min-height: 28px;
  padding: 0 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(99, 221, 255, 0.18);
  border-radius: 999px;
  color: rgba(195, 245, 255, 0.78);
  background: rgba(5, 14, 18, 0.48);
  box-shadow: 0 0 24px rgba(56, 204, 255, 0.08);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.assist-indicator span {
  color: #87efff;
  font-weight: 760;
}

.assist-indicator b {
  color: rgba(248, 243, 234, 0.42);
  font-weight: 520;
}

.is-assisted .assist-indicator,
.hand-predicted .assist-indicator {
  border-color: rgba(190, 132, 255, 0.5);
  color: #e0c2ff;
  box-shadow: 0 0 34px rgba(153, 78, 255, 0.28);
}

.camera-mode-button {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  display: flex;
  min-height: 34px;
  padding: 0 13px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 196, 85, 0.22);
  border-radius: 999px;
  color: rgba(248, 243, 234, 0.76);
  background: rgba(8, 5, 4, 0.58);
  backdrop-filter: blur(14px);
  font-size: 9px;
  cursor: pointer;
  pointer-events: auto;
}

.camera-mode-button span {
  color: #5de4a1;
  font-size: 8px;
}

.camera-picker {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  display: flex;
  min-height: 34px;
  padding: 0 11px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 196, 85, 0.22);
  border-radius: 999px;
  color: rgba(248, 243, 234, 0.5);
  background: rgba(8, 5, 4, 0.66);
  backdrop-filter: blur(14px);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 8px;
  pointer-events: auto;
}

.camera-picker select {
  width: min(34vw, 150px);
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-overflow: ellipsis;
  cursor: pointer;
}

.camera-picker option {
  color: #160b06;
  background: #fff8ec;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5de4a1;
  box-shadow: 0 0 9px rgba(93, 228, 161, 0.7);
  animation: status-pulse 1.8s ease-in-out infinite;
}

.aim-reticle {
  position: absolute;
  top: 42%;
  left: 50%;
  width: min(62vw, 300px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 193, 91, 0.15);
  border-radius: 50%;
  opacity: 0.55;
  transform: translate(-50%, -50%);
  transition: opacity 240ms ease, transform 240ms ease;
}

.hand-found .aim-reticle {
  opacity: 0.12;
  transform: translate(-50%, -50%) scale(0.82);
}

.aim-reticle::before,
.aim-reticle::after {
  position: absolute;
  inset: 13%;
  border: 1px dashed rgba(255, 193, 91, 0.16);
  border-radius: 50%;
  content: "";
  animation: ring-spin 16s linear infinite;
}

.aim-reticle::after {
  inset: 42%;
  border-style: solid;
  background: radial-gradient(circle, rgba(255, 180, 74, 0.18), transparent 65%);
  animation: core-pulse 1.6s ease-in-out infinite alternate;
}

.gesture-guide {
  position: absolute;
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 72px));
  left: 50%;
  display: grid;
  width: min(calc(100% - 32px), 430px);
  min-height: 76px;
  padding: 8px 14px 9px;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(8, 5, 4, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 46px rgba(0, 0, 0, 0.26);
  transform: translateX(-50%);
}

.gesture-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.gesture-assist-note {
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(139, 229, 255, 0.56);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.gesture-step { display: flex; align-items: center; gap: 8px; }
.gesture-step > span:last-child { display: grid; gap: 2px; font-size: 11px; font-weight: 620; white-space: nowrap; }
.gesture-step small { color: rgba(255, 196, 85, 0.64); font-family: "Geist Mono", ui-monospace, monospace; font-size: 7px; letter-spacing: 0.18em; }
.gesture-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--gold); border: 1px solid rgba(255, 196, 85, 0.2); border-radius: 50%; background: rgba(255, 119, 20, 0.08); }
.fist-icon { font-size: 14px; }
.palm-icon { font-size: 18px; filter: grayscale(1) sepia(1) saturate(3); }
.guide-arrow { color: rgba(255, 255, 255, 0.26); font-size: 15px; }

.fire-button {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  height: 48px;
  padding: 0 15px 0 7px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 184, 82, 0.22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(8, 5, 4, 0.68);
  backdrop-filter: blur(16px);
  cursor: pointer;
  pointer-events: auto;
}

.fire-button-core {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #2b0c00;
  background: radial-gradient(circle at 35% 30%, #fff7c6, #ffbb34 45%, #ff5a0d 100%);
  box-shadow: 0 0 18px rgba(255, 81, 9, 0.46);
  font-family: serif;
}

.fire-button-label { font-size: 10px; font-weight: 620; }

.shot-counter {
  position: absolute;
  bottom: max(31px, calc(env(safe-area-inset-bottom) + 13px));
  left: max(22px, env(safe-area-inset-left));
  color: rgba(248, 243, 234, 0.42);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shot-counter span { margin-right: 5px; color: var(--gold); font-size: 13px; }

.is-blasting .camera-stage {
  animation: camera-kick 440ms cubic-bezier(0.22, 0.8, 0.24, 1);
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-9px) scale(1.025); }
}

@keyframes core-pulse {
  from { opacity: 0.72; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1.08); }
}

@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes ring-spin-reverse { to { transform: rotate(-296deg) scaleY(0.72); } }
@keyframes loading-sweep { from { transform: translateX(-120%); } to { transform: translateX(340%); } }
@keyframes status-pulse { 50% { opacity: 0.38; } }
@keyframes camera-kick {
  0% { transform: scale(1) translate(0, 0); filter: brightness(1); }
  12% { transform: scale(1.04) translate(-5px, 4px); filter: brightness(1.45); }
  28% { transform: scale(1.02) translate(4px, -3px); }
  54% { transform: scale(1.01) translate(-2px, 1px); }
  100% { transform: scale(1) translate(0, 0); filter: brightness(1); }
}

@media (max-width: 520px) {
  .brand-name { display: none; }
  .status-pill { top: max(26px, env(safe-area-inset-top)); }
  .intro-panel { justify-content: center; }
  .intro-panel h1 { font-size: clamp(30px, 9vw, 42px); }
  .gesture-guide { gap: 7px; padding-inline: 10px; }
  .gesture-flow { gap: 7px; }
  .assist-indicator b { display: none; }
  .gesture-icon { width: 30px; height: 30px; }
  .gesture-step > span:last-child { font-size: 9px; }
  .fire-button-label { display: none; }
  .fire-button { width: 48px; padding: 6px; }
  .camera-mode-button { width: 34px; padding: 0; justify-content: center; font-size: 0; }
  .camera-picker { top: max(68px, calc(env(safe-area-inset-top) + 44px)); right: 12px; }
  .camera-picker > span { display: none; }
  .camera-picker select { width: 116px; }
}

@media (max-height: 680px) {
  .intro-orb { width: 110px; height: 110px; margin-bottom: 20px; }
  .intro-copy { margin-block: 15px 20px; }
  .privacy-note { margin-top: 18px; }
  .gesture-guide { bottom: max(66px, calc(env(safe-area-inset-bottom) + 58px)); min-height: 72px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .intro-panel { width: min(100%, 820px); padding-inline: 150px 28px; align-items: flex-start; text-align: left; }
  .intro-orb { position: absolute; right: 32px; width: 120px; height: 120px; }
  .intro-copy { max-width: 430px; }
  .privacy-note { align-self: flex-start; }
  .gesture-guide { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-orb,
  .orb-core,
  .orb-ring,
  .status-dot,
  .loader-rune,
  .loading-bar span {
    animation-duration: 4s;
  }
}


/* Embedded portfolio mode */
.is-embedded .brand-mark {
  left: max(18px, env(safe-area-inset-left));
}
