/* Hudhud's sky: blue fading to white, soft clouds at the bottom. Brand colours and fonts (Fredoka for titles and
   buttons, Nunito for text), hosted here. Text colours are chosen for contrast: navy on orange, gold and teal. */
@font-face {
  font-family: Fredoka;
  src: url(/fonts/fredoka-latin.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Fredoka;
  src: url(/fonts/fredoka-latin-ext.woff2) format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Nunito;
  src: url(/fonts/nunito-latin.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Nunito;
  src: url(/fonts/nunito-latin-ext.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --crest: #f47b20; /* Crest Orange */
  --teal: #1ba098; /* Arcade Teal */
  --gold: #ffd166; /* Sunshine Gold */
  --navy: #141e30; /* Midnight Navy */
  --ink: var(--navy);
  --card: #ffffff;
  --muted: #475569;
  --title: Fredoka, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html {
  background: #d8f1ff;
  min-height: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: Nunito, ui-rounded, 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; }
h1, h2, .brand, .tagline, .lang, .play, .promises { font-family: var(--title); }
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: 32px;
  font-weight: 600;
  text-shadow: 0 2px 0 #0002;
}
.brand img { border-radius: 16px; box-shadow: 0 3px 0 #0002; }
.lang {
  text-decoration: none;
  font-weight: 600;
  background: #ffffffcc;
  border-radius: 999px;
  padding: 8px 16px;
}
.tagline {
  color: #fff;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 600;
  margin: 8px 0 12px;
  text-shadow: 0 2px 0 #0002;
}
main { flex: 1; }

/* What parents look for first, right under the tagline. */
.promises { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.promises li {
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 17px;
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 3px 0 #00000026;
}

.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 / 9; object-fit: cover; background: var(--accent); }
.card div { padding: 18px 22px 22px; display: grid; gap: 10px; }
.card h2 { margin: 0; font-size: 30px; font-weight: 600; }
.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;
}
.badges li.camera { background: var(--teal); color: var(--navy); font-weight: 700; } /* the signature: play with your body */
.play {
  justify-self: start;
  margin-top: 4px;
  background: var(--crest);
  color: var(--navy); /* 6:1 on Crest Orange; white would be 2.7:1 */
  font-weight: 600;
  font-size: 22px;
  border-radius: 999px;
  padding: 10px 28px;
  box-shadow: 0 5px 0 #b4550f; /* a pressable edge */
}
.card:active .play { transform: translateY(3px); box-shadow: 0 2px 0 #b4550f; }
/* 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: 56%; }
  .hero div { padding: 32px 40px; }
  .hero h2 { font-size: 44px; }
  .hero p { font-size: 20px; }
}

/* Playing with the camera: three steps, after the games. */
.how {
  margin-top: 32px;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border-radius: 28px;
  padding: 20px clamp(20px, 4vw, 36px) 24px;
  box-shadow: 0 6px 0 #0000001a;
}
.how h2 { margin: 0 0 12px; font-size: 24px; font-weight: 600; }
.how ol {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.how li { counter-increment: step; display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.4; }
.how li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--navy);
  font: 600 20px var(--title);
}
.how p { margin: 14px 0 0; color: var(--muted); }

.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: 36px; font-weight: 600; }
.text h2 { margin: 24px 0 4px; font-size: 22px; font-weight: 600; }
.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: #f8fafc; --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)); }
  .badges li.camera { background: var(--teal); color: var(--navy); }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:active .play { transform: 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-weight: 600; 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; }
