/* AA Games website styles.
   Colours live in :root below. Each game page sets its own --accent colour
   in the <body style="--accent: ..."> line of its index.html. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c0a1f;
  --bg-2: #120f2b;
  --card: #1a1640;
  --card-2: #221d50;
  --line: rgba(255, 255, 255, .09);
  --text: #f6f4ff;
  --muted: #b9b3dc;
  --pink: #ff4fa3;
  --orange: #ff8a3d;
  --yellow: #ffc83d;
  --brand: linear-gradient(100deg, var(--pink), var(--orange) 55%, var(--yellow));
  --accent: var(--pink);
  --radius: 22px;
  --wrap: 1120px;
  --head: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 10, 31, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.35rem var(--head); white-space: nowrap; }
.logo img { width: 36px; height: 36px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 700; padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--card); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font: 800 1rem var(--body); text-decoration: none;
  border: 2px solid transparent; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-main { background: var(--brand); color: #1b0b20; }
.btn-ghost { border-color: var(--line); background: rgba(255, 255, 255, .04); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .25); }

/* Store buttons: a real link when the game is out, a grey label when it isn't yet */
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 150px; padding: 8px 18px; border-radius: 14px;
  background: #fff; color: #0c0a1f; text-decoration: none;
  font: 800 1.05rem/1.15 var(--body); transition: transform .15s, box-shadow .15s;
}
.store small { font-size: .7rem; font-weight: 700; opacity: .7; letter-spacing: .02em; }
a.store:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.store.soon { background: transparent; color: var(--muted); border: 2px dashed rgba(255, 255, 255, .2); }

/* ---------- Home hero ---------- */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; z-index: -1;
}
.hero::before { width: 520px; height: 520px; background: #8a2d8f; top: -220px; left: -160px; }
.hero::after { width: 480px; height: 480px; background: #283f99; bottom: -260px; right: -120px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin-bottom: 14px; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 36em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.icon-pile { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 420px; margin: 0 auto; }
.icon-pile a { display: block; border-radius: 26%; overflow: hidden; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); transition: transform .2s; }
.icon-pile a:nth-child(1) { transform: rotate(-6deg); }
.icon-pile a:nth-child(2) { transform: translateY(-18px) rotate(4deg); }
.icon-pile a:nth-child(3) { transform: rotate(7deg); }
.icon-pile a:nth-child(4) { transform: translateX(50%) rotate(-3deg); }
.icon-pile a:nth-child(5) { transform: translateX(50%) translateY(8px) rotate(5deg); }
.icon-pile a:hover { transform: scale(1.08) rotate(0); z-index: 2; }
.icon-pile img { width: 100%; aspect-ratio: 1; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 32px; max-width: 42em; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* ---------- Game cards (home) ---------- */
.games { display: grid; gap: 22px; grid-template-columns: 1fr; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.card-banner { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.card-body { position: relative; padding: 0 22px 22px; display: flex; flex-direction: column; flex: 1; }
.card-icon { width: 76px; height: 76px; border-radius: 22%; margin-top: -38px; border: 3px solid var(--card); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.card h3 { margin: 14px 0 4px; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card opens the game page */
.card p { color: var(--muted); margin-bottom: 18px; }
.card .stores { margin-top: auto; position: relative; z-index: 2; }
.card .store { min-width: 0; padding: 6px 14px; font-size: .95rem; border-radius: 12px; }
.tag {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .03em;
  background: rgba(12, 10, 31, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tag.out { color: #7dffb0; }
.tag.soon { color: var(--yellow); }

/* ---------- About ---------- */
.about { display: grid; gap: 32px; align-items: center; }
.about p { font-size: 1.1rem; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.facts li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.facts b { display: block; font: 600 1.15rem var(--head); }
.facts span { color: var(--muted); font-size: .98rem; }

/* ---------- Support list ---------- */
.help-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.help-list li {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px;
}
.help-list img { width: 48px; height: 48px; border-radius: 22%; }
.help-list .name { font: 600 1.15rem var(--head); flex: 1 1 140px; }
.help-list .links { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block; padding: 7px 14px; border-radius: 999px; text-decoration: none;
  font-weight: 800; font-size: .92rem; background: var(--card-2); border: 1px solid var(--line);
  transition: background .15s, border-color .15s;
}
.pill:hover { border-color: rgba(255, 255, 255, .3); background: #2b2562; }
.contact-box {
  margin-top: 28px; padding: 26px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 79, 163, .16), rgba(255, 200, 61, .1));
  border: 1px solid rgba(255, 138, 61, .3);
}
.contact-box h3 { margin-bottom: 6px; }
.contact-box p { margin: 0; color: var(--muted); }
.mail { font: 800 1.15rem var(--body); color: var(--yellow); word-break: break-all; }

/* ---------- Game page ---------- */
.game-hero { position: relative; padding: 56px 0 48px; overflow: hidden; isolation: isolate; }
.game-hero .bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; filter: blur(2px) saturate(1.1); transform: scale(1.04);
}
.game-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12, 10, 31, .55), rgba(12, 10, 31, .82) 55%, var(--bg));
}
.game-top { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.game-icon { width: 112px; height: 112px; border-radius: 22%; box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
.game-top h1 { font-size: clamp(2.2rem, 6.5vw, 3.8rem); margin-bottom: .15em; }
.game-top .tagline { font-size: 1.2rem; color: var(--text); opacity: .9; margin: 0; }
.chips { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 13px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-weight: 700; font-size: .9rem; }
.chips li:first-child { background: color-mix(in srgb, var(--accent) 28%, transparent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.back { display: inline-block; margin-bottom: 22px; color: var(--muted); text-decoration: none; font-weight: 700; }
.back:hover { color: var(--text); }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(140px, 40vw, 230px);
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 16px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.shots img {
  width: 100%; height: auto; aspect-ratio: 540 / 1169; object-fit: cover;
  border-radius: 20px; border: 1px solid var(--line); scroll-snap-align: start; background: var(--card);
}

.two-col { display: grid; gap: 32px; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.features li { position: relative; padding: 12px 16px 12px 44px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.features li::before {
  content: ""; position: absolute; left: 16px; top: 19px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

.skins { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.skin { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.skin img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.skin div { padding: 12px 14px; }
.skin b { display: block; font: 600 1.1rem var(--head); }
.skin span { color: var(--muted); font-size: .9rem; }
.skin-empty {
  grid-column: 1 / -1; text-align: center; padding: 36px 20px; border-radius: 18px;
  border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.skin-empty b { display: block; font: 600 1.3rem var(--head); margin-bottom: 4px; }
.skin-empty span { color: var(--muted); }

/* ---------- Footer ---------- */
.site-foot { padding: 40px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-foot .wrap { display: grid; gap: 18px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot a { text-decoration: none; font-weight: 700; }
.site-foot a:hover { color: var(--text); }
.site-foot p { margin: 0; }

/* ---------- Wider screens ---------- */
@media (min-width: 700px) {
  .games { grid-template-columns: repeat(2, 1fr); }
  .games .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .about { grid-template-columns: 1.3fr 1fr; }
  .two-col { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .game-icon { width: 140px; height: 140px; }
  .site-foot .wrap { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1000px) {
  .hero { padding: 96px 0 88px; }
  .hero .wrap { grid-template-columns: 1.15fr 1fr; }
  .section { padding: 96px 0; }
  /* three across; with exactly five games the last two share the second row */
  .games { grid-template-columns: repeat(6, 1fr); }
  .games .card, .games .card:last-child:nth-child(odd) { grid-column: span 2; }
  .games .card:nth-child(4):nth-last-child(2), .games .card:nth-child(5):last-child { grid-column: span 3; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .site-head .wrap { height: 58px; }
  .logo { font-size: 1.15rem; }
  .logo img { width: 32px; height: 32px; }
  .nav a { padding: 6px 8px; font-size: .92rem; }
  .nav .nav-about { display: none; } /* About is still on the home page; phones keep Games, Support, Contact */
  .game-top { grid-template-columns: 1fr; }
  .game-icon { width: 96px; height: 96px; }
  .icon-pile { gap: 12px; max-width: 320px; }
}
@media (max-width: 380px) {
  .site-head .wrap { gap: 8px; }
  .logo { font-size: 1.05rem; gap: 8px; }
  .logo img { width: 28px; height: 28px; }
  .nav { gap: 0; }
  .nav a { padding: 6px 6px; font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Game page: help links and "More from AA Games" ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pills .pill { padding: 10px 18px; font-size: 1rem; }
.icon-row { display: flex; flex-wrap: wrap; gap: 16px; }
.icon-row a { border-radius: 22%; overflow: hidden; transition: transform .2s; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.icon-row a:hover { transform: translateY(-4px) scale(1.04); }
.icon-row img { width: 84px; height: 84px; }
