:root {
  color-scheme: dark;
  --paper: #141414;
  --ink: #f7f1e8;
  --muted: #c7bcb0;
  --line: #423832;
  --panel: #242221;
  --accent: #ff9c29;
  --surface: #201e1d;
  --accent-text: #211409;
  --white: #fcf5ec;
  --display: "Instrument Sans", "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 "DM Sans", system-ui, sans-serif;
}

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

h1, h2, h3, .brand { font-family: var(--display); }

a { color: inherit; }

button { font: inherit; }

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

[hidden] { display: none !important; }

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

:where(.feature, .site-footer, .video-dialog) :focus-visible { outline-color: var(--accent); }

.container {
  width: min(1240px, 100% - clamp(2rem, 6vw, 7rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 3;
  top: 1rem;
  left: 1rem;
  padding: .65rem 1rem;
  transform: translateY(calc(-100% - 2rem));
  background: var(--accent);
  color: var(--accent-text);
}

.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #191919;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .66rem;
  color: var(--ink);
  font-size: 1.13rem;
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration: none;
}

.brand img { flex: none; object-fit: contain; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 3.4vw, 2.5rem);
  font-size: .94rem;
  font-weight: 700;
}

.site-nav a {
  text-decoration: none;
  text-underline-offset: .25em;
}

.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }

.site-nav .nav-contact {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  padding: .55rem .9rem;
  border: 1px solid #76614d;
  border-radius: 6px;
}

.site-nav .nav-contact:hover {
  border-color: #ba8b55;
  background: var(--panel);
  color: var(--white);
  text-decoration: none;
}

.floating-chat {
  position: fixed;
  z-index: 2;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 48px;
  padding: .6rem 1rem;
  border: 1px solid #ffbc62;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 18px #0008;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.floating-chat:hover { background: #ffbc62; }

.cover-section { padding-top: clamp(1rem, 3vw, 2.5rem); }

.studio-cover {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #1a1a1a;
}

.feature-section { padding-block: clamp(1.15rem, 3.4vw, 3rem) 0; }

.feature {
  display: grid;
  grid-template-columns: minmax(19rem, .86fr) minmax(0, 1.35fr);
  background: var(--panel);
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.feature-copy {
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.65rem, 4.15vw, 4rem);
}

.feature-label, .eyebrow {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .125em;
  text-transform: uppercase;
}

.feature-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--accent);
}

.feature-label span {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: currentColor;
}

.feature h2 {
  margin-block: 1rem;
  font-size: clamp(2.65rem, 4.6vw, 4.7rem);
  line-height: .99;
  font-weight: 700;
  letter-spacing: -.055em;
  word-spacing: .04em;
}

.feature-subtitle {
  display: block;
  margin-block-start: .45rem;
  color: var(--accent);
  font-size: .57em;
  letter-spacing: -.045em;
}

.feature-description {
  max-width: 26ch;
  margin-bottom: 1.6rem;
  color: #ded3c7;
  font-size: clamp(.98rem, 1.35vw, 1.12rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: .74rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .91rem;
  font-weight: 700;
  text-decoration: none;
}

.button-accent {
  background: var(--accent);
  color: var(--accent-text);
}

.button-accent:hover { background: #ffbc62; }

.feature-art {
  position: relative;
  min-height: clamp(26rem, 37vw, 33rem);
  overflow: hidden;
  border-radius: 0 18px 18px 0;
  background: #292421;
}

.feature-art img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.games-section, .studio-section { padding-block: clamp(3.1rem, 6.2vw, 5.7rem) 0; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .8rem 1.5rem;
  margin-bottom: 1.45rem;
}

.eyebrow {
  color: #e4b785;
  margin-bottom: .45rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4.15vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -.048em;
  line-height: 1.04;
}

.game-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}

.game-filters button {
  min-height: 42px;
  padding: .35rem .75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 700;
}

.game-filters button:hover { border-color: #966b43; }

.game-filters button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-text);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.8rem, 2vw, 1.5rem);
}

.game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.game-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #282321;
  border-radius: 9px 9px 0 0;
}

.game-art > a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.game-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.game-art > a:hover img, .game-art > a:focus-visible img { transform: scale(1.035); }

.play-button {
  position: absolute;
  bottom: .55rem;
  left: .55rem;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding-left: .32rem;
  border: 1px solid #ffffff65;
  border-radius: 50%;
  background: #191512ed;
  color: var(--white);
  cursor: pointer;
}

.play-button:hover { background: var(--white); color: var(--panel); }

.game-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: .9rem clamp(.75rem, 1.6vw, 1.3rem) .7rem;
}

.game-genre {
  margin-bottom: .26rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.game-body h3 {
  margin-bottom: .38rem;
  font-size: clamp(1.12rem, 1.95vw, 1.53rem);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -.034em;
}

.game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin-top: auto;
  font-size: .84rem;
}

.game-links a {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-height: 34px;
  color: var(--muted);
  text-decoration-color: #938171;
  text-underline-offset: .24em;
}

.game-links a:first-child {
  color: #ffc074;
  font-weight: 700;
  text-decoration: none;
}

.game-links a:hover { text-decoration: underline; }

.studio-section { padding-bottom: clamp(3rem, 6vw, 5.2rem); }

.studio-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  padding: clamp(1.35rem, 3.4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.studio-callout h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.studio-callout p {
  margin-top: .4rem;
  color: var(--muted);
}

.studio-callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.button-dark {
  border-color: #76614d;
  background: #342a23;
  color: var(--white);
}

.button-dark:hover { background: #493628; }

.contact-links {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: .2rem 1.15rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact-links :is(a, button) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .88rem;
  text-decoration: underline;
  text-underline-offset: .24em;
  cursor: pointer;
}

.contact-links :is(a, button):hover { color: var(--ink); }

.contact-links i {
  margin-left: .32rem;
  font-size: .77rem;
  font-style: normal;
  font-weight: 700;
}

.site-footer {
  padding-block: 1rem calc(5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #101010;
  color: #d7cbbf;
  font-size: .88rem;
}

.footer-policies { border-bottom: 1px solid #423832; }

.footer-policies summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  color: var(--white);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.footer-policies summary::-webkit-details-marker { display: none; }

.footer-policies summary span::before { content: "+"; }
.footer-policies[open] summary span::before { content: "−"; }

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1.4rem;
  padding-bottom: 1rem;
}

.policy-links a { padding-block: .35rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  padding: .95rem 0 .3rem;
}

.footer-bottom a, .policy-links a {
  text-decoration-color: #938171;
  text-underline-offset: .22em;
}

.footer-bottom a:hover, .policy-links a:hover { color: var(--accent); }

.video-dialog {
  width: min(860px, 100% - 2rem);
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 1px solid #4c3c30;
  border-radius: 12px;
  background: var(--panel);
  color: var(--white);
}

.video-dialog::backdrop { background: #0e0c0ad9; }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  gap: .75rem;
}

.dialog-head h2 { font-size: 1.3rem; line-height: 1.15; }

.dialog-close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid #76614d;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.7rem;
  cursor: pointer;
}

.dialog-close:hover { background: #48362a; }

.video-dialog video {
  display: block;
  width: 100%;
  max-height: 74vh;
  background: #0b0a09;
}

body.has-dialog { overflow: hidden; }

.toast {
  position: fixed;
  right: 1rem;
  bottom: calc(4.75rem + env(safe-area-inset-bottom));
  z-index: 2;
  visibility: hidden;
  padding: .75rem 1rem;
  border-radius: 6px;
  background: var(--panel);
  color: var(--white);
}

.toast.is-visible { visibility: visible; }

@media (max-width: 960px) {
  .section-heading { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; }
  .feature-copy { grid-row: 2; }
  .feature-art {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 18px 18px 0 0;
  }
  .feature h2 { margin-block: .7rem; font-size: clamp(2.4rem, 8vw, 3.65rem); }
  .feature-description { max-width: 35ch; margin-bottom: 1rem; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .header-inner {
    flex-wrap: wrap;
    gap: .35rem 1rem;
    padding-block: .8rem .65rem;
  }
  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: .3rem;
  }
  .site-nav .nav-contact { padding-inline: .65rem; }
}

@media (max-width: 390px) {
  .brand { font-size: .95rem; gap: .35rem; }
  .brand img { width: 30px; height: 30px; }
  .site-nav { font-size: .83rem; }
  .nav-contact span { display: none; }
  .game-grid { gap: .62rem; }
  .game-links { column-gap: .65rem; }
  .game-filters button { padding-inline: .55rem; }
}

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