/* The website's pages around the game (site/, laid out by tools/build_site.py). They wear the game's own clothes:
   the loading screen's teal-black, the title's cream and orange, the cream panel paper, steel buttons and the dark
   title plates. One look, dark, on purpose. */

@font-face {
  font-family: "Open Sans";
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/OpenSans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/BarlowCondensed-Bold-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --night: #0b1416;        /* the loading screen's teal-black */
  --night-2: #12201f;
  --night-3: #1b2b2a;
  --line: #2b3d3b;
  --cream: #fff7e0;        /* the title's cream */
  --paper: #fffff7;        /* the game's panel paper */
  --paper-2: #f6f3e2;
  --ink: #1a1a1a;
  --ink-2: #4a4f4a;
  --orange: #ff9e26;       /* TYCOON */
  --amber: #f2a83d;        /* the progress bar */
  --rust: #8c4d1a;         /* Col's tip label */
  --steel: #66809f;
  --steel-hi: #b3c9e6;
  --steel-lo: #2e3a51;
  --plate: #1f2b44;        /* a window's title plate */
  --plate-text: #ffd774;
  --done: #4fae6a;
  --next: #ff9e26;
  --later: #8aa0ad;
  --text: #dfe6e2;
  --muted: #a9b8b4;
  --sans: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", "Open Sans", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--cream); font: 400 16px/1.6 var(--sans); }
img { max-width: 100%; }
a { color: var(--orange); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.15; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 32px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* header */
header.site { position: sticky; top: 0; z-index: 10; background: rgba(11, 20, 22, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 12px 20px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); font: 800 17px/1 var(--sans); letter-spacing: 0.01em; }
.brand img { width: 32px; height: 32px; flex: none; }
.brand b { color: var(--orange); }
nav.pages { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
nav.pages a { color: var(--muted); text-decoration: none; font: 600 15px/1 var(--sans); padding: 9px 12px; border-radius: 3px; }
nav.pages a:hover { color: var(--cream); background: var(--night-3); }
nav.pages a[aria-current="page"] { color: var(--cream); box-shadow: inset 0 -3px 0 var(--orange); }
@media (max-width: 620px) {
  header.site .play { display: none; }
  nav.pages { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  nav.pages a { white-space: nowrap; padding-inline: 10px; }
}

/* the game's chunky steel button, in orange for Play */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; font: 700 16px/1 var(--sans); padding: 12px 18px; color: var(--cream);
  background: var(--steel); border: 2px solid #0f141f; box-shadow: inset 2px 2px 0 var(--steel-hi), inset -2px -2px 0 var(--steel-lo); }
.btn:active { box-shadow: inset 2px 2px 0 var(--steel-lo), inset -2px -2px 0 var(--steel-hi); }
.btn.play { background: #e8861a; color: #1b1205; box-shadow: inset 2px 2px 0 #ffc77a, inset -2px -2px 0 #8f4c0a; font-size: 17px; }
.btn.play:hover { background: #f2942a; }
.btn.play:active { box-shadow: inset 2px 2px 0 #8f4c0a, inset -2px -2px 0 #ffc77a; }
.btn.small { padding: 9px 14px; font-size: 15px; }

/* home: the hero is the loading screen's own picture */
.hero { position: relative; background: #2a3a2c url("/img/hero.webp") 62% center / cover no-repeat; border-bottom: 3px solid #000; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 20, 22, 0.94) 0%, rgba(11, 20, 22, 0.78) 42%, rgba(11, 20, 22, 0) 72%); }
@media (max-width: 700px) { .hero::before { background: linear-gradient(180deg, rgba(11, 20, 22, 0.55) 0%, rgba(11, 20, 22, 0.85) 60%, rgba(11, 20, 22, 0.95) 100%); } }
.hero .wrap { position: relative; padding-block: 56px 48px; display: grid; gap: 22px; }
.hero h1 { font: 800 clamp(44px, 8vw, 84px)/0.95 var(--sans); letter-spacing: -0.01em; text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55); }
.hero h1 span { display: block; }
.hero h1 span + span { color: var(--orange); }
.hero .tag { font: 600 clamp(17px, 2.2vw, 21px)/1.4 var(--sans); max-width: 30ch; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.hero .meta { color: var(--text); font-size: 14px; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8); }
.tip { display: flex; gap: 14px; align-items: center; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 12px 16px; max-width: 470px; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35); }
.tip svg { width: 58px; height: 58px; flex: none; }
.tip small { display: block; font: 700 12px/1.2 var(--sans); color: var(--rust); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 3px; }
.tip p { font: 600 15px/1.4 var(--sans); }

/* sections */
.band { padding-block: 64px; }
.band.alt { background: var(--night-2); border-block: 1px solid var(--line); }
.eyebrow { font: 700 15px/1 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 10px; }
.band h2:not(.plate) { font: 800 clamp(28px, 4vw, 40px)/1.1 var(--sans); margin-bottom: 14px; }
.lede { color: var(--text); max-width: 62ch; font-size: 17px; }
.lede + .lede { margin-top: 14px; }

.pitch { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .pitch { grid-template-columns: 1.15fr 0.85fr; gap: 48px; } }
.docket { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4); }
.plate { margin: 0; background: var(--plate); color: var(--plate-text); font: 700 18px/1 var(--label); letter-spacing: 0.1em; text-transform: uppercase; padding: 11px 14px; border-bottom: 3px solid var(--ink); }
.docket table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.docket td { padding: 8px 14px; border-bottom: 1px dashed #c9c4b0; vertical-align: top; color: var(--ink); }
.docket td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.docket tr:last-child td { border-bottom: 0; }
.docket .foot { font-size: 13px; color: var(--ink-2); padding: 8px 14px 12px; border-top: 2px solid var(--ink); }

/* the levels: a real sequence, so the numbers mean something */
.ladder { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 28px; }
.rung { background: var(--night-3); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.rung img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.rung .body { padding: 16px 18px 20px; display: grid; gap: 8px; }
.rung .lvl { font: 700 14px/1 var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.rung h3 { font: 800 22px/1.15 var(--sans); }
.rung p { color: #d3dcd8; font-size: 15px; }
.rung .goal { font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.later-rungs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.later-rungs span { border: 1px dashed var(--later); color: var(--later); font: 600 14px/1 var(--sans); padding: 9px 12px; }

/* features: picture and words, alternating sides */
.feats { display: grid; gap: 44px; margin-top: 32px; }
.feat { display: grid; gap: 20px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .feat { grid-template-columns: 1.25fr 1fr; gap: 36px; } .feat:nth-child(even) .shot { order: 2; } }
.shot { margin: 0; border: 3px solid #000; box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45); background: #000; max-width: 100%; }
.shot img { display: block; width: 100%; height: auto; }
.feat h3 { font: 800 26px/1.15 var(--sans); margin-bottom: 10px; }
.feat p { color: #d8e0dc; max-width: 52ch; }

.two { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .two { grid-template-columns: 1fr 1fr; } }
.list-card { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); min-width: 0; }
.list-card ul { list-style: none; margin: 0; padding: 6px 0; }
.list-card li { padding: 10px 16px; display: grid; grid-template-columns: 20px 1fr; gap: 4px 8px; border-bottom: 1px dashed #d4cfbb; }
.list-card li:last-child { border-bottom: 0; }
.list-card .mk { font-weight: 800; }
.list-card .mk.done { color: #2f7d45; }
.list-card .mk.next { color: #c56a00; }
.list-card .nm { font-weight: 700; }
.list-card .tx { grid-column: 2; font-size: 14px; color: var(--ink-2); }
.list-card .more { display: block; padding: 10px 16px 14px; font-weight: 700; color: #a3541a; }

.closer { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between; }
.closer h2 { margin: 0; }

/* inner pages */
.page-head { padding-block: 48px 28px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--night-2), var(--night)); }
.page-head h1 { font: 800 clamp(34px, 5vw, 52px)/1.05 var(--sans); margin-bottom: 12px; }
.page-head h1 b { color: var(--orange); }
.page-head p { color: #d8e0dc; max-width: 62ch; font-size: 17px; }

/* how to play */
.guide { display: grid; gap: 40px; grid-template-columns: 1fr; padding-block: 40px 64px; }
@media (min-width: 900px) { .guide { grid-template-columns: 220px 1fr; } }
.toc { position: sticky; top: 80px; align-self: start; display: grid; gap: 2px; }
.toc a { color: var(--muted); text-decoration: none; font: 600 14.5px/1.3 var(--sans); padding: 7px 10px; border-left: 3px solid var(--line); }
.toc a:hover { color: var(--cream); border-left-color: var(--orange); }
@media (max-width: 899px) { .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; } .toc a { border: 1px solid var(--line); } }
.prose { max-width: 68ch; display: grid; gap: 16px; min-width: 0; }
.prose h2 { font: 800 28px/1.15 var(--sans); margin-top: 24px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #e2e8e4; }
.prose ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose kbd { font: 700 13px/1 var(--sans); background: var(--night-3); border: 1px solid var(--line); border-bottom-width: 3px; padding: 3px 7px; border-radius: 3px; }
.prose .tablewrap { overflow-x: auto; border: 1px solid var(--line); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 520px; }
.prose th { text-align: left; font: 700 14px/1.2 var(--label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); background: var(--night-3); padding: 10px 12px; }
.prose td { padding: 9px 12px; border-top: 1px solid var(--line); color: var(--text); }
.prose figure { margin: 8px 0; }
.prose figcaption { font-size: 13.5px; color: var(--muted); padding: 8px 2px 0; background: var(--night); }

/* roadmap */
.rm-jump { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 28px 0; }
.rm-jump a { font: 700 15px/1 var(--sans); padding: 10px 14px; color: var(--cream); background: var(--night-3); border: 2px solid var(--line); text-decoration: none; }
.rm-jump a:hover { border-color: var(--steel); }
.rm-jump .n { color: var(--muted); font-weight: 600; margin-left: 4px; }
.rm-section { padding-block: 32px 8px; scroll-margin-top: 70px; }
.rm-section h2 { font: 800 28px/1.15 var(--sans); margin-bottom: 16px; display: flex; gap: 10px; align-items: baseline; }
.rm-section h2 .n { font: 600 16px/1 var(--sans); color: var(--muted); }
.rm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.rm-item { align-content: start; padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 22px 1fr; gap: 4px 10px; min-width: 0; }
.rm-item .mk { font-weight: 800; font-size: 17px; line-height: 1.3; }
.rm-item h3 { font: 700 17px/1.3 var(--sans); }
.rm-item p { grid-column: 2; font-size: 14.5px; color: #c9d3cf; }
.rm-done .mk, .rm-done h3 { color: var(--done); }
.rm-next .mk, .rm-next h3 { color: var(--next); }
.rm-later .mk, .rm-later h3 { color: var(--later); }
.rm-foot { color: var(--muted); font-size: 14.5px; padding-block: 24px 64px; }

/* high scores */
.boards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); padding-block: 36px 24px; align-items: start; }
.board { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4); min-width: 0; }
.board h2 { font-size: 19px; }
.board .rule { font-size: 13px; color: var(--ink-2); padding: 8px 14px 4px; }
.board ol { list-style: none; margin: 0; padding: 4px 0 10px; font-variant-numeric: tabular-nums; }
.board ol:empty { display: none; }
.board li { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; padding: 6px 14px; font-weight: 600; font-size: 15px; }
.board li:nth-child(odd) { background: var(--paper-2); }
.board li .rk { color: var(--ink-2); }
.board li:first-child .rk { color: #b07a00; }
.board li .shop { overflow-wrap: anywhere; }
.board li .v { font-weight: 700; }
.board .empty { padding: 10px 14px 16px; color: var(--ink-2); font-size: 14.5px; }
.scores-note { color: var(--muted); font-size: 14.5px; padding-bottom: 64px; max-width: 70ch; display: grid; gap: 8px; }

/* footer */
footer.site { border-top: 1px solid var(--line); background: #070d0e; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-block: 28px; align-items: center; }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer.site a { color: var(--muted); }
footer.site .build { margin-left: auto; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .tag, .hero .cta, .tip { animation: rise 0.6s ease-out both; }
  .hero .tag { animation-delay: 0.08s; }
  .hero .cta { animation-delay: 0.16s; }
  .tip { animation-delay: 0.3s; }
  @keyframes rise { from { transform: translateY(10px); opacity: 0.001; } to { transform: none; opacity: 1; } }
}
