/* Pirate Map's city pages, in the fleet's look (fleet-kit LOOK.md, "The look: Departure").
   Every colour is a palette's, by name: Sunshine in the light, Midnight in the dark. The ground
   is the cloth; the words keep 4.5 to 1 on it at its brightest and darkest. Overpass is served
   from this box, as every file here is: the page asks for nothing from any other server. */

@font-face { font-family: "Overpass"; font-weight: 400; font-display: optional; src: url("/fonts/overpass-regular.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 600; font-display: optional; src: url("/fonts/overpass-semibold.woff2") format("woff2"); }
@font-face { font-family: "Overpass"; font-weight: 800; font-display: optional; src: url("/fonts/overpass-extrabold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  /* Sunshine */
  --ground: #F8F3E8;          /* FleetClothGround */
  --fibre: rgba(160, 140, 106, 0.071); /* FleetClothFibre, #12A08C6A */
  --current: rgba(95, 227, 234, 0.702); /* FleetClothCurrent, #B35FE3EA */
  --paper: #FBF8F2;           /* FleetPaper */
  --card: #FFFFFF;            /* FleetCard */
  --ink: #26221C;             /* FleetInk */
  --ink-soft: #5D564B;        /* FleetInkSoft */
  --line: #E5DDCE;            /* FleetLine */
  --water: #0E5F6A;           /* FleetWater */
  --water-wash: #E3EEF0;      /* FleetWaterWash */
  --gold: #B98B1F;            /* FleetGold */
  --tile: #26221C;            /* FleetTile */
  --on-tile: #FBF8F2;         /* FleetOnTile */
  --x: #B23A2C;               /* FleetMapX */
  --lift: rgba(38, 34, 28, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Midnight */
    --ground: #1D1913;
    --fibre: rgba(0, 0, 0, 0.502);      /* #80000000 */
    --current: rgba(95, 227, 234, 0.149); /* #265FE3EA */
    --paper: #16130E;
    --card: #211D16;
    --ink: #F3EDE1;
    --ink-soft: #B5AB98;
    --line: #3B3529;
    --water: #3EC4CE;
    --water-wash: #0E3A3F;
    --gold: #E5BB4F;
    --tile: #3B3529;
    --on-tile: #F3EDE1;
    --x: #F07A68;
    --lift: rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The cloth's ground, and its weave as it lies still: what a reader with no script sees. The
   cloth (cloth.js) lays its folds and their light over it once it has drawn its first frame. */
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--ground);
  background-image:
    repeating-linear-gradient(90deg, var(--fibre) 0 1.26px, transparent 1.26px 3px),
    repeating-linear-gradient(0deg, var(--fibre) 0 1.26px, transparent 1.26px 3px);
  font-family: "Overpass", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  font-variant-numeric: lining-nums tabular-nums;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}

canvas.cloth {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease-out;
}
canvas.cloth.on { opacity: 1; }

.bar, main, .foot, body > section { max-width: 44rem; margin-left: auto; margin-right: auto; }

.bar { display: flex; align-items: center; min-height: 48px; }
.mark {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 800; color: var(--ink); text-decoration: none;
}

a { color: var(--water); text-underline-offset: 0.15em; }

/* A figure stays whole on its line: "25 Nov 2026" and "34.8 MB" are never split, and nor is the
   company's name: "Kris Adams" never ends a line without its "TV". */
time, data, .company { white-space: nowrap; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.375rem; margin-top: 2.5rem; }
h3 { font-size: 1.125rem; margin-top: 1.25rem; font-weight: 600; }
p { margin: 0.5rem 0 0; }

.hero { padding-top: 0.25rem; }
.hero .lede { margin-top: 0.5rem; }
.honest, .stamp, .soft, figcaption, .foot { font-size: 15px; color: var(--ink-soft); }
.honest { margin-top: 0.625rem; }
.honest data, .honest time { color: var(--ink); font-weight: 600; }
.making {
  margin-top: 0.875rem;
  padding: 0.625rem 0.875rem;
  border-left: 3px solid var(--gold);
  background: var(--card);
  border-radius: 0 10px 10px 0;
  box-shadow: 0 1px 2px var(--lift);
}

/* Things arrive in order, in their seats: nothing moves, the words only warm on. */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: warm 420ms ease-out both; }
  .hero > :nth-child(2) { animation-delay: 90ms; }
  .hero > :nth-child(3) { animation-delay: 180ms; }
  .hero > :nth-child(4) { animation-delay: 270ms; }
}
@keyframes warm { from { opacity: 0; } to { opacity: 1; } }

figure { margin: 0.75rem 0 0; }

.treasure { display: block; width: 100%; height: auto; }
.treasure .box { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.treasure .line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: 0.9; }
.treasure .edge { fill: none; stroke: var(--ink-soft); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.treasure .xs { fill: none; stroke: var(--x); stroke-width: 1.8; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* The board: each figure in a fixed seat on its tile, the word beside it. */
.board {
  list-style: none; margin: 0.625rem 0 0; padding: 0;
  background: var(--card); border-radius: 14px; box-shadow: 0 1px 3px var(--lift);
}
.board li {
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 48px; padding: 0.375rem 0.75rem;
  border-top: 1px solid var(--line);
}
.board li:first-child { border-top: 0; }
.board data {
  flex: none; min-width: 4.25em; padding: 0.125rem 0.5rem; border-radius: 8px;
  background: var(--tile); color: var(--on-tile); font-weight: 800; text-align: right;
}

.places { list-style: none; margin: 0.625rem 0 0; padding: 0; }
.places li { padding: 0.5rem 0; border-top: 1px solid var(--line); }
.places .name { font-weight: 600; display: block; }
.places .where { display: block; font-size: 15px; color: var(--ink-soft); }
.places .hours { display: block; font-size: 15px; color: var(--ink-soft); overflow-wrap: anywhere; }

.cards { list-style: none; margin: 0.625rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.cards li { background: var(--card); border-radius: 14px; padding: 0.5rem 0.875rem 0.75rem; box-shadow: 0 1px 3px var(--lift); }
.card { display: inline-flex; align-items: center; min-height: 48px; font-size: 1.375rem; font-weight: 800; }

.strip {
  list-style: none; margin: 0.75rem calc(-1 * max(16px, env(safe-area-inset-left))) 0; padding: 0 16px 0.5rem;
  display: flex; gap: 0.875rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
}
.strip li { flex: none; width: min(56vw, 210px); scroll-snap-align: start; }
.strip figure { margin: 0; }
.strip img {
  display: block; width: 100%; height: auto; border-radius: 18px;
  background: var(--card); box-shadow: 0 2px 6px var(--lift);
}
.strip figcaption { margin-top: 0.375rem; }

.credits ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.credits li { margin-top: 0.375rem; }
.credits li { margin-top: 0.25rem; }
/* A link in running words keeps a touch target 48 points high without moving the lines round it. */
.credits a, .foot a { padding: 0.75rem 0; }
.foot a { display: inline-flex; align-items: center; min-height: 48px; padding: 0; }

.foot { margin-top: 2.5rem; padding: 1rem 0 2rem; border-top: 1px solid var(--line); }

@media (min-width: 760px) {
  h1 { font-size: 3rem; }
  .strip { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; }
  .strip li { width: 200px; }
}
