/* DIGI VIBES - shared design system for /, /apps/ and /games/.
   Identity kept from the original site: gray-900 background, teal-to-cyan gradient (from the logo), Inter.
   Uses logical properties (inline/block) so the Arabic RTL layout mirrors without extra rules. */

:root {
  --bg: #0b1120;
  --bg-2: #111827;        /* gray-900, the original background */
  --surface: #1f2937;     /* gray-800 */
  --surface-2: rgba(31, 41, 55, 0.6);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-2: #d1d5db;      /* gray-300 */
  --text-3: #9ca3af;      /* gray-400 */
  --teal: #14b8a6;        /* teal-500 */
  --teal-light: #5eead4;  /* teal-300 */
  --cyan: #0891b2;        /* cyan-600 */
  --cyan-light: #22d3ee;  /* cyan-400 */
  --gradient: linear-gradient(90deg, var(--teal) 0%, var(--cyan) 100%);
  --gradient-text: linear-gradient(90deg, var(--teal-light) 0%, var(--cyan-light) 100%);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  --header-h: 4.5rem;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Cairo", "Inter", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="ar"] body { font-family: var(--font-ar); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.15; letter-spacing: -0.025em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }

p { margin: 0; }

:focus-visible { outline: 2px solid var(--cyan-light); outline-offset: 3px; border-radius: 0.375rem; }

.container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -3rem; z-index: 100;
  padding: 0.5rem 1rem; border-radius: 0.5rem; background: var(--text); color: var(--bg);
}
.skip-link:focus { top: 1rem; }

/* ---- Background glow --------------------------------------------------------------- */

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40rem 28rem at 15% -5%, rgba(20, 184, 166, 0.16), transparent 70%),
    radial-gradient(36rem 26rem at 90% 10%, rgba(8, 145, 178, 0.14), transparent 70%),
    var(--bg);
}

.bg-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}

/* ---- Header ------------------------------------------------------------------------ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header.scrolled,
.header.open {
  background: rgba(11, 17, 32, 0.8);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}

.logo img { height: 2.4rem; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.nav-links a {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(34, 211, 238, 0.12); }

.nav-end { display: flex; align-items: center; gap: 0.75rem; }

.lang-switch {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.lang-switch button {
  min-width: 2.25rem;
  padding: 0.3rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-3);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--gradient); color: var(--text); }
.lang-switch button[lang="ar"] { font-family: var(--font-ar); }

.menu-btn {
  display: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.menu-btn svg { width: 1.5rem; height: 1.5rem; }
.menu-btn .icon-close { display: none; }
.header.open .menu-btn .icon-open { display: none; }
.header.open .menu-btn .icon-close { display: block; }

.mobile-menu { display: none; }

/* ---- Buttons ----------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn svg { width: 1.125rem; height: 1.125rem; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--gradient); color: var(--text); box-shadow: 0 8px 24px -8px rgba(20, 184, 166, 0.6); }
.btn-primary:hover { filter: brightness(1.12); }

.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.28); }

.btn-sm { padding: 0.5rem 0.875rem; border-radius: 0.625rem; font-size: 0.8125rem; }

.arrow { display: inline-block; transition: transform 0.2s ease; }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
a:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] a:hover .arrow { transform: scaleX(-1) translateX(4px); }

/* ---- Pill / eyebrow ---------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.875rem 0.25rem 0.25rem;
  padding-inline: 0.25rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-2);
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}

.pill:hover { border-color: rgba(34, 211, 238, 0.5); }

.pill strong {
  padding: 0.125rem 0.75rem;
  border-radius: 999px;
  background: var(--gradient);
  color: var(--text);
  font-weight: 600;
}

.eyebrow {
  display: inline-block;
  color: var(--cyan-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 0.9375rem; }

/* ---- Hero -------------------------------------------------------------------------- */

.hero { padding: 4.5rem 0 5rem; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

.hero h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
}

.hero-text {
  max-width: 36rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Floating collage of real app icons. */
.icon-cloud {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 26rem;
  margin-inline: auto;
  padding: 1.5rem;
}

.icon-cloud::before {
  content: "";
  position: absolute;
  inset: 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 184, 166, 0.35), rgba(8, 145, 178, 0.12) 60%, transparent);
  filter: blur(20px);
}

.icon-cloud a {
  display: block;
  aspect-ratio: 1;
  border-radius: 24%;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.icon-cloud a:nth-child(3n + 2) { animation-delay: -2s; transform: translateY(1.5rem); }
.icon-cloud a:nth-child(3n) { animation-delay: -4s; }
.icon-cloud a:hover { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--cyan-light); }
.icon-cloud img { width: 100%; height: 100%; object-fit: cover; }
.icon-cloud .icon-svg { display: grid; place-items: center; background: linear-gradient(160deg, #1f2937, #0b1120); }
.icon-cloud .icon-svg img { width: 58%; height: 58%; object-fit: contain; }
.icon-cloud .more { display: grid; place-items: center; background: var(--gradient); color: var(--text); font-size: 2.5rem; font-weight: 300; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* ---- Stats ------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 4rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.stat { padding: 1.5rem; background: var(--bg); text-align: center; }
.stat strong { display: block; direction: ltr; color: var(--text); font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1; }
.stat span { display: block; margin-top: 0.375rem; color: var(--text-3); font-size: 0.875rem; }

/* ---- Sections ---------------------------------------------------------------------- */

.section { padding: 5rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-tight { padding-top: 0; }

.section-head { max-width: 42rem; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: 0.75rem; font-size: clamp(1.875rem, 4vw, 2.75rem); font-weight: 800; }
.section-head p { margin-top: 1rem; font-size: 1.0625rem; color: var(--text-3); }

/* Page heading used by /apps/ and /games/. */
.page-hero { padding: 4.5rem 0 3rem; text-align: center; }
.page-hero h1 { margin-top: 1.25rem; font-size: clamp(2.25rem, 6vw, 3.75rem); font-weight: 800; }
.page-hero p { max-width: 40rem; margin: 1.25rem auto 0; font-size: 1.125rem; }

/* ---- Universe cards (home) --------------------------------------------------------- */

.universes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.universe {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.6));
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.universe::before {
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-end: -20%;
  z-index: -1;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 184, 166, 0.28), transparent);
  transition: transform 0.4s ease;
}

.universe.games::before { background: radial-gradient(closest-side, rgba(34, 211, 238, 0.28), transparent); }
.universe:hover { border-color: rgba(34, 211, 238, 0.45); transform: translateY(-4px); }
.universe:hover::before { transform: scale(1.2); }

.universe h3 { margin-top: 0.75rem; font-size: 2rem; font-weight: 800; }
.universe p { max-width: 26rem; margin-top: 0.75rem; color: var(--text-2); }

.universe-icons { display: flex; margin-top: auto; padding-top: 2rem; }

.universe-icons img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 24%;
  border: 3px solid var(--bg-2);
  object-fit: cover;
  background: var(--surface);
}

.universe-icons img + img { margin-inline-start: -0.75rem; }
.universe-icons img.icon-plain { padding: 0.6rem; background: linear-gradient(160deg, #1f2937, #0b1120); object-fit: contain; }

.universe-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--cyan-light);
  font-weight: 600;
}

/* Whole-card link: the stretched pseudo-element covers the card. */
.stretched::after { content: ""; position: absolute; inset: 0; }

/* ---- Feature grid (home) ----------------------------------------------------------- */

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

.feature {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  background: var(--gradient);
  color: var(--text);
  box-shadow: 0 10px 24px -10px rgba(20, 184, 166, 0.8);
}

.feature-icon svg { width: 1.5rem; height: 1.5rem; }
.feature h3 { margin-top: 1.25rem; font-size: 1.125rem; font-weight: 700; }
.feature p { margin-top: 0.5rem; color: var(--text-3); font-size: 0.9375rem; }

/* ---- Contact (home) ---------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(30rem 20rem at 0% 0%, rgba(20, 184, 166, 0.14), transparent 70%),
    var(--surface-2);
}

html[dir="rtl"] .contact {
  background:
    radial-gradient(30rem 20rem at 100% 0%, rgba(20, 184, 166, 0.14), transparent 70%),
    var(--surface-2);
}

.contact h2 { font-size: clamp(1.875rem, 4vw, 2.5rem); font-weight: 800; }
.contact-intro p { margin-top: 1rem; color: var(--text-3); font-size: 1.0625rem; }
.contact-intro .btn { margin-top: 2rem; }

.contact-list { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }

.contact-list li {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(11, 17, 32, 0.5);
}

.contact-list svg { width: 1.375rem; height: 1.375rem; flex: none; margin-top: 0.125rem; color: var(--cyan-light); }
.contact-list span { display: block; color: var(--text-3); font-size: 0.8125rem; }
.contact-list a, .contact-list address { color: var(--text); font-style: normal; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--cyan-light); }

.legal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.legal dt { color: var(--text-3); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
html[lang="ar"] .legal dt { letter-spacing: 0; font-size: 0.8125rem; }
.legal dd { margin: 0.25rem 0 0; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- App / game cards -------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filters button {
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.filters button:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.filters button[aria-pressed="true"] { border-color: transparent; background: var(--gradient); color: var(--text); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(31, 41, 55, 0.75), rgba(17, 24, 39, 0.55));
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover { border-color: rgba(34, 211, 238, 0.4); transform: translateY(-4px); box-shadow: var(--shadow); }
.card[hidden] { display: none; }

.card-top { display: flex; align-items: flex-start; gap: 1rem; }

.card-icon {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 24%;
  object-fit: cover;
  background: var(--surface);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card-icon.icon-plain { padding: 0.9rem; background: linear-gradient(160deg, #1f2937, #0b1120); object-fit: contain; }

.card-title { min-width: 0; }
.card h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.card .category { display: block; margin-top: 0.25rem; color: var(--cyan-light); font-size: 0.8125rem; font-weight: 600; }

/* Highlight label sitting on the card's top border, so every card keeps the same layout. */
.card-badge {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 1.5rem;
  transform: translateY(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--gradient);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 0 4px var(--bg), 0 6px 16px -4px rgba(20, 184, 166, 0.6);
}

.card-badge.static {
  position: static;
  display: inline-block;
  margin-bottom: 1rem;
  transform: none;
  box-shadow: none;
}

.card p { flex: 1; margin-top: 1.25rem; color: var(--text-2); font-size: 0.9375rem; }

.platforms { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }

.platforms li {
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 500;
}

/* A platform chip that links to its store. */
.platforms li:has(> a) { border-color: rgba(34, 211, 238, 0.35); }

.platforms a {
  display: inline-flex;
  gap: 0.25rem;
  margin: -0.125rem -0.625rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  color: var(--cyan-light);
  transition: background-color 0.15s ease;
}

.platforms a::after { content: "\2197"; font-size: 0.7em; }
.platforms a:hover { background: rgba(34, 211, 238, 0.12); }

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.store-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Compact store / website button: icon only, its name shows in a tooltip. */
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.icon-btn svg { width: 1.125rem; height: 1.125rem; }
.icon-btn:hover { border-color: transparent; background: var(--gradient); transform: translateY(-2px); }

.icon-btn::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  z-index: 5;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  background: var(--text);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.icon-btn:hover::after,
.icon-btn:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

.card-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem 1rem; }
.card-links a { color: var(--text-3); font-size: 0.8125rem; font-weight: 500; }
.card-links a:hover { color: var(--text); }

/* Big featured game card. */
.game-feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.game-feature:hover { border-color: rgba(34, 211, 238, 0.4); }

.game-cover {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 20rem;
  overflow: hidden;
  isolation: isolate;
}

.game-cover .blur {
  position: absolute;
  inset: -15%;
  z-index: -1;
  width: 130%;
  height: 130%;
  max-width: none;
  object-fit: cover;
  filter: blur(36px) saturate(1.4) brightness(0.7);
}

.game-cover .icon {
  width: min(55%, 13rem);
  height: auto;
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 3px rgba(255, 255, 255, 0.15);
  transition: transform 0.35s ease;
}

.game-feature:hover .game-cover .icon { transform: scale(1.05) rotate(-3deg); }

.game-body { display: flex; flex-direction: column; padding: 2.5rem; }
.game-body h2 { margin-top: 0.75rem; font-size: clamp(1.875rem, 4vw, 2.5rem); font-weight: 800; }
.game-body p { margin-top: 1rem; color: var(--text-2); font-size: 1.0625rem; }

.game-facts { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 1.5rem 0 0; }
.game-facts div { display: flex; flex-direction: column-reverse; min-width: 5rem; }
.game-facts dt { color: var(--text-3); font-size: 0.8125rem; }
.game-facts dd { margin: 0; color: var(--text); font-size: 1.375rem; font-weight: 800; }

.game-body .card-actions { flex-wrap: wrap; justify-content: flex-start; gap: 0.75rem; margin-top: auto; padding-top: 1.5rem; border-top: 0; }
.game-body .card-links { margin-inline-start: auto; }
.game-body .platforms { margin-top: 1.5rem; }

.coming-next {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--line-strong);
}

.coming-next .plus {
  display: grid;
  place-items: center;
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--gradient);
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}

.coming-next h3 { font-size: 1.125rem; }
.coming-next p { margin-top: 0.25rem; color: var(--text-3); }

/* CTA band at the bottom of /apps/ and /games/. */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  color: var(--text);
}

.cta-band h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); font-weight: 800; }
.cta-band p { margin-top: 0.25rem; color: rgba(255, 255, 255, 0.85); }
.cta-band .btn { background: var(--bg); color: var(--text); }
.cta-band .btn:hover { filter: none; background: var(--bg-2); }

/* ---- Footer ------------------------------------------------------------------------ */

.footer { margin-top: 2rem; padding: 3rem 0 2rem; border-top: 1px solid var(--line); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand img { height: 2.25rem; width: auto; }
.footer-brand p { max-width: 20rem; margin-top: 1rem; color: var(--text-3); font-size: 0.9375rem; }

.footer h4 { margin: 0 0 1rem; color: var(--text); font-size: 0.875rem; font-weight: 600; }
.footer ul { display: grid; gap: 0.625rem; margin: 0; padding: 0; list-style: none; }
.footer ul a { color: var(--text-3); font-size: 0.9375rem; }
.footer ul a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 0.875rem;
}

/* ---- 404 --------------------------------------------------------------------------- */

.not-found { display: grid; place-items: center; min-height: calc(100vh - var(--header-h) - 12rem); padding: 4rem 0; text-align: center; }
.not-found .code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; }
.not-found h1 { margin-top: 1rem; font-size: clamp(1.5rem, 4vw, 2rem); }
.not-found p { margin-top: 0.75rem; color: var(--text-3); }
.not-found .hero-actions { justify-content: center; }

/* ---- Reveal on scroll (enabled by site.js only) ------------------------------------ */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---- Responsive -------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .legal { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 4rem; }

  .nav-links, .nav-end .lang-switch { display: none; }
  .menu-btn { display: grid; }

  .mobile-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .header.open .mobile-menu { visibility: visible; opacity: 1; transform: none; }

  .mobile-menu > a {
    padding: 0.875rem 0.5rem;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 600;
  }

  .mobile-menu > a[aria-current="page"] { color: var(--cyan-light); }
  .mobile-menu .lang-switch { justify-self: start; margin-top: 1rem; }
  .mobile-menu .lang-switch button { min-width: 3.25rem; padding: 0.5rem 0.75rem; font-size: 0.9375rem; }

  .hero { padding: 2.5rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-copy { text-align: center; }
  .hero-text { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .icon-cloud { max-width: 20rem; gap: 1rem; padding: 0.5rem 1rem 1.5rem; }

  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 3rem; }

  .section { padding: 3.5rem 0; }
  .section-head { margin-bottom: 2rem; }

  .universes { grid-template-columns: 1fr; }
  .universe { min-height: 0; padding: 1.75rem; }

  .contact { grid-template-columns: 1fr; padding: 1.75rem; }

  .game-feature { grid-template-columns: 1fr; }
  .game-cover { min-height: 15rem; }
  .game-body { padding: 1.75rem; }

  .page-hero { padding: 3rem 0 2rem; }
}

@media (max-width: 560px) {
  .container { padding-inline: 1.125rem; }
  .features { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .card { padding: 1.375rem; }
  .card-icon { width: 4rem; height: 4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; align-items: center; }
  .cta-band { padding: 1.75rem; }
  .cta-band .btn { width: 100%; }
  .coming-next { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
