/*
---
filename: style.css
author: Jean-Yves Cornet
date_modified: 2026-07-30 21:51:16
version: 1.0.0
scope: core
---
*/

:root {
  color-scheme: dark;
  --ink: #e9f0e8;
  --muted: #81969a;
  --line: rgba(218, 235, 229, 0.14);
  --panel: rgba(7, 20, 24, 0.88);
  --accent: #f4a640;
  --accent-dark: #bd622a;
  --bg: #071318;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

.game-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 500px;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 35%, rgba(38, 88, 93, 0.2), transparent 35%),
    linear-gradient(180deg, #0b2026 0%, var(--bg) 76%);
}

.hud {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 72px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 15, 18, 0.54), transparent);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-self: start;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent);
  transform: rotate(8deg);
  box-shadow: inset 0 0 0 3px var(--bg);
  background: var(--accent);
}

.scores {
  display: flex;
  gap: clamp(24px, 5vw, 62px);
}

.scores p {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  align-items: baseline;
  margin: 0;
}

.scores span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scores strong {
  min-width: 2ch;
  color: var(--ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.icon-button {
  justify-self: end;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  border-color: rgba(244, 166, 64, 0.65);
  color: var(--accent);
  transform: translateY(-1px);
}

.stage,
#game {
  width: 100%;
  height: 100%;
}

#game {
  display: block;
  touch-action: none;
}

.panel {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: min(90vw, 520px);
  padding: 46px 44px 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  text-align: center;
  transform: translate(-50%, -48%);
  backdrop-filter: blur(10px);
}

.panel::before,
.panel::after {
  position: absolute;
  width: 20px;
  height: 20px;
  content: "";
}

.panel::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.panel h1,
.panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 0.91;
  letter-spacing: -0.045em;
}

.panel h1 {
  font-size: clamp(54px, 8vw, 82px);
}

.panel h2 {
  font-size: clamp(44px, 7vw, 68px);
}

.panel h1 em {
  color: var(--accent);
  font-weight: 400;
}

.panel > p:not(.eyebrow) {
  max-width: 360px;
  margin: 24px auto 28px;
  color: #9eb0b1;
  font-size: 14px;
  line-height: 1.7;
}

.primary-button {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  min-width: 210px;
  padding: 14px 18px 14px 22px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #172023;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

.primary-button:active {
  transform: translateY(1px);
}

.panel small {
  display: block;
  margin-top: 22px;
  color: #5f7477;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-small {
  width: min(88vw, 430px);
}

.hint {
  position: absolute;
  z-index: 3;
  bottom: 34px;
  left: 50%;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(7, 19, 24, 0.7);
  color: #8ea2a4;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 240ms ease, transform 240ms ease;
  pointer-events: none;
}

.hint.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .hud {
    height: 62px;
  }

  .scores {
    gap: 14px;
  }

  .scores p {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
  }

  .scores span {
    font-size: 8px;
  }

  .scores strong {
    font-size: 17px;
  }

  .brand {
    font-size: 0;
  }

  .panel {
    padding: 38px 24px 32px;
  }
}

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