/* Hammerscale site: one stylesheet for the landing page, the legal pages and the 404 page.
   The palette, radii and type treatment are the game's own (src/ui/styles.css, the dark theme).
   No web fonts, no images from CSS, no inline styles anywhere: the Content-Security-Policy in
   site/_headers allows styles from this file only.

   CLASS NAMES FOR A NEW PAGE (privacy.html, terms.html)
   -----------------------------------------------------
   Copy the <head> links, the skip link, the header and the footer from index.html, then:

     <body>
       <a class="skip" href="#main">Skip to content</a>
       <header class="site-header"> ... </header>          as in index.html
       <main id="main">
         <article class="legal">
           <h1>Privacy Policy</h1>
           <p class="legal-updated">Last updated: <time datetime="2026-11-22">22 November 2026</time></p>
           <p class="legal-lead">Optional: one short summary paragraph, set a little larger.</p>
           <h2>...</h2>  <h3>...</h3>  <p>  <ul>  <ol>  <dl>  <a>  <strong>  <code>
           <div class="table-scroll" tabindex="0" role="region" aria-label="What the table is">
             <table> <thead><tr><th scope="col">...</th></tr></thead> <tbody>...</tbody> </table>
           </div>
           <p class="legal-note">Optional: a set-off note (a boxed aside).</p>
         </article>
       </main>
       <footer class="site-footer"> ... </footer>          as in index.html
     </body>

   .legal            the article: measure of about 70 characters (60ch), centred, its own vertical padding
   .legal-updated    the "last updated" line under the h1
   .legal-lead       a summary paragraph
   .legal-note       a boxed aside
   .table-scroll     wraps every table, so a wide table scrolls by itself on a phone
   .skip             the skip link (first element of the body)
   .site-header, .brand, .site-footer, .wrap    the shared header and footer
   aria-current="page" on a footer link marks the page you are on.

   Everything else in this file (.hero, .loop, .rarities, .systems, .shots, .contact, .lost)
   belongs to index.html and 404.html. */

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --bg-page: #0b0908;
  --bg: #14110f;
  --surface: #1e1916;
  --surface-2: #29211c;
  --line: #3d3129;
  --line-2: #4a3b31;
  --line-ember: #5a3a22;
  --line-ember-strong: #7a4a1c;
  --text: #f3e9de;
  --muted: #a8998a;
  --ember: #ff7a2f;
  --ember-hot: #ffb347;
  --ember-deep: #b63c0b;
  --ember-ink: #ffc98f;
  --spark: #ffe9b0;
  --well: #120e0c;
  --hair: rgba(255, 255, 255, 0.05);
  --gutter: 20px;
  --page: 1080px;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: var(--ember-ink);
  text-decoration: underline;
  text-decoration-color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--spark);
  text-decoration-color: var(--ember);
}

:focus-visible {
  outline: 2px solid var(--ember-hot);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--ember-deep);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ skip link */

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ember);
  color: #2a1203;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 10px;
  color: #2a1203;
}

/* ------------------------------------------------------------------ shared header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#221b17, var(--bg));
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand:hover {
  color: var(--ember-hot);
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-header .tag {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: right;
}

/* ------------------------------------------------------------------ shared footer */

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: var(--bg-page);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 18px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration-color: currentColor;
}

.site-footer a:hover {
  color: var(--ember-hot);
}

.site-footer a[aria-current='page'] {
  color: var(--ember-ink);
  text-decoration: none;
}

/* ------------------------------------------------------------------ landing: hero */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  /* The glow of the fire, as in assets/brand/background.svg, behind the picture. */
  background:
    radial-gradient(60% 70% at 72% 46%, rgba(255, 122, 47, 0.2), rgba(182, 60, 11, 0.07) 48%, rgba(20, 17, 15, 0) 76%),
    var(--bg);
}

.hero .wrap {
  display: grid;
  gap: 36px;
  padding-block: 40px 48px;
}

.eyebrow {
  color: var(--ember);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 14px;
  font-size: clamp(2.125rem, 1.2rem + 4.2vw, 3.75rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--ember-hot);
  text-shadow: 0 0 28px rgba(255, 122, 47, 0.35);
}

.hero .lede {
  margin-top: 18px;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.125rem;
}

/* The status: text, deliberately not a button. */
.status {
  display: flex;
  flex-wrap: wrap;
  margin-top: 26px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-ember);
  border-radius: var(--radius);
  background: linear-gradient(#3a2413, #251911);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status li {
  flex: 1 1 auto;
  /* Each cell draws its left and top line and is pulled over the frame by one pixel, so the
     separators stay right however the cells wrap. */
  margin: -1px 0 0 -1px;
  padding: 11px 16px;
  border-left: 1px solid var(--line-ember);
  border-top: 1px solid var(--line-ember);
  color: var(--ember-ink);
}

.status li:first-child::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
  animation: ember 2.6s ease-in-out infinite;
}

@keyframes ember {
  50% {
    opacity: 0.45;
  }
}

.hero-art {
  justify-self: center;
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--line-ember-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--well);
  box-shadow:
    0 0 0 6px rgba(0, 0, 0, 0.3),
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 90px rgba(255, 122, 47, 0.12);
}

.hero-art img {
  width: 100%;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    align-items: center;
    gap: 56px;
    padding-block: 72px 80px;
  }
}

/* ------------------------------------------------------------------ landing: sections */

.section {
  padding-top: 64px;
}

.section > .wrap > h2,
.contact h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section .kicker {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section .intro {
  margin-top: 12px;
  max-width: 40em;
  color: var(--muted);
}

/* The loop: four steps on one rail, the way a stage shows its waves. */
.loop {
  display: grid;
  gap: 0;
  margin-top: 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.loop li {
  position: relative;
  padding: 0 0 26px 52px;
  counter-increment: step;
}

.loop li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-ember-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(#3a2413, #251911);
  color: var(--ember-hot);
  font-size: 0.9375rem;
  font-weight: 800;
}

.loop li::after {
  content: '';
  position: absolute;
  left: 16px;
  top: 40px;
  bottom: 6px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(var(--line-ember-strong), var(--line));
}

.loop li:last-child {
  padding-bottom: 0;
}

.loop li:last-child::after {
  display: none;
}

.loop h3 {
  padding-top: 3px;
  font-size: 1.125rem;
  font-weight: 700;
}

.loop p {
  margin-top: 4px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .loop {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }

  .loop li {
    padding: 50px 0 0;
  }

  .loop li::after {
    left: 44px;
    right: -22px;
    top: 16px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--line-ember-strong), var(--line));
  }
}

/* The eight rarities, in the colours the game gives them (src/data/rarities.json). */
.rarities {
  margin-top: 36px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 60%), var(--surface);
}

.rarities p {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rarities ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.rarities li {
  padding: 9px 10px 9px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid currentColor;
  border-radius: var(--radius-sm);
  background: var(--well);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.r-common {
  color: #9ca3af;
}
.r-uncommon {
  color: #4ade80;
}
.r-rare {
  color: #60a5fa;
}
.r-epic {
  color: #c084fc;
}
.r-legendary {
  color: #fbbf24;
}
.r-mythic {
  color: #f87171;
}
.r-divine {
  color: #22d3ee;
}
.r-celestial {
  color: #f0abfc;
}

@media (min-width: 560px) {
  .rarities ol {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .rarities ol {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* The other systems: a ledger of name and description, not a row of cards. */
.systems {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.systems > div {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.systems dt {
  color: var(--ember-ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.systems dd {
  max-width: 44em;
}

@media (min-width: 760px) {
  .systems > div {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
  }
}

/* ------------------------------------------------------------------ landing: screenshots */

.shots {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  /* The strip runs to the edge of the window; its first picture lines up with the text. */
  padding: 6px max(var(--gutter), calc((100vw - var(--page)) / 2)) 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--page)) / 2));
  scrollbar-color: var(--line-2) transparent;
  list-style: none;
}

.shots li {
  flex: 0 0 auto;
  width: min(62vw, 250px);
  scroll-snap-align: start;
}

.shots img {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--well);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.shots figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* ------------------------------------------------------------------ landing: contact */

.contact {
  margin-top: 64px;
}

.contact .wrap > div {
  padding: 26px 22px;
  border: 1px solid var(--line-ember);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(255, 122, 47, 0.1), rgba(255, 122, 47, 0) 60%),
    var(--surface);
}

.contact p {
  margin-top: 8px;
  max-width: 40em;
  color: var(--muted);
}

.contact .mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-size: clamp(1rem, 0.85rem + 0.9vw, 1.375rem);
  font-weight: 700;
  overflow-wrap: anywhere;
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .contact .wrap > div {
    padding: 34px 36px;
  }
}

/* ------------------------------------------------------------------ 404 */

.lost {
  padding-block: 88px 40px;
  text-align: center;
}

.lost img {
  width: 96px;
  height: 96px;
  margin-inline: auto;
  filter: drop-shadow(0 0 30px rgba(255, 122, 47, 0.35));
}

.lost .eyebrow {
  margin-top: 26px;
}

.lost h1 {
  margin-top: 10px;
  font-size: clamp(1.75rem, 1.3rem + 2.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

.lost p {
  margin-top: 12px;
  color: var(--muted);
}

.lost .back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 14px;
  font-weight: 700;
}

/* ------------------------------------------------------------------ legal pages
   <article class="legal">: long-form text at a measure of about 70 characters. See the top of
   this file for the markup. Headings are plain h1, h2, h3; give an h2 an id to link to it. */

.legal {
  width: 100%;
  max-width: calc(60ch + 2 * var(--gutter));
  margin-inline: auto;
  padding: 48px var(--gutter) 0;
}

.legal h1 {
  font-size: clamp(1.875rem, 1.4rem + 2.2vw, 2.625rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.legal-updated {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-lead {
  margin-top: 24px;
  padding-left: 16px;
  border-left: 3px solid var(--ember);
  font-size: 1.125rem;
}

.legal h2 {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.25;
  scroll-margin-top: 16px;
}

.legal h3 {
  margin-top: 30px;
  color: var(--ember-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-top: 16px;
}

.legal p,
.legal ul,
.legal ol,
.legal dl,
.legal .table-scroll {
  margin-top: 16px;
}

.legal h2 + p,
.legal h3 + p {
  margin-top: 12px;
}

.legal ul,
.legal ol {
  padding-left: 1.4em;
}

.legal li + li {
  margin-top: 8px;
}

.legal li::marker {
  color: var(--ember);
}

.legal li > ul,
.legal li > ol {
  margin-top: 8px;
}

.legal dt {
  margin-top: 14px;
  font-weight: 700;
}

.legal dd {
  margin-top: 2px;
  color: var(--muted);
}

.legal strong {
  color: #fff;
  font-weight: 700;
}

.legal code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--well);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.legal-note {
  padding: 14px 16px;
  border: 1px solid var(--line-ember);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.legal table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.legal th,
.legal td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.legal tbody th {
  font-weight: 700;
}

.legal tbody tr:last-child > * {
  border-bottom: 0;
}

/* On a phone a two-column table of long text would need sideways scrolling to be read at all:
   stack each row instead, the row heading above its cell. The header row is hidden from sight
   only; the row headings (<th scope="row">) carry the meaning. */
@media (max-width: 600px) {
  .legal table {
    min-width: 0;
  }

  .legal thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .legal tbody,
  .legal tbody tr,
  .legal tbody th,
  .legal tbody td {
    display: block;
  }

  .legal tbody th {
    padding-bottom: 2px;
    border-bottom: 0;
    color: var(--ember-ink);
  }

  .legal tbody td {
    padding-top: 2px;
  }

  .legal tbody tr:last-child > th {
    border-bottom: 0;
  }
}

/* ------------------------------------------------------------------ small screens, motion, print */

@media (max-width: 420px) {
  :root {
    --gutter: 16px;
  }

  .site-header .tag {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .status li:first-child::before {
    animation: none;
  }
}

@media print {
  html,
  body,
  .site-header,
  .site-footer {
    background: #fff;
    color: #000;
  }

  .legal h3,
  .legal strong,
  .legal-updated,
  .legal dd,
  a {
    color: #000;
  }

  .skip,
  .site-footer ul {
    display: none;
  }
}
