/* ==========================================================================
   MI Studios — static stylesheet
   Rebuilt from the Squarespace export: no framework, no third-party requests.
   --------------------------------------------------------------------------
   1. Fonts          5. Header & navigation
   2. Tokens         6. Sections
   3. Reset          7. Components
   4. Typography     8. Footer
                     9. Motion & utilities
   ========================================================================== */

/* 1. Fonts ---------------------------------------------------------------- */
/* Both weights live in one variable file, so a single face covers 100-900. */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 2. Tokens --------------------------------------------------------------- */
:root {
  --blue: #3887ff;
  --blue-rgb: 56 135 255;
  --white: #fff;
  --black: #000;
  --dark: hsl(111.4 11.1% 12.4%);

  --font-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* Fluid type scale, tuned against the original 390px / 1440px renderings. */
  --fs-display: clamp(2.85rem, 2.448rem + 2.112vw, 4.6rem);
  --fs-h2: clamp(1.85rem, 1.607rem + 0.886vw, 2.55rem);
  --fs-h3: clamp(1.6rem, 1.467rem + 0.681vw, 2.2rem);
  --fs-h4: clamp(1.2rem, 1.086rem + 0.504vw, 1.65rem);
  --fs-card: clamp(1.38rem, 1.28rem + 0.409vw, 1.68rem);
  --fs-lead: clamp(1.3rem, 1.234rem + 0.341vw, 1.6rem);
  --fs-body: 1rem;
  --fs-small: 0.892rem;

  --lh-heading: 1.58;
  --lh-body: 1.7;
  --ls-heading: 0.27em;

  --header-h: clamp(5.25rem, 5.25rem + 0.25vw, 5.5rem);
  --gutter: 4%;
  --content-wide: 92%;
  --content-medium: 69%;
  --section-medium: clamp(420px, 66vh, 900px);

  --radius: 0.4rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (max-width: 37.5em) {
  :root {
    --gutter: 6%;
    --content-wide: 88%;
    --content-medium: 88%;
  }
}

/* 3. Reset ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

body {
  min-height: 100vh;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgb(var(--blue-rgb) / 0.85);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* 4. Typography ----------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  text-wrap: balance;
}

h1,
.heading--display {
  font-size: var(--fs-display);
}

h2,
.heading--lg {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
}

h4,
.heading--sm {
  font-size: var(--fs-h4);
}

h1 strong,
h2 strong,
h3 strong,
h4 strong {
  font-weight: 700;
}

p {
  line-height: var(--lh-body);
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-lead);
}

.text-blue {
  color: var(--blue);
}

/* 5. Header & navigation -------------------------------------------------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  color: var(--black);
  font-size: var(--fs-small);
  transform: translateY(-120%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 70;
  background: rgb(0 0 0 / 0.33);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: var(--content-wide);
  min-height: var(--header-h);
  margin-inline: auto;
}

.site-nav ul {
  display: flex;
  gap: 1.26rem;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding-block: 0.1rem;
  font-size: var(--fs-body);
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-logo {
  justify-self: center;
  line-height: 0;
}

.site-logo img {
  width: auto;
  height: 3.125rem;
}

.site-logo--compact {
  display: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.site-header__actions .btn {
  margin-left: 2.75rem;
}

.social-list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.social-list a {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: currentColor;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.social-list a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.social-list svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.social-list .icon-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Burger ---------------------------------------------------------------- */
.menu-toggle {
  display: none;
  position: relative;
  z-index: 70;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.6rem;
  padding: 0.75rem;
}

.menu-toggle__box {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.menu-toggle__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.menu-toggle__bar:nth-child(1) { top: 4px; }
.menu-toggle__bar:nth-child(2) { top: 50%; margin-top: -1px; }
.menu-toggle__bar:nth-child(3) { bottom: 4px; }

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Mobile menu ----------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
  background: var(--black);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__nav ul {
  display: grid;
  gap: 1.75rem;
}

.mobile-menu__nav a {
  font-size: var(--fs-h3);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  text-decoration: none;
}

.mobile-menu__nav a[aria-current="page"] {
  color: var(--blue);
}

.mobile-menu__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.mobile-menu__actions .social-list {
  gap: 1.5rem;
}

.mobile-menu__actions .social-list a {
  width: 1.5rem;
  height: 1.5rem;
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 59.9375em) {
  .site-header__inner {
    grid-template-columns: auto 1fr;
  }

  .site-nav,
  .site-header__actions .social-list,
  .site-header__actions .btn,
  .site-logo--wide {
    display: none;
  }

  .site-logo--compact {
    display: block;
  }

  .site-logo--compact img {
    height: 2.75rem;
  }

  .site-header__actions {
    gap: 0;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-menu {
    display: flex;
  }
}

/* 6. Sections ------------------------------------------------------------- */
.container {
  width: var(--content-wide);
  margin-inline: auto;
}

.container--medium {
  width: var(--content-medium);
}

.section {
  position: relative;
}

.section--black {
  background: var(--black);
}

/* Hero ------------------------------------------------------------------- */
.hero {
  display: grid;
  align-items: center;
  min-height: 100svh;
  min-height: 100vh;
  padding: calc(var(--header-h) + 2.6rem) 0 4rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--dark);
  text-align: center;
}

@supports (min-height: 100svh) {
  .hero {
    min-height: 100svh;
  }
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (prefers-reduced-motion: reduce) {
  .hero__video {
    display: none;
  }
}

.hero h1 {
  margin-bottom: 2rem;
}

.hero p {
  margin-bottom: 2.1rem;
}

/* Page hero (games) ------------------------------------------------------ */
.page-hero {
  display: flex;
  align-items: flex-end;
  min-height: var(--section-medium);
  padding: calc(var(--header-h) + 2rem) 0 3.4rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--black);
}

.page-hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero h1,
.page-hero h2 {
  margin-bottom: 1.25rem;
}

.page-hero__content {
  width: 100%;
}

/* About ------------------------------------------------------------------ */
.section--about {
  padding: 9vw 0;
  text-align: center;
}

.section--about h2 {
  margin-bottom: 2.1rem;
}

/* Titles list ------------------------------------------------------------ */
.section--titles {
  padding: 10vw 0 9vw;
  background: var(--black);
}

.section-label {
  margin-bottom: 4.4rem;
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

/* 7. Components ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.3rem 2.17rem;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: transparent;
  color: var(--blue);
  font-size: var(--fs-body);
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.btn:hover {
  background: rgb(var(--blue-rgb) / 0.12);
}

.btn--sm {
  padding: 1.16rem 1.94rem;
  font-size: var(--fs-small);
}

.btn--light {
  border-color: var(--white);
  color: var(--white);
}

.btn--light:hover {
  background: rgb(255 255 255 / 0.14);
}

/* Marquee ---------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 15%,
    #000 85%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 15%,
    #000 85%,
    transparent 100%
  );
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
}

.marquee__group {
  display: flex;
  flex: none;
  align-items: center;
  gap: var(--marquee-gap, 0.5em);
  padding-right: var(--marquee-gap, 0.5em);
}

.marquee__item {
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Game list -------------------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.75rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.game-card__media {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.game-card__media--redaction {
  object-position: 31% 68%;
}

.game-card__title {
  margin-top: 1.5rem;
  font-size: var(--fs-card);
  font-weight: 400;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-transform: uppercase;
}

.game-card__description {
  margin-top: 1.5rem;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.game-card__cta {
  margin-top: 2rem;
}

@media (max-width: 56.25em) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 37.5em) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

/* 8. Footer -------------------------------------------------------------- */
.site-footer {
  padding: 6.9vw var(--gutter) 4.5vw;
  background: var(--blue);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 5fr 2fr 5fr;
  margin-inline: -1.06rem;
}

.footer-col {
  padding: 1.06rem;
}

.footer-col--center {
  display: grid;
  place-items: center;
}

.footer-heading {
  margin-bottom: 2rem;
  font-size: var(--fs-h4);
  font-weight: 700;
  letter-spacing: var(--ls-heading);
  text-align: center;
  text-transform: uppercase;
}

.footer-col p {
  text-align: center;
}

.footer-col p a {
  font-size: var(--fs-small);
  text-decoration: none;
}

.footer-col p a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.footer-logo {
  width: 100%;
  max-width: 11.875rem;
  height: auto;
}

.footer-social {
  justify-content: center;
}

@media (max-width: 47.9375em) {
  .site-footer {
    padding-block: 3.5rem 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* 9. Motion & utilities --------------------------------------------------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee__track {
    animation: none;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
