/* Serendib Games: site styles */

:root {
  --bg: #080c11;
  --bg-raised: #0c1117;
  --panel: #0f151c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f4f7;
  --text-soft: #c3cad3;
  --muted: #8d98a6;
  --accent: #f5c451;
  --accent-hover: #ffd47a;
  --accent-ink: #1a1405;
  --title: #f7ead0;

  --font-display: "Bricolage Grotesque", "Outfit", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 72px;
  --radius: 16px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  height: auto;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(245, 196, 81, 0.35);
  color: #fff;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.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: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s;
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Buttons and links ---------- */

.btn {
  --btn-h: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s var(--ease-out);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn .btn__arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--secondary {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.13);
}

.btn--sm {
  --btn-h: 42px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--text);
  font-weight: 600;
  transition: color 0.2s;
}

.text-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease-out);
}

.text-link:hover {
  color: var(--accent);
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

/* A soft shade keeps the menu readable over hero art until the page scrolls. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -32px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 12, 17, 0.55), rgba(8, 12, 17, 0));
  pointer-events: none;
  transition: opacity 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 12, 17, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

.site-header.is-scrolled::before {
  opacity: 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}

.brand__mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand__name {
  font: 700 1.125rem/1 var(--font-display);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: rgba(242, 244, 247, 0.72);
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: #fff;
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}

.site-nav .socials {
  display: none;
}

.site-header__inner > .socials {
  padding-left: clamp(12px, 2vw, 24px);
  border-left: 1px solid var(--line-strong);
}

.socials {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.socials__link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: rgba(242, 244, 247, 0.72);
  transition:
    color 0.2s,
    background-color 0.2s;
}

.socials__link .icon {
  width: 20px;
  height: 20px;
}

.socials__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(8, 12, 17, 0.5);
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition:
    transform 0.25s var(--ease-out),
    opacity 0.2s;
}

.nav-toggle span:nth-child(1) {
  top: 14px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 26px;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Type ---------- */

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font: 600 0.8125rem/1.3 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.lead {
  color: var(--text-soft);
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.prose p {
  color: var(--text-soft);
}

.prose p + p {
  margin-top: 1em;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Game titles, set in the game's own lettering. */
.game-logo {
  display: inline-block;
  margin-right: -0.06em;
  font-size: var(--logo-size, 3rem);
  line-height: 1;
  white-space: nowrap;
}

.game-logo--explora {
  color: var(--title);
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft);
  font: 500 0.8125rem/1 var(--font-body);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 12, 17, 0.45);
  color: var(--text);
  font: 600 0.8125rem/1 var(--font-body);
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

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

.section {
  position: relative;
  padding: clamp(72px, 9vw, 128px) 0;
}

/* Stacked sections share one gap instead of doubling it. */
.section + .section {
  padding-top: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(620px, 92vh, 920px);
  padding: calc(var(--header-h) + 48px) 0 clamp(72px, 10vh, 120px);
  overflow: hidden;
}

.hero__bg,
.game-hero__bg,
.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #0b141c;
}

.hero__bg img,
.game-hero__bg img,
.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 60% 50%);
}

/* A slow push-in on the key art. */
.hero__bg img,
.game-hero__bg img {
  transform-origin: 60% 60%;
  animation: hero-drift 40s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

/* Shade the left for the text and fade the bottom into the page. */
.hero::before,
.game-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 17, 0.9) 0%, rgba(8, 12, 17, 0.75) 34%, rgba(8, 12, 17, 0.25) 60%, rgba(8, 12, 17, 0) 75%),
    linear-gradient(180deg, rgba(8, 12, 17, 0.4) 0%, rgba(8, 12, 17, 0) 20%, rgba(8, 12, 17, 0) 58%, rgba(8, 12, 17, 0.65) 85%, var(--bg) 100%);
}

.hero__content {
  max-width: 640px;
}

.hero__title {
  margin-bottom: 24px;
  font-size: clamp(3.1rem, 7.2vw, 6.25rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero__title span {
  display: block;
  color: var(--accent);
}

.hero__lead {
  max-width: 40ch;
  margin-bottom: 36px;
  color: rgba(242, 244, 247, 0.86);
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
  line-height: 1.55;
}

/* ---------- Home: featured game ---------- */

.featured {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
}

.featured__title {
  --logo-size: clamp(2.75rem, 4.6vw, 4rem);
  margin-bottom: 16px;
}

.featured__title a {
  transition: opacity 0.2s;
}

.featured__title a:hover {
  opacity: 0.85;
}

.featured__tagline {
  margin-bottom: 14px;
  font: 600 clamp(1.2rem, 1.7vw, 1.4rem)/1.3 var(--font-display);
  letter-spacing: -0.015em;
}

.featured__text {
  max-width: 46ch;
  margin-bottom: 32px;
  color: var(--text-soft);
}

.featured .video {
  --delay: 0.1s;
}

/* ---------- Showcase video ---------- */

/* A poster that turns into the YouTube player when clicked (see main.js). */
.video {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

.video__poster,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video__poster {
  isolation: isolate;
  display: grid;
  place-items: center;
}

.video__poster:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius);
}

.video__poster img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.video__play {
  display: grid;
  place-items: center;
  width: clamp(64px, 6vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
  transition:
    transform 0.3s var(--ease-out),
    background-color 0.3s;
}

.video__play .icon {
  width: clamp(22px, 2.2vw, 28px);
  height: clamp(22px, 2.2vw, 28px);
  margin-left: 3px;
}

.video__poster:hover img {
  transform: scale(1.03);
}

.video__poster:hover .video__play,
.video__poster:focus-visible .video__play {
  background: var(--accent-hover);
  transform: scale(1.06);
}

/* ---------- Home: studio ---------- */

.studio {
  padding: clamp(72px, 9vw, 128px) 0;
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
}

.studio__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(36px, 6vw, 96px);
}

.studio .section-title {
  max-width: 17ch;
  margin-bottom: 22px;
}

.studio__text {
  max-width: 50ch;
  margin-bottom: 26px;
  color: var(--text-soft);
}

.studio .island {
  justify-self: center;
  width: min(100%, 460px);
}

.island img {
  width: 100%;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5));
}

/* ---------- Contact ---------- */

.contact {
  padding: clamp(64px, 8vw, 112px) 0;
  border-top: 1px solid var(--line);
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 28px clamp(36px, 6vw, 96px);
}

.contact__title {
  max-width: 13ch;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.contact__text {
  max-width: 44ch;
  margin-bottom: 24px;
  color: var(--text-soft);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: #06090d;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: 56px 0 44px;
}

.site-footer__brand p {
  max-width: 30ch;
  margin-top: 16px;
  color: var(--muted);
}

.site-footer h2 {
  margin-bottom: 14px;
  color: var(--muted);
  font: 600 0.8125rem/1.2 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__col ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__col a {
  color: var(--text-soft);
  transition: color 0.2s;
}

.site-footer__col a:hover {
  color: #fff;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Inner page hero ---------- */

.page-hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--header-h) + clamp(72px, 10vw, 136px)) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 12, 17, 0.92) 0%, rgba(8, 12, 17, 0.72) 45%, rgba(8, 12, 17, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 12, 17, 0.35) 0%, rgba(8, 12, 17, 0) 35%, var(--bg) 100%);
}

.page-hero__title {
  max-width: 15ch;
  margin-bottom: 20px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.page-hero__title span {
  color: var(--accent);
}

.page-hero .lead {
  max-width: 54ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.25);
}

.breadcrumb a {
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #fff;
}

/* ---------- Games index ---------- */

.game-rows {
  display: grid;
  gap: clamp(56px, 7vw, 96px);
}

.game-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.game-row:nth-child(even) .game-row__media {
  order: 2;
}

.game-row__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.game-row__media:hover img {
  transform: scale(1.03);
}

.game-row__body {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.game-row__title {
  --logo-size: clamp(2.8rem, 5vw, 4rem);
}

.game-row__tagline {
  font: 600 clamp(1.2rem, 1.7vw, 1.4rem)/1.3 var(--font-display);
  letter-spacing: -0.015em;
}

.game-row__text {
  max-width: 48ch;
  color: var(--text-soft);
}

.game-row .actions {
  margin-top: 8px;
}

/* ---------- Game page ---------- */

.game-hero {
  --logo-size: clamp(3.6rem, 10vw, 8rem);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(620px, 90vh, 900px);
  padding: calc(var(--header-h) + 64px) 0 clamp(64px, 9vh, 112px);
  overflow: hidden;
}

.game-hero__content {
  display: grid;
  justify-items: start;
  gap: 20px;
  max-width: 640px;
}

.game-hero h1 {
  margin-top: 8px;
}

.game-hero__tagline {
  color: rgba(242, 244, 247, 0.9);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.4;
}

.game-hero .actions {
  margin-top: 12px;
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 96px);
}

.overview .section-title {
  margin-bottom: 24px;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.features li {
  position: relative;
  padding: 16px 0 16px 26px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  line-height: 1.5;
}

/* A small block, nodding to the voxels. */
.features li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(16px + 0.75em - 4px);
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.info-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.info-card h2 {
  margin-bottom: 6px;
  color: var(--muted);
  font: 600 0.8125rem/1.2 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-list {
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.shot {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

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

.shot:hover img {
  transform: scale(1.04);
}

/* A call to action over dimmed key art. */
.cta-band {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 56px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.cta-band__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 45%;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(12, 17, 23, 0.97) 0%, rgba(12, 17, 23, 0.9) 40%, rgba(12, 17, 23, 0.55) 100%);
}

.cta-band h2 {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

.cta-band__text {
  max-width: 50ch;
  color: var(--text-soft);
}

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

.story {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}

.story .section-title {
  margin-bottom: 24px;
}

.story .island {
  justify-self: center;
  width: min(100%, 480px);
}

.values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.value-card {
  padding: 30px 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.value-card__num {
  display: block;
  margin-bottom: 44px;
  color: var(--accent);
  font: 700 1rem/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

.value-card h3 {
  margin-bottom: 10px;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.value-card p {
  color: var(--muted);
}

.motto {
  display: grid;
  justify-items: center;
  gap: 36px;
  text-align: center;
}

.motto__text {
  max-width: 20ch;
  font: 700 clamp(2rem, 4.4vw, 3.5rem)/1.08 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.motto__text span {
  color: var(--accent);
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: 88vh;
  padding: calc(var(--header-h) + 48px) 0 80px;
  text-align: center;
}

.not-found__code {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.06));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: 800 clamp(7rem, 24vw, 14rem)/0.85 var(--font-display);
  letter-spacing: -0.02em;
}

.not-found h1 {
  margin: 24px 0 12px;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
}

.not-found p:not(.not-found__code) {
  max-width: 44ch;
  margin: 0 auto 32px;
  color: var(--text-soft);
}

.not-found .actions {
  justify-content: center;
}

/* ---------- Dialogs: video + screenshot viewer ---------- */

.modal {
  width: min(100% - 32px, 1040px);
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b1016;
  color: var(--text);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95);
}

.modal::backdrop {
  background: rgba(4, 6, 9, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal[open] {
  animation: modal-in 0.3s var(--ease-out);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.modal__close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #121922;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal__close .icon {
  width: 18px;
  height: 18px;
}

.modal__close:hover {
  background: #1c2531;
}

.modal__frame {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 1px);
  background: #000;
}

.modal__frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* 16:9 like the video, but grows taller when the text needs room (phones). */
.trailer-soon {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  aspect-ratio: 16 / 9;
  padding: 24px;
  text-align: center;
}

.trailer-soon img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trailer-soon::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8, 12, 17, 0.8);
}

.trailer-soon__play {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #fff;
}

.trailer-soon__play .icon {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}

.trailer-soon h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
}

.trailer-soon p {
  max-width: 40ch;
  color: var(--text-soft);
}

.lightbox {
  width: min(100% - 32px, 1280px);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 12px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(11, 16, 22, 0.85);
  cursor: pointer;
}

.lightbox__nav--prev {
  left: 12px;
}

.lightbox__nav--next {
  right: 12px;
}

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

.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

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

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

@media (max-width: 960px) {
  :root {
    --header-h: 64px;
  }

  .site-header__inner > .socials {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 12, 17, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.25s,
      transform 0.25s var(--ease-out),
      visibility 0s 0.25s;
  }

  .nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 0.25s,
      transform 0.25s var(--ease-out);
  }

  .site-header.nav-open {
    background: rgba(8, 12, 17, 0.97);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav__link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.125rem;
  }

  .site-nav__link[aria-current="page"]::after {
    right: auto;
    bottom: -1px;
    width: 24px;
  }

  .site-nav .socials {
    display: flex;
    margin: 16px 0 0 -10px;
  }

  .hero {
    min-height: clamp(560px, 88vh, 760px);
  }

  .hero::before,
  .game-hero::before {
    background: linear-gradient(180deg, rgba(8, 12, 17, 0.5) 0%, rgba(8, 12, 17, 0.2) 16%, rgba(8, 12, 17, 0.66) 34%, rgba(8, 12, 17, 0.9) 60%, var(--bg) 100%);
  }

  .featured,
  .studio__inner,
  .contact__inner,
  .game-row,
  .story,
  .overview,
  .cta-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio .island,
  .story .island {
    width: min(80%, 380px);
  }

  .game-row:nth-child(even) .game-row__media {
    order: 0;
  }

  .info-card {
    position: static;
  }

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

  .values {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }

  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .btn {
    --btn-h: 48px;
  }

  .actions .btn {
    flex: 1 1 auto;
  }

  .hero .actions .btn,
  .game-hero .actions .btn,
  .cta-band .actions .btn {
    flex-basis: 100%;
  }

  .features,
  .shots {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .modal__close {
    top: -52px;
    right: 0;
  }
}

@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 [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
