/* Any Button Games – site styles */

@font-face {
  font-family: "Baloo";
  src: url("../fonts/Baloo-Regular.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #0b0f19;
  --bg-2: #10162a;
  --surface: #161d33;
  --surface-2: #1d2642;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --muted: #a3acc2;
  --faint: #6f7893;
  --accent: #ff8a3d;
  --accent-2: #ffb547;
  --red: #e2384d;
  --green: #46c37b;
  --violet: #8f7cff;
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --display: "Baloo", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(226, 56, 77, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(143, 124, 255, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--body);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0 0 0.5em; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand:hover { color: #fff; }

.nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: var(--surface); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); display: none; }
  .nav-open .nav { display: block; }
  .nav ul { flex-direction: column; padding: 10px var(--gutter) 16px; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 8px;
  font: 600 0.98rem/1.1 var(--body);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #1c0d00; }
.btn-primary:hover { background: var(--accent-2); color: #1c0d00; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); }
.hero-main { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 6vw, 72px); align-items: center; }
.hero-logo { width: clamp(150px, 20vw, 230px); }
.eyebrow { display: inline-block; font: 700 0.8rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 36em; margin-bottom: 28px; }
@media (max-width: 760px) {
  .hero-main { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hero-logo { width: 120px; }
  .hero .btn-row { justify-content: center; }
}

/* quick game strip under the hero */
.game-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 6vw, 64px); }
.game-chip {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--surface) center / cover no-repeat; text-decoration: none; color: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s ease;
}
.game-chip:hover { transform: translateY(-4px); color: #fff; }
.game-chip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(5, 8, 15, 0.9)); }
.game-chip span { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; font: 700 1.15rem/1.2 var(--display); }
.game-chip small { display: block; font: 600 0.78rem/1.3 var(--body); color: var(--accent-2); letter-spacing: 0.06em; text-transform: uppercase; }
.game-chip.meow { background: linear-gradient(135deg, #2c2350, #4b2d6b); }
.game-chip.meow .chip-cats { position: absolute; inset: 14px 14px auto auto; display: flex; gap: 6px; }
.game-chip.meow .chip-cats img { width: 22%; max-width: 64px; border-radius: 12px; transform: rotate(-6deg); }
.game-chip.meow .chip-cats img:nth-child(2) { transform: rotate(5deg) translateY(10px); }
@media (max-width: 760px) { .game-strip { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(36px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* ---------- Game feature blocks ---------- */
.game { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: clamp(72px, 10vw, 120px); }
.game:last-child { margin-bottom: 0; }
.game.flip .game-media { order: 2; }
@media (max-width: 900px) { .game { grid-template-columns: 1fr; } .game.flip .game-media { order: 0; } }

.game-media { position: relative; }
.game-cover { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--surface); }
.game-cover > img:not(.title-logo) { width: 100%; height: 100%; object-fit: cover; }
.game-cover .title-logo { position: absolute; left: 6%; bottom: 8%; width: 46%; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.shots button { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: var(--surface); aspect-ratio: 16 / 9; }
.shots img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.shots button:hover img { transform: scale(1.06); }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font: 700 0.78rem/1.2 var(--body); letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.live { color: #b6f3cf; background: rgba(70, 195, 123, 0.14); border-color: rgba(70, 195, 123, 0.35); }
.badge.live::before, .badge.soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.soon { color: #ffd59b; background: rgba(255, 181, 71, 0.13); border-color: rgba(255, 181, 71, 0.35); }

.game-text p { color: var(--muted); }
.features { padding-left: 1.2em; margin: 0 0 26px; }
.features:last-child { margin-bottom: 0; }
.features li { color: var(--text); margin-bottom: 6px; }

/* trailer facade (loads YouTube only after a click) */
.trailer { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: none; }
.trailer img { width: 100%; height: 100%; object-fit: cover; }
.trailer .play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: rgba(226, 56, 77, 0.92); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: transform .2s;
}
.trailer .play::after { content: ""; position: absolute; left: 31px; top: 24px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; }
.trailer:hover .play { transform: scale(1.08); }
.trailer .note { position: absolute; left: 12px; bottom: 10px; font-size: 0.75rem; color: rgba(255, 255, 255, 0.8); background: rgba(0, 0, 0, 0.45); padding: 3px 8px; border-radius: 6px; }
.game-cover iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Meow Sweeper board mock-up, built from the game's cat tiles */
.meow-board {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 20%, #5b3f8f, #2a1f4d 70%);
  display: grid; place-items: center; padding: 4%;
}
.meow-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; width: 100%; max-width: 640px; }
.meow-grid > * { aspect-ratio: 1; border-radius: 22%; }
.meow-grid .h { background: linear-gradient(160deg, #b7a6e8, #8e7bd1); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18); }
.meow-grid .p { background: linear-gradient(160deg, #e7c08f, #c8955c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15); }
.meow-grid .w { background: #4a3d6b; }
.meow-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 22%; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }
.meow-grid .pop { animation: pop 3.6s ease-in-out infinite; }
.meow-grid .pop:nth-of-type(2n) { animation-delay: 1.2s; }
.meow-grid .pop:nth-of-type(3n) { animation-delay: 2.4s; }
@keyframes pop { 0%, 80%, 100% { transform: scale(1) rotate(0); } 88% { transform: scale(1.12) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .meow-grid .pop { animation: none; } }

.cat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.cat-row figure { margin: 0; width: 64px; text-align: center; }
.cat-row img { width: 56px; height: 56px; margin: 0 auto 4px; border-radius: 14px; }
.cat-row figcaption { font-size: 0.7rem; line-height: 1.2; color: var(--faint); }

/* ---------- Community ---------- */
.discord-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: clamp(22px, 4vw, 36px); border-radius: var(--radius);
  background: linear-gradient(135deg, #3b3fb0, #5865f2); box-shadow: var(--shadow); margin-bottom: 22px;
}
.discord-card img { width: 64px; height: 64px; }
.discord-card h3 { margin: 0 0 4px; }
.discord-card p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.discord-card .btn { background: #fff; color: #3b3fb0; }
.discord-card .btn:hover { background: #e8eaff; color: #3b3fb0; }
@media (max-width: 760px) { .discord-card { grid-template-columns: 1fr; text-align: center; } .discord-card img { margin: 0 auto; } }

.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.social {
  flex: 1 1 160px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 16px; min-height: 60px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .15s, transform .15s;
}
.social:hover { border-color: rgba(255, 255, 255, 0.35); color: #fff; transform: translateY(-2px); }
.social img { width: 30px; height: 30px; flex: none; }

/* ---------- Contact ---------- */
.contact-box { text-align: center; padding: clamp(28px, 5vw, 48px); border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: var(--radius); max-width: 760px; margin: 0 auto; }
.contact-box a.mail { font: 700 clamp(1.2rem, 3.4vw, 1.7rem)/1.2 var(--display); color: var(--accent-2); text-decoration: none; word-break: break-all; }
.contact-box a.mail:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 40px; color: var(--faint); font-size: 0.92rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; opacity: 0.8; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); }
.lightbox::backdrop { background: rgba(3, 5, 10, 0.88); }
.lightbox img { border-radius: var(--radius-sm); max-height: 86vh; width: auto; margin: 0 auto; }
.lightbox button { position: fixed; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(40px, 7vw, 80px) 0; }
.legal .container { max-width: 860px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-top: 2.2em; padding-top: 0.6em; border-top: 1px solid var(--line); }
.legal h3 { font-size: 1.2rem; margin-top: 1.6em; }
.legal p, .legal li { color: #cfd5e4; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 0.45em; }
.legal .updated { color: var(--faint); }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 22px; margin: 26px 0; }
.legal .toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 28px; }
.legal .toc li { margin: 0 0 0.3em; break-inside: avoid; }
@media (max-width: 640px) { .legal .toc ol { columns: 1; } }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 0.95rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: #cfd5e4; }
.legal th { color: var(--text); font-weight: 700; background: var(--surface); }
.legal .callout { background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.3); border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.legal dt { color: var(--muted); font-weight: 600; }
.legal dd { margin: 0; color: var(--text); }
@media (max-width: 560px) { .legal dl { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 10px; } }

/* ---------- 404 ---------- */
.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.not-found img { width: 120px; margin: 0 auto 24px; border-radius: 24px; }
