/* ==========================================================================
   Super Slots — Global styles
   ========================================================================== */

body {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--color-accent-yellow);
  color: var(--color-text-on-btn);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-card);
  font-weight: var(--fw-btn);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0.5rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

main {
  display: block;
  /* Contain any nested horizontal-scroll region (tables, comparison grids,
     the games carousel) so it can never push the whole page into a
     horizontal scroll — only the intended inner element scrolls. The
     sticky header lives outside <main>, so this doesn't affect it. */
  overflow-x: hidden;
}

section {
  padding-block: var(--space-section);
}

h1,
h2,
h3 {
  font-weight: var(--fw-heading);
  color: var(--color-heading-gold);
  line-height: 1.25;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-h2-text);
}

h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-h3-text);
}

p {
  margin-bottom: var(--space-paragraph);
}

p:last-child {
  margin-bottom: 0;
}

a.inline-link {
  color: var(--color-accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

a.inline-link:hover,
a.inline-link:focus-visible {
  color: var(--color-accent-yellow);
}

ul.styled-list,
ol.styled-list {
  margin-bottom: var(--space-paragraph);
  padding-left: 1.25rem;
}

ul.styled-list {
  list-style: disc;
}

ol.styled-list {
  list-style: decimal;
}

ul.styled-list li,
ol.styled-list li {
  margin-bottom: 0.5rem;
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-card);
  font-weight: var(--fw-btn);
  font-size: var(--fs-body);
  text-align: center;
  transition: transform var(--transition-fast), filter var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--color-btn-gradient);
  color: var(--color-text-on-btn);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  filter: brightness(1.05);
}

.btn--secondary {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-btn-secondary-border);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--color-btn-secondary-border);
  color: var(--color-text-on-btn);
}

.btn--blue {
  background: var(--color-accent-blue);
  color: var(--color-white);
}

.btn--blue:hover,
.btn--blue:focus-visible {
  filter: brightness(1.1);
}

/* Breadcrumb
   ========================================================================== */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: var(--fs-small);
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--color-accent-yellow);
}

.breadcrumb__current {
  color: var(--color-heading-gold);
}

/* Tables
   ========================================================================== */

.data-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-paragraph);
  border-radius: var(--radius-card);
}

.data-table {
  min-width: 100%;
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.data-table caption {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: var(--fw-btn);
  color: var(--color-heading-gold);
}

.data-table th,
.data-table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  font-size: var(--fs-small);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 9rem;
}

.data-table th {
  background: var(--color-bg-dark);
  color: var(--color-heading-gold);
  font-weight: var(--fw-btn);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Cards grid
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-card-gap);
}

@media (min-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  padding: var(--space-card-padding);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card__image {
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--color-bg-dark);
}

/* Icon variant: for logo-style glyphs (e.g. Android/iOS badges) rather than
   photo content — a small, centered icon instead of a stretched-to-fill image. */
.card__image--icon {
  aspect-ratio: auto;
  background: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 0;
}

.card__image--icon img {
  width: auto;
  height: 3.5rem;
  max-width: 3.5rem;
}

.card__title {
  margin-bottom: 0;
  font-size: var(--fs-h3);
}

.card__text {
  margin-bottom: 0;
  flex-grow: 1;
}

/* Comparison grid (e.g. Android/iOS side-by-side blocks)
   On mobile this scrolls horizontally instead of stacking cards into a
   column, so the two (or more) columns stay readable side by side.
   ========================================================================== */

.compare-grid {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  gap: var(--space-card-gap);
  padding-bottom: 0.35rem;
}

.compare-grid > .card {
  flex: 0 0 85%;
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .compare-grid > .card {
    flex-basis: 60%;
  }
}

@media (min-width: 768px) {
  .compare-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }

  .compare-grid > .card {
    flex-basis: auto;
  }
}

/* Scroll-to-top button
   ========================================================================== */

.scroll-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--color-btn-gradient);
  color: var(--color-text-on-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  z-index: 900;
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Reveal-on-scroll animation hook
   ========================================================================== */

.js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Utility
   ========================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.section-title--center {
  text-align: center;
}

.mt-cta {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
}

/* 404 page
   ========================================================================== */

.error-404 {
  padding-block: clamp(4rem, 12vw, 8rem);
  min-height: 50dvh;
  display: flex;
  align-items: center;
}

.error-404__inner {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.error-404__code {
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 800;
  color: var(--color-heading-gold);
  line-height: 1;
  margin: 0;
}

.error-404__title {
  margin: 0;
}

.error-404__subtitle {
  color: var(--color-text-primary);
}
