:root {
  --bg: #17191e;
  --panel: rgba(24, 25, 29, 0.78);
  --field: #403a2a;
  --field-soft: #73603d;
  --line: rgba(166, 141, 111, 0.38);
  --text: #f2f2f2;
  --muted: #c9c0b4;
  --accent: #b44120;
  --amber: #d28a35;
  --paper: #d9c8a7;
  --steel: #a9b0ae;
  --font-body: "Inter", system-ui, sans-serif;
  --font-heading: "Barlow Condensed", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

button,
input {
  font: inherit;
}

.launch-stage {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100vh;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(23, 25, 30, 0.96), rgba(64, 58, 42, 0.86) 48%, rgba(27, 29, 26, 0.96)),
    radial-gradient(circle at 10% 15%, rgba(180, 65, 32, 0.16), transparent 34%),
    radial-gradient(circle at 84% 74%, rgba(210, 138, 53, 0.14), transparent 30%),
    #17191e;
}

.launch-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(35deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.02) 25%, transparent 25%),
    linear-gradient(35deg, transparent 75%, rgba(0, 0, 0, 0.13) 75%),
    linear-gradient(145deg, transparent 75%, rgba(0, 0, 0, 0.16) 75%);
  background-size: 96px 96px;
  background-position: 0 0, 48px 0, 48px -48px, 0 48px;
  opacity: 0.72;
}

.launch-stage::after {
  content: "";
  position: absolute;
  inset: -20vh -20vw;
  z-index: -2;
  background:
    linear-gradient(90deg, transparent, rgba(210, 138, 53, 0.08), transparent),
    repeating-linear-gradient(90deg, rgba(242, 242, 242, 0.03) 0 1px, transparent 1px 72px);
  transform: rotate(-8deg);
  opacity: 0.55;
}

.range-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(166, 141, 111, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 141, 111, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle, black 0 42%, transparent 74%);
  opacity: 0.7;
}

.wind-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(100deg, transparent 12%, rgba(201, 192, 180, 0.12) 12.2%, transparent 12.6%),
    linear-gradient(100deg, transparent 38%, rgba(210, 138, 53, 0.12) 38.2%, transparent 38.6%),
    linear-gradient(100deg, transparent 72%, rgba(201, 192, 180, 0.1) 72.2%, transparent 72.6%);
  animation: drift 18s linear infinite;
}

.target-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.language-toggle {
  position: absolute;
  left: clamp(16px, 4vw, 46px);
  top: clamp(16px, 4vw, 42px);
  z-index: 7;
  min-width: 46px;
  height: 38px;
  border: 1px solid rgba(166, 141, 111, 0.38);
  background: rgba(16, 18, 22, 0.68);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  border-color: rgba(210, 138, 53, 0.74);
  outline: none;
}

.brand-core {
  position: relative;
  z-index: 5;
  width: min(92vw, 980px);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  pointer-events: none;
}

.brand-mark {
  position: relative;
  width: clamp(72px, 11vw, 118px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(210, 138, 53, 0.42);
  background:
    linear-gradient(135deg, rgba(180, 65, 32, 0.22), rgba(210, 138, 53, 0.12)),
    rgba(16, 18, 22, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 44px rgba(180, 65, 32, 0.18);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span::before,
.brand-mark span::after {
  content: "";
  position: absolute;
  background: rgba(210, 138, 53, 0.88);
}

.brand-mark::before {
  width: 60%;
  height: 1px;
}

.brand-mark::after {
  width: 1px;
  height: 60%;
}

.brand-mark span {
  width: 56%;
  aspect-ratio: 1;
  border: 2px solid rgba(210, 138, 53, 0.88);
  border-radius: 50%;
}

.brand-mark span::before {
  inset: 17%;
  border: 1px solid rgba(242, 242, 242, 0.42);
  border-radius: 50%;
  background: transparent;
}

.brand-mark span::after {
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  left: calc(50% - 3.5px);
  top: calc(50% - 3.5px);
  box-shadow: 0 0 20px rgba(180, 65, 32, 0.75);
}

h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(3.8rem, 11.4vw, 9.8rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  text-wrap: balance;
  text-shadow:
    0 2px 0 rgba(210, 138, 53, 0.22),
    0 26px 90px rgba(0, 0, 0, 0.66);
}

.brand-line {
  width: min(680px, 88vw);
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  font-weight: 700;
  line-height: 1.45;
}

.countdown-panel {
  min-width: min(88vw, 640px);
  display: grid;
  gap: 8px;
  padding: 18px 22px;
  border: 1px solid rgba(210, 138, 53, 0.38);
  background:
    linear-gradient(90deg, rgba(16, 18, 22, 0.3), rgba(32, 32, 37, 0.82), rgba(16, 18, 22, 0.3)),
    rgba(0, 0, 0, 0.2);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.34);
}

.countdown-panel span {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 1.2vw, 0.82rem);
  font-weight: 700;
  text-transform: uppercase;
}

.countdown-panel strong {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 9vw, 7.4rem);
  line-height: 0.86;
  color: var(--text);
  letter-spacing: 0;
  text-transform: uppercase;
}

.countdown-panel.is-live {
  border-color: rgba(225, 45, 32, 0.74);
  box-shadow:
    0 16px 50px rgba(0, 0, 0, 0.34),
    0 0 44px rgba(225, 45, 32, 0.2);
}

.countdown-panel.is-live span,
.countdown-panel.is-live strong {
  color: #e12d20;
}

.countdown-panel.is-live strong {
  text-shadow:
    0 0 24px rgba(225, 45, 32, 0.52),
    0 12px 42px rgba(0, 0, 0, 0.62);
}

.hud {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 4px;
  min-width: 178px;
  padding: 14px;
  border: 1px solid rgba(166, 141, 111, 0.32);
  background: rgba(16, 18, 22, 0.62);
  backdrop-filter: blur(12px);
  color: var(--muted);
}

.hud span,
.hud small {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  text-transform: uppercase;
}

.hud strong {
  color: var(--amber);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 0.9;
  text-transform: uppercase;
}

.hud-right {
  max-width: min(42vw, 560px);
}

.hud-right strong {
  font-size: clamp(1.25rem, 2.35vw, 2rem);
  line-height: 0.96;
}

.hud-left {
  left: clamp(16px, 4vw, 46px);
  bottom: clamp(16px, 4vw, 42px);
}

.hud-right {
  right: clamp(16px, 4vw, 46px);
  top: clamp(16px, 4vw, 42px);
}

.target {
  --size: 92px;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: auto;
  cursor: crosshair;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  animation: target-in 420ms cubic-bezier(0.18, 0.9, 0.22, 1), target-float var(--float, 3.6s) ease-in-out infinite alternate;
  filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.42));
}

.target::before,
.target::after {
  content: "";
  position: absolute;
  inset: 0;
}

.target.clay::before {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, transparent 0 25%, rgba(39, 28, 18, 0.54) 26% 29%, transparent 30%),
    radial-gradient(circle at 50% 50%, #f0a744 0 28%, #bd5a23 29% 50%, #351b13 51% 56%, transparent 57%);
}

.target.clay::after {
  inset: 19%;
  border: 2px solid rgba(255, 231, 164, 0.56);
  border-radius: 50%;
}

.target.precision::before {
  border-radius: 50%;
  background:
    radial-gradient(circle, #1b1714 0 10%, #d5c19b 11% 20%, #1b1714 21% 28%, #d5c19b 29% 39%, #1b1714 40% 47%, #d5c19b 48% 61%, #1b1714 62% 66%, transparent 67%),
    linear-gradient(#1b1714, #1b1714);
  border: 5px solid #d5c19b;
}

.target.ipsc {
  aspect-ratio: 0.68;
}

.target.ipsc::before {
  clip-path: polygon(18% 0, 82% 0, 100% 20%, 100% 100%, 0 100%, 0 20%);
  background:
    linear-gradient(90deg, transparent 48%, rgba(40, 28, 18, 0.28) 48% 52%, transparent 52%),
    linear-gradient(#d0b47f, #af8a4f);
  border: 3px solid rgba(46, 32, 20, 0.7);
}

.target.ipsc::after {
  inset: 17% 18% 34%;
  border: 2px solid rgba(70, 45, 25, 0.38);
}

.target.popper {
  --size: 82px;
  aspect-ratio: 0.43;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48), transparent 42%) 50% 46% / 30% 62% no-repeat,
    linear-gradient(180deg, #f8fbf8 0%, #dfe8e1 58%, #b8c4bc 100%) 50% 47% / 31% 63% no-repeat;
}

.target.popper::before {
  inset: auto;
  width: 76%;
  height: auto;
  aspect-ratio: 1;
  left: 12%;
  top: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.98) 0 14%, transparent 15%),
    linear-gradient(135deg, #ffffff 0%, #eef3ef 48%, #bfc9c1 100%);
  box-shadow:
    inset -9px -13px 18px rgba(70, 80, 72, 0.18),
    inset 9px 8px 12px rgba(255, 255, 255, 0.58);
}

.target.popper::after {
  inset: auto;
  width: 98%;
  height: 17%;
  left: 1%;
  bottom: 0;
  clip-path: polygon(10% 18%, 90% 18%, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 13% 72%, #111312 0 4%, transparent 4.5%),
    radial-gradient(circle at 87% 72%, #111312 0 4%, transparent 4.5%),
    linear-gradient(#1e211f, #0d0f0e) 50% 12% / 32% 52% no-repeat,
    linear-gradient(90deg, #181a18, #5c615b 50%, #181a18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 -9px 0 -6px rgba(20, 22, 20, 0.82);
}

.target.hit {
  pointer-events: none;
  animation: hit-fade 650ms ease forwards;
}

.target.hit.clay::before {
  clip-path: polygon(50% 50%, 0 8%, 32% 0, 55% 45%, 88% 6%, 100% 26%, 61% 53%, 98% 81%, 75% 100%, 51% 58%, 22% 100%, 0 78%, 42% 52%);
}

.target.hit.precision::after,
.target.hit.ipsc::after {
  inset: 42% auto auto 47%;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #17100c;
  box-shadow:
    -22px -12px 0 -4px rgba(23, 16, 12, 0.78),
    20px 14px 0 -5px rgba(23, 16, 12, 0.7),
    0 0 0 4px rgba(180, 65, 32, 0.18);
}

.target.hit.popper {
  transform-origin: 50% 100%;
  animation: popper-down 760ms ease forwards;
}

.spark {
  position: absolute;
  width: 6px;
  aspect-ratio: 1;
  left: var(--sx);
  top: var(--sy);
  z-index: 6;
  border-radius: 50%;
  background: var(--amber);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: spark 520ms ease-out forwards;
}

@keyframes drift {
  from { transform: translateX(-4vw) rotate(0.001deg); }
  to { transform: translateX(5vw) rotate(0.001deg); }
}

@keyframes target-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.62); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(var(--scale, 1)); }
}

@keyframes target-float {
  from { margin-top: -6px; }
  to { margin-top: 8px; }
}

@keyframes hit-fade {
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.35) rotate(12deg); filter: blur(2px) drop-shadow(0 0 18px rgba(210, 138, 53, 0.38)); }
}

@keyframes popper-down {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(var(--scale, 1)); }
  70% { opacity: 1; transform: translate(-50%, -50%) rotate(84deg) scale(var(--scale, 1)); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(90deg) translateY(42px) scale(var(--scale, 1)); }
}

@keyframes spark {
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2);
  }
}

@media (max-width: 820px) {
  .launch-stage {
    min-height: 640px;
  }

  .brand-core {
    gap: 14px;
  }

  .countdown-panel {
    min-width: min(88vw, 520px);
  }

  .hud {
    min-width: 142px;
    padding: 11px;
  }

  .hud strong {
    font-size: 1.55rem;
  }

  .hud-right {
    top: auto;
    bottom: 16px;
  }

  .hud-left {
    display: none;
  }

  .language-toggle {
    height: 34px;
    min-width: 42px;
  }

  .target {
    --size: 70px;
  }

  h1 {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wind-lines,
  .target {
    animation: none;
  }
}
