/* Hudhud's sky: blue fading to white, soft clouds at the bottom, rounded letters, sun-coloured buttons. */
:root {
  --ink: #24486b;
  --sun: #ffb347;
  --card: #ffffff;
  --muted: #4f6f8f;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html {
  background: #d8f1ff;
  min-height: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(60% 40px at 15% calc(100% - 20px), #fff 98%, transparent),
    radial-gradient(50% 50px at 80% 100%, #fff 98%, transparent),
    linear-gradient(#4fa9f2, #8fd3ff 45%, #d8f1ff);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
header, main, footer { width: min(1040px, 100% - 32px); margin-inline: auto; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  text-shadow: 0 2px 0 #0002;
}
.brand img { border-radius: 16px; box-shadow: 0 3px 0 #0002; }
.lang {
  text-decoration: none;
  font-weight: 700;
  background: #ffffffcc;
  border-radius: 999px;
  padding: 8px 16px;
}
.tagline {
  color: #fff;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  margin: 8px 0 24px;
  text-shadow: 0 2px 0 #0002;
}
main { flex: 1; }

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 6px 0 #0000001a, 0 12px 30px #24486b22;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: 0 10px 0 #0000001a, 0 18px 40px #24486b33; }
.card:focus-visible { outline: 4px solid var(--accent); outline-offset: 4px; }
.card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--accent); }
.card div { padding: 18px 22px 22px; display: grid; gap: 10px; }
.card h2 { margin: 0; font-size: 28px; }
.card p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.4; }
.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.badges li {
  font-size: 14px;
  background: color-mix(in srgb, var(--accent) 18%, #fff);
  border-radius: 999px;
  padding: 4px 10px;
}
.play {
  justify-self: start;
  margin-top: 4px;
  background: var(--sun);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  border-radius: 999px;
  padding: 10px 26px;
  text-shadow: 0 2px 0 #c9661f;
  box-shadow: 0 4px 0 #0002;
}
/* The flagship: the whole first row, picture beside the text on wide screens. */
.hero { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .hero { flex-direction: row; align-items: center; }
  .hero img { width: 46%; aspect-ratio: 1; }
  .hero div { padding: 32px 40px; }
  .hero h2 { font-size: 44px; }
  .hero p { font-size: 20px; }
}

.text {
  background: var(--card);
  border-radius: 28px;
  padding: 24px clamp(20px, 5vw, 48px) 32px;
  max-width: 760px;
  line-height: 1.55;
  font-size: 17px;
  box-shadow: 0 6px 0 #0000001a;
}
.text h1 { margin: 8px 0 4px; font-size: 34px; }
.text h2 { margin: 24px 0 4px; font-size: 21px; }
.text p { margin: 6px 0; }
.text .lead { font-size: 19px; font-weight: 600; }
.text code { font-size: 14px; word-break: break-all; }

footer {
  text-align: center;
  color: var(--ink);
  font-weight: 700;
  padding: 40px 0 70px;
}
footer p { margin: 4px 0; }

@media (prefers-color-scheme: dark) {
  :root { --ink: #e6f2ff; --card: #17263a; --muted: #a9c1d9; }
  html { background: #0b1626; }
  body {
    background:
      radial-gradient(1.5px 1.5px at 20% 15%, #fff 99%, transparent),
      radial-gradient(1.5px 1.5px at 70% 8%, #fff 99%, transparent),
      radial-gradient(1px 1px at 45% 25%, #fff 99%, transparent),
      linear-gradient(#0b1626, #1d3557 60%, #2b4a72);
    background-attachment: fixed;
  }
  .lang { background: #ffffff22; }
  .badges li { background: color-mix(in srgb, var(--accent) 30%, var(--card)); }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}

/* Before launch: hudhud.games shows only the logo and "soon". */
.soon { display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 40px 0; }
.soon img { width: min(320px, 70vw); height: auto; border-radius: 32px; box-shadow: 0 6px 0 #0000001a; }
.soon h1 { margin: 16px 0 0; font-size: clamp(36px, 8vw, 56px); color: #fff; text-shadow: 0 2px 0 #0002; }
.soon p { margin: 0; font-size: 22px; font-weight: 700; color: #fff; text-shadow: 0 2px 0 #0002; }
