:root {
  color-scheme: dark;
  --background: var(--brand-night);
  --surface: var(--brand-surface);
  --border: var(--brand-line);
  --text: var(--brand-on-night);
  --muted: var(--brand-muted);
  --focus-ring: var(--brand-mint);
  --mono: ui-monospace, Consolas, monospace;
}

body {
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(3rem, 5.3vw, 5rem) clamp(3.5rem, 6vw, 5.5rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--muted);
  font: 500 .75rem/1.4 var(--mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: .48rem;
  height: .48rem;
  flex: none;
  border-radius: .1rem;
  background: var(--brand-mint);
  content: "";
}

.hero h1 {
  margin-top: 1.25rem;
  font-size: clamp(3.4rem, 5.6vw, 5.15rem);
  font-weight: 720;
  letter-spacing: -.065em;
  line-height: 1;
}

.hero h1 span { display: block; color: var(--brand-mint); }

.intro {
  max-width: 33ch;
  margin-block: 1.35rem 1.75rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.55;
}

.button {
  display: inline-flex;
  width: fit-content;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .65rem 1rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  font-size: .9rem;
  font-weight: 560;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button-primary {
  min-height: 3.15rem;
  padding-inline: 1.1rem;
  background: var(--brand-mint);
  color: var(--brand-ink);
}

.button-primary:hover { background: #cff8ea; }
.arrow { font: 500 1.15em/1 system-ui, sans-serif; }

.showcase {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.46;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  background:
    linear-gradient(#cae9e412 1px, transparent 1px) center / 32px 32px,
    linear-gradient(90deg, #cae9e412 1px, transparent 1px) center / 32px 32px,
    radial-gradient(ellipse at 22% 22%, #24413e 0, transparent 60%),
    radial-gradient(ellipse at 79% 68%, #39324f 0, transparent 65%),
    #182329;
}

.showcase::before, .showcase::after {
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat;
  color: #8aaba8;
  content: "";
}

.showcase::before { top: 8%; right: 8%; }
.showcase::after { bottom: 8%; left: 8%; }

.screen {
  --frame-radius: clamp(.85rem, 2.2vw, 1.75rem);
  --frame-padding: clamp(.2rem, .5vw, .45rem);
  position: absolute;
  z-index: 1;
  display: block;
  width: 28.5%;
  padding: var(--frame-padding);
  border: 1px solid #817894;
  border-radius: var(--frame-radius);
  background: #221e2e;
  box-shadow: 0 1.35rem 2rem #0a0713b3;
  transform: rotate(var(--tilt));
  transition: transform 180ms ease, border-color 180ms ease;
}

.screen img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--frame-radius) - var(--frame-padding));
}

.screen:hover, .screen:focus-visible {
  z-index: 2;
  border-color: var(--brand-mint);
  transform: translateY(-.3rem) rotate(var(--tilt));
}

.screen-unnail { --tilt: -11deg; top: 9%; left: 18%; }
.screen-blockista { --tilt: 10deg; top: 15%; left: 52%; }

#games, #unnail, #blockista, #contact { scroll-margin-top: 1.5rem; }

.games {
  padding-top: 1.8rem;
  border-top: 1px solid var(--border);
}

h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  font-weight: 660;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.45rem;
}

.game {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--surface);
}

.game-unnail { --game-accent: #ffce76; }
.game-blockista { --game-accent: #dbcaff; }
.game:target { border-color: var(--game-accent); }

.cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 500;
  border-radius: calc(1.15rem - 1px) calc(1.15rem - 1px) 0 0;
  border-bottom: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface);
}

.game-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(1rem, 2.5vw, 1.65rem);
}

.game-heading { display: flex; align-items: center; gap: .95rem; }

.game-icon {
  width: 3.55rem;
  height: 3.55rem;
  flex: none;
  border: 1px solid #ffffff24;
  border-radius: .7rem;
}

.game h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.game-heading p { margin-top: .25rem; color: var(--game-accent); font-size: .88rem; }
.game-description { margin-top: 1rem; color: var(--muted); }

.modes {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .75rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  color: var(--text);
  font-size: .85rem;
  list-style: none;
}

.modes li { display: inline-flex; align-items: center; gap: .75rem; }

.modes li + li::before {
  width: .25rem;
  height: .25rem;
  border-radius: 50%;
  background: var(--game-accent);
  content: "";
}

.game-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.2rem;
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.button-store { border-color: #51636b; background: #233138; color: var(--text); }
.button-store:hover { border-color: var(--brand-mint); color: var(--brand-mint); }

.play-icon {
  width: .75rem;
  height: .9rem;
  flex: none;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.policy-link {
  color: var(--muted);
  font-size: .85rem;
  text-decoration-color: #819398;
  text-underline-offset: .23em;
}

.policy-link { padding-block: .6rem; }
.policy-link:hover { color: var(--text); }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem 2rem;
  margin-block: clamp(3rem, 6vw, 5rem) 2rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--surface);
}

.contact h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
.contact p { margin-top: .45rem; color: var(--muted); }
.button-contact { max-width: 100%; border-color: #59756d; color: var(--brand-mint); }
.button-contact:hover { border-color: var(--brand-mint); }
.button-contact span:first-child { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 54rem) {
  .hero { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero h1 { font-size: clamp(2.65rem, 9.1vw, 4.75rem); }
  .showcase { width: 100%; max-width: 40rem; }
}

@media (max-width: 40rem) {
  .hero { padding-block: 2.9rem; }
  .showcase { border-radius: 1.05rem; }
  .game-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button, .screen { transition: none; }
  .screen:hover, .screen:focus-visible { transform: rotate(var(--tilt)); }
}
