:root {
  color-scheme: light;
  --ink: #102326;
  --muted: #52676a;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(16, 35, 38, 0.16);
  --green: #2f7f68;
  --blue: #3866b6;
  --red: #d45248;
  --gold: #c89a3a;
  --bg: #eef5f4;
  --shadow: 0 24px 70px rgba(31, 48, 50, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(118deg, rgba(47, 127, 104, 0.28), transparent 36%),
    linear-gradient(244deg, rgba(56, 102, 182, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 46%),
    var(--bg);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1220px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 34px 0;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(520px, 1.2fr);
  gap: clamp(22px, 4vw, 56px);
  align-items: center;
}

.intro-panel {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

h1 {
  max-width: 560px;
  margin: clamp(56px, 11vh, 104px) 0 0;
  color: var(--ink);
  font-size: clamp(3.9rem, 7.7vw, 7.8rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.lede {
  max-width: 530px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.44rem);
  line-height: 1.45;
}

.launch-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  max-width: 100%;
  margin-top: 32px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(212, 82, 72, 0.14);
}

.contact-link {
  display: block;
  width: fit-content;
  margin-top: 22px;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.35;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.game-panel {
  min-width: 0;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 4px 14px;
}

.game-topbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.game-topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 650;
}

.score-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.score-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(16, 35, 38, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  white-space: nowrap;
}

.score-strip strong {
  margin-left: 6px;
  color: var(--ink);
  font-weight: 850;
}

.canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 38, 0.14);
  border-radius: 8px;
  background: #0f2226;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  cursor: crosshair;
  touch-action: none;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at center, rgba(246, 242, 232, 0.12), transparent 44%),
    rgba(10, 28, 31, 0.55);
}

.game-overlay.is-visible {
  display: flex;
}

.overlay-card {
  width: min(360px, 100%);
  padding: 22px;
  border: 1px solid rgba(246, 242, 232, 0.26);
  border-radius: 8px;
  background: rgba(246, 242, 232, 0.92);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

.overlay-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.overlay-card p {
  margin: 10px auto 18px;
  max-width: 280px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.4;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 126px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf0;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(16, 35, 38, 0.22);
}

.play-button:hover {
  transform: translateY(-1px);
}

.play-button:focus-visible {
  outline: 3px solid rgba(56, 102, 182, 0.42);
  outline-offset: 3px;
}

.play-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.game-meter {
  height: 12px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 38, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
}

.game-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
  transition: width 140ms ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .page-shell {
    width: min(100% - 28px, 780px);
    align-items: start;
    padding: 28px 0 18px;
  }

  .game-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  h1 {
    margin-top: 50px;
    font-size: clamp(3.7rem, 14vw, 6.2rem);
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 22px, 420px);
  }

  h1 {
    margin-top: 38px;
  }

  .lede {
    font-size: 1.04rem;
  }

  .launch-card {
    align-items: flex-start;
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    border-radius: 8px;
  }

  .status-dot {
    margin-top: 5px;
  }

  .contact-link {
    overflow-wrap: anywhere;
  }

  .game-panel {
    padding: 11px;
  }

  .game-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .score-strip {
    width: 100%;
    justify-content: space-between;
  }

  .score-strip span {
    flex: 1 1 auto;
    justify-content: center;
  }

  .overlay-card {
    padding: 18px;
  }
}
