:root {
  color-scheme: light;
  --paper: #fafafa;
  --surface: #ffffff;
  --ink: #15171b;
  --muted: #5d626c;
  --accent: #315ddc;
  --line: #d9dce1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main:focus, .how-section:focus { outline: none; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 16px;
  padding: 14px 18px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--accent);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 80px;
  padding: 16px 5%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 760;
  text-decoration: none;
}
.brand-period { color: var(--accent); }
.brand-lockup { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.beta-label { padding: 3px 8px; border: 1px solid #ccd6ed; border-radius: 5px; background: #edf1fb; color: #2853c7; font-size: .875rem; line-height: 1.4; font-weight: 600; }
.site-header nav { display: flex; align-items: center; gap: 32px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .9375rem;
  line-height: 1.4;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}
.nav-link:hover, .nav-link:focus-visible, .nav-link[aria-current="location"] { text-decoration-color: currentColor; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  min-width: 164px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: .9375rem;
  line-height: 1.4;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}
.button span { display: inline-block; transition: transform 140ms ease-out; }
.button:hover { background: #2b2e34; }
.button:hover span { transform: translate(2px, -2px); }
.button:active { background: #050608; }
.button:active span { transform: none; }

.hero {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-height: clamp(480px, 38vw, 610px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #030707;
  color: #ffffff;
}
.hero-image { position: absolute; inset: 0; z-index: -1; }
.hero-image img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: right center; }
.hero-content { flex: 1; width: 40%; max-width: 600px; padding: 76px 0 28px; margin-left: 5%; }
.hero-content > :is(h1, p) { width: fit-content; background: #030707; }
.eyebrow { margin: 0 0 18px; font-size: .875rem; line-height: 1.5; font-weight: 650; }
.hero .eyebrow { color: #b9c8e5; }
h1 { margin: 0; font-size: 3.5rem; line-height: 1.05; font-weight: 760; }
.hero-premise { margin: 20px 0 0; font-size: 1.625rem; line-height: 1.35; font-weight: 500; }
.hero-description { margin: 18px 0 22px; color: #d4d9df; font-size: 1rem; line-height: 1.65; }
.button-hero { border-color: #9ca5b3; min-width: 184px; }
.button-hero:focus-visible { outline-color: #94b4ff; box-shadow: 0 0 0 2px #030707; }
.entry-status { min-height: 42px; max-width: 330px; margin: 14px 0 0; color: #b9c1cc; font-size: .875rem; line-height: 1.5; }
.development-status { margin: 0 0 22px; color: #d4d9df; font-size: 1rem; line-height: 1.6; }
.about-section { max-width: 1296px; margin: 0 auto; padding: 8px 5% 40px; scroll-margin-top: 24px; }
.about-section .eyebrow { color: var(--accent); margin-bottom: 10px; }
.about-section p:not(.eyebrow) { max-width: 72ch; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 1rem; text-underline-offset: 4px; }
.footer-link:hover { color: var(--ink); }
.details-section { max-width: 900px; margin: 32px auto; border-top: 1px solid var(--line); }

.how-section { max-width: 1296px; margin: 0 auto; padding: 36px 5% 40px; scroll-margin-top: 24px; }
.section-heading .eyebrow { color: var(--accent); margin-bottom: 10px; }
h2 { margin: 0; font-size: 2rem; line-height: 1.2; font-weight: 700; }
.steps { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.steps li { border-top: 1px solid var(--line); padding-top: 22px; }
.step-number { font-size: .875rem; line-height: 1.5; font-weight: 650; color: var(--accent); }
h3 { font-size: 1.125rem; line-height: 1.4; font-weight: 650; margin: 13px 0 10px; }
.steps p { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--muted); max-width: 33ch; }
.site-footer { margin: 0 5%; padding: 18px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.footer-name { margin: 0; font-weight: 700; font-size: .9375rem; line-height: 1.5; }
.account-preview-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; color: var(--muted); text-underline-offset: 4px; }
.credits-button { min-width: 72px; min-height: 44px; padding: 10px 0 10px 16px; border: 0; background: transparent; color: var(--muted); font-size: .9375rem; line-height: 1.4; text-decoration: underline; text-underline-offset: 4px; }
.credits-button:hover { color: var(--ink); }
.credits-dialog { width: min(720px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); overflow: hidden; }
.credits-dialog[open] { display: flex; flex-direction: column; }
.credits-dialog::backdrop { background: rgb(3 7 7 / 65%); }
body:has(.credits-dialog[open]) { overflow: hidden; }
.credits-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.credits-header h2 { font-size: 1.75rem; }
.credits-close { display: grid; place-items: center; flex-shrink: 0; min-width: 48px; min-height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); font-size: 2rem; line-height: 1; }
.credits-close:hover { background: #eceef2; }
.credits-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px 28px; scrollbar-gutter: stable; }
.credits-content:focus-visible { outline-offset: -4px; }
.credits-content section + section { margin-top: 28px; }
.credits-content h3 { margin: 0 0 10px; font-size: 1.125rem; }
.credits-content p { margin: 0 0 12px; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.credits-content a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding: 8px 0; color: #2853c7; text-underline-offset: 4px; overflow-wrap: anywhere; }
.credits-content a:hover { color: #15388f; }
.credit-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.credits-content .credits-note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: .875rem; }

@media (max-width: 1200px) {
  .hero-content { width: 40%; padding-top: 68px; }
  h1 { font-size: 2.875rem; }
  .hero-premise { font-size: 1.375rem; }
  .hero-description { max-width: 29ch; }
  .steps { gap: 28px; }
  .how-section { padding-top: 36px; }
}

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero-image { position: relative; inset: auto; order: 2; width: 100%; }
  .hero-image img { height: auto; object-position: center; }
  .hero-content { width: auto; max-width: none; margin: 0 5%; padding: 32px 0 12px; }
}

/* Unlike viewport media units, this threshold follows the actual root text size.
   Large text gets its own row so it cannot obscure the game image. */
@container (max-width: 56.25rem) {
  .hero-image { position: relative; inset: auto; order: 2; width: 100%; }
  .hero-image img { height: auto; object-position: center; }
  .hero-content { width: auto; max-width: none; margin: 0 5%; padding: 32px 0 12px; }
}

@media (max-width: 760px) {
  .site-header { padding: 10px 20px; min-height: 64px; gap: 16px; }
  .site-header nav { gap: 20px; flex-wrap: wrap; }
  .wordmark { font-size: 1.1875rem; }
  .button-header { display: none; }
  .nav-link { font-size: .875rem; }
  .hero-content { margin-inline: 20px; }
  h1 { font-size: 2.5rem; }
  .hero-premise { font-size: 1.25rem; }
  .hero-description { font-size: 1rem; }
  .how-section { padding: 32px 20px 40px; }
  .about-section { padding: 0 20px 32px; }
  h2 { font-size: 1.625rem; }
  .steps { grid-template-columns: 1fr; gap: 24px; margin-top: 26px; }
  .steps li { padding-top: 18px; }
  .steps p { max-width: 52ch; }
  .site-footer { margin: 0 20px; padding: 18px 0; gap: 16px; }
}

@media (max-width: 600px) {
  .hero-content { padding: 32px 0 4px; }
  .hero .eyebrow { margin-bottom: 14px; }
  h1 { font-size: 2.25rem; }
  .hero-premise { margin-top: 16px; font-size: 1.125rem; line-height: 1.4; }
  .hero-premise br { display: none; }
  .hero-description { max-width: 35ch; margin: 16px 0; }
  .button-hero { min-height: 48px; margin-bottom: 12px; }
  .entry-status { margin-top: 12px; max-width: 270px; }
  .credits-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .credits-header { padding: 16px; }
  .credits-content { padding: 20px 16px; }
}

@media (max-width: 360px) {
  .site-header { padding-inline: 16px; gap: 8px; }
  .wordmark { font-size: 1.0625rem; }
  .nav-link { font-size: .875rem; }
  .hero-content { margin-inline: 16px; padding-top: 28px; }
  h1 { font-size: 2rem; }
  .hero-premise { max-width: 25ch; }
  .hero-description { font-size: .9375rem; max-width: 29ch; }
  .hero-description br { display: none; }
  .how-section { padding: 28px 16px 36px; }
  .about-section { padding-inline: 16px; }
  .site-footer { margin-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .button:hover span { transform: none; }
}
