/* ============================================================
   Roblox worlds & systems — sunset neon, editorial
   Display: Space Grotesk · Text: Inter
   ============================================================ */

:root {
  --bg: #120a26;
  --bg-soft: #1a1034;
  --surface: #1c1236;
  --ink: #fdf3ee;
  --muted: rgba(253, 243, 238, 0.66);
  --muted-2: rgba(253, 243, 238, 0.4);
  --pink: #ff4d8d;
  --pink-soft: #ff7aa6;
  --orange: #ff9a5a;
  --violet: #8b5cff;
  --grain: rgba(255, 255, 255, 0.045);
  --r: 16px;
  --wrap: 1200px;
  --gut: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 0.7, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #150b2c 0%, #120a26 42%, #0d0719 100%);
  background-attachment: fixed;
}

/* fine film grain: texture rather than glow */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.09'/%3E%3C/svg%3E");
}

::selection {
  background: var(--pink);
  color: #190b1f;
}

/* ------------------------------------------------------------
   Scrollbar — sunset thumb on a twilight track
   ------------------------------------------------------------ */

@supports selector(::-webkit-scrollbar) {
  html::-webkit-scrollbar {
    width: 14px;
    height: 14px;
  }

  html::-webkit-scrollbar-track {
    background: #0c0619;
  }

  html::-webkit-scrollbar-thumb {
    border: 3px solid #0c0619;
    border-radius: 999px;
    background-image: linear-gradient(180deg, #ffb07a 0%, #ff7aa6 36%, #ff4d8d 64%, #8b5cff 100%);
    background-clip: padding-box;
  }

  html::-webkit-scrollbar-thumb:hover {
    background-image: linear-gradient(180deg, #ffc79a 0%, #ff93b8 36%, #ff6ba3 64%, #a27cff 100%);
  }

  html::-webkit-scrollbar-thumb:active {
    background-image: linear-gradient(180deg, #ffd3ae 0%, #ffa8c6 36%, #ff86b4 64%, #b399ff 100%);
  }

  html::-webkit-scrollbar-corner {
    background: #0c0619;
  }
}

/* Firefox: no gradient support on scrollbars, so match the palette */
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;
    scrollbar-color: #ff5f9e #0c0619;
  }
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--pink-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

/* ------------------------------------------------------------
   Scroll reveal
   ------------------------------------------------------------ */

.reveal {
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.js.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------
   Skip link + frame
   ------------------------------------------------------------ */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 400;
  transform: translateY(-180%);
  padding: 11px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: #1a0d2b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out);
}

.skip-link:focus-visible {
  transform: none;
}

.wrap {
  width: min(var(--wrap), calc(100% - (var(--gut) * 2)));
  margin-inline: auto;
}

main {
  display: block;
}

/* ------------------------------------------------------------
   Hero — sunset sky over twilight
   ------------------------------------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(104px, 16vh, 168px) 0 clamp(132px, 18vh, 196px);
  overflow: hidden;
  background-color: #140b2c;
  background-image:
    radial-gradient(circle at 66% 82%, rgba(255, 240, 214, 0.52) 0%, rgba(255, 205, 158, 0.34) 10%, rgba(255, 164, 104, 0.12) 22%, transparent 40%),
    radial-gradient(62% 44% at 68% 86%, rgba(255, 154, 90, 0.68), transparent 74%),
    radial-gradient(105% 82% at 36% 106%, rgba(255, 77, 141, 0.85), transparent 74%),
    linear-gradient(176deg, #120a26 0%, #1e0f3d 30%, #3a1251 52%, #641a5c 70%, #9b2764 85%, #cf4368 100%);
}

/* land back into the page background */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: clamp(120px, 18vh, 190px);
  background: linear-gradient(180deg, rgba(18, 10, 38, 0) 0%, rgba(18, 10, 38, 0.55) 58%, var(--bg) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-title {
  max-width: 1080px;
  font-family: var(--display);
  font-size: clamp(2.45rem, 8.4vw, 7.1rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-title-accent {
  background: linear-gradient(96deg, #fff0d2 0%, #ffc896 26%, #ff9a92 58%, #ff7fa8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 56px;
  margin-top: clamp(34px, 6vh, 66px);
}

.hero-lede {
  max-width: 40ch;
  font-size: 16.5px;
  line-height: 1.65;
  color: rgba(253, 243, 238, 0.78);
  text-wrap: pretty;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(253, 243, 238, 0.32);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.hero-link span {
  font-size: 13px;
  transition: transform 0.35s var(--ease-out);
}

.hero-link:hover {
  border-bottom-color: var(--ink);
  color: #fff;
}

.hero-link:hover span {
  transform: translateY(3px);
}

/* ------------------------------------------------------------
   Sections
   ------------------------------------------------------------ */

.section {
  padding: clamp(84px, 10vw, 138px) 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 20px clamp(32px, 8vw, 120px);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.section-head p {
  max-width: 46ch;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

/* ------------------------------------------------------------
   Games — staggered editorial gallery
   ------------------------------------------------------------ */

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
  column-gap: clamp(20px, 3.4vw, 48px);
  row-gap: clamp(44px, 5vw, 76px);
  padding-bottom: clamp(48px, 6vw, 84px);
}

.gallery > .game:nth-child(even) {
  margin-top: clamp(44px, 6vw, 84px);
}

/* the fifth entry closes the gallery as a wide panorama */
@media (min-width: 861px) {
  .gallery > .game:last-child {
    grid-column: 1 / -1;
  }

  .gallery > .game:last-child .game-shot {
    aspect-ratio: 2 / 1;
  }
}

.game {
  min-width: 0;
}

.game-shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  border: 0;
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  cursor: zoom-in;
}

.gallery > .game:nth-child(2n) .game-shot {
  aspect-ratio: 4 / 3;
}

.game-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s var(--ease-out);
}

.game:hover .game-shot img {
  transform: scale(1.025);
}

.game-shot:focus-visible {
  outline-offset: 4px;
}

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

.game-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

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

.game-text h3 {
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.game-text p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.game-link {
  flex: none;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.game-link span {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}

.game-link:hover {
  color: var(--ink);
}

.game-link:hover span {
  transform: translate(2px, -2px);
}

/* ------------------------------------------------------------
   Systems
   ------------------------------------------------------------ */

.duo {
  display: grid;
  grid-template-columns: minmax(0, 0.56fr) minmax(0, 1.44fr);
  align-items: start;
  gap: clamp(24px, 4.5vw, 64px);
}

.shot {
  min-width: 0;
}

.shot-low {
  margin-top: clamp(48px, 8vw, 132px);
}

.shot-media {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--r);
  background: #170d2c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  cursor: zoom-in;
}

.shot-media img {
  width: 100%;
  height: auto;
  transition: transform 0.6s var(--ease-out);
}

.shot:hover .shot-media img {
  transform: scale(1.012);
}

.shot-media:focus-visible {
  outline-offset: 4px;
}

.shot figcaption {
  margin-top: 14px;
}

.shot h3 {
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.shot figcaption p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

/* ------------------------------------------------------------
   About
   ------------------------------------------------------------ */

.section-about {
  padding-bottom: clamp(112px, 14vw, 190px);
}

.about {
  max-width: none;
}

.about-line {
  max-width: 26ch;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.about-note {
  margin-top: 20px;
  font-size: 14.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px clamp(16px, 6vw, 96px) 64px;
  background: rgba(10, 4, 22, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(1240px, 100%);
  transform: translateY(8px) scale(0.99);
  transition: transform 0.4s var(--ease-out);
}

.lightbox.is-open figure {
  transform: none;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  border-radius: 14px;
  box-shadow: 0 40px 110px -40px rgba(0, 0, 0, 0.9);
}

.lightbox figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 14px;
  text-align: center;
}

.lb-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
}

.lb-meta {
  font-size: 12.5px;
  color: var(--muted);
}

.lb-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.3s var(--ease-out);
}

.lb-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.lb-btn:active {
  transform: scale(0.96);
}

.lb-close {
  top: 20px;
  right: 20px;
  font-size: 22px;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 22px;
}

.lb-next {
  right: 22px;
}

.lb-prev:hover {
  transform: translateY(calc(-50% - 1px));
}

.lb-next:hover {
  transform: translateY(calc(-50% - 1px));
}

body.no-scroll {
  overflow: hidden;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1000px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .hero-title {
    letter-spacing: -0.04em;
  }
}

@media (max-width: 860px) {
  .duo {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .shot-low {
    margin-top: 0;
    max-width: none;
  }

  .shot-module {
    max-width: 380px;
  }

  .gallery {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 44px;
    padding-bottom: 0;
  }

  .gallery > .game:nth-child(even) {
    margin-top: 0;
  }

  .gallery > .game:nth-child(2n) .game-shot,
  .game-shot {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 720px) {
  .hero {
    padding-top: 96px;
    padding-bottom: 128px;
  }

  .hero-title {
    font-size: clamp(2.3rem, 10.4vw, 3.6rem);
    line-height: 1;
  }

  .hero-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-top: 32px;
  }

  .hero-lede {
    font-size: 15.5px;
  }

  .section {
    padding: 66px 0;
  }

  .section-about {
    padding-bottom: 110px;
  }

  .shot-low {
    max-width: 100%;
  }

  .lightbox {
    padding: 68px 16px 104px;
  }

  .lightbox img {
    max-height: 68vh;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 26px;
    transform: none;
  }

  .lb-prev {
    left: calc(50% - 56px);
  }

  .lb-next {
    right: calc(50% - 56px);
  }

  .lb-prev:hover,
  .lb-next:hover {
    transform: translateY(-1px);
  }

  .lb-prev:active,
  .lb-next:active {
    transform: scale(0.96);
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: clamp(2.15rem, 10.6vw, 2.9rem);
  }

  .game-meta {
    gap: 10px;
  }

  .game-text h3 {
    font-size: 15.5px;
  }

  .game-link {
    font-size: 12.5px;
  }
}

@media (hover: none) {
  .game:hover .game-shot img,
  .shot:hover .shot-media img {
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js.reveal-ready .reveal {
    opacity: 1;
    transform: none;
  }
}
