/* Artie's Arcade
   Layout: a front porch, not a storefront. A wordmark over a ruled line, one
   invitation beside the porch picture, a shelf of games, then the family story. */

@font-face { font-family: "Fraunces"; font-weight: 700; font-display: swap; src: url("fonts/fraunces-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }

/* Afternoon */
:root {
  --paper: #FFF6E6;
  --paper-deep: #F3E8D5;
  --ink: #192C21;
  --ink-soft: #4B5B50;
  --heading: #721F24;      /* oxblood */
  --rule: #1D392E;         /* pine */
  --hair: #BDAF95;
  --button: #1D392E;
  --button-hover: #304F3E;
  --on-button: #FFF6E6;
  --footer: #1D392E;
  --on-footer: #FFF6E6;
  --focus: #BC7821;        /* brass */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* Dusk */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F2029;
    --paper-deep: #172C35;
    --ink: #F0E4C9;
    --ink-soft: #B5B19E;
    --heading: #DDA964;
    --rule: #57776A;
    --hair: #3B4F53;
    --button: #DDA964;
    --button-hover: #E8BD82;
    --on-button: #0F2029;
    --footer: #0A161C;
    --on-footer: #F0E4C9;
    --focus: #DDA964;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F2029;
  --paper-deep: #172C35;
  --ink: #F0E4C9;
  --ink-soft: #B5B19E;
  --heading: #DDA964;
  --rule: #57776A;
  --hair: #3B4F53;
  --button: #DDA964;
  --button-hover: #E8BD82;
  --on-button: #0F2029;
  --footer: #0A161C;
  --on-footer: #F0E4C9;
  --focus: #DDA964;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.03; text-wrap: balance; }
a { color: var(--heading); text-underline-offset: 0.16em; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap {
  max-width: 1280px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.skip { position: absolute; left: -999em; }
.skip:focus { left: 1rem; top: 1rem; z-index: 5; background: var(--paper); color: var(--ink); padding: 0.6rem 0.9rem; }

/* ---------- Header and footer bars ---------- */

.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.5rem; padding-block: 1.1rem; }
.bar a { color: inherit; text-decoration: none; }
.bar a:hover { text-decoration: underline; }
.bar ul { display: flex; flex-wrap: wrap; gap: 0.3rem clamp(1rem, 3vw, 2.6rem); }
.brand { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3.1vw, 2.75rem); letter-spacing: -0.045em; line-height: 1.05; }
.brand:hover { text-decoration: none; }

.site-head .bar { border-bottom: 2px solid var(--rule); }
.site-head nav { font-size: 1.1875rem; }

.site-foot { background: var(--footer); color: var(--on-footer); padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-foot .brand { font-size: 1.8rem; }
.site-foot .bar { padding-block: 1.4rem 0.6rem; }
.site-foot .fine { padding-bottom: 1.4rem; font-size: 0.9375rem; opacity: 0.8; }
.site-foot a:focus-visible { outline-color: var(--on-footer); }

/* ---------- Hero ---------- */

.hero { display: grid; align-items: center; gap: 0.5rem 0; padding-block: 1rem; border-bottom: 2px solid var(--rule); }
@media (min-width: 761px) { .hero { grid-template-columns: 46% 54%; } }
.intro { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.2rem 2rem 1.6rem 0; min-width: 0; }
.intro h1 { font-size: clamp(3rem, 5.1vw, 5.2rem); color: var(--heading); letter-spacing: -0.045em; }
.intro p { font-size: clamp(1.25rem, 1.9vw, 1.75rem); line-height: 1.3; }
.hero img { width: 100%; }
@media (max-width: 760px) {
  .intro { padding: 1rem 0 1.1rem; gap: 0.8rem; }
  .hero img { max-height: 20rem; object-fit: cover; }
}

.button {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.8rem 1.4rem;
  background: var(--button);
  color: var(--on-button);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}
.button:hover { background: var(--button-hover); }

/* ---------- Games shelf ---------- */

.games { padding-block: 1.6rem 3.5rem; scroll-margin-top: 1rem; }
h2 { font-size: clamp(2.3rem, 4.1vw, 4rem); color: var(--heading); letter-spacing: -0.04em; }
.shelf { display: grid; align-items: start; gap: 2.2rem 1.4rem; margin-top: 1.25rem; }
@media (min-width: 761px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shelf article { display: grid; gap: 0.55rem; min-width: 0; }
.shelf img { width: 100%; aspect-ratio: 1.72; object-fit: cover; margin-bottom: 0.45rem; }
.shelf h3 { font-size: 1.55rem; }
@media (min-width: 761px) { .shelf h3 { font-size: 1.4rem; } }
.status { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
details { border-top: 1px solid var(--hair); margin-top: 0.45rem; }
summary { cursor: pointer; padding-block: 0.8rem; color: var(--heading); font-weight: 700; }
summary:hover { text-decoration: underline; }
details > p { padding-bottom: 0.9rem; }
details .links { display: flex; flex-wrap: wrap; gap: 0.2rem 1.4rem; }

/* ---------- Story ---------- */

.story { display: grid; align-items: center; gap: 1.6rem min(6vw, 6rem); border-top: 2px solid var(--rule); padding-block: clamp(2rem, 5vw, 3.6rem); scroll-margin-top: 1rem; }
@media (min-width: 761px) { .story { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); } }
.story figure { justify-self: center; width: 100%; max-width: 26rem; }
@media (min-width: 761px) { .story figure { justify-self: start; } }
.story figure img { width: 100%; }
figcaption { font-style: italic; font-size: 1rem; margin-top: 0.5rem; color: var(--ink-soft); }
.story__text { display: grid; gap: 1rem; max-width: 38rem; min-width: 0; }
.story__text h2 { margin-bottom: 0.3rem; }
.signed { font-style: italic; color: var(--heading); }

/* ---------- Document pages: privacy, support ---------- */

.doc { padding-block: clamp(2rem, 5vw, 3.4rem) clamp(2.6rem, 6vw, 4.5rem); }
.doc article { display: grid; gap: 1rem; max-width: 40rem; }
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); color: var(--heading); letter-spacing: -0.04em; margin-bottom: 0.3rem; }
.doc h2 { font-size: 1.6rem; letter-spacing: -0.03em; color: var(--ink); margin-top: 1.1rem; }
.doc h3 { font-family: var(--font-body); font-size: 1.125rem; line-height: 1.35; letter-spacing: 0; margin-top: 0.4rem; }
.doc ul.plain { list-style: disc; padding-left: 1.3em; display: grid; gap: 0.35rem; }
.doc .meta { color: var(--ink-soft); font-size: 1rem; border-top: 1px solid var(--hair); padding-top: 1rem; margin-top: 0.8rem; }
.address { font-weight: 700; user-select: all; overflow-wrap: anywhere; }
