/* =========================================================
   DESIGN TOKENS
   ========================================================= */

:root {
  /* Layout */
  --nav-h: 80px;
  --menu-h: 420px;
  --section-padding-y: 60px;
  --section-padding-y-desktop: 90px;
  --content-max: 1100px;

  /* Motion */
  --menu-dur: 500ms;
  --item-dur: 300ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Colours */
  --brand-blue: #2f80ff;
  --brand-red: #ef4444;
  --dark: #1c1c1c;
  --heading: #0b132b;
  --section-bg: #ffffff;
  --paragraph-color-on-light: rgba(0, 0, 0, 0.35);
  --paragraph-color-on-dark: rgba(255, 255, 255, 0.35);

  /* Cards */
  --card-bg: #ffffff;
  --card-border: 1px solid rgba(22, 22, 24, 0.08);
  --card-radius: 16px;
  --card-shadow: 0 6px 18px rgba(22, 22, 24, 0.07);
  --card-padding: 20px;
  --card-padding-desktop: 24px;

  /* Typography */
  --hero-title-size: clamp(3.8rem, 8vw, 7rem);
  --hero-title-line-height: 0.95;
  --section-title-size: 2.6rem;
  --section-title-size-desktop: 3.5rem;
  --section-title-line-height: 1.1;
  --section-title-line-height-desktop: 1.05;
  --card-title-size: 2rem;
  --paragraph-size: clamp(0.9rem, 1.8vw, 0.9rem);
  --paragraph-line-height: 1.4;

  /* Buttons */
  --btn-height: 40px;
  --btn-padding-x: 28px;
  --btn-radius: 6px;
  --btn-font-size: 0.85rem;
  --btn-mobile-height: 48px;
  --btn-mobile-padding-x: 20px;
  --btn-hover-duration: 0.65s;

  /* Eyebrow */
  --eyebrow-margin-bottom: 10px;
  --eyebrow-padding: 10px 16px;
  --eyebrow-radius: 999px;
  --eyebrow-font-size: 0.9rem;

  /* Logo */
  --logo-size-desktop: 26px;
  --logo-size-mobile: 22px;

  /* Links */
  --link-color: rgba(255, 255, 255, 0.5);
  --link-hover-color: #ffffff;
  --link-size: 1rem;
  --link-size-mobile: 1.1rem;
  --footer-link-size: 0.9rem;
  --link-weight: 500;
  --link-letter-spacing: 0.02em;
  --link-padding-y: 2px;
  --link-padding-x: 4px;
  --link-transition-duration: 0.45s;
}

/* =========================================================
   BASE + BOOTSTRAP OVERRIDES
   ========================================================= */

.container {
  --bs-gutter-x: 2.5rem;
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family:
    "Oswald",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}

section[id] {
  scroll-margin-top: var(--nav-h);
}

.section-pad {
  padding: var(--section-padding-y) 0;
  background-color: var(--section-bg);
}

/* =========================================================
   TYPOGRAPHY + SECTION HEADERS
   ========================================================= */

.hero-title {
  display: flex;
  flex-direction: column;
  margin: 0 0 12px;
  font-size: var(--hero-title-size);
  font-weight: 700;
  line-height: var(--hero-title-line-height);
  text-transform: uppercase;
}

.section-title {
  color: var(--heading);
  font-size: var(--section-title-size);
  font-weight: 700;
  line-height: var(--section-title-line-height);
}

.card-title {
  font-size: var(--card-title-size);
  font-weight: 700;
}

.paragraph {
  font-family:
    "Google Sans Flex",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size: var(--paragraph-size);
  font-optical-sizing: auto;
  font-weight: 400;
  line-height: var(--paragraph-line-height);
}

.paragraph--on-light {
  color: var(--paragraph-color-on-light);
}

.paragraph--on-dark {
  color: var(--paragraph-color-on-dark);
}

.who-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-bottom: var(--eyebrow-margin-bottom);
  padding: var(--eyebrow-padding);
  border: 1px solid var(--brand-blue);
  border-radius: var(--eyebrow-radius);
  background: transparent;
  color: var(--brand-blue);
  font-size: var(--eyebrow-font-size);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.section-description {
  margin-bottom: 0;
}

.about-header {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-header .section-description {
  max-width: 600px;
  margin-right: auto;
  margin-left: auto;
}

/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1035;
  min-height: var(--nav-h);
  background-color: var(--dark) !important;
  transition:
    transform 0.35s ease,
    box-shadow 0.25s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.navbar.is-scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.navbar.is-hidden {
  transform: translateY(-100%);
}

.navbar > .container {
  align-items: center;
}

.navbar-brand {
  padding: 0;
  line-height: 1;
}

.navbar-brand img,
.footer-logo img {
  display: block;
  height: var(--logo-size-desktop);
}

.navbar-brand img {
  max-height: calc(var(--nav-h) - 16px);
}

.mobile-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mobile-contact-icon-btn,
.navbar-toggler {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  -webkit-tap-highlight-color: transparent;
}

.mobile-contact-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}

.mobile-contact-icon-btn img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.mobile-contact-icon-btn:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 4px;
}

.navbar .nav-link {
  padding-left: 5px;
  color: var(--link-color);
  font-size: var(--link-size);
  font-weight: var(--link-weight);
  letter-spacing: var(--link-letter-spacing);
  transition: color 0.2s ease-in-out;
}

.navbar .nav-link.slide-link {
  padding: var(--link-padding-y) var(--link-padding-x);
}

.navbar-toggler {
  position: relative;
  box-shadow: none !important;
}

.menu-icon {
  position: absolute;
  inset: 0;
  display: block;
  width: 42px;
  height: 42px;
  margin: auto;
  object-fit: contain;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-icon-open {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.menu-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.8);
}

.navbar-toggler[aria-expanded="true"] .menu-icon-open,
.navbar-toggler.is-open .menu-icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(0.8);
}

.navbar-toggler[aria-expanded="true"] .menu-icon-close,
.navbar-toggler.is-open .menu-icon-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.nav-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--menu-dur) var(--ease);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.site-btn {
  --btn-bg: #ffffff;
  --btn-text: var(--heading);
  --btn-hover-bg: var(--brand-blue);
  --btn-text-hover: #ffffff;

  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  overflow: hidden;
  border: 0 !important;
  border-radius: var(--btn-radius);
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  font-size: var(--btn-font-size);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.35s ease;
}

.site-btn--white {
  --btn-bg: #ffffff;
}

.site-btn--light {
  --btn-bg: #f1f1f2;
}

.site-btn span {
  position: relative;
  z-index: 2;
}

.site-btn::before {
  content: "";
  position: absolute;
  top: var(--circle-y, 50%);
  left: var(--circle-x, 50%);
  z-index: 1;
  width: var(--circle-size, 220px);
  height: var(--circle-size, 220px);
  border-radius: 50%;
  background: var(--btn-hover-bg);
  transform: translate(-50%, -50%) scale(0);
  transform-origin: center;
  transition: transform var(--btn-hover-duration) cubic-bezier(0.16, 1, 0.3, 1);
}

.site-btn:hover,
.site-btn:focus-visible {
  color: var(--btn-text-hover) !important;
}

.site-btn:hover::before,
.site-btn:focus-visible::before {
  transform: translate(-50%, -50%) scale(1);
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 600px;
  padding: var(--nav-h) 0 40px;
  overflow: hidden;
  background: var(--dark);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(47, 128, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 128, 255, 0.1) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(
    circle at center,
    #000 20%,
    rgba(0, 0, 0, 0.2) 75%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle at center,
    #000 20%,
    rgba(0, 0, 0, 0.2) 75%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  padding: 0 24px;
  overflow: visible;
}

.hero-mask {
  display: block;
  overflow: hidden;
}

.hero-line {
  display: block;
  will-change: transform;
}

.hero-subtitle {
  max-width: 500px;
  margin: 0;
  opacity: 1;
}

.hero-image {
  position: relative;
  z-index: 2;
  display: block;
  width: min(240px, 80vw);
  height: auto;
  margin-top: 20px;
}

/* =========================================================
   ABOUT
   ========================================================= */

.about-main-image {
  width: min(100%, var(--content-max));
  height: 420px;
  margin: 40px auto 0;
  overflow: hidden;
  border-radius: var(--card-radius);
}

.about-main-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   SHARED CARD SURFACE
   ========================================================= */

.service-card,
.game-card,
.legal-card {
  border: var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

/* =========================================================
   SERVICES
   ========================================================= */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: min(100%, var(--content-max));
  margin: 40px auto 0;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 188px;
  padding: var(--card-padding);
  text-align: left;
}

.service-card-image {
  display: block;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  margin-bottom: 8px;
  object-fit: contain;
}

.service-card-text {
  width: 100%;
}

.service-card-title {
  margin: 0 0 6px;
  color: var(--heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.service-card-subtitle {
  margin: 0;
  text-align: left;
}

/* =========================================================
   GAMES CAROUSEL
   ========================================================= */

.games-carousel {
  width: min(100%, var(--content-max));
  margin: 32px auto 0;
}

.games-list {
  --games-per-view: 1;
  --games-gap: 20px;

  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: var(--games-gap);
  width: 100%;
  padding: 8px 0 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-padding-inline: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.games-list.is-static {
  justify-content: center;
  overflow-x: hidden;
  scroll-snap-type: none;
}

.games-list::-webkit-scrollbar {
  display: none;
}

.games-list:focus-visible {
  border-radius: var(--card-radius);
  outline: 2px solid var(--brand-blue);
  outline-offset: 6px;
}

.game-card {
  display: flex;
  flex: 0 0
    calc(
      (100% - (var(--games-gap) * (var(--games-per-view) - 1))) /
        var(--games-per-view)
    );
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 220px;
  padding: var(--card-padding);
  overflow: visible;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.game-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-card-icon {
  display: block;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--card-radius);
  object-fit: cover;
}

.game-card-text {
  flex: 1;
  min-width: 0;
}

.game-card-title {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.game-card-genre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--brand-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.game-card-subtitle {
  display: -webkit-box;
  margin: 16px 0 0;
  overflow: hidden;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.game-card-store-badges {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.store-badge {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  text-decoration: none;
}

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

.game-card-store-badges.is-muted .store-badge {
  cursor: default;
  pointer-events: none;
}

.game-card-store-badges.is-muted .store-badge img {
  opacity: 0.35;
  filter: grayscale(1);
}

.game-carousel-pagination {
  --indicator-width: 28px;
  --indicator-height: 6px;
  --indicator-gap: 8px;
  --active-page: 0;

  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--indicator-gap);
  width: fit-content;
  min-height: 16px;
  margin: 12px auto 0;
}

.game-carousel-pagination[hidden] {
  display: none;
}

.game-carousel-indicator {
  position: relative;
  z-index: 1;
  flex: 0 0 var(--indicator-width);
  width: var(--indicator-width);
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game-carousel-indicator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: var(--indicator-height);
  border-radius: 2px;
  background: rgba(11, 19, 43, 0.16);
  transform: translateY(-50%);
  pointer-events: none;
}

.game-carousel-active {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 2;
  width: var(--indicator-width);
  height: var(--indicator-height);
  border-radius: 2px;
  background: var(--brand-blue);
  backface-visibility: hidden;
  pointer-events: none;
  transform: translate3d(
    calc(var(--active-page) * (var(--indicator-width) + var(--indicator-gap))),
    -50%,
    0
  );
  transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.game-carousel-indicator:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

/* =========================================================
   CONTACT POPUP + FORM
   ========================================================= */

body.contact-popup-open {
  overflow: hidden;
}

.contact-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 260ms ease,
    visibility 260ms ease;
}

.contact-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.contact-popup-dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: calc(100svh - 48px);
  padding: 80px 56px 36px;
  overflow-y: auto;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
  transform: translateY(24px) scale(0.98);
  transition: transform 260ms ease;
}

.contact-popup.is-open .contact-popup-dialog {
  transform: translateY(0) scale(1);
}

.contact-popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent url("assets/icons/icon-close.svg") center / contain
    no-repeat;
  box-shadow: none;
  cursor: pointer;
  transition: background-image 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.contact-popup-close:hover,
.contact-popup-close:focus-visible {
  background-image: url("assets/icons/icon-close-hover.svg");
}

.contact-popup-close:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 4px;
}

.contact-popup-header {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.contact-popup-header .section-title {
  font-size: clamp(2.4rem, 3vw, 3rem);
}

.contact-popup-header .section-description {
  max-width: 540px;
  margin: 12px auto 0;
}

.contact-popup-layout {
  margin-top: 24px;
}

#contact-form .form-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(11, 19, 43, 0.2);
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--heading);
  box-shadow: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#contact-form .form-control:focus {
  border-color: var(--brand-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.12);
}

#contact-form textarea {
  min-height: 80px;
  resize: none !important;
}

#contact-form textarea::-webkit-resizer {
  display: none;
}

#contact-form ::placeholder {
  color: rgba(11, 19, 43, 0.25);
  opacity: 0.5;
}

.contact-submit-group {
  display: flex;
  justify-content: center;
}

.contact-botcheck {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.contact-submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.contact-form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--paragraph-color-on-light);
  text-align: center;
}

.contact-form-status.is-success {
  color: #198754;
}

.contact-form-status.is-error {
  color: #c62828;
}

/* =========================================================
   COPY EMAIL CONTROL
   ========================================================= */

.contact-email-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-blue);
  font: inherit;
  line-height: inherit;
  vertical-align: baseline;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.contact-email {
  color: currentColor;
  font-weight: 400;
}

.copy-email-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  opacity: 1;
}

.copy-email-icon img {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.contact-email-wrapper:focus {
  outline: none;
}

.contact-email-wrapper:focus-visible {
  border-radius: 3px;
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

.contact-email-wrapper:active {
  transform: scale(0.98);
}

.copy-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 19, 43, 0.16);
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.copy-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  padding: 32px 0 16px;
  background-color: var(--dark);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo img {
  width: auto;
}

.footer-tagline {
  max-width: 680px;
  white-space: nowrap;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.footer-social img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity 0.25s ease;
}

.footer-social a:hover img,
.footer-social a:focus-visible img {
  opacity: 1;
}

.footer-divider {
  width: 100%;
  height: 1px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.14);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-left {
  color: var(--paragraph-color-on-dark) !important;
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  padding: var(--link-padding-y) var(--link-padding-x);
  color: var(--link-color);
  font-size: var(--footer-link-size);
  font-weight: var(--link-weight);
  font-family: inherit;
  line-height: inherit;
  letter-spacing: var(--link-letter-spacing);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.footer-divider-secondary {
  display: none;
}

.footer-tagline .contact-email-wrapper {
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}

.footer-tagline .contact-email,
.footer-tagline .copy-email-icon {
  opacity: 1;
}

.footer-tagline .copy-email-icon {
  width: 15px;
  height: 15px;
  background-color: currentColor;
  -webkit-mask: url("assets/icons/icon-copy.svg") center / contain no-repeat;
  mask: url("assets/icons/icon-copy.svg") center / contain no-repeat;
}

.footer-tagline .copy-email-icon img {
  display: none;
}

/* =========================================================
   INNER + LEGAL PAGES
   ========================================================= */

.inner-page main {
  padding-top: var(--nav-h);
}

.legal-document-page {
  background: var(--section-bg);
}

.legal-section {
  min-height: calc(100svh - var(--nav-h));
}

.legal-header {
  width: min(100%, 820px);
  margin: 0 auto;
  text-align: center;
}

.legal-title {
  margin: 0;
}

.legal-updated {
  margin: 8px 0 0;
}

.legal-card {
  width: min(100%, 900px);
  margin: 24px auto 0;
  padding: 40px;
}

.legal-card h2 {
  margin: 32px 0 10px;
  color: var(--heading);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.2;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p {
  margin: 0;
}

.legal-card ul,
.legal-card ol {
  margin: 0;
  padding-left: 22px;
}

.legal-card li + li {
  margin-top: 6px;
}

.legal-contact-email {
  color: rgba(0, 0, 0, 0.75);
  font-weight: 500;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */

.reveal {
  opacity: 1;
}

@keyframes heroLineMaskReveal {
  to {
    transform: translateY(0);
  }
}

@keyframes heroSubtitleFadeReveal {
  to {
    opacity: 1;
  }
}

@keyframes heroImageSlideUp {
  0% {
    opacity: 0;
    transform: translateY(110%);
  }

  20% {
    opacity: 0;
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes joystickFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }
}

@keyframes navFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* =========================================================
   RESPONSIVE: SMALL TABLET AND UP
   ========================================================= */

@media (min-width: 576px) {
  .hero {
    min-height: 680px;
    padding-top: calc(var(--nav-h) + 44px);
  }
}

/* =========================================================
   RESPONSIVE: TABLET AND UP
   ========================================================= */

@media (min-width: 768px) {
  .container {
    --bs-gutter-x: 5rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-card {
    min-height: 220px;
  }

  .games-list {
    --games-per-view: 2;
    --games-gap: 24px;
  }
}

/* =========================================================
   RESPONSIVE: DESKTOP
   ========================================================= */

@media (min-width: 992px) {
  .container {
    --bs-gutter-x: 10rem;
  }

  .section-pad {
    padding: var(--section-padding-y-desktop) 0;
  }

  .section-title {
    font-size: var(--section-title-size-desktop);
    line-height: var(--section-title-line-height-desktop);
  }

  .navbar-layout {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center;
    width: 100%;
  }

  .navbar-brand {
    grid-column: 1;
    justify-self: start;
  }

  .navbar-collapse {
    grid-column: 2;
    justify-self: center;
    display: flex !important;
    flex-grow: 0 !important;
    justify-content: center;
    width: auto !important;
  }

  .navbar-nav {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 0 !important;
  }

  .nav-contact-btn {
    grid-column: 3;
    justify-self: end;
    display: inline-flex !important;
    margin-left: 0 !important;
  }

  .navbar-toggler {
    display: none !important;
  }

  .link-style {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    color: var(--link-color);
    text-decoration: none;
  }

  .link-style span {
    display: block;
    color: var(--link-color);
    transform: translateY(0);
    transition: transform var(--link-transition-duration) var(--ease);
  }

  .link-style::after {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: var(--link-padding-x);
    width: calc(100% - (var(--link-padding-x) * 2));
    color: var(--link-hover-color);
    text-decoration: none;
    transform: translateY(0);
    transition: transform var(--link-transition-duration) var(--ease);
  }

  .link-style:hover span,
  .link-style:focus-visible span,
  .link-style:hover::after,
  .link-style:focus-visible::after {
    transform: translateY(-110%);
  }

  .navbar .nav-link:hover {
    color: inherit !important;
  }

  .games-carousel {
    --carousel-shadow-space: 24px;
  }

  .games-list {
    box-sizing: border-box;
    width: calc(100% + (var(--carousel-shadow-space) * 2));
    margin-right: calc(var(--carousel-shadow-space) * -1);
    margin-left: calc(var(--carousel-shadow-space) * -1);
    padding: 20px var(--carousel-shadow-space) 28px;
    scroll-padding-inline: var(--carousel-shadow-space);
  }

  html.animations-ready .reveal > .container {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.8s ease-out,
      transform 0.8s ease-out;
    will-change: opacity, transform;
    -webkit-transform: translateY(28px) translateZ(0);
    backface-visibility: hidden;
  }

  html.animations-ready .reveal.is-visible > .container {
    opacity: 1;
    transform: translateY(0);
    -webkit-transform: translateY(0) translateZ(0);
  }

  html.animations-ready .hero-line {
    transform: translateY(110%);
  }

  html.animations-ready .hero-subtitle {
    opacity: 0;
  }

  html.animations-ready .hero-image {
    opacity: 0;
    transform: translateY(120%);
    will-change: transform, opacity;
  }

  html.animations-ready .hero-loaded .hero-mask:nth-child(1) .hero-line {
    animation: heroLineMaskReveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  html.animations-ready .hero-loaded .hero-mask:nth-child(2) .hero-line {
    animation: heroLineMaskReveal 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.25s
      forwards;
  }

  html.animations-ready .hero-loaded .hero-subtitle {
    animation: heroSubtitleFadeReveal 1.2s ease 0.8s forwards;
  }

  html.animations-ready .hero-loaded .hero-image {
    animation:
      heroImageSlideUp 1.2s cubic-bezier(0, 0, 0.2, 1) 0.9s forwards,
      joystickFloat 4.5s ease-in-out 2.45s infinite;
  }

  html.animations-ready .navbar-brand,
  html.animations-ready .navbar-nav,
  html.animations-ready .nav-contact-btn {
    opacity: 0;
  }

  html.animations-ready body.page-loaded .navbar-brand,
  html.animations-ready body.page-loaded .navbar-nav,
  html.animations-ready body.page-loaded .nav-contact-btn {
    animation: navFadeIn 1.5s ease forwards;
  }
}

/* =========================================================
   RESPONSIVE: LARGE DESKTOP
   ========================================================= */

@media (min-width: 1200px) {
  .service-card {
    padding: var(--card-padding-desktop);
  }

  .games-list {
    --games-per-view: 3;
  }

  .game-card-store-badges .store-badge {
    flex: 0 0 auto;
    max-width: 140px;
  }
}

/* =========================================================
   RESPONSIVE: TABLET + MOBILE
   ========================================================= */

@media (max-width: 991.98px) {
  :root {
    --nav-h: 64px;
  }

  /* Keep the mobile header logo pinned to the left. */
  .navbar > .container.navbar-layout {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
  }

  .navbar-brand {
    flex: 0 0 auto;
    margin: 0;
  }

  .navbar-brand img {
    width: auto;
  }

  .mobile-nav-actions {
    flex: 0 0 auto;
    margin-left: auto;
  }

  #nav.collapse,
  #nav.collapsing {
    display: block !important;
  }

  #nav,
  #nav.collapsing {
    height: auto !important;
    transition-property: max-height, padding-top, padding-bottom !important;
  }

  #nav {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    left: 0;
    z-index: 1030;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--dark);
    transition:
      max-height var(--menu-dur) var(--ease),
      padding-top var(--menu-dur) var(--ease),
      padding-bottom var(--menu-dur) var(--ease);
  }

  body.nav-overlay-open #nav,
  #nav.show {
    max-height: var(--menu-h);
    padding-top: 12px;
    padding-bottom: 12px;
    overflow-y: auto;
    pointer-events: auto;
  }

  #nav .navbar-nav {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: calc(var(--bs-gutter-x) / 2);
    padding-left: calc(var(--bs-gutter-x) / 2);
  }

  #nav .nav-item {
    width: 100%;
  }

  #nav .nav-link {
    display: block;
    width: 100%;
    padding-left: 6px;
    color: var(--link-hover-color);
    text-align: left;
    opacity: 0;
    transition:
      color 0.2s ease-in-out,
      opacity var(--item-dur) var(--ease);
    transition-delay: 0ms;
  }

  #nav .nav-link span,
  #nav .nav-link:hover,
  #nav .nav-link:focus-visible,
  #nav .nav-link:active {
    color: var(--link-hover-color);
  }

  #nav.menu-open .nav-link {
    opacity: 1;
    transition-delay: calc(var(--i, 0) * 90ms);
  }

  .navbar .nav-link {
    font-size: var(--link-size-mobile);
  }

  .navbar .nav-link.slide-link {
    padding: 8px;
  }

  #nav .nav-link.slide-link {
    padding-right: 0;
    padding-left: 0;
  }

  .nav-backdrop {
    position: fixed;
    inset: var(--nav-h) 0 0;
    z-index: 1025;
    background: rgba(0, 0, 0, 0.5);
  }

  body.nav-overlay-open {
    overflow: hidden;
  }

  body.nav-overlay-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .navbar-brand,
  .navbar-nav,
  .nav-contact-btn {
    opacity: 1;
    animation: none !important;
  }

  .hero-title {
    gap: 4px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .about-main-image {
    height: 320px;
  }

  .games-carousel {
    --carousel-bleed: 20px;
    --carousel-shadow-space: 20px;

    width: calc(100% + (var(--carousel-bleed) * 2));
    margin-right: calc(var(--carousel-bleed) * -1);
    margin-left: calc(var(--carousel-bleed) * -1);
  }

  .games-list {
    box-sizing: border-box;
    width: 100%;
    padding: 20px var(--carousel-shadow-space) 28px;
    scroll-padding-inline: var(--carousel-shadow-space);
  }

  body.contact-popup-open {
    position: fixed;
    top: var(--contact-popup-scroll-offset, 0);
    right: 0;
    left: 0;
    width: 100%;
  }

  .contact-popup {
    padding: 14px;
    overscroll-behavior: none;
  }

  .contact-popup-dialog {
    max-height: calc(100svh - 28px);
    padding: 76px 22px 28px;
    border-radius: 22px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .contact-popup-close {
    top: 14px;
    right: 14px;
    min-width: 42px;
    min-height: 42px;
  }

  .contact-popup-close,
  .contact-popup-close:hover,
  .contact-popup-close:focus-visible,
  .contact-popup-close:active {
    background-image: url("assets/icons/icon-close-hover.svg");
  }

  .contact-popup-header .section-title {
    font-size: clamp(2rem, 8vw, 2.4rem);
    line-height: 1.05;
  }

  .contact-popup-layout {
    margin-top: 32px;
  }

  .contact-submit-group {
    display: block;
  }

  .site-btn::before {
    display: none;
  }

  .contact-submit-btn {
    --btn-bg: var(--btn-hover-bg);
    --btn-text: var(--btn-text-hover);

    background: var(--btn-hover-bg) !important;
    color: var(--btn-text-hover) !important;
  }

  .contact-email-wrapper,
  .contact-email-wrapper:hover,
  .contact-email-wrapper:focus-visible,
  .contact-email-wrapper:active {
    color: var(--brand-blue);
  }

  .footer {
    padding: 24px 0 16px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    padding-bottom: 24px;
    text-align: left;
  }

  .footer-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    text-align: left;
  }

  .footer-brand-divider {
    display: none;
  }

  .footer-tagline {
    width: 100%;
    max-width: 560px;
    margin: 0;
    text-align: left;
    white-space: normal;
  }

  .footer-social {
    justify-content: flex-start;
    gap: 20px;
  }

  .footer-social a,
  .footer-social img {
    width: 42px;
    height: 42px;
  }

  .footer-social img {
    opacity: 1;
    transition: none;
  }

  .footer-divider {
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.25);
  }

  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    text-align: left;
  }

  .footer-links {
    order: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    padding: 12px 0;
  }

  .footer-links a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: var(--link-padding-y) var(--link-padding-x);
    color: var(--link-hover-color);
  }

  .footer-links a span {
    color: var(--link-hover-color);
  }

  .footer-divider-secondary {
    order: 2;
    display: block;
    width: 100%;
  }

  .footer-left {
    order: 3;
    margin-top: 16px;
    text-align: left;
  }
}

/* =========================================================
   RESPONSIVE: TABLET ONLY
   ========================================================= */

@media (min-width: 768px) and (max-width: 991.98px) {
  #nav .navbar-nav {
    max-width: 720px;
  }

  .games-carousel {
    --carousel-shadow-space: 16px;
  }

  .games-list {
    --games-gap: 32px;
  }
}

/* =========================================================
   RESPONSIVE: SMALL TABLET ONLY
   ========================================================= */

@media (min-width: 576px) and (max-width: 767.98px) {
  #nav .navbar-nav {
    max-width: 540px;
  }
}

/* =========================================================
   RESPONSIVE: BELOW TABLET
   ========================================================= */

@media (max-width: 767.98px) {
  .game-card {
    flex-basis: 100%;
    max-width: 100%;
  }

  .legal-card {
    margin-top: 32px;
    padding: 28px 22px;
    border-radius: 14px;
  }

  .legal-card h2 {
    margin-top: 28px;
  }
}

/* =========================================================
   RESPONSIVE: MOBILE
   ========================================================= */

@media (max-width: 575.98px) {
  .navbar-brand img,
  .footer-logo img {
    height: var(--logo-size-mobile);
  }

  .hero-content {
    padding: 20px 20px 0;
  }

  .hero-title {
    font-size: clamp(2.65rem, 13vw, 3.5rem);
  }

  .hero-line {
    white-space: nowrap;
  }

  .hero-image {
    width: 200px;
  }

  .about-main-image {
    height: 220px;
    border-radius: 10px;
  }

  .site-btn--mobile-full {
    width: 100%;
    height: var(--btn-mobile-height);
    padding-right: var(--btn-mobile-padding-x);
    padding-left: var(--btn-mobile-padding-x);
  }

  .contact-popup-dialog {
    padding: 76px 18px 28px;
  }

  .contact-popup-header .section-title {
    font-size: 2.4rem;
  }

  .footer-social {
    flex-wrap: wrap;
  }

  .legal-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .legal-card {
    padding: 24px 18px;
  }
}

/* =========================================================
   POINTER-SPECIFIC INTERACTIONS
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
  .game-carousel-indicator:hover::before {
    background: rgba(47, 128, 255, 0.32);
  }

  .footer-tagline .contact-email-wrapper:hover,
  .footer-tagline .contact-email-wrapper:focus-visible {
    color: #ffffff;
  }
}

/* =========================================================
   ACCESSIBILITY + SAFARI
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .navbar,
  .site-btn,
  .site-btn::before,
  .reveal,
  .reveal > .container,
  #nav,
  #nav .nav-link,
  .hero-line,
  .hero-subtitle,
  .hero-image,
  .game-carousel-active,
  .contact-popup,
  .contact-popup-dialog {
    transition: none !important;
    animation: none !important;
  }

  .reveal,
  .reveal > .container,
  .hero-line,
  .hero-subtitle,
  .hero-image {
    opacity: 1 !important;
    transform: none !important;
  }
}

@supports (-webkit-touch-callout: none) {
  .navbar {
    transition: transform 0.25s ease;
  }

  .navbar.is-scrolled {
    box-shadow: none;
  }
}
