/* Embercrest Studios — Option B studio shell, Art Deco game page.
   Relative paths only, for a HostGator subfolder. Images keep their
   aspect ratios and are never stretched. */

/* Self-hosted body and UI fonts (Latin subset). See fonts/README.txt. */
@font-face {
  font-family: "Source Serif Pro";
  src: url("../fonts/SourceSerifPro-Latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: "Fraunces", "Source Serif Pro", Georgia, serif;
  --font-body: "Source Serif Pro", Georgia, serif;
  --font-ui: "Source Sans 3", system-ui, sans-serif;
  --font-deco: "Cinzel", "Fraunces", serif;
  --bg: #161412;
  --surface: #221e1b;
  --ink: #efe8dc;
  --muted: #a89f93;
  --rule: #3a342e;
  --accent: #d97746;
  --accent-bright: #e8a070;
  --deco-bg: #0e1211;
  --deco-band: #010e0a;
  --deco-gold: #f9cf92;
  --deco-cream: #f1e0b8;
  --deco-line: #c9a86a;
  --deco-ink: #1a1410;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.55 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}
.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 10;
}
.skip:focus, .skip:focus-visible { left: 8px; top: 8px; }

header { padding: 36px 24px 16px; text-align: center; }
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  margin: 0;
  letter-spacing: .02em;
  color: var(--ink);
}
.brand a { color: inherit; text-decoration: none; }
.brand a:hover { color: var(--accent-bright); text-decoration: none; }
.brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.brand-logo {
  width: 220px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}
.brand-text { display: block; }
.tag {
  margin: 6px 0 0;
  font-family: var(--font-ui);
  font-size: .95rem;
  color: var(--muted);
}

nav.site-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 12px 16px 16px;
  font-family: var(--font-ui);
  font-size: .9rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
nav.site-nav a { color: var(--accent-bright); }
nav.site-nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

main { max-width: 800px; margin: 0 auto; padding: 16px 24px 56px; flex: 1 0 auto; width: 100%; overflow-wrap: break-word; }
main:focus { outline: none; }
main:focus-visible { outline: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
h1, h2 { font-size: 1.35rem; margin: 32px 0 10px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.card h2, h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
  border-bottom: 0;
  padding-bottom: 0;
}
p { margin: 0 0 14px; }

.card {
  padding: 20px 22px;
  margin: 20px 0;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.game-row { display: flex; gap: 18px; align-items: flex-start; }
.game-row img {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 18px;
  margin-top: 8px;
  background: var(--accent);
  color: var(--bg);
  border: 0;
}
.btn:hover { text-decoration: none; background: var(--accent-bright); color: var(--bg); }
.btn[aria-disabled="true"] { cursor: default; pointer-events: none; opacity: .9; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-top: 8px;
}
.card-actions .btn { margin-top: 0; }
.btn-quiet {
  background: transparent;
  color: var(--accent-bright);
  border: 2px solid var(--accent);
}
.btn-quiet:hover {
  background: var(--surface);
  color: var(--accent-bright);
  text-decoration: none;
}
.note { font-family: var(--font-ui); font-size: .85rem; color: var(--muted); }

/* Official Google Play badge: do not recolor, crop, or stretch.
   The PNG already includes the required clear space (¼ of the badge height).
   Minimum digital badge height is 28px; this display size is larger. */
.play-offer { margin: 10px 0 0; }
.play-offer--soon {
  font-family: var(--font-ui);
  color: var(--muted);
  margin: 10px 0 0;
}
.play-badge {
  display: inline-block;
  line-height: 0;
  max-width: 100%;
}
.play-badge img {
  display: block;
  width: 240px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.play-released { margin: 8px 0 0; }
.play-legal {
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--muted);
  margin: 12px auto 0;
  max-width: 36em;
}

.placeholder {
  font-family: var(--font-ui);
  font-size: .9rem;
  padding: 2px 6px;
  background: var(--rule);
  color: var(--accent-bright);
  white-space: nowrap;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.faq details {
  margin: 0 0 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--rule);
}
.faq summary {
  font-family: var(--font-ui);
  font-weight: 600;
  cursor: pointer;
  min-height: 24px;
  padding: 8px 0;
  display: list-item;
}
.faq details p { margin: 8px 0 4px; }

.meta { font-family: var(--font-ui); font-size: .9rem; color: var(--muted); margin-bottom: 16px; }

dl.facts { margin: 0 0 8px; }
dl.facts div {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
dl.facts dt {
  font-family: var(--font-ui);
  font-weight: 600;
  flex: 0 0 140px;
  color: var(--muted);
}
dl.facts dd { margin: 0; flex: 1 1 auto; }

.press-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin: 16px 0 24px;
}
.press-asset { margin: 0; }
.press-asset img { height: auto; object-fit: contain; }
.press-asset--icon {
  flex: 0 0 auto;
  width: 160px;
  max-width: 100%;
}
.press-asset--icon img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.press-asset--feature { flex: 1 1 280px; min-width: 0; }
.press-asset--feature img {
  width: 100%;
  aspect-ratio: 1024 / 500;
  object-fit: contain;
}
.press-asset figcaption {
  font-family: var(--font-ui);
  font-size: .85rem;
  margin-top: 8px;
  overflow-wrap: break-word;
}

.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 18px 0 8px;
}
.shot {
  width: 150px;
  aspect-ratio: 9 / 16;
  background: var(--surface);
  border: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-family: var(--font-ui);
  font-size: .72rem;
  color: var(--muted);
  flex: 0 0 auto;
}
.shot-item {
  margin: 0;
  flex: 0 0 auto;
  width: 150px;
}
.shot-item .shot { width: 100%; }
.shot-item figcaption {
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.35;
}

.social-drafts {
  margin: 0 0 16px;
  padding-left: 1.25rem;
}
.social-drafts li { margin: 0 0 12px; }



footer.site-footer {
  text-align: center;
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--muted);
  padding: 20px 16px 28px;
  border-top: 1px solid var(--rule);
  overflow-wrap: break-word;
}
.footer-brand { margin: 0 0 12px; }
.footer-logo {
  width: 112px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.press-asset--on-dark img {
  background: #161412;
  border-radius: 4px;
}
.press-asset--on-light img {
  background: #f7f1e8;
  border-radius: 4px;
}
footer.site-footer a { color: var(--accent-bright); }

/* WCAG 2.2 AA 2.5.8: standalone controls at least 24x24 CSS px.
   Inline links in body copy are exempt and left unchanged. */
nav.site-nav a,
footer.site-footer a,
.studio-bar .studio-name,
.brand a {
  min-height: 24px;
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Press download captions must wrap at 360px; inline-flex would keep them
   on one line and overflow. inline-block plus min-height keeps a 24px target. */
.press-asset figcaption a {
  display: inline-block;
  max-width: 100%;
  min-height: 24px;
  overflow-wrap: break-word;
  line-height: 1.35;
}


/* Screenshot gallery (shared layout). Art Deco colors are applied only
   on the game page, below. Images keep their aspect and are never stretched. */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 18px 0 8px;
}
.gallery-item {
  margin: 0;
  min-width: 0;
}
.gallery-item--wide { grid-column: 1 / -1; }
.gallery a.gallery-link {
  display: block;
  min-width: 24px;
  min-height: 24px;
}
.gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.gallery-standin-note {
  font-family: var(--font-ui);
  font-size: .9rem;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
}
@media (min-width: 641px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

/* Lightbox (vanilla). Studio colors by default; game page overrides follow. */
body.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lightbox[hidden] { display: none !important; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.88);
}
.lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
}
.lightbox-figure {
  margin: 0;
  min-width: 0;
  max-width: min(100%, calc(100vw - 112px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  object-fit: contain;
  display: block;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.lightbox-caption {
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--ink);
  text-align: center;
  margin: 8px 0 0;
  max-width: 36em;
  overflow-wrap: break-word;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  flex: 0 0 auto;
  box-sizing: border-box;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 2px solid var(--accent-bright);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  font-size: 1.8rem;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--bg);
}
.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .lightbox { padding: 8px; }
  .lightbox-panel { gap: 4px; }
  .lightbox-figure { max-width: min(100%, calc(100vw - 96px)); }
  .lightbox-image { max-height: calc(100vh - 112px); }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox * {
    transition: none !important;
    animation: none !important;
  }
}

/* ----- Stellar Logic game page (Art Deco only here) ----- */
body.game { background: var(--deco-bg); color: var(--deco-cream); }
body.game a { color: var(--deco-gold); }
body.game a:focus-visible, body.game .btn:focus-visible, body.game summary:focus-visible {
  outline-color: var(--deco-gold);
}
body.game .studio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
}
body.game .studio-bar .studio-name {
  color: var(--accent-bright);
  font-size: .85rem;
  letter-spacing: .04em;
}
body.game .studio-bar nav.site-nav {
  display: flex;
  gap: 20px;
  padding: 0;
  border: 0;
}
body.game .studio-bar nav.site-nav a {
  font-family: var(--font-ui);
  color: var(--accent-bright);
  letter-spacing: .06em;
  text-transform: none;
  font-size: .85rem;
}
body.game .studio-bar nav.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}
body.game .deco-band {
  background: var(--deco-band);
  border-top: 3px double var(--deco-line);
  border-bottom: 3px double var(--deco-line);
  text-align: center;
  padding: 22px 16px 20px;
}
body.game .deco-kicker {
  font-family: var(--font-deco);
  color: var(--deco-line);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .68rem;
  margin: 0 0 8px;
}
body.game .deco-title {
  font-family: var(--font-deco);
  color: var(--deco-gold);
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: 1.85rem;
  margin: 0 0 8px;
  font-weight: 500;
  border-bottom: 0;
  padding-bottom: 0;
}
body.game .deco-tag {
  font-family: var(--font-deco);
  color: var(--deco-cream);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .8rem;
  margin: 0;
}
body.game main { padding-top: 24px; }
body.game h2 {
  font-family: var(--font-deco);
  color: var(--deco-gold);
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 0;
  text-align: left;
}
body.game .icon-inline {
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto 16px;
}
body.game .hero {
  width: 100%;
  max-width: 1024px;
  height: auto;
  aspect-ratio: 1024 / 500;
  object-fit: contain;
  margin: 0 auto 22px;
  border: 1px solid var(--deco-line);
  background: var(--deco-band);
}
body.game .play-row { text-align: center; margin: 8px 0 24px; }
body.game .btn {
  background: var(--deco-band);
  color: var(--deco-gold);
  border: 2px solid var(--deco-line);
  font-family: var(--font-deco);
  letter-spacing: .14em;
}
body.game .btn:hover { background: var(--deco-ink); color: var(--deco-gold); }
body.game .placeholder { background: var(--deco-ink); color: var(--deco-line); }
body.game .note { color: var(--deco-line); }
body.game .play-offer--soon { color: var(--deco-line); }
body.game .play-legal { color: var(--deco-line); }
body.game .shot {
  background: var(--deco-ink);
  border-color: var(--deco-line);
  color: var(--deco-line);
}
body.game .shot-item figcaption { color: var(--deco-line); }
body.game .shots-note { text-align: center; }
body.game .gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 18px 0 8px;
}
body.game .gallery-item {
  margin: 0;
  min-width: 0;
}
body.game .gallery-item--wide { grid-column: 1 / -1; }
body.game .gallery a {
  display: block;
  min-width: 24px;
  min-height: 24px;
}
body.game .gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border: 1px solid var(--deco-line);
  background: var(--deco-band);
}
@media (min-width: 641px) {
  body.game .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  body.game .gallery { grid-template-columns: repeat(3, 1fr); }
}
body.game footer.site-footer {
  color: var(--deco-line);
  border-top: 1px solid var(--deco-line);
  font-family: var(--font-deco);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .7rem;
}
body.game footer.site-footer a { color: var(--deco-gold); }
body.game footer.site-footer a[aria-current="page"] {
  font-weight: 700;
  color: var(--deco-cream);
  text-decoration: underline;
  text-underline-offset: 4px;
}
body.game .howto-fig {
  margin: 16px 0 28px;
  max-width: 420px;
}
body.game .howto-fig--wide { max-width: 640px; }
body.game .howto-fig svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--deco-line);
  background: var(--deco-band);
}
body.game .howto-fig figcaption {
  font-family: var(--font-ui);
  font-size: .85rem;
  color: var(--deco-line);
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 640px) {
  header { padding: 22px 16px 12px; }
  .brand { font-size: 1.55rem; }
  .brand-logo { width: 168px; }
  .play-badge img { width: 200px; }
  .footer-logo { width: 88px; }
  nav.site-nav { gap: 8px 12px; flex-wrap: wrap; justify-content: center; padding: 10px 12px 12px; font-size: .85rem; }
  main { padding: 8px 16px 40px; }
  .game-row { flex-direction: column; }
  .game-row img { width: 72px; height: 72px; flex-basis: 72px; }
  body.game .studio-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 16px;
  }
  body.game .studio-bar nav.site-nav { flex-wrap: wrap; gap: 8px 12px; }
  body.game .deco-title { font-size: 1.45rem; letter-spacing: .14em; }
  .shot, .shot-item { width: calc(50% - 10px); }
  .shot-item .shot { width: 100%; }
  dl.facts div { flex-direction: column; gap: 2px; padding: 8px 0; }
  dl.facts dt { flex: none; }
  .press-asset--icon { width: 128px; }
  .placeholder { white-space: normal; }
}

/* iPad portrait (and similar tablets): let the four 9:16 frames share the row
   instead of sitting as 150px boxes with leftover space. Aspect stays 9:16. */
@media (min-width: 641px) and (max-width: 1023px) and (min-height: 901px) {
  body.game .shot {
    flex: 1 1 0;
    width: auto;
    max-width: 180px;
  }
}

/* iPad landscape and other short, wide viewports: pull the Play button fully
   onto the first screen, and keep the screenshot frames compact so the 9:16
   row is less dominant. */
@media (min-width: 900px) and (max-height: 900px) {
  body.game .deco-band { padding: 14px 16px 12px; }
  body.game .deco-title { font-size: 1.65rem; margin-bottom: 6px; }
  body.game .icon-inline { width: 56px; height: 56px; margin-bottom: 8px; }
  body.game main { padding-top: 14px; padding-bottom: 36px; }
  body.game .hero { margin-bottom: 14px; }
  body.game .play-row { margin: 4px 0 16px; }
  body.game .shot {
    flex: 0 0 auto;
    width: 130px;
  }
}

body.game .gallery-standin-note { color: var(--deco-line); }
body.game .lightbox-backdrop { background: rgba(1, 14, 10, 0.92); }
body.game .lightbox-image {
  border-color: var(--deco-line);
  background: var(--deco-band);
}
body.game .lightbox-caption { color: var(--deco-cream); }
body.game .lightbox-close,
body.game .lightbox-prev,
body.game .lightbox-next {
  border-color: var(--deco-line);
  background: var(--deco-ink);
  color: var(--deco-gold);
  font-family: var(--font-deco);
}
body.game .lightbox-close:hover,
body.game .lightbox-prev:hover,
body.game .lightbox-next:hover {
  background: var(--deco-band);
  color: var(--deco-cream);
}
body.game .lightbox-close:focus-visible,
body.game .lightbox-prev:focus-visible,
body.game .lightbox-next:focus-visible {
  outline-color: var(--deco-gold);
}

