/* Color, type and layout shared by every page. */
:root {
  color-scheme: dark;
  --background: #171412;
  --surface: #211c19;
  --surface-hover: #28201b;
  --ink: #fff6ed;
  --muted: #c6b8ad;
  --subtle: #a99587;
  --border: #3e322b;
  --accent: #ff9250;
  --accent-light: #ffb27d;
  --focus: #ffd397;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3.25rem);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--ink);
}

main { flex: 1; }
main:focus { outline: none; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.07;
}

:where(a):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

::selection { background: var(--accent); color: var(--background); }

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

.skip-link {
  position: fixed;
  z-index: 5;
  top: .75rem;
  left: .75rem;
  transform: translateY(-170%);
  padding: .65rem 1rem;
  background: var(--ink);
  color: var(--background);
}

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

/* Global navigation */
.site-header {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--border);
  background: #171412;
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-inner { min-height: 74px; }

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .58rem;
  min-height: 44px;
  font-size: 1.21rem;
  font-weight: 850;
  letter-spacing: -.045em;
  text-decoration: none;
}

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

.primary-nav, .site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.primary-nav a, .site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav a { position: relative; }

.primary-nav a:is(:hover, [aria-current], .nav-section),
.site-footer nav a:hover { color: var(--ink); }

.primary-nav a:is([aria-current], .nav-section)::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

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

.footer-inner { min-height: 94px; padding-block: .75rem; }

/* Homepage */
.studio-hero {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 77% 45%, #342017 0%, transparent 47%),
    linear-gradient(115deg, #1a1512 15%, #201813 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.24fr 1fr;
  align-items: center;
  min-height: 490px;
  padding-block: clamp(2.5rem, 6.2vw, 5rem);
}

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

.hero-copy h1 {
  font-size: clamp(3.65rem, 6.15vw, 6.15rem);
  letter-spacing: -.055em;
  line-height: .99;
}

.hero-copy h1::before {
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom: 1.4rem;
  border-radius: 2px;
  background: var(--accent);
  content: "";
}

.hero-copy em { color: var(--accent); font-style: normal; }

.hero-intro {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.65vw, 1.28rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: .7rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: #211611;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.button:hover { transform: translateY(-2px); background: var(--accent-light); }
.hero-copy .button { margin-top: 1.7rem; }

.hero-art {
  position: relative;
  display: grid;
  isolation: isolate;
  place-items: center;
  min-width: 0;
  min-height: 315px;
}

.hero-art::before {
  position: absolute;
  z-index: -2;
  inset: -24% -12%;
  background-image: radial-gradient(#d29064 1px, transparent 1px);
  background-size: 23px 23px;
  mask-image: radial-gradient(ellipse, #000 10%, transparent 72%);
  opacity: .29;
  content: "";
}

.hero-art img {
  width: min(79%, 370px);
  filter: drop-shadow(0 16px 20px #0a0505a8);
}

.hero-orbits {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(95%, 480px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid #6f442d6e;
  border-radius: 50%;
  background: radial-gradient(circle, #a9521d36, transparent 67%);
}

.hero-orbits::before, .hero-orbits::after {
  position: absolute;
  border: 1px solid #a9653e48;
  border-radius: inherit;
  content: "";
}

.hero-orbits::before { inset: 9%; }
.hero-orbits::after { inset: 20%; }

.hero-orbits span {
  position: absolute;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f99553;
  box-shadow: 0 0 14px #ef7b3f8a;
}

.hero-orbits span:nth-child(1) { top: 14%; left: 14%; }
.hero-orbits span:nth-child(2) { top: 19%; right: 18%; width: 4px; opacity: .7; }
.hero-orbits span:nth-child(3) { bottom: 13%; right: 15%; }

.lineup { padding-block: clamp(2.5rem, 5vw, 4.3rem) clamp(3.4rem, 6vw, 5.25rem); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.section-heading h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }

.text-link, .breadcrumb {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent-light);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .24em;
  text-decoration-color: #b56e47;
  transition: color 160ms ease;
}

.text-link:hover, .breadcrumb:hover { color: var(--ink); text-decoration-color: currentColor; }

/* Games and gallery */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.35vw, 1.75rem);
}

.game-card {
  display: grid;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: background-color 180ms ease, border-color 180ms ease;
}

.game-card:hover, .game-card:focus-within {
  border-color: #976447;
  background: var(--surface-hover);
}

.game-card > a {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: inherit;
  text-decoration: none;
}

.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2.05;
  border-radius: 11px 11px 0 0;
  background: #171d24;
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}

.game-card:hover img { transform: scale(1.035); }
.game-card--bounzlatz .card-media img { object-position: center 37%; }

.status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 100%;
  padding: .32rem .67rem;
  border: 1px solid #65533e;
  border-radius: 20px;
  background: #231a16;
  color: #ffe3cb;
  font-size: .875rem;
  font-weight: 750;
  line-height: 1.3;
}

.status--test { border-color: #526a7b; background: #131d28; color: #d3eaff; }
.status > span { flex: none; width: 7px; aspect-ratio: 1; border-radius: 50%; background: #ff9c5c; }
.status--test > span { background: #8aceff; }
.card-media .status { position: absolute; bottom: .8rem; left: .85rem; }

.card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
  padding: clamp(1.1rem, 2.1vw, 1.55rem);
}

.eyebrow {
  color: var(--subtle);
  font-size: .875rem;
  font-weight: 750;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.card-copy :is(h2, h3) { font-size: clamp(1.65rem, 2.45vw, 2rem); }
.card-copy p:not(.eyebrow) { color: var(--muted); }

.card-action {
  margin-top: auto;
  padding-top: .56rem;
  color: var(--accent-light);
  font-size: .94rem;
  font-weight: 750;
}

.game-card:is(:hover, :focus-within) .card-action {
  text-decoration: underline;
  text-underline-offset: .24em;
}

/* Interior pages */
.inner-page, .policy-page { padding-block: clamp(2.35rem, 6vw, 4.75rem) clamp(3.5rem, 7vw, 6rem); }
.compact-page { max-width: 870px; }
.page-intro { margin-bottom: clamp(1.55rem, 4vw, 2.65rem); }

.page-intro h1, .policy h1, .game-story h1 {
  overflow-wrap: anywhere;
  font-size: clamp(2.7rem, 6.1vw, 5.25rem);
  letter-spacing: -.06em;
}

.page-intro > p:not(.eyebrow), .policy .date {
  margin-top: .85rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.65vw, 1.25rem);
}

.game-page {
  --game-glow: #19344a;
  background: radial-gradient(ellipse 75% 440px at 72% 0%, var(--game-glow), transparent 90%);
}

.game-page--bounzlatz { --game-glow: #243c32; }
.game-intro { padding-top: 1.25rem; }

.game-hero {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(1.25rem, 4vw, 3.25rem) clamp(2.7rem, 5.7vw, 5.1rem);
}

.game-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.app-icon { width: 56px; height: 56px; border: 1px solid #617a96; border-radius: 12px; }
.game-story p { margin-top: .8rem; color: var(--muted); }
.game-story .game-lead { margin-top: 1.1rem; color: var(--ink); font-size: clamp(1.12rem, 1.7vw, 1.31rem); }
.game-story .availability { font-weight: 650; }

.feature-art {
  overflow: hidden;
  border: 1px solid #99857566;
  border-radius: 13px;
  box-shadow: 0 20px 36px #08060558;
}

.feature-art img { width: 100%; }
.gallery { border-top: 1px solid var(--border); padding-top: clamp(1.75rem, 4vw, 2.75rem); }
.screenshot { min-width: 0; margin: 0; }

.screenshot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color 160ms ease;
}

.screenshot a { display: block; border-radius: 9px; }
.screenshot a:hover img { border-color: var(--accent); }
.screenshot figcaption { margin-top: .55rem; color: var(--muted); }

.game-support {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  padding-block: 2rem clamp(2rem, 5vw, 4rem);
}

.policy-list, .support-list { display: grid; gap: .85rem; }

.policy-list a, .support-panel {
  min-width: 0;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.policy-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 1rem;
  text-decoration: none;
}

.policy-list a:hover { border-color: #976447; background: var(--surface-hover); }
.policy-list strong { font-size: 1.2rem; }
.policy-list span, .support-panel p { color: var(--muted); }
.support-panel { scroll-margin-top: 1rem; }
.support-panel h2 { font-size: 1.5rem; }
.support-panel p { margin-top: .5rem; }
.support-panel .text-link { margin-top: .35rem; }

.policy-page { max-width: 780px; padding-top: 1.7rem; }
.policy { margin-top: 1.35rem; font-size: clamp(1rem, 1.5vw, 1.075rem); line-height: 1.7; }
.policy h1 { margin-top: .45rem; font-size: clamp(2.35rem, 5.7vw, 4rem); }
.policy h2 { margin-top: 1.8rem; font-size: clamp(1.33rem, 3vw, 1.65rem); }
.policy p + p, .policy h2 + p { margin-top: .55rem; }
.policy p:not(.eyebrow, .policy-notice) { color: var(--muted); }

.policy p.policy-notice {
  margin-top: 1.3rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  background: var(--surface);
}

.policy a { color: var(--accent-light); text-underline-offset: .18em; overflow-wrap: anywhere; }
.policy a:hover { color: var(--ink); }
.policy strong { color: var(--ink); }
.policy .contact { color: var(--ink); font-weight: 700; }
.error-page .eyebrow { margin-bottom: .6rem; color: var(--accent); }
.error-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1.3rem; }

@media (max-width: 860px) {
  .hero-grid { min-height: 0; }
  .hero-copy h1 { font-size: clamp(3.05rem, 7.3vw, 4rem); }
  .hero-art { min-height: 260px; }
  .game-hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .game-story { max-width: 65ch; }
  .feature-art { max-width: 680px; width: 100%; }
}

@media (max-width: 630px) {
  .header-inner { flex-wrap: wrap; gap: 0; padding-block: .25rem .4rem; }
  .primary-nav { width: 100%; justify-content: space-between; gap: .45rem; }
  .primary-nav a { padding-inline: .28rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 2.6rem 1.2rem; gap: 1.5rem; }
  .studio-hero { background: radial-gradient(ellipse at 53% 85%, #3b2317, transparent 62%), #1c1612; }
  .hero-copy h1 { font-size: clamp(2.5rem, 11.3vw, 4.9rem); }
  .hero-copy h1::before { margin-bottom: 1.15rem; }
  .hero-intro { margin-top: 1rem; }
  .hero-copy .button { margin-top: 1.25rem; }
  .hero-art { min-height: 0; padding-block: .75rem; }
  .hero-art img { width: min(70%, 295px); }
  .hero-orbits { width: min(87%, 340px); }
  .hero-art::before { inset: -6% 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card-copy { gap: .4rem; }
  .policy-list a { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: .2rem; }
  .site-footer nav { flex-wrap: wrap; gap: .4rem 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .button:hover, .game-card:hover img { transform: none; }
}
