/* Shared stylesheet for the public pages (index.html, mods.html, changelog.html
   and the update pages under changes/). Published to
   the bucket root beside them by the release workflow; the pages link it as
   https://storage.googleapis.com/carnivores-ce/site.css. */

:root {
  --ground:   #12140F;
  --raised:   #1B1E17;
  --sunk:     #0C0E0A;
  --edge:     #2E3327;
  --bone:     #E8E6DE;
  --lichen:   #9A9C8E;
  --blaze:    #D4762A;
  --blaze-dim:#8A4E1C;

  --display: 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  /* Wordmark. Julius Sans One (SIL OFL) is the same face the game uses in
     place of Lithos Pro, so the site and the menu share an identity, and
     being freely licensed it needs no Adobe subscription or CDN. */
  --wordmark: 'Julius Sans One', 'Barlow Condensed', 'Helvetica Neue', Arial, sans-serif;
  --body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.5rem; }

/* Mono utility label: build stamps and specs. */
.stamp {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blaze);
}

h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }

a { color: var(--blaze); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(4rem, 12vh, 7rem) 0 clamp(3rem, 8vh, 4.5rem);
  border-bottom: 1px solid var(--edge);
  background-image:
    linear-gradient(180deg, rgba(18,20,15,.62) 0%, rgba(18,20,15,.86) 55%, var(--ground) 100%),
    url('https://storage.googleapis.com/carnivores-ce/screenshots/hero.jpg');
  background-size: cover;
  background-position: center 40%;
}

/* The wordmark is text, set in the face the game's menus use. Julius Sans One
   is a light, wide inscriptional face that draws lowercase as small caps, so
   it wants generous tracking. (The old logo image carried the former name and
   is not shown; a drawn Carnis wordmark can replace this when one exists.) */
.hero h1 {
  font-family: var(--wordmark);
  font-size: clamp(3rem, 11vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: .75rem;
  text-shadow: 0 2px 30px rgba(0,0,0,.9);
}

.hero .former {
  margin: 0 0 1.6rem;
  color: var(--lichen);
  text-shadow: 0 1px 14px rgba(0,0,0,.95);
}

.tagline {
  max-width: 36rem;
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  color: var(--bone);
  margin: 0 auto 2rem;
  text-shadow: 0 1px 14px rgba(0,0,0,.95);
}

.rule { height: 1px; background: var(--edge); border: 0; margin: 0 0 1.25rem; }

.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }

.btn {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .62rem 1.4rem;
  text-decoration: none;
  border: 1px solid var(--blaze-dim);
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.btn-primary { background: var(--blaze); color: var(--sunk); border-color: var(--blaze); }
.btn-primary:hover { background: #E88940; border-color: #E88940; }
.btn-ghost { background: rgba(12,14,10,.55); color: var(--bone); }
.btn-ghost:hover { border-color: var(--blaze); color: var(--blaze); }
.btn:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

/* ---------- Secondary pages: a slim bar instead of the hero ---------- */
.topbar {
  border-bottom: 1px solid var(--edge);
  padding: 1rem 0;
}
.topbar .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.topbar .mark {
  font-family: var(--wordmark);
  font-size: 1.5rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
}
.topbar .mark:hover { color: var(--blaze); }
.topbar nav a { color: var(--lichen); text-decoration: none; margin-left: 1.4rem; font-size: .95rem; }
.topbar nav a:hover { color: var(--blaze); }

/* padding-top only: the element is also a .wrap, and a padding shorthand here
   zeroed the wrap's side gutter, so the heading sat flush to the window edge. */
.page-head { padding-top: clamp(2.5rem, 7vh, 4rem); }
.page-head h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: .3rem 0 .6rem;
}
.page-head p { color: var(--lichen); margin: 0; max-width: 46rem; font-size: 1.05rem; }

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 8vh, 4.5rem) 0; border-top: 1px solid var(--edge); }
section:first-of-type { border-top: 0; }

.sec-head { margin-bottom: 2rem; }
.sec-head h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: .3rem 0 .35rem;
}
.sec-head p { color: var(--lichen); margin: 0; max-width: 46rem; }

.prose { color: var(--lichen); max-width: 46rem; }
.prose p { margin: 0 0 1rem; }
.prose strong { color: var(--bone); font-weight: 600; }

/* Terms of Use and Privacy Policy, generated from TERMS.md / PRIVACY.md by
   site/render_legal.py. Long-form reading, so the prose column and its lists
   carry the page. */
.legal h2 {
  color: var(--bone);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 2.4rem 0 .7rem;
}
.legal hr { border: 0; border-top: 1px solid var(--edge); margin: 2rem 0; }
.legal ul, .legal ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal li { margin: .35rem 0; }
.legal code { font-family: var(--mono); font-size: .88em; color: var(--bone); }
.legal p { overflow-wrap: anywhere; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem 2rem; }
.feature { border-top: 1px solid var(--edge); padding-top: .9rem; }
.feature h3 {
  font-size: 1.22rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: .4rem;
}
.feature ul { margin: 0; padding-left: 1.1rem; color: var(--lichen); font-size: .94rem; }
.feature li { margin: .15rem 0; }

/* ---------- Screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.1rem; }
.shot {
  margin: 0; overflow: hidden;
  border: 1px solid var(--edge); background: var(--sunk);
  min-height: 190px;
  /* Hatch shows through until a shot is added, so a missing image reads
     as intentional rather than broken. */
  background-image: repeating-linear-gradient(135deg,
    rgba(46,51,39,.32) 0 2px, transparent 2px 11px);
}
.shot.wide { grid-column: 1 / -1; min-height: 260px; }
.shot img { display: block; width: 100%; height: auto; color: transparent; }

/* ---------- Downloads ---------- */
.dls { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.dl { background: var(--raised); border: 1px solid var(--edge); padding: 1.3rem; }
.dl h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: .1rem; }
.dl .spec { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--lichen); margin: 0 0 1.1rem; }

ol.steps { padding-left: 1.3rem; margin: 0; max-width: 46rem; }
ol.steps li { margin-bottom: .5rem; color: var(--lichen); }
ol.steps strong { color: var(--bone); font-weight: 600; }

.callout {
  border-left: 3px solid var(--blaze);
  background: var(--sunk);
  padding: 1rem 1.2rem;
  margin-top: 1.75rem;
  color: var(--lichen);
  font-size: .93rem;
  max-width: 46rem;
}
.callout strong { color: var(--bone); }

code, .path {
  font-family: var(--mono);
  font-size: .86em;
  color: var(--bone);
  background: var(--sunk);
  border: 1px solid var(--edge);
  padding: .08em .4em;
}

/* ---------- Mod cards (mods.html) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.card { background: var(--raised); border: 1px solid var(--edge); padding: 1.3rem; display: flex; flex-direction: column; gap: .35rem; }
.card h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.card .by { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lichen); }
.card p { margin: .4rem 0 0; color: var(--lichen); font-size: .94rem; }

table.paths { border-collapse: collapse; max-width: 46rem; width: 100%; margin-top: 1rem; font-size: .94rem; }
table.paths th, table.paths td { text-align: left; padding: .45rem .6rem; border-top: 1px solid var(--edge); vertical-align: top; }
table.paths th { color: var(--bone); font-weight: 600; white-space: nowrap; }
table.paths td { color: var(--lichen); }

/* ---------- Changelog (changelog.html, changes/CL*.html) ---------- */
.cl-filter { max-width: 32rem; margin-bottom: 1.6rem; }
.cl-filter label { display: block; color: var(--lichen); font-size: .9rem; margin-bottom: .4rem; }
.cl-filter-row { display: flex; gap: .5rem; }
.cl-filter input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: .95rem;
  color: var(--bone); background: var(--sunk);
  border: 1px solid var(--edge); padding: .55rem .7rem;
}
.cl-filter input:focus { outline: none; border-color: var(--blaze); }
.cl-filter .btn { padding: .45rem 1.1rem; cursor: pointer; }
.cl-note { color: var(--lichen); font-size: .9rem; margin: .5rem 0 0; min-height: 1.2em; }

/* Four short columns, but a long title must not push the page sideways on a
   phone: the table scrolls inside its own box instead. */
.cl-scroll { overflow-x: auto; }
table.cl-list { border-collapse: collapse; width: 100%; font-size: .94rem; }
table.cl-list th, table.cl-list td { text-align: left; padding: .55rem .7rem; border-top: 1px solid var(--edge); vertical-align: top; }
table.cl-list thead th {
  border-top: 0; border-bottom: 1px solid var(--edge);
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--lichen);
  white-space: nowrap;
}
table.cl-list td { color: var(--lichen); }
table.cl-list td:nth-child(-n+2) { font-family: var(--mono); font-size: .88rem; white-space: nowrap; }
table.cl-list td:nth-child(4) { min-width: 14rem; }
table.cl-list td a { color: var(--bone); text-decoration: none; }
table.cl-list td a:hover { color: var(--blaze); text-decoration: underline; }
table.cl-list tbody tr:hover td { background: var(--raised); }

.crumbs { padding-top: 1.4rem; font-size: .92rem; color: var(--lichen); }
.crumbs a { color: var(--lichen); text-decoration: none; }
.crumbs a:hover { color: var(--blaze); }
.crumbs span[aria-hidden] { margin: 0 .45rem; color: var(--edge); }
.crumbs [aria-current] { color: var(--bone); font-family: var(--mono); font-size: .88rem; }

.cl-page { padding-top: 2rem; padding-bottom: 4rem; }
table.cl-meta { border-collapse: collapse; width: 100%; max-width: 46rem; background: var(--raised); border: 1px solid var(--edge); }
table.cl-meta th, table.cl-meta td { text-align: left; padding: .6rem .9rem; border-top: 1px solid var(--edge); vertical-align: baseline; }
table.cl-meta tr:first-child th, table.cl-meta tr:first-child td { border-top: 0; }
table.cl-meta th {
  width: 11rem; white-space: nowrap;
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--lichen);
}
table.cl-meta td { color: var(--bone); }
.cl-desc { margin-top: 2.4rem; }
.cl-desc h2 {
  color: var(--bone); font-size: 1.45rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .8rem;
}
/* A release's page (changes/_release_template.html): the summary, then every
   entry that was queued for it, one list per kind. */
.cl-desc h2:not(:first-child) { margin-top: 2.4rem; }
.cl-summary { color: var(--bone); }
.cl-entries { margin: 0; padding-left: 1.2rem; }
.cl-entries > li { margin-bottom: 1.1rem; }
.cl-entries li p { margin: 0 0 .5rem; }
.cl-entries ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.cl-desc code { font-family: "IBM Plex Mono", monospace; font-size: .88em; color: var(--bone); }
.cl-desc pre { overflow-x: auto; background: var(--raised); border: 1px solid var(--edge); padding: .7rem .9rem; }
.cl-desc figure { margin: 1.4rem 0; }
.cl-desc img { display: block; max-width: 100%; height: auto; border: 1px solid var(--edge); }
.cl-desc figcaption { font-size: .86rem; margin-top: .4rem; }
@media (max-width: 480px) { table.cl-meta th { width: auto; } }

/* ---------- Support ---------- */
/* QR plus the same link as text: the QR is for a phone pointed at a desktop
   screen, the button for everyone already on the device they would pay from. */
.support {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
  background: var(--raised); border: 1px solid var(--edge); padding: 1.5rem;
  max-width: 46rem;
}
.support .qr {
  display: block; flex: 0 0 auto; width: 150px; height: 150px;
  /* The QR ships on a transparent background; it needs a light pad to scan
     against the dark page, and the pad doubles as the tap target. */
  background: #fff; border-radius: 10px; padding: 6px;
}
.support .qr img { display: block; width: 100%; height: 100%; }
.support .qr:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
.support-text { flex: 1 1 260px; color: var(--lichen); font-size: .94rem; }
.support-text p { margin: 0 0 1rem; }
.support-text strong { color: var(--bone); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--edge); padding: 2.2rem 0 3rem; color: var(--lichen); font-size: .86rem; }
footer a { color: var(--blaze); }
footer p { margin: .3rem 0; }
footer .disclaimer { max-width: 56rem; margin: 0 0 1.4rem; font-size: .84rem; line-height: 1.6; }

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