/* ─── /assets/common.css — shared chrome across all gorilla pages ───
   Canonical styles for design tokens, reset, body atmosphere, nav,
   header rule, primary/secondary buttons, endgame strip, and footer.
   Page-specific styles (hero, run-card, lobby, etc.) stay inline on
   each page. Edit here for site-wide changes. */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&family=Chakra+Petch:wght@400;500;600;700&display=swap');

:root {
  /* Brand palette: yellow + red on cabinet black with white ink. See DESIGN.md
     for the rationale (Lazy_Initiative5905 r/SaaS review, 2026-05-08). Green is
     retired; --green stays as a deprecated alias mapped to --yellow so legacy
     references still resolve. New code: use --yellow / --red directly. */
  --bg: #0a0612;
  --bg2: #140928;
  --ink: #ffffff;
  --yellow: #ffd23f;
  --yellow-dim: rgba(255,210,63,0.12);
  --red: #ff3355;
  /* Deprecated: --green / --green-dim. Kept as aliases — do not introduce
     emerald in new code. Both resolve to yellow. */
  --green: #ffd23f;
  --green-dim: rgba(255,210,63,0.12);
  --pixel: 'Press Start 2P', monospace;
  --crt: 'VT323', monospace;
  --ui: 'Chakra Petch', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  overflow-x: hidden;
}
body {
  /* Single warm tint at low opacity. The old purple + magenta blob stack was
     part of the noise that DESIGN.md retired — at most one ambient effect. */
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(255,210,63,0.06), transparent),
    var(--bg);
  min-height: 100vh;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* Universal title-accent reset — any <span class="pixel"> inside any
   heading inherits the heading's font, size, color, and weight. The
   class used to swap to Press-Start-2P + yellow mid-sentence; that
   broke reading flow on every seo-page and blog-post H1. Loaded
   from common.css which is the last stylesheet on every page, so
   this wins over page-specific overrides without !important. */
h1 .pixel, h2 .pixel, h3 .pixel, h4 .pixel, h5 .pixel, h6 .pixel,
.pixel {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  display: inline;
  margin: 0;
}

/* Scanline + vignette overlays are off by default. The aesthetic carries
   without them. Pages that opt in (a single signature surface, never the
   landing page) can add the markup; without an explicit class on <body>
   they don't render. See DESIGN.md "No-Glow Rule". */
.scanlines,
.vignette { display: none; }

@keyframes blink { 50% { opacity: 0; } }

/* ─── NAV ─── */
nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 36px;
  background: rgba(10,6,18,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
/* Hamburger toggle — visible only on mobile (see media query below). */
.nav-menu-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.40);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--ui);
  font-size: 14px;
  line-height: 1;
  transition: border-color .15s;
}
.nav-menu-toggle:hover { border-color: var(--ink); }
.nav-menu-toggle::before {
  content: '\2630';
  display: block;
}
nav.menu-open .nav-menu-toggle::before { content: '\00D7'; font-size: 18px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-img { width: 32px; height: 32px; image-rendering: pixelated; display: block; }
.logo-text {
  font-family: var(--pixel);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 1.5px;
}
nav ul { list-style: none; display: flex; gap: 24px; }
/* The dropdown CTA item is mobile/tablet-only — hidden in the desktop
   horizontal nav. On smaller screens the hamburger menu surfaces it as the
   primary SIGN UP FREE pill. */
nav ul li.nav-menu-cta { display: none; }
@media (max-width: 1000px) {
  nav ul li.nav-menu-cta { display: block; }
}
nav ul a {
  font-family: var(--ui);
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color .15s;
}
nav ul a:hover { color: var(--yellow); }

.nav-actions { display: inline-flex; align-items: center; gap: 10px; }
.nav-login {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--ink);
  padding: 11px 16px;
  border: 1.5px solid rgba(255,255,255,0.40);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: border-color .15s;
}
.nav-login:hover { border-color: var(--ink); }
/* SIGN UP FREE pill — yellow CTA, visible on every page. */
.nav-cta {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  background: var(--yellow);
  color: #1a0d2e;
  padding: 11px 16px;
  border: 2px solid #1a0d2e;
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--red);
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: transform .1s, box-shadow .1s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--red); }
.nav-cta:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--red); }

.header-rule {
  height: 4px;
  background: var(--red);
  box-shadow: 0 1px 0 #000 inset;
}

/* ─── PRIMARY ARCADE BUTTONS ─── */
.btn-arcade {
  font-family: var(--pixel);
  font-size: 16px;
  padding: 26px 32px;
  background: var(--yellow);
  color: #1a0d2e;
  border: 2px solid #1a0d2e;
  border-radius: 8px;
  box-shadow: 0 4px 0 var(--red);
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 1.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 12px;
  transition: transform .1s, box-shadow .1s;
}
.btn-arcade:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--red); }
.btn-arcade:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--red); }
.btn-secondary { display: none; }

/* ─── ENDGAME STRIP ─── */
/* Stacked background image: top red border, top yellow caution stripe,
   bottom yellow caution stripe, bottom red border, solid black behind.
   All contiguous so there's no gap risk between the bands. */
.endgame {
  text-align: center;
  padding: 100px 48px;
  background-color: #000;
  background-image:
    linear-gradient(var(--red), var(--red)),
    repeating-linear-gradient(90deg, var(--yellow) 0 20px, transparent 20px 40px),
    repeating-linear-gradient(90deg, var(--yellow) 0 20px, transparent 20px 40px),
    linear-gradient(var(--red), var(--red));
  background-repeat: no-repeat;
  background-size: 100% 6px, 100% 14px, 100% 14px, 100% 6px;
  background-position:
    0 0,
    0 6px,
    0 calc(100% - 20px),
    0 calc(100% - 6px);
  border: 0;
  margin-top: 80px;
  /* Full-bleed: always span the viewport width, even when the .endgame
     element is nested inside a max-width container (e.g. blog posts). */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
  overflow: visible;
}
.endgame h2 {
  font-family: var(--pixel);
  font-size: 32px;
  color: var(--yellow);
  margin-bottom: 16px;
  line-height: 1.4;
}
.endgame .credits {
  font-family: var(--crt);
  font-size: 22px;
  color: var(--red);
  margin-bottom: 36px;
}

/* Walker animation — gorilla paces along the red top border, picks up the
   banana, eats it, walks back. Stage extends above .endgame so the
   walker stands on the red line. */
.endgame-stage {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0; right: 0;
  height: 80px;
  pointer-events: none;
  z-index: 3;
}
.walker, .endgame-banana {
  position: absolute;
  bottom: 0;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  background-repeat: no-repeat;
}
.walker-walk {
  left: 0;
  width: 80px; height: 70px;
  background-image: url('/assets/gorilla-walk.png');
  background-size: 320px 70px;
  transform-origin: center;
  animation:
    walk-cycle 0.7s steps(4) infinite,
    walk-pace 16s linear infinite;
}
.walker-eat {
  right: 80px; left: auto;
  width: 56px; height: 72px;
  background-image: url('/assets/gorilla-grab-eat.png');
  background-size: 392px 72px;
  opacity: 0;
  animation: eat-master 16s steps(1) infinite;
}
.endgame-banana {
  right: 96px;
  width: 24px; height: 24px;
  background-image: url('/assets/gorilla-banana.png');
  background-size: contain;
  animation: banana-vis 16s steps(1) infinite;
}
@keyframes walk-cycle { to { background-position: -320px 0; } }
@keyframes walk-pace {
  0%      { left: 0;                              transform: scaleX(1); opacity: 1; }
  35%     { left: calc(100% - 80px - 80px);       transform: scaleX(1); opacity: 1; }
  36%     { left: calc(100% - 80px - 80px);       transform: scaleX(1); opacity: 0; }
  54%     { left: calc(100% - 80px - 80px);       transform: scaleX(-1); opacity: 0; }
  55%     { left: calc(100% - 80px - 80px);       transform: scaleX(-1); opacity: 1; }
  90%     { left: 0;                              transform: scaleX(-1); opacity: 1; }
  91%     { left: 0;                              transform: scaleX(1); opacity: 1; }
  100%    { left: 0;                              transform: scaleX(1); opacity: 1; }
}
@keyframes eat-master {
  0%      { opacity: 0; background-position: 0 0; }
  35%     { opacity: 1; background-position: 0 0; }
  37.857% { background-position: -56px 0; }
  40.714% { background-position: -112px 0; }
  43.571% { background-position: -168px 0; }
  46.428% { background-position: -224px 0; }
  49.285% { background-position: -280px 0; }
  52.142% { background-position: -336px 0; }
  55%     { opacity: 0; background-position: -336px 0; }
  100%    { opacity: 0; background-position: -336px 0; }
}
@keyframes banana-vis {
  0%, 35% { opacity: 1; }
  36%, 89% { opacity: 0; }
  90%, 100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .walker, .endgame-banana { animation: none; }
  .walker-walk { left: 24px; }
  .walker-eat { opacity: 0; }
}

/* ─── FOOTER ─── */
/* No top border — the .endgame strip's bottom red rule already
   acts as the page's hard divider into the footer. */
footer {
  background: #000;
  padding: 48px 48px 32px;
  font-family: var(--ui);
  color: rgba(255,255,255,.6);
}
.footer-grid {
  max-width: 1400px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .logo-text { display: block; margin-top: 12px; }
.footer-tagline {
  font-family: var(--crt);
  font-size: 18px;
  color: rgba(255,255,255,.5);
  margin-top: 14px;
  max-width: 240px;
  line-height: 1.4;
}
.footer-col h3,
.footer-col h4 {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  max-width: 1400px;
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,.45);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 1000px) {
  /* Compact nav from tablet down — only the brand mark and the hamburger
     remain in the bar. LOG IN moves into the dropdown menu (along with the
     primary SIGN UP FREE pill). */
  nav { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .nav-actions { gap: 6px; flex-shrink: 0; }
  .nav-login,
  .nav-cta { display: none; }
  .nav-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  nav ul {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  nav.menu-open ul { display: flex; }
  nav ul li { width: 100%; }
  nav ul a {
    display: block;
    padding: 12px 4px;
    font-size: 13px;
  }
  /* Surface the primary action inside the dropdown as a yellow pill. */
  nav.menu-open ul li.nav-menu-cta a {
    margin: 8px 0 4px;
    padding: 12px 16px;
    background: var(--yellow);
    color: #1a0d2e;
    border: 2px solid #1a0d2e;
    border-radius: 6px;
    box-shadow: 0 4px 0 var(--red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  nav { padding: 10px 8px 10px 14px; }
  .logo-img { width: 26px; height: 26px; }
  .logo-text { font-size: 10px; letter-spacing: 1.2px; }
  .endgame { padding: 78px 18px 80px; }
  .endgame h2 { font-size: 22px; }
  .endgame .credits { font-size: 18px; }
  /* Walker animation runs on mobile too — it's the brand flourish on the
     endgame strip and reads correctly at small sizes. */
}

/* ─── Locale banner ───────────────────────────────────────────
   Small dismissible bar that suggests the /br/ version to
   pt-BR browsers. Lives in common.css so it works on every
   page (the home page doesn't load styles.css). */
@keyframes locale-banner-in {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.locale-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: linear-gradient(135deg, #1a0d2e 0%, #0b0612 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 210, 63, 0.55);
  border-radius: 12px;
  padding: 12px 14px 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(255, 51, 85, 0.85), 0 18px 44px rgba(0, 0, 0, 0.55);
  max-width: calc(100vw - 32px);
  animation: locale-banner-in .28s cubic-bezier(.2, .8, .2, 1);
}
.locale-banner-flag {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6));
  flex-shrink: 0;
}
.locale-banner-text {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.locale-banner-cta {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--yellow);
  color: #1a0d2e !important;
  text-decoration: none !important;
  padding: 9px 14px;
  border: 2px solid #1a0d2e;
  border-radius: 7px;
  box-shadow: 0 3px 0 var(--red);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: transform .1s, box-shadow .1s;
  flex-shrink: 0;
}
.locale-banner-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--red);
  text-decoration: none !important;
}
.locale-banner-cta:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--red);
}
.locale-banner-close {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.55);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  flex-shrink: 0;
  transition: color .12s, border-color .12s, background .12s;
}
.locale-banner-close:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
}
@media (max-width: 540px) {
  .locale-banner {
    font-size: 12.5px;
    padding: 10px 12px;
    gap: 10px;
    bottom: 14px;
    border-radius: 10px;
  }
  .locale-banner-flag { font-size: 18px; }
  .locale-banner-text { display: none; }
  .locale-banner-cta { font-size: 10px; padding: 8px 12px; }
}
