/* Self-hosted variable fonts (Google Fonts, SIL Open Font License) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter.woff2') format('woff2');
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url('assets/fonts/orbitron.woff2') format('woff2');
}

:root {
  --bg: #000000;
  --bg-alt: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --text: #f2f2f2;
  --muted: #a3a3a3;
  --accent: #ff1a1a;
  --accent-2: #ff4d4d;
  --accent-soft: rgba(255, 26, 26, 0.15);
  /* Button-only backgrounds (A1): #fff on #c40000 = 6.27:1, on #a80000 = 7.88:1.
     Red text/accents stay --accent (#ff1a1a on #000 = 5.41:1). */
  --btn-bg: #c40000;
  --btn-bg-hover: #a80000;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 6px;
  --font-head: 'Orbitron', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Keyboard focus (A2): visible ring for keyboard users only */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
main:focus { outline: none; }

/* Skip link (A3) */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px; border-radius: 4px; background: var(--btn-bg); color: #fff; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 68px; position: relative; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 900; font-size: 1.25rem; }
.brand-logo { height: 60px; width: auto; margin: -8px 0; mix-blend-mode: screen; }
.nav-links { display: flex; gap: 32px; font-weight: 500; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; min-width: 44px; min-height: 44px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 120px 0 100px; text-align: center; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 300px at 50% 40%, rgba(255,26,26,.18), transparent 70%),
    repeating-linear-gradient(180deg, transparent 0 38px, rgba(255,26,26,.07) 38px 40px),
    linear-gradient(180deg, #050505, var(--bg));
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .2em; text-indent: .2em; font-size: .8rem; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-family: var(--font-head); font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1.1; margin-bottom: 20px; }
.accent { color: var(--accent); }
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); content: attr(data-text) / ""; position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; pointer-events: none; }
.glitch::before { color: var(--accent); clip-path: inset(10% 0 60% 0); transform: translate(-3px, -1px); animation: glitch-a 3s infinite steps(1); }
.glitch::after  { color: #fff; clip-path: inset(65% 0 10% 0); transform: translate(3px, 1px); animation: glitch-b 3s infinite steps(1); opacity: .8; }
@keyframes glitch-a { 0%,88%,100% { clip-path: inset(10% 0 60% 0); } 90% { clip-path: inset(40% 0 30% 0); transform: translate(-6px,0); } 94% { clip-path: inset(5% 0 80% 0); } }
@keyframes glitch-b { 0%,86%,100% { clip-path: inset(65% 0 10% 0); } 89% { clip-path: inset(20% 0 55% 0); transform: translate(6px,0); } 93% { clip-path: inset(75% 0 5% 0); } }
@media (prefers-reduced-motion: reduce) { .glitch::before, .glitch::after { animation: none; } }
.hero-logo { width: min(560px, 85%); margin: 0 auto 20px; mix-blend-mode: screen; -webkit-mask-image: radial-gradient(ellipse 70% 65% at center, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 65% at center, #000 55%, transparent 100%); }
.lead { max-width: 620px; margin: 0 auto 36px; color: var(--muted); font-size: 1.15rem; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
/* Equal widths, so the gap between the two hero buttons sits on the page centre line. */
.cta-row .btn { flex: 0 0 220px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 4px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .9rem;
  transition: transform .15s, box-shadow .15s, background .2s;
  border: 1px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit;
}
.btn-primary { background: var(--btn-bg); color: #ffffff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--accent); background: var(--btn-bg-hover); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); text-align: center; text-transform: uppercase; letter-spacing: .08em; text-indent: .08em; }
.section-title::after { content: ""; display: block; width: 56px; height: 5px; background: var(--accent); margin: 14px auto 0; }
.section-sub { text-align: center; color: var(--muted); margin: 10px 0 48px; }

/* Games */
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 28px; }
.game-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, border-color .2s;
}
.game-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 40px rgba(255,26,26,.15); }
.game-art { position: relative; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; }
.game-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-art-jailbreak { background: linear-gradient(135deg, #1a0000, #3a0a0a 60%, #111); }
.game-art-cat { background: linear-gradient(135deg, #111, #2a0505 60%, #1a0000); }
.game-tag {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 3px; font-size: .75rem; font-weight: 600; letter-spacing: .05em;
}
.game-body { padding: 26px; }
.game-body h3 { font-family: var(--font-head); font-size: 1.35rem; margin-bottom: 10px; }
.game-body p { color: var(--muted); margin-bottom: 22px; }
.store-row { display: flex; gap: 10px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; font-size: .9rem; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); transition: background .2s;
}
/* A4: games not uploaded yet - non-interactive "Coming soon" badge, dimmed via a
   dashed border and muted text (#a3a3a3 on #1a1a1a = 6.90:1), no opacity on text */
.store-btn.store-soon { color: var(--muted); border-style: dashed; cursor: default; }
.store-btn.store-soon svg { opacity: .6; }

/* Coming soon */
.soon-card {
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.soon-art {
  position: relative; min-height: 320px;
  background: radial-gradient(circle at 30% 40%, rgba(255,26,26,.35), transparent 60%), linear-gradient(135deg, #050505, #1a0000);
}
.soon-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soon-badge {
  position: absolute; top: 18px; left: 18px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(255,26,26,.5);
  padding: 6px 14px; border-radius: 3px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.soon-body { min-width: 0; padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.soon-body h3 { font-family: var(--font-head); font-size: 2rem; margin-bottom: 14px; }
.soon-body p { color: var(--muted); margin-bottom: 26px; }
.notify { margin-top: 4px; }
.soon-body .notify-copy { margin-bottom: 14px; color: var(--text); font-weight: 600; }
.notify-btn { font-size: .95rem; padding: 12px 22px; }

/* About */
.about-copy { max-width: 720px; margin: -24px auto 56px; text-align: center; color: var(--muted); font-size: 1.05rem; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.team-card {
  text-align: center; padding: 36px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.avatar {
  position: relative; width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--accent); border: 3px solid #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: #ffffff;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1.15rem; }
.team-card .role { color: var(--accent); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; margin: 4px 0 12px; }
.team-card p { color: var(--muted); font-size: .95rem; }
.team-card { align-self: start; }
.bio-more { margin-top: 12px; text-align: left; }
.bio-more summary {
  list-style: none; cursor: pointer; text-align: center; display: inline-block; width: 100%;
  color: var(--accent); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em;
}
.bio-more summary::-webkit-details-marker { display: none; }
.bio-more summary::after { content: " +"; }
.bio-more[open] summary::after { content: " \2212"; }
.bio-more[open] summary { margin-bottom: 12px; }
.bio-more p { margin-bottom: 12px; }
.bio-more p:last-child { margin-bottom: 0; }

/* Contact / footer */
.contact { text-align: center; }
.legal-copy { color: var(--muted); max-width: 720px; margin: 0 auto; }
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 24px; font-size: .9rem; color: var(--muted); }
.footer-logo { height: 72px; opacity: .9; mix-blend-mode: screen; }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.footer-tag { margin: 8px 0 20px; }
.footer-head { font-family: inherit; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.footer-list { display: grid; gap: 10px; }
.footer-list a, .footer-social a { color: var(--muted); display: inline-block; min-height: 24px; padding-block: 2px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a { border: 1px solid var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.footer-list a:hover, .footer-social a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--surface-2); margin-top: 40px; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: .82rem; }
@media (max-width: 720px) { .footer-cols { grid-template-columns: 1fr; } .footer-bottom { justify-content: center; text-align: center; } }
.btn-email { text-transform: none; letter-spacing: 0; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; }
.footer-links a:hover { color: var(--text); }
/* Tap targets >= 24x24 CSS px (WCAG 2.5.8) */
.footer-links a, .nav-links a { display: inline-block; min-height: 24px; padding-block: 2px; }
.bio-more summary { min-height: 24px; padding-block: 4px; }
/* Legal pages (A10) */
.legal-copy h2 { font-family: var(--font-head); font-size: 1.15rem; color: var(--text); margin: 32px 0 10px; }
.legal-copy p, .legal-copy ul { margin-bottom: 12px; }
.legal-copy ul { list-style: disc; padding-left: 1.4em; }
.legal-copy a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Reduced motion (A7) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.visible { opacity: 1; transform: none; transition: none; }
  .game-card, .btn { transition: none; }
  .game-card:hover, .btn-primary:hover { transform: none; }
}

/* Responsive */
@media (max-width: 820px) {
  .soon-card { grid-template-columns: minmax(0, 1fr); }
  .soon-body { padding: 30px 24px; }
  .notify { text-align: center; padding-top: 22px; border-top: 1px solid var(--border); }
  .notify-btn { width: 100%; max-width: 320px; }
  .soon-art { min-height: 240px; }
}
@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: -16px; right: -16px;
    flex-direction: column; gap: 0; background: var(--bg-alt); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 16px 24px; }
  .hero { padding: 80px 0 70px; }
  .section { padding: 64px 0; }
}

/* Game privacy policies: summary box and data tables (no page uses these since the Cat policy moved to its own site) */
.legal-summary { padding: 14px 18px; border: 1px solid var(--border); border-left: 4px solid var(--accent); background: rgba(255,255,255,.03); color: var(--text); }
.legal-table { overflow-x: auto; margin: 0 0 16px; }
.legal-table table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: .92rem; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-table th { background: rgba(255,255,255,.06); color: var(--text); }
