/* Enthusiastic Amateur -- site styles.
   Colours come from One More Adventure's own UI (docs/ui_patterns.md in the
   game repo): black panels, a 1px light frame, square corners everywhere. */

@font-face {
  font-family: "1776 Independence";
  src: url("/fonts/1776IndependenceNormal.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "1776 Independence";
  src: url("/fonts/1776IndependenceBold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "1776 Independence";
  src: url("/fonts/1776IndependenceItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #000000;
  --panel: rgba(0, 0, 0, 0.86);       /* PANEL_BG (0,0,0,220) */
  --frame: #dcdcdc;                   /* PANEL_BORDER (220,220,220) */
  --outline: #505050;                 /* ROW_OUTLINE (80,80,80) */
  --selected-bg: #3c3c3c;             /* ROW_SELECTED_BG (60,60,60) */
  --text: #dcdcdc;                    /* body text (220,220,220) */
  --head: #ffffff;                    /* titles (255,255,255) */
  --hint: #c8c8c8;                    /* hints (200,200,200) */
  --rule: #969696;                    /* separator lines (150,150,150) */
  --active: #ffff00;                  /* selected / active (255,255,0) */
  --gold: #ffd700;                    /* currency gold (255,215,0) */
  --hover: #ffe678;                   /* Yes/No hover border (255,230,120) */
  --focus: #c8a532;                   /* party panel focus gold (200,165,50) */
  --go: #1e6428;                      /* green action rows (30,100,40) */
  --go-hover: #287828;                /* Follow: ON (40,120,40) */
  --code-bg: #141419;                 /* (20,20,25) */

  --gutter: 16px;
  --measure: 960px;
  --font: "1776 Independence", "IM Fell English", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, Consolas, "Cascadia Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;        /* square corners, like the game */
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  /* 1776 draws a small body for its nominal size, so read a step larger. */
  font-size: 1.58rem;
  line-height: 1.5;
  overflow-x: hidden;
  /* The game draws 1776 without its decorative ct / st joins. */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "hlig" 0, "clig" 0;
}

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

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--active);
}
a:focus-visible,
.btn:focus-visible,
video:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  color: var(--head);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: 2.93rem; }
h2 { font-size: 2.23rem; }
h3 { font-size: 1.78rem; }

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- header / footer -------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--frame);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.wordmark {
  color: var(--head);
  font-size: 1.93rem;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--active); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--active);
}

.site-footer {
  border-top: 1px solid var(--frame);
  margin-top: 56px;
  padding: 24px 0 32px;
  color: var(--hint);
  font-size: 1.38rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

/* ---- panels, buttons -------------------------------------------------- */

main.wrap { padding-top: 32px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--frame);
  padding: 20px 24px;
  margin: 0 0 24px;
}
.panel > :last-child { margin-bottom: 0; }

section { margin: 0 0 40px; }

/* Section titles in the game's decoration style: "-- Features --". */
.deco::before { content: "-- "; color: var(--hint); }
.deco::after  { content: " --"; color: var(--hint); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 20px;
}
.btn {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--outline);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 1.58rem;
  line-height: 1.3;
}
.btn:hover {
  border-color: var(--hover);
  color: var(--active);
}
.btn-go {
  background: var(--go);
  border-color: var(--frame);
  color: var(--head);
}
.btn-go:hover {
  background: var(--go-hover);
  color: var(--head);
}

.lead {
  font-size: 1.78rem;
  color: var(--head);
}
.hint { color: var(--hint); }

/* ---- the home page ---------------------------------------------------- */

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--frame);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.game-card:hover { border-color: var(--hover); }
.game-card:hover h3 { color: var(--active); }
.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-right: 1px solid var(--frame);
}
.game-card .body { padding: 20px 24px; }
.game-card .meta { color: var(--hint); margin: 0; }

/* ---- the game page ---------------------------------------------------- */

.hero {
  position: relative;
  border-bottom: 1px solid var(--frame);
  background: var(--bg);
}
.hero .banner { width: 100%; }
.hero .logo {
  position: absolute;
  left: 4%;
  top: 7%;
  width: 34%;
  filter: drop-shadow(0 0 6px #000) drop-shadow(0 0 2px #000);
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 20px;
  margin: 0;
}
.facts dt { color: var(--hint); }
.facts dd { margin: 0; }

.trailer {
  border: 1px solid var(--frame);
  background: var(--bg);
  width: 100%;
}

.features {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding-left: 1.2em;
}
.features li { break-inside: avoid; margin: 0 0 4px; }

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.shots a {
  display: block;
  border: 1px solid var(--outline);
}
.shots a:hover { border-color: var(--hover); }
.shots img { width: 100%; }
.shots a:first-child { grid-column: 1 / -1; }   /* 7 shots: one wide, then pairs */

.quote {
  border-left: 1px solid var(--frame);
  margin: 0;
  padding: 4px 0 4px 20px;
  font-style: italic;
  font-size: 1.2em;   /* the italic face draws smaller than the regular */
}

.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.links-list li {
  border-top: 1px solid var(--outline);
  padding: 12px 0;
}
.links-list li:last-child { border-bottom: 1px solid var(--outline); }
.links-list .hint { display: block; font-size: 1.38rem; }

/* ---- long documents (modding guide, privacy policy) ------------------- */

.doc h2 {
  margin-top: 40px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.doc h2 .num { color: var(--hint); }
.doc ul,
.doc ol { padding-left: 1.4em; margin: 0 0 1em; }
.doc li { margin: 0 0 6px; }
.doc dl { margin: 0 0 1em; }
.doc dt { color: var(--head); }
.doc dd { margin: 0 0 10px 1.4em; }
.doc .back-top { font-size: 1.38rem; }

code,
pre {
  font-family: var(--mono);
  font-size: 0.8em;
}
code {
  background: var(--code-bg);
  border: 1px solid var(--outline);
  padding: 0 4px;
  white-space: nowrap;
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--outline);
  padding: 12px 16px;
  margin: 0 0 1em;
  overflow-x: auto;
  line-height: 1.45;
  color: var(--text);
}

.doc .toc h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding-left: 1.6em;
}
.toc li { break-inside: avoid; }

/* ---- phone widths ----------------------------------------------------- */

@media (max-width: 700px) {
  body { font-size: 1.48rem; }
  h1 { font-size: 2.43rem; }
  h2 { font-size: 1.93rem; }
  .panel { padding: 16px; }

  .game-card { grid-template-columns: minmax(0, 1fr); }
  .game-card img {
    border-right: 0;
    border-bottom: 1px solid var(--frame);
  }

  /* The logo leaves the banner and sits under it, full size. */
  .hero .logo {
    position: static;
    width: 80%;
    margin: 16px auto;
    filter: none;
  }

  .features,
  .toc ol { columns: 1; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  code { white-space: normal; word-break: break-all; }
}
