/* Barbarossa's site: In Port + Chart (docs/lanes/site/spec_site.md), ported from the approved
   mockup (docs/lanes/site/mockups/landing.html). The key art opens the page, a centered title
   screen under it, then two of the game's framed panels (the chart, then its legend), the close,
   the studio's charter and the footer. One look by design: the game's UI theme
   (gameproject Assets/Resources/UI/Styles/Theme.uss). */

/* ---------- Fonts: Google Fonts' latin subsets, self-hosted (OFL 1.1, see fonts/*-OFL.txt) ---------- */
@font-face {
  font-family: "Acme";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/acme-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Merriweather comes as one variable file per style. */
@font-face {
  font-family: "Merriweather";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/merriweather.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Merriweather";
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url("/fonts/merriweather-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ink: #1B2722;
  --ink-deep: #101814;
  --panel: #21332C;
  --frame: #4E7C6A;
  --frame-dim: #2F4C41;
  --land: #35594A;
  --paper: #CCBDB8;
  --paper-dim: #AA9E9A;
  --brass: #E7A893;
  --brass-light: #F2C6B5;
  --gold: #E3B53C;
  /* Faction colors, as the chart's pennants and hulls wear them. */
  --crown: #C8322B;
  --merchant: #E8B92A;
  --title: "Acme", "Trebuchet MS", "Avenir Next Condensed", sans-serif;
  --text: "Merriweather", Georgia, "Times New Roman", serif;
  /* Each block of the page pads by this above and below, so any two sit twice it apart: one
     rhythm from the title screen to the footer. */
  --block-pad: clamp(40px, 6vw, 80px);
}
body {
  margin: 0;
  background: var(--ink); color: var(--paper);
  font-family: var(--text); font-weight: 300; font-size: 17px; line-height: 1.75;
}
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }

.wrap {
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.inner { max-width: 1200px; margin-inline: auto; padding-inline: clamp(0px, 3vw, 32px); }
/* The hidden sprite of marks the legend reuses. */
.sprite { position: absolute; }

/* ---------- The key art and the title screen ---------- */
.p-band { position: relative; display: block; margin: 0; }
.p-band img { display: block; width: 100%; height: auto; aspect-ratio: 2.677; max-height: 720px; object-fit: cover; object-position: 50% 58%; }
.p-band::after { content: ""; position: absolute; inset: auto 0 0 0; height: 42%; background: linear-gradient(to bottom, rgba(27, 39, 34, 0), var(--ink)); pointer-events: none; }
.p-hero { position: relative; z-index: 2; margin-top: clamp(-130px, -7.5vw, -34px); text-align: center; padding-block: 0 var(--block-pad); }
.p-title-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.6vw, 30px); }
/* The game's brass wordmark (aspect 3.2), lifted off the band as the text title was. The B's
   ascender fills its top, so the flourishes drop to the lowercase letters' middle. */
.p-title-row { --logo: clamp(270px, 46vw, 660px); }
.p-title { margin: 0; line-height: 0; }
.p-title img { display: block; width: var(--logo); height: auto; filter: drop-shadow(0 12px 32px rgba(16, 24, 20, 0.7)); }
.p-title-row .p-flourish { position: relative; top: calc(var(--logo) * 0.04); }
.p-flourish { width: clamp(44px, 11vw, 168px); height: 20px; color: var(--frame); flex: none; }
.p-flourish.r { transform: scaleX(-1); }
.p-sub { font-style: italic; font-size: clamp(17px, 1.5vw, 20px); color: var(--paper-dim); margin: 6px 0 0; }
.p-hook { max-width: 38ch; margin: 34px auto 0; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.7; color: var(--paper); text-wrap: balance; }
.p-actions { margin-top: 38px; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 22px; }
/* The row under the first: one row gap below it. */
.p-actions-more { margin-top: 18px; }

/* The "Set Sail" button: a double frame with brass-cut corner brackets. */
.p-btn {
  --cc: var(--frame);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 230px; padding: 15px 30px; font-family: var(--title); font-size: 22px; line-height: 1.2;
  color: var(--brass-light); text-decoration: none; background: var(--ink-deep);
  border: 1px solid var(--frame); box-shadow: inset 0 0 0 4px var(--ink-deep), inset 0 0 0 5px var(--frame-dim);
}
.p-btn:hover { background: var(--panel); box-shadow: inset 0 0 0 4px var(--panel), inset 0 0 0 5px var(--frame); color: #FFE3D8; }
.p-btn-quiet { color: var(--paper-dim); --cc: var(--frame-dim); border-color: var(--frame-dim); }
.p-corners::before {
  content: ""; position: absolute; inset: -5px; pointer-events: none;
  --l: 12px; --t: 2px;
  background:
    linear-gradient(var(--cc), var(--cc)) 0 0 / var(--l) var(--t),
    linear-gradient(var(--cc), var(--cc)) 0 0 / var(--t) var(--l),
    linear-gradient(var(--cc), var(--cc)) 100% 0 / var(--l) var(--t),
    linear-gradient(var(--cc), var(--cc)) 100% 0 / var(--t) var(--l),
    linear-gradient(var(--cc), var(--cc)) 0 100% / var(--l) var(--t),
    linear-gradient(var(--cc), var(--cc)) 0 100% / var(--t) var(--l),
    linear-gradient(var(--cc), var(--cc)) 100% 100% / var(--l) var(--t),
    linear-gradient(var(--cc), var(--cc)) 100% 100% / var(--t) var(--l);
  background-repeat: no-repeat;
}

/* ---------- Sections and the game's framed panel ---------- */
.p-section { padding-block: var(--block-pad); }
.p-heading {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 34px;
  font-family: var(--title); font-weight: 400; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; color: var(--paper); text-align: center;
}
.p-heading .p-flourish { width: clamp(36px, 8vw, 110px); }
.p-intro { max-width: 50ch; margin: -16px auto 34px; text-align: center; font-style: italic; font-size: 19px; line-height: 1.65; color: var(--paper-dim); text-wrap: balance; }
.p-panel {
  --cc: var(--brass);
  position: relative; background: var(--panel); border: 1px solid var(--frame);
  box-shadow: inset 0 0 0 5px var(--panel), inset 0 0 0 6px var(--frame-dim);
}

/* ---------- The chart ---------- */
.pc-map { position: relative; margin: 9px; aspect-ratio: 1.6; max-width: 100%; touch-action: pan-y; }
.pc-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
/* The waters chip and the hint share one inset from the chart's edge. */
.pc-waters {
  position: absolute; top: 14px; left: 14px; margin: 0; padding: 5px 12px; pointer-events: none;
  background: rgba(16, 24, 20, 0.88); border: 1px solid var(--frame-dim);
  font-size: 14px; line-height: 1.4; font-weight: 400; color: var(--paper);
}
.pc-hint { position: absolute; right: 14px; bottom: 14px; left: 14px; margin: 0; text-align: right; font-style: italic; font-size: 14px; line-height: 1.4; color: var(--paper-dim); pointer-events: none; }
.pc-hint .touch { display: none; }
@media (hover: none) { .pc-hint .mouse { display: none; } .pc-hint .touch { display: inline; } }

/* ---------- The legend: each pillar's mark, drawn on a swatch of the chart's sea ---------- */
.pc-legend { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 60px; padding: clamp(28px, 4vw, 54px); }
/* The well sits in its term (a <dl> group holds only <dt> and <dd>), set in the entry's left column. */
.pc-entry { --well: 76px; --well-gap: 24px; position: relative; min-height: var(--well); padding-left: calc(var(--well) + var(--well-gap)); }
.pc-well {
  position: absolute; top: 0; left: 0; width: var(--well); height: var(--well); display: grid; place-items: center;
  background: var(--ink); border: 1px solid var(--frame-dim); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px rgba(47, 76, 65, 0.55);
}
.pc-entry dt { font-family: var(--title); font-size: 26px; line-height: 1.2; color: var(--brass); text-wrap: balance; margin-top: 2px; }
.pc-entry dd { margin: 8px 0 0; }

/* The marks: the chart's own vocabulary, in its ink. Brass is always you: your ship, your contract, your flag. */
.mark { width: 62px; height: 62px; color: var(--paper-dim); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.mark .dots { stroke-width: 1.9; stroke-dasharray: 0.1 3.6; }
.mark .course { stroke-dasharray: 3.4 3; }
.mark .faint { stroke-opacity: 0.45; }
.mark .solid { fill: currentColor; stroke: none; }
.mark .you { stroke: var(--brass); }
.mark .you-fill { fill: var(--brass); stroke: none; }
.mark .crown-fill { fill: var(--crown); stroke: none; }
.mark .merchant-fill { fill: var(--merchant); stroke: none; }
.mark .land { fill: var(--land); }
.mark .water-ring { stroke: rgba(110, 160, 140, 0.55); stroke-width: 8; }
.mark .water-cut { stroke: var(--ink); stroke-width: 5.4; }
.mark .rumor { fill: currentColor; stroke: none; font: italic 400 12px var(--text); }
.mark .yard { stroke-width: 2; }
.mark .slot { stroke: var(--ink-deep); stroke-width: 1.6; stroke-dasharray: 0.1 2.3; }
/* The game's ink ship (ChartOverlayService.ShipGlyph): a hull in its owner's color, outlined in ink. */
.ship { stroke: var(--ink-deep); }
.ship.mine { fill: var(--brass); }
.ship.crown { fill: var(--crown); }
.ship.merchant { fill: var(--merchant); }

/* ---------- Close, charter, footer ---------- */
.p-close { text-align: center; padding-block: var(--block-pad); }
/* Centered as a column, so a button wider than a 320 px phone's column spills evenly into both
   gutters (as the title screen's do) instead of past the right edge. */
.p-close .inner { display: flex; flex-direction: column; align-items: center; }
.p-close-line { font-style: italic; font-size: clamp(23px, 2.8vw, 34px); line-height: 1.5; max-width: 30ch; margin: 0 auto 34px; color: var(--paper); text-wrap: balance; }
/* The footer band has no padding of its own above it, so the card keeps a whole gap below. */
.p-charter-wrap { padding-block: var(--block-pad) calc(2 * var(--block-pad)); }
.p-charter {
  max-width: 720px; margin: 0 auto; display: grid; gap: 18px;
  padding: clamp(24px, 4vw, 44px);
  background: var(--paper); color: var(--ink);
  border: 1px solid #A8968F; box-shadow: 0 0 0 6px var(--ink), 0 0 0 7px var(--frame-dim);
}
.p-charter h2 { margin: 0 0 10px; }
.p-charter h2 img { display: block; width: clamp(220px, 40vw, 320px); max-width: 100%; height: auto; }
.p-charter-sub { margin: 2px 0 0; font-style: italic; color: rgba(27, 39, 34, 0.66); }
.p-charter-body { border-top: 1px solid rgba(27, 39, 34, 0.26); padding-top: 18px; }
.p-charter-body p { margin: 0 0 12px; font-weight: 400; color: rgba(27, 39, 34, 0.88); }
.p-charter-body p:last-child { margin-bottom: 0; }
.p-charter a { color: var(--ink); }
.p-foot { background: var(--ink-deep); border-top: 1px solid var(--frame-dim); padding-block: 34px 40px; color: var(--paper-dim); font-size: 15px; }
/* Equal side columns keep the links on the page's center line, whatever the two ends' widths. */
.p-foot .inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 14px 24px; }
.p-foot .inner > span { white-space: nowrap; }
.p-copyright { justify-self: end; }
/* Privacy and Cookie settings sit under the links, on the same center line. */
.p-foot-legal { grid-column: 1 / -1; justify-self: center; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.p-mark { font-family: var(--title); font-size: 22px; color: var(--paper); }
.p-foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.p-foot a { color: var(--paper); }
.p-email { user-select: all; }
/* A button that reads as one of the footer's links. */
.p-link { padding: 0; border: 0; background: none; font: inherit; color: var(--paper); text-decoration: underline; cursor: pointer; }

/* ---------- The consent banner (src/client/consent-banner.ts): the game's framed panel, pinned
   to the window's corner. Decline and Allow are the same button. ---------- */
.p-consent {
  position: fixed; z-index: 10; box-sizing: border-box;
  left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: min(400px, calc(100vw - 32px)); padding: 20px 22px;
  font-size: 15px; line-height: 1.6;
  box-shadow: inset 0 0 0 5px var(--panel), inset 0 0 0 6px var(--frame-dim), 0 14px 34px rgba(16, 24, 20, 0.7);
}
.p-consent-body { margin: 0 0 16px; }
.p-consent a { color: var(--paper); }
.p-consent-actions { display: flex; gap: 12px; }
.p-consent .p-btn { flex: 1; min-width: 0; padding: 9px 14px; font-size: 18px; cursor: pointer; }

/* ---------- The privacy page: one column of text under a section heading ---------- */
.pv { padding-block: calc(2 * var(--block-pad)); }
.pv-text { max-width: 720px; margin-inline: auto; }
.pv-text h2 { margin: 44px 0 10px; font-family: var(--title); font-weight: 400; font-size: 26px; line-height: 1.2; color: var(--brass); }
.pv-text p, .pv-text ul, .pv-text ol { margin: 0 0 14px; }
.pv-text ul, .pv-text ol { padding-left: 22px; }
.pv-text li { margin-bottom: 8px; }
.pv-text a { color: var(--paper); }
.pv-text strong { font-weight: 700; }
.pv-text code { font-size: 15px; }
.pv-text .pv-updated { margin-block: 34px; font-style: italic; color: var(--paper-dim); }

/* ---------- The updates pages (src/updates.ts), in the privacy page's column: the list of posts,
   each with its day and kind beside it, and a post's own page ---------- */
.up-column { max-width: 720px; margin-inline: auto; }
.up-list { list-style: none; margin: 0 0 54px; padding: 0; border-bottom: 1px solid var(--frame-dim); }
.up-entry { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px 28px; padding-block: 26px; border-top: 1px solid var(--frame-dim); }
.up-when { display: flex; flex-direction: column; margin: 5px 0 0; font-size: 15px; line-height: 1.6; }
.up-when span { font-style: italic; color: var(--paper-dim); }
.up-entry h2 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 26px; line-height: 1.2; text-wrap: balance; }
.up-entry h2 a { color: var(--brass); text-decoration: none; }
.up-entry h2 a:hover { color: var(--brass-light); text-decoration: underline; }
.up-entry h2 + p { margin: 8px 0 0; }
.up-title { margin: 0; font-family: var(--title); font-weight: 400; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.15; text-align: center; text-wrap: balance; }
.pv-text .up-meta { margin: 14px 0 44px; text-align: center; font-style: italic; font-size: 19px; color: var(--paper-dim); }
.pv-text img { display: block; height: auto; margin-block: 24px; }
.up-close { margin-top: 54px; padding-top: 44px; border-top: 1px solid var(--frame-dim); text-align: center; }
.up-close .p-actions { margin: 0 0 30px; }
.up-close > a { color: var(--paper); }

/* ---------- The 404 page: the title screen's pieces, centered on the ground ---------- */
.nf { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center; padding-block: 48px; box-sizing: border-box; }
.nf .p-heading { margin: 0; font-size: clamp(36px, 5vw, 56px); }
.nf-line { margin: 18px 0 38px; font-style: italic; font-size: 19px; line-height: 1.65; color: var(--paper-dim); }

@media (max-width: 700px) { .p-band img { aspect-ratio: 1.317; } }
@media (max-width: 760px) {
  .pc-map { aspect-ratio: 1.05; }
  .pc-hint { text-align: left; font-size: 13px; }
  .pc-legend { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 26px 20px; }
  .pc-entry { --well: 60px; --well-gap: 16px; }
  .mark { width: 48px; height: 48px; }
  .up-entry { grid-template-columns: minmax(0, 1fr); }
  .up-when { flex-direction: row; gap: 12px; margin: 0; }
}
/* Below this the footer's two ends no longer fit equal columns beside the links, so it stacks. */
@media (max-width: 860px) {
  .p-foot .inner { grid-template-columns: minmax(0, 1fr); }
  .p-copyright, .p-foot-legal { justify-self: start; }
}
@media (max-width: 520px) {
  .p-flourish { display: none; }
  .p-title, .p-title img { width: 100%; }
}
