:root {
  color-scheme: light;
  --paper: #f5efe5;
  --card: #fbf7ef;
  --ink: #102d36;
  --ink-deep: #0b222a;
  --muted: #526168;
  --line: #d9d1c4;
  --ember: #fb936f;
  --rust: #9d3b25;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b74b2f; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.06; }
h2 { font-size: clamp(2.25rem, 4.8vw, 3.65rem); letter-spacing: -.045em; }

.site-shell { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 2; inset: .75rem auto auto .75rem; padding: .65rem 1rem; background: var(--card); transform: translateY(-170%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; }
.header-inner { padding-block: 1.15rem; }
.wordmark { display: inline-flex; align-items: baseline; gap: 0; white-space: nowrap; font-size: 1.28rem; font-weight: 800; letter-spacing: -.065em; text-decoration: none; }
.wordmark > span:first-child { font-weight: 450; }
.brand-dot { display: inline-block; align-self: center; width: .38rem; height: .38rem; margin-left: .32rem; border-radius: 50%; background: var(--rust); }
.site-nav, .footer-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.4rem; }
.site-nav a, .footer-nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; font-size: .88rem; font-weight: 650; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"], .footer-nav a:hover { text-decoration: underline; }
.site-nav .nav-discord { padding-inline: .8rem; border: 1px solid var(--ink); }
.nav-discord span, .text-action span { color: var(--rust); }

.eyebrow, .platform, .genre, .count {
  font: 700 .72rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .105em;
  text-transform: uppercase;
}
.eyebrow { color: var(--rust); }

.studio-hero {
  color: var(--paper);
  background: radial-gradient(ellipse at 76% 25%, #1b4249 0%, transparent 58%), var(--ink-deep);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(3.5rem, 7vw, 7rem);
}
.hero-kicker { display: flex; align-items: center; gap: .7rem; color: #f5bb9c; margin-bottom: 1.25rem; }
.hero-kicker::before { content: ""; width: 1.65rem; height: 1px; background: var(--ember); }
.hero-copy h1 { font-size: clamp(4rem, 8vw, 7.6rem); line-height: .9; letter-spacing: -.073em; }
.hero-copy h1 em { display: block; color: var(--ember); font-weight: 400; }
.hero-lede { max-width: 36rem; margin-top: 1.7rem; color: #e4ddd2; font-size: clamp(1rem, 1.45vw, 1.16rem); }
.hero-actions { display: flex; gap: .75rem; margin-top: 1.6rem; }
.hero-action {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .35rem;
  width: 5.55rem;
  aspect-ratio: 1;
  border: 1px solid #c2cbc680;
  color: var(--paper);
  font-size: .83rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s;
}
.hero-action:hover { background: #f5efe51f; }
.hero-action svg { width: 1.55rem; height: 1.55rem; }
.hero-action-discord { background: #294d56; border-color: #79949a; }
.hero-action-discord:hover { background: #365d67; }
.studio-hero :focus-visible { outline-color: var(--ember); }
.hero-art {
  width: min(100%, 27rem);
  margin-inline: auto;
  padding: clamp(.6rem, 1.1vw, 1rem);
  border: 1px solid #e3bf9b66;
  background: repeating-linear-gradient(135deg, #f5efe508 0 1px, transparent 1px 7px);
}
.studio-mark { overflow: hidden; background: #f9ecd3; }
.studio-mark img { width: 100%; height: auto; mix-blend-mode: multiply; }

.studio-games { padding-block: clamp(3.5rem, 7vw, 6rem); }
.games-heading, .section-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.55rem; }
.games-heading h2, .community-panel h2 { margin-top: .45rem; }
.text-action { display: inline-flex; align-items: center; gap: .45rem; font-size: .91rem; font-weight: 700; text-decoration-thickness: 1px; }
.text-action:hover { color: var(--rust); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.project-card { min-width: 0; background: var(--card); border: 1px solid var(--line); }
.project-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ink-deep); }
.project-copy { padding: clamp(1.05rem, 2.2vw, 1.65rem); }
.project-genre { margin-bottom: .65rem; }
.project-copy h3, .game-info h3 { font-size: clamp(1.65rem, 2.6vw, 2.45rem); letter-spacing: -.045em; }
.project-copy > p:not(.eyebrow), .description { color: var(--muted); margin-top: .7rem; }
.project-copy .text-action { margin-top: .8rem; }

.community-section { padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.community-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem 3rem;
  padding: clamp(1.35rem, 4vw, 3rem);
  border: 1px solid #d9c9b6;
  border-left: 4px solid var(--rust);
  background: #eee1d0;
}
.community-panel p:not(.eyebrow) { max-width: 39rem; margin-top: .7rem; color: #47535a; }
.community-links { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  min-height: 2.8rem;
  padding: .62rem .95rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.primary span { color: var(--ember); }
.primary:hover { background: #204851; }
.primary:disabled { cursor: wait; opacity: .65; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 1.15rem; }

.page-intro { padding-block: clamp(2.7rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem); }
.page-title { margin-top: .45rem; font-size: clamp(3.15rem, 7.5vw, 6rem); letter-spacing: -.065em; }
.page-lede { max-width: 40rem; margin-top: .85rem; color: var(--muted); font-size: 1.1rem; }
.playtest-access { margin-top: .75rem; }
.playtest-access a, .library-note a, .dialog-note a, .faq-list p a { font-weight: 700; }

.library, .faq-section { padding-bottom: clamp(3rem, 7vw, 6rem); }
.library .section-heading { border-bottom: 1px solid var(--line); padding-bottom: .9rem; }
.library .section-heading h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.count { color: var(--muted); }
#load-status:empty, .error:empty { display: none; }
.game-list { display: grid; gap: 1rem; }
.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  min-height: 17rem;
  border: 1px solid var(--line);
  background: var(--card);
}
.game-without-art { grid-template-columns: 1fr; min-height: 0; }
.game-screenshot { position: relative; background: var(--ink); }
.game-screenshot img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.game-info { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1rem, 3vw, 2rem); }
.game-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; width: 100%; margin-bottom: 1rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .5rem; border: 1px solid var(--line); font-size: .72rem; }
.dot { width: .38rem; height: .38rem; border-radius: 50%; background: var(--rust); }
.platform, .genre { color: var(--muted); }
.genre { margin-bottom: .4rem; }
.game-action { margin-top: auto; padding-top: .85rem; }
.library-note { max-width: 44rem; margin-top: 1.25rem; color: var(--muted); }

dialog { width: min(28rem, calc(100% - 2rem)); padding: 2rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
dialog::backdrop { background: #0b222abf; }
dialog h2 { padding-right: 1.5rem; font-size: 2.2rem; }
.close { position: absolute; inset: .6rem .65rem auto auto; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; background: none; color: var(--ink); font-size: 1.6rem; }
#gate-description, .dialog-note { margin-top: .7rem; color: var(--muted); }
#gate-form { margin-top: 1.25rem; }
#gate-form label { display: block; font-weight: 650; margin-bottom: .35rem; }
#gate-form input { width: 100%; border: 1px solid #8b9a9a; background: #fffdf7; color: var(--ink); padding: .65rem .75rem; }
#gate-form .primary { width: 100%; margin-top: .85rem; }
.error { margin-top: .5rem; color: #a22920; }
.dialog-note { font-size: .87rem; }

.faq-list { max-width: 48rem; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 1rem .3rem; cursor: pointer; font-size: 1.1rem; font-weight: 650; }
.faq-list summary::marker { color: var(--rust); }
.faq-list details p { max-width: 42rem; padding: 0 .3rem 1.05rem; color: var(--muted); }
.faq-list details a { color: var(--ink); }

@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { width: min(100%, 24rem); margin-inline: 0; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .project-card img { height: 100%; }
}

@media (max-width: 530px) {
  .site-shell { width: calc(100% - 2rem); }
  .header-inner { gap: .4rem 1rem; }
  .site-nav, .footer-nav { gap: .2rem .85rem; }
  .site-nav a, .footer-nav a { font-size: .82rem; }
  .hero-copy h1 { font-size: clamp(3.55rem, 13vw, 5rem); }
  .project-card, .game, .community-panel { grid-template-columns: 1fr; }
  .project-card img { height: auto; }
  .game-screenshot { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-action { transition: none; }
}
