/* fubugames.com public page. Palette comes from the logo: soft white letters, amber-to-orange fill. */

:root {
  --bg: #0d1016;
  --surface: #161b25;
  --surface-2: #1d2430;
  --line: rgba(238, 243, 247, 0.09);
  --line-strong: rgba(238, 243, 247, 0.2);
  --text: #eef3f7;
  --muted: #98a4b5;
  --amber: #f7a81b;
  --orange: #ef7d1a;
  --ink: #1b1204;
  --fill: linear-gradient(180deg, var(--amber), var(--orange));
  --focus: 0 0 0 3px rgba(247, 168, 27, 0.55);
  --glow: 0 10px 34px rgba(239, 125, 26, 0.38);
  --wide: 1120px;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 50% -160px, rgba(239, 125, 26, 0.2), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
  position: relative;
}

/* Bubbles drifting up behind the page, echoing the ones in the logo. */
body::before, body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--fill);
  opacity: 0.16;
  pointer-events: none;
  z-index: -1;
  animation: rise 9s ease-in-out infinite alternate;
}
body::before { width: 180px; height: 180px; top: 110px; left: max(-60px, calc(50% - 640px)); }
body::after { width: 96px; height: 96px; top: 300px; right: max(10px, calc(50% - 560px)); animation-duration: 7s; }

@keyframes rise {
  from { transform: translateY(14px); }
  to { transform: translateY(-14px); }
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus); }

/* ── Header ───────────────────────────────────────────── */

.site-head { display: flex; justify-content: center; padding: 44px 16px 6px; }

/* The logo file is square with wide empty margins; show only the lettering. */
.logo { position: relative; width: min(300px, 66vw); aspect-ratio: 8 / 7; overflow: hidden; }
.logo img { position: absolute; width: 121%; max-width: none; height: auto; left: -10.5%; top: -20.7%; }

/* ── PC / MOBILE switch ───────────────────────────────── */

.switch {
  display: flex;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 18px auto 44px;
  padding: 6px;
  gap: 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
html:not(.js) .switch { display: none; }

.switch button {
  appearance: none;
  border: 0;
  cursor: pointer;
  min-width: min(172px, 40vw);
  height: 58px;
  padding: 0 26px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  transition: color 0.18s, background-color 0.18s, transform 0.18s;
}
.switch button:hover { color: var(--text); }
.switch button[aria-pressed="true"] { background: var(--fill); color: var(--ink); box-shadow: var(--glow); }
.switch button[aria-pressed="true"]:focus-visible { box-shadow: var(--focus), var(--glow); }
.switch button:active { transform: scale(0.97); }

/* ── Sections ─────────────────────────────────────────── */

main { width: min(100% - 32px, var(--wide)); margin: 0 auto; }

.js body[data-tab="pc"] #mobile,
.js body[data-tab="mobile"] #pc { display: none; }

/* "#mobile" in the address selects a tab; the huge scroll margin keeps the page at the top. */
#pc, #mobile { margin-bottom: 72px; scroll-margin-top: 9999px; }

.group + .group { margin-top: 48px; }
.group h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.group h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--fill); }

.grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }

.empty { text-align: center; color: var(--muted); padding: 56px 0; font-size: 1.05rem; }

/* ── Game cards ───────────────────────────────────────── */

.card {
  flex: 1 1 320px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-5px); border-color: rgba(247, 168, 27, 0.45); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
}

.cover { position: relative; aspect-ratio: 460 / 215; background: var(--surface-2); }
.cover.playing { aspect-ratio: 16 / 9; background: #000; }
.cover iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Play button: covers the whole image so the cover itself starts the trailer. */
.play {
  appearance: none;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: start end;
  width: 100%;
  border: 0;
  padding: 14px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font: inherit;
}
.play span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px 0 17px;
  border-radius: 999px;
  background: var(--fill);
  box-shadow: var(--glow);
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: transform 0.18s;
}
.play span::before { content: ""; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--ink); }
.play:hover span { transform: scale(1.07); }
.play:focus-visible { box-shadow: none; }
.play:focus-visible span { box-shadow: var(--focus), var(--glow); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--muted);
  overflow-wrap: anywhere;
  background: radial-gradient(260px 160px at 80% 110%, rgba(239, 125, 26, 0.3), transparent 70%), var(--surface-2);
}

.card h3 { padding: 20px 22px 0; font-size: 1.3rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }

.badge {
  align-self: flex-start;
  margin: 10px 22px 0;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(247, 168, 27, 0.6);
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.links { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 22px 22px; margin-top: auto; }

.store {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.18s, background-color 0.18s, color 0.18s, transform 0.18s;
}
.store:hover { border-color: var(--amber); color: var(--amber); }
.store:active { transform: scale(0.97); }
.store[data-platform="steam"],
.store[data-platform="appstore"],
.store[data-platform="googleplay"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.store[data-platform="steam"]:hover,
.store[data-platform="appstore"]:hover,
.store[data-platform="googleplay"]:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }

/* ── Mobile games: app icon on the left, like a store listing ── */

.card.app {
  flex: 1 1 300px;
  max-width: 420px;
  display: grid;
  grid-template-columns: 104px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 10px 18px;
  padding: 18px;
}
.card.app .cover { grid-row: 1 / span 2; width: 104px; aspect-ratio: 1; border-radius: 24px; overflow: hidden; }
.card.app .cover-fallback { font-size: 0.8rem; padding: 8px; }
.card.app h3 { padding: 0; align-self: end; font-size: 1.15rem; }
.card.app .links { padding: 0; margin: 0; align-self: start; }
.card.app .store { height: 36px; padding: 0 14px; font-size: 0.84rem; }

/* On the small icon the trailer button is just the round play symbol. */
.card.app .play { place-items: end; padding: 6px; }
.card.app .play span { width: 34px; height: 34px; padding: 0 0 0 3px; gap: 0; justify-content: center; font-size: 0; }
.card.app:has(.cover.playing) { display: flex; flex-direction: column; }
.card.app .cover.playing { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; }

/* ── Contact ──────────────────────────────────────────── */

#contact {
  display: grid;
  gap: 28px;
  padding: clamp(24px, 5vw, 48px);
  margin-bottom: 56px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
}
@media (min-width: 820px) {
  #contact { grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
}

.contact-intro h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.1; }
.contact-intro h2::after { content: ""; display: block; width: 46px; height: 6px; margin-top: 16px; border-radius: 999px; background: var(--fill); }
.contact-intro p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

#contact-form { display: grid; gap: 16px; }
#contact-form label { display: grid; gap: 7px; font-size: 0.86rem; font-weight: 700; color: var(--muted); }
#contact-form input, #contact-form textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.18s;
}
#contact-form textarea { min-height: 140px; resize: vertical; }
#contact-form input:focus-visible, #contact-form textarea:focus-visible { border-color: var(--amber); }

/* Honeypot: off-screen, never focusable by keyboard. */
#contact-form input[name="website"] { position: absolute; left: -9999px; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; }

.privacy { color: var(--muted); font-size: 0.84rem; }

#contact-form button {
  appearance: none;
  justify-self: start;
  height: 50px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: var(--glow);
  transition: transform 0.18s, filter 0.18s;
}
#contact-form button:hover { filter: brightness(1.08); }
#contact-form button:active { transform: scale(0.97); }
#contact-form button:focus-visible { box-shadow: var(--focus), var(--glow); }
#contact-form button:disabled { opacity: 0.6; cursor: default; }

#contact-status { min-height: 1.5em; font-size: 0.92rem; color: var(--muted); }
#contact-status.is-ok { color: #8fe3a4; }
#contact-status.is-error { color: #ff9a8a; }

/* ── Footer ───────────────────────────────────────────── */

.social { padding: 0 16px 48px; text-align: center; }
.social nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.social a {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s;
}
.social a:hover { color: var(--amber); border-color: rgba(247, 168, 27, 0.5); }
.copyright { margin-top: 22px; color: var(--muted); font-size: 0.82rem; opacity: 0.7; }

@media (max-width: 520px) {
  .site-head { padding-top: 28px; }
  .switch { margin-bottom: 30px; }
  .switch button { height: 52px; padding: 0 16px; font-size: 0.95rem; }
  .card h3 { font-size: 1.15rem; }
  body::before { width: 120px; height: 120px; top: 70px; }
  body::after { top: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
