@font-face {
  font-family: "Incopins";
  src: url("/assets/fonts/incopins.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #0b1220;
  --bg-alt: #111b33;
  --fg: #e8ecf4;
  --fg-muted: #9aa3b5;
  --accent: #1fbf5b;
  --accent-dark: #158a42;
  --border: #1f2a44;
  --max-width: 780px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.page--prose {
  padding-top: 2rem;
}

.page--prose p {
  color: var(--fg-muted);
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.logo {
  font-family: "Incopins", system-ui, sans-serif;
  font-weight: normal;
  font-size: clamp(3.5rem, 10vw, 6rem);
  margin: 0;
  letter-spacing: 0.02em;
  color: var(--fg);
}

.logo--small {
  font-size: 1.6rem;
}

.tagline {
  color: var(--fg-muted);
  font-size: 1.1rem;
  margin: 0.5rem 0 2rem;
}

.blurb-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
  display: grid;
  gap: 0.6rem;
}

.blurb-list li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
}

.blurb-list li::before {
  content: "⚽";
  font-size: 1rem;
  line-height: inherit;
}

.hero-graphic {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin-inline: auto;
  margin-bottom: 2rem;
  border-radius: 12px;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  padding: 0.9rem 2.5rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.cta:hover,
.cta:focus-visible {
  background: var(--accent-dark);
}

.stores {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  min-width: 180px;
}

.store-badge img {
  height: 100%;
  width: auto;
}

.store-badge--disabled {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-muted);
  cursor: not-allowed;
  padding: 0 1.5rem;
  text-align: center;
  filter: grayscale(1);
}

.coming-soon {
  font-size: 0.9rem;
  line-height: 1.2;
}

.coming-soon small {
  font-size: 0.7rem;
  opacity: 0.75;
}

.blurb {
  margin: 0 auto;
  color: var(--fg-muted);
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--fg-muted);
}

.footer-row {
  display: flex;
  justify-content: space-between;
}

.lang-switcher {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.lang-switcher [aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}

.prose-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.prose-header h1 {
  margin: 0;
}

.back-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.back-link:hover {
  color: var(--fg);
}

.btn {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--fg-muted);
}

.revoke-status {
  color: var(--accent);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Play page */

.play-body {
  margin: 0;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.game-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  display: block;
}

/* Floating chrome buttons sit over the iframe in the corners. In landscape
   they fall in Phaser's letterbox area, so they don't cover the playfield. */
.play-back,
.play-fs-btn {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  z-index: 1100;
  border: 1px solid var(--border);
  background: rgba(17, 27, 51, 0.85);
  color: var(--fg);
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
}

.play-back {
  left: max(0.5rem, env(safe-area-inset-left));
  z-index: 1300;
}

.play-fs-btn {
  right: max(0.5rem, env(safe-area-inset-right));
}

.play-back:hover,
.play-fs-btn:hover {
  background: rgba(31, 191, 91, 0.18);
  border-color: var(--accent);
}

.play-back[hidden],
.play-fs-btn[hidden] {
  display: none;
}

.play-fs-help-btn {
  position: fixed;
}

.play-fs-help-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b1220;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* Portrait CTA — mobile-only prompt to enter fullscreen + landscape. */
.portrait-cta {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(11, 18, 32, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.portrait-cta[hidden] {
  display: none;
}

.portrait-cta-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 22rem;
  width: 100%;
  text-align: center;
  color: var(--fg);
}

.portrait-rotate-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  color: var(--accent);
}

.portrait-cta-panel h2 {
  margin: 0 0 0.4rem;
  font-family: "Incopins", system-ui, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.portrait-cta-panel p {
  margin: 0 0 1.1rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.portrait-cta-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1220;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
}

.portrait-cta-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* iOS PWA install help dialog (no native iframe fullscreen on iOS). */
.fullscreen-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.fullscreen-help-overlay[hidden] {
  display: none;
}

.fullscreen-help-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  max-width: 26rem;
  width: 100%;
  color: var(--fg);
}

.fullscreen-help-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.fullscreen-help-panel p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.fullscreen-help-panel ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.fullscreen-help-panel ol li {
  margin-bottom: 0.35rem;
}

.fullscreen-help-panel .btn {
  display: inline-block;
}

/* PWA standalone (Add to Home Screen): iframe already fills the screen,
   hide every floating control and respect the notch / home-indicator. */
.play-body.is-standalone .play-back,
.play-body.is-standalone .play-fs-btn,
.play-body.is-standalone .portrait-cta {
  display: none;
}

.play-body.is-standalone {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

@media (display-mode: standalone) {
  .play-body .play-back,
  .play-body .play-fs-btn,
  .play-body .portrait-cta {
    display: none;
  }
  .play-body {
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
  }
}

/* Consent banner */

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 1000;
  font-size: 0.9rem;
}

.consent-banner[hidden] {
  display: none;
}

.consent-banner p {
  margin: 0;
  flex: 1 1 300px;
  color: var(--fg);
}

.consent-banner a {
  color: var(--accent);
}

.consent-actions {
  display: flex;
  gap: 0.5rem;
}

.consent-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.consent-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.consent-btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

