:root {
  --bg: #000000;
  --bg-deep: #000000;
  --surface: #071514;
  --surface-raised: #0a211e;
  --surface-soft: #0d2a26;
  --text: #f4fbf9;
  --muted: #c0d5d0;
  --subtle: #86a7a0;
  --line: #1e5a50;
  --line-strong: #2f8a78;
  --accent: #22e0b5;
  --accent-bright: #53f5cd;
  --accent-soft: #8fd9c7;
  --accent-deep: #0d4a40;
  --shadow: 0 20px 60px rgba(0, 0, 0, .42);
  --max: 1180px;
  --header: 98px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
}
body {
  min-height: 100vh;
  margin: 0;
  background: #000;
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.58;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.lightbox-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-160%);
  padding: .7rem 1rem;
  border-radius: 8px;
  background: var(--accent-bright);
  color: #001713;
  font-weight: 850;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.topbar {
  width: min(calc(100% - 40px), var(--max));
  height: var(--header);
  margin-inline: auto;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: #000;
  border-bottom: 3px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  text-decoration: none;
}
.brand img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(24, 224, 180, .14));
}
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong {
  color: #fff;
  font-size: 1.74rem;
  font-weight: 900;
  letter-spacing: -.045em;
}
.brand-copy small {
  margin-top: .38rem;
  color: var(--accent-soft);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1rem, 2.5vw, 2rem);
}
.topbar nav a {
  position: relative;
  padding: .45rem .05rem;
  color: #d8e8e4;
  font-size: .79rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .18s ease, transform .18s ease;
}
.topbar nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}
.topbar nav a:hover,
.topbar nav a:focus-visible {
  color: var(--accent-bright);
  transform: translateY(-1px);
}
.topbar nav a:hover::after,
.topbar nav a:focus-visible::after { transform: scaleX(1); }

main, footer {
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
}
main { padding-bottom: 2.5rem; }
.section { padding-top: 4.6rem; }
.section-heading {
  margin-bottom: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-heading::after {
  content: "";
  height: 5px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--line-strong), rgba(47, 138, 120, .08));
}
.section-title {
  margin: 0;
  color: #f8fffd;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 900;
}

.game {
  margin-bottom: 2rem;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  border: 2px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(18, 63, 56, .82), rgba(5, 20, 18, .94) 52%, rgba(3, 12, 11, .98)),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(134, 255, 222, .07);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.game::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  z-index: -1;
  background: linear-gradient(90deg, var(--accent), #1594a0 60%, transparent);
}
.game::after {
  content: "";
  position: absolute;
  width: 270px;
  height: 270px;
  right: -140px;
  top: -155px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(40, 215, 180, .12);
  filter: blur(10px);
}
.game:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 26px 72px rgba(0, 0, 0, .5), 0 0 0 1px rgba(50, 224, 183, .06);
}
.game-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
}
.game-heading { min-width: 0; }
.game h2 {
  margin: 0;
  max-width: 780px;
  color: #fff;
  font-size: clamp(1.25rem, 2.15vw, 1.72rem);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 900;
}
.meta {
  margin: .7rem 0 0;
  color: var(--accent-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1.45;
  text-transform: uppercase;
}
.meta span { margin-inline: .48rem; color: #529486; font-weight: 900; }
.itch-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .58rem;
  min-height: 46px;
  padding: .55rem .85rem;
  border: 2px solid #388f7e;
  border-radius: 12px;
  background: rgba(2, 15, 13, .72);
  color: #e9fffa;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .025em;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.itch-link img {
  width: 30px;
  height: 30px;
  filter: brightness(0) saturate(100%) invert(87%) sepia(73%) saturate(1558%) hue-rotate(89deg) brightness(100%) contrast(105%);
}
.itch-link:hover,
.itch-link:focus-visible {
  border-color: var(--accent-bright);
  background: rgba(14, 75, 64, .78);
  transform: translateY(-2px);
}

.slider {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: stretch;
  gap: 12px;
  position: relative;
}
.slider-viewport {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  touch-action: pan-x;
  border-radius: 14px;
}
.slider-viewport::-webkit-scrollbar { display: none; }
.slider-track {
  display: flex;
  gap: 14px;
  min-width: max-content;
}
.slide {
  position: relative;
  flex: 0 0 clamp(250px, 28vw, 346px);
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 2px solid rgba(78, 151, 137, .58);
  border-radius: 14px;
  background: #020605;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
}
.image-open {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #020605;
  cursor: zoom-in;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease, filter .28s ease;
}
.cover-slide img { object-fit: contain; }
.office-cover { background: #020605; }
.reanimator-cover { background: #a8c814; }
.slide:hover img { transform: scale(1.02); filter: saturate(1.04) contrast(1.02); }
.slider-control {
  width: 52px;
  min-height: 100%;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 70, 61, .95), rgba(5, 26, 23, .96));
  color: var(--accent-bright);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.24);
  transition: border-color .18s ease, background .18s ease, transform .18s ease, opacity .18s ease;
}
.slider-control svg {
  width: 30px;
  height: 30px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.slider-control:hover,
.slider-control:focus-visible {
  border-color: var(--accent-bright);
  background: linear-gradient(180deg, rgba(25, 105, 88, .98), rgba(7, 43, 37, .98));
  transform: scale(1.035);
}
.slider-control:disabled {
  opacity: .26;
  cursor: default;
  transform: none;
}
.description {
  max-width: 990px;
  margin: 1.25rem 0 .1rem;
  color: #d1e2de;
  font-size: .94rem;
  font-weight: 560;
  line-height: 1.72;
}
.description em { color: #fff; font-style: normal; font-weight: 800; }

.studio { padding-bottom: 1.8rem; }
.studio-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.4rem, 3vw, 2.3rem);
  border: 2px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(14, 61, 54, .9), rgba(4, 20, 18, .97) 60%),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(134, 255, 222, .07);
  position: relative;
  overflow: hidden;
}
.studio-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #1594a0, var(--accent) 55%, transparent);
}
.studio-card p {
  margin: 0;
  color: #d3e3df;
  font-size: .95rem;
  font-weight: 560;
  line-height: 1.78;
}
.studio-card a {
  color: var(--accent-bright);
  font-weight: 780;
  text-decoration-thickness: 2px;
  text-decoration-color: #3a897a;
  text-underline-offset: .22rem;
}
.studio-card a:hover { text-decoration-color: var(--accent-bright); }

footer {
  min-height: 108px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  border-top: 3px solid var(--line);
  color: #abc5bf;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}
footer a {
  position: relative;
  padding-block: .45rem;
  color: #d8e9e5;
  font-weight: 850;
  text-decoration: none;
}
footer a:last-child { justify-self: end; }
footer a:hover { color: var(--accent-bright); }
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}
.footer-links a { white-space: nowrap; }

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 3vw, 2.4rem);
  border: 0;
  background: rgba(1, 7, 6, .98);
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .96); }
.lightbox[open] {
  display: grid;
  grid-template-columns: 72px minmax(0,1fr) 72px;
  align-items: center;
  gap: 1.2rem;
}
.lightbox-content {
  min-width: 0;
  max-width: min(1360px, 100%);
  max-height: 90vh;
  margin: auto;
  display: grid;
  justify-items: center;
  gap: .75rem;
}
.lightbox-content img {
  max-width: 100%;
  max-height: calc(90vh - 40px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .65);
}
.lightbox-content figcaption {
  color: #c5d8d3;
  font-size: .78rem;
  font-weight: 650;
}
.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, #123e37, #061b18);
  color: var(--accent-bright);
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  border-color: var(--accent-bright);
  background: #104e42;
  transform: scale(1.04);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  font-weight: 700;
}
.lightbox-nav {
  width: 58px;
  height: 58px;
}
.lightbox-nav svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lightbox-nav:disabled { opacity: .24; pointer-events: none; }

:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 4px; }

@media (max-width: 760px) {
  :root { --header: auto; }
  .topbar, main, footer { width: calc(100% - 28px); }
  .topbar {
    min-height: 86px;
    padding-block: .65rem;
    gap: 1rem;
  }
  .brand { gap: .58rem; }
  .brand img { width: 56px; height: 56px; }
  .brand-copy strong { font-size: 1.32rem; }
  .brand-copy small { font-size: .56rem; letter-spacing: .12em; }
  .topbar nav {
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .topbar nav a { font-size: .66rem; letter-spacing: .045em; }
  .topbar nav a:nth-child(2) { display: none; }
  .section { padding-top: 3.3rem; }
  .section-title { font-size: 1.75rem; }
  .game {
    border-radius: 18px;
    padding: 1rem;
    margin-bottom: 1.4rem;
  }
  .game-card-head {
    align-items: flex-start;
    gap: .8rem;
  }
  .game h2 { font-size: 1.16rem; }
  .meta { font-size: .62rem; }
  .meta span { margin-inline: .26rem; }
  .itch-link {
    min-height: 42px;
    padding: .46rem;
    border-radius: 10px;
  }
  .itch-link img { width: 28px; height: 28px; }
  .itch-link span { display: none; }
  .slider {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }
  .slider-control { width: 44px; border-radius: 11px; }
  .slider-control svg { width: 25px; height: 25px; }
  .slider-track { gap: 10px; }
  .slide {
    flex-basis: min(73vw, 300px);
    border-radius: 11px;
  }
  .description { font-size: .87rem; line-height: 1.68; }
  .studio-card {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    border-radius: 18px;
  }
  .studio-card p { font-size: .88rem; }
  footer {
    min-height: 120px;
    grid-template-columns: 1fr auto;
    gap: .8rem 1rem;
    padding-block: 1.3rem;
    font-size: .66rem;
  }
  .footer-links {
    grid-column: 1 / -1;
    grid-row: 1;
    gap: 1.4rem;
  }
  footer > span { grid-column: 1; grid-row: 2; }
  footer > a:last-child { grid-column: 2; grid-row: 2; justify-self: end; }
  .lightbox { padding: .7rem; }
  .lightbox[open] {
    grid-template-columns: 46px minmax(0,1fr) 46px;
    gap: .4rem;
  }
  .lightbox-nav { width: 42px; height: 52px; }
  .lightbox-nav svg { width: 25px; height: 25px; }
  .lightbox-close { top: 10px; right: 10px; width: 42px; height: 42px; }
  .lightbox-content figcaption { text-align: center; }
}

@media (max-width: 440px) {
  .topbar nav { gap: .55rem; }
  .topbar nav a { font-size: .61rem; }
  .slider { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 6px; }
  .slider-control { width: 40px; }
  .slide { flex-basis: min(70vw, 280px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
