:root {
  color-scheme: dark;
  --bg: #101014;
  --panel: #181a20;
  --panel-strong: #20232b;
  --text: #f4f0e8;
  --muted: #b8b1a5;
  --line: rgba(255, 255, 255, 0.12);
  --red: #f25f5c;
  --cyan: #24d4d8;
  --green: #8bd450;
  --yellow: #f6c756;
  --blue: #6d8cff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(36, 212, 216, 0.08), transparent 32rem),
    linear-gradient(135deg, #101014 0%, #15191a 45%, #201d22 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.site-header {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.top-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #f4f0e8;
  color: #101014;
  font-size: 0.78rem;
  border-radius: 8px;
}

.top-nav {
  gap: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.top-nav a {
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--text);
}

.hero {
  width: min(1120px, calc(100% - 32px));
  margin: 22px auto 0;
  min-height: min(680px, calc(100vh - 112px));
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.8fr);
  gap: 44px;
  align-items: center;
  padding-bottom: 56px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(4.4rem, 14vw, 8.5rem);
  line-height: 0.86;
}

.hero-text {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-action,
.secondary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  background: var(--red);
  color: #170f10;
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.hero-machine {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #242832, #17191f);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.machine-top {
  height: 44px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.machine-top span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
}

.machine-top span:nth-child(2) {
  background: var(--yellow);
}

.machine-top span:nth-child(3) {
  background: var(--green);
}

.machine-screen {
  position: relative;
  min-height: 386px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    #0c0d12;
  background-size: 28px 28px;
  overflow: hidden;
}

.tetromino {
  position: absolute;
  width: 112px;
  height: 84px;
  filter: drop-shadow(0 14px 24px rgba(36, 212, 216, 0.2));
}

.tetromino::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  background: currentColor;
  box-shadow:
    28px 0 currentColor,
    56px 0 currentColor,
    84px 0 currentColor;
}

.t1 {
  top: 78px;
  left: 52px;
  color: var(--cyan);
}

.t2 {
  top: 164px;
  right: 52px;
  color: var(--red);
  transform: rotate(90deg);
}

.t3 {
  bottom: 76px;
  left: 98px;
  color: var(--yellow);
}

.mine-grid {
  position: absolute;
  right: 54px;
  bottom: 58px;
  width: 156px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.mine-grid span {
  aspect-ratio: 1;
  background: #c9c4bb;
  border: 3px solid;
  border-color: #ffffff #77736b #77736b #ffffff;
}

.games-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
}

.game-link {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) 1fr;
  min-height: 278px;
  text-decoration: none;
}

.game-preview {
  display: grid;
  place-items: center;
  min-height: 278px;
  background: var(--panel);
}

.preview-board {
  width: 156px;
  height: 216px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 26px;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(36, 212, 216, 0.28);
  background: #080a0d;
}

.block {
  border-radius: 3px;
  box-shadow: inset 0 -4px rgba(0, 0, 0, 0.2);
}

.cyan {
  background: var(--cyan);
  grid-column: span 1;
}

.pink {
  background: #f0569b;
}

.green {
  background: var(--green);
}

.yellow {
  background: var(--yellow);
}

.blue {
  background: var(--blue);
}

.retro-window {
  width: 190px;
  padding: 8px;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #777 #777 #ffffff;
}

.retro-bar {
  height: 18px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
}

.retro-score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px;
  border: 2px solid;
  border-color: #777 #ffffff #ffffff #777;
  color: #f00;
  background: #c0c0c0;
  font-family: "Courier New", monospace;
  font-weight: 900;
}

.retro-score span:nth-child(2) {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid;
  border-color: #ffffff #777 #777 #ffffff;
  color: #111;
  font-family: Arial, sans-serif;
}

.retro-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid;
  border-color: #777 #ffffff #ffffff #777;
}

.retro-board span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: #0000ff;
  font-weight: 900;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #777 #777 #ffffff;
}

.retro-board .open {
  border: 1px solid #777;
  background: #bdbdbd;
}

.game-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
}

.game-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1;
}

.game-content p:not(.game-kicker) {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.play-label {
  width: fit-content;
  margin-top: 22px;
  color: var(--text);
  font-weight: 800;
  border-bottom: 2px solid var(--red);
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .game-grid,
  .game-link {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-bottom: 34px;
  }

  .hero-machine {
    min-height: 360px;
  }

  .machine-screen {
    min-height: 316px;
  }
}

@media (max-width: 560px) {
  .top-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .game-preview {
    min-height: 230px;
  }
}
