/* The game's palette (game/theme/palette.gd), its two typefaces, its plaques, plates and paper. */
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/BarlowCondensed-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url(/fonts/SourceSans3.ttf) format("truetype"); font-weight: 200 900; font-display: swap; }

:root {
  --bg: #0a0f14; --panel: #141a20; --panel-alt: #1b232b; --line: #33414d;
  --text: #d7e2ea; --muted: #8fa3b3; --faint: #61717f;
  --accent: #ffb454; --screen: #6fd3ff; --good: #6fbf73; --warn: #e0a33f; --bad: #e0574a; --rust: #8a5a3a;
  --ink: #2a241d; --head: 64px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.125rem/1.55 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; margin: 0; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
p { margin: 0 0 1em; }
.shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.narrowish { width: min(960px, calc(100% - 40px)); }
.narrow { width: min(760px, calc(100% - 40px)); }
.kicker { font: 700 1.05rem/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .55em; }
.lede { font-size: 1.3rem; color: var(--muted); max-width: 44em; margin-top: .8em; }
.dim { color: var(--muted); }
.small { font-size: .95rem; margin: .3em 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: var(--accent); color: #000; padding: 6px 12px; }
:focus-visible { outline: 2px solid var(--screen); outline-offset: 2px; }

/* The plaques and plates */
.plaque { display: inline-block; border-style: solid; border-width: 19px 25px; border-image: url(/assets/media/ui/plaque.webp?v=494535b75e) 52 62 fill / 19px 25px / 0 stretch; color: var(--text); font: 700 1.25rem/1.15 var(--display); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap; text-align: center; min-width: 170px; }
a.plaque:hover, a.plaque:focus-visible { border-image-source: url(/assets/media/ui/plaque-hover.webp?v=5d7c84f70b); color: var(--accent); }
.plaque.off { color: var(--faint); filter: saturate(.3) brightness(.75); }
.plate { border: 18px solid transparent; border-image: url(/assets/media/ui/panel.webp?v=f131420915) 36 fill / 18px; }

/* The header */
.site-head { height: 64px; background: #0d1319; border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.head-row { display: flex; align-items: center; gap: 22px; height: 100%; }
.brand-logo { height: 46px; width: auto; }
.brand { margin-right: auto; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--muted); font: 700 1.2rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.switch, .menu-toggle { background: var(--panel); color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 6px 12px; font: 700 1.02rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.switch b { color: var(--faint); }
.switch[aria-pressed="true"] b { color: var(--accent); }
.menu-toggle { display: none; }

/* The title screen */
.hero { --h: max(calc(100svh - 64px), 640px); position: relative; height: var(--h); overflow: hidden; background: var(--bg); }
.stage { position: absolute; top: 50%; left: 50%; aspect-ratio: 1672 / 941; width: max(100%, calc(var(--h) * 1672 / 941)); transform: translate(-50%, -50%); }
.backdrop, .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.ship { position: absolute; left: 29.904%; top: 17.535%; width: 69.976%; }
.scene { visibility: hidden; }
.scene.on { visibility: visible; }
.scene.on ~ .ship, .stage:has(.scene.on) .ship { visibility: hidden; }
.hero-front { position: absolute; left: clamp(20px, 3.4vw, 58px); top: clamp(24px, 6vh, 64px); bottom: clamp(20px, 4vh, 40px); width: min(690px, 44vw); display: flex; flex-direction: column; }
.hero-front h1 { margin: 0; }
.logo { width: 100%; }
.menu-plaques { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; }
.hero-line { font: 700 clamp(1.3rem, 1.9vw, 1.75rem)/1.2 var(--display); letter-spacing: .02em; margin: auto 0 6px; max-width: 17em; text-shadow: 0 1px 8px #000, 0 0 18px #000; }
.hero-note { color: var(--muted); margin: 0; text-shadow: 0 1px 6px #000, 0 0 14px #000; }

/* The ramp */
.premise-art { width: 100%; max-height: 82vh; object-fit: cover; object-position: 50% 40%; }
.premise-body { position: relative; margin-top: clamp(-150px, -9vw, -50px); padding-bottom: 90px; }
.premise-body h2 { max-width: 18em; text-shadow: 0 2px 18px #000; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 34px; color: var(--muted); }
.facts-grid p { margin: 0; border-top: 2px solid var(--rust); padding-top: 12px; }

/* Aboard */
.aboard { padding-block: 40px 90px; }
.stages { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 0; margin: 30px 0; padding: 0; font: 700 1.5rem/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.stages li { color: var(--warn); }
.stages li + li::before { content: "›"; color: var(--faint); margin: 0 .55em; }
.stages li:last-child { color: var(--bad); }
.groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; }
.groups.five { grid-template-columns: repeat(5, 1fr); }
.groups.five dt { color: var(--text); }
.groups dt { font: 700 1.55rem/1.1 var(--display); color: var(--accent); margin-bottom: 4px; }
.groups dd { margin: 0; color: var(--muted); font-size: 1.02rem; line-height: 1.35; }

.ending { position: relative; min-height: 76vh; display: grid; place-items: center; padding: 60px 20px; overflow: hidden; }
.ending-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.ending-card { position: relative; width: min(760px, 100%); text-align: center; }
.ending-card > * { position: relative; }
.ending-card h2 { font-size: clamp(2.6rem, 5.4vw, 4.2rem); margin-bottom: 14px; }
.at-end { color: var(--muted); margin: 16px auto 24px; max-width: 34em; }

/* What the captain does */
.features { padding-block: 90px 30px; }
.features > h2 { margin-bottom: 40px; }
.feature { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(24px, 4vw, 54px); align-items: center; margin-bottom: 56px; }
.feature:nth-of-type(even) { grid-template-columns: 1fr 1.55fr; }
.feature:nth-of-type(even) img { order: 2; }
.feature img { width: 100%; border: 1px solid var(--line); }
.feature h3 { font-size: clamp(2rem, 3.2vw, 2.8rem); color: var(--accent); margin-bottom: 12px; }
.feature p { color: var(--muted); }

/* Getting it */
.get { text-align: center; padding-block: 50px 90px; }
.get h2 { margin-bottom: 26px; }
.platforms { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 22px; padding: 0; margin: 0 0 18px; }
.get .platforms { justify-content: center; }
.platforms li { display: grid; justify-items: center; gap: 6px; }
.platforms small { color: var(--faint); font-size: .95rem; }

/* Inner pages */
.page { padding-block: 64px 90px; }
.page-head { margin-bottom: 36px; }
.page-head h1 { font-size: clamp(3rem, 7vw, var(--head)); }
.section-title { font-size: clamp(2rem, 3.6vw, 2.8rem); margin: 56px 0 24px; }
.lost { text-align: center; padding-block: 18vh; }

/* The yard: paper */
.paper { color: var(--ink); }
.paper h3 { font-size: 1.9rem; }
.paper-small { font-size: .95rem; }
.paper-price { font: 700 1.5rem/1.1 var(--display); margin: auto 0 0; }
.hulls { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px; }
.clipboard { width: 360px; aspect-ratio: 976 / 1611; background: url(/assets/media/ui/inspection.webp?v=450e0658cc) center / 100% 100% no-repeat; padding: 92px 42px 62px; display: flex; flex-direction: column; font-size: 1.04rem; }
.clipboard:nth-child(1) { transform: rotate(-.8deg); }
.clipboard:nth-child(3) { transform: rotate(.9deg); }
.paper-note { font-size: 1rem; line-height: 1.32; margin: .4em 0 .7em; }
.conditions { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 4px; }
.conditions li { display: flex; align-items: center; gap: 12px; }
.conditions img { width: 150px; height: 50px; object-fit: contain; background: #0b1014; padding: 3px; }
.conditions span { font-size: .95rem; }
.section-title.first { margin-top: 0; }
.lede.tight { margin: -14px 0 22px; }
.clipboard dl { margin: 0 0 .9em; }
.clipboard dl div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(42, 36, 29, .25); }
.clipboard dd { margin: 0; font-weight: 700; }
.captains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dossier { aspect-ratio: 1; background: url(/assets/media/ui/dossier.webp?v=ed1c1b5d68) center / 100% 100% no-repeat; padding: 13% 12% 12% 14%; display: flex; flex-direction: column; font-size: .98rem; line-height: 1.32; }
.dossier h3 { font-size: 1.6rem; margin-bottom: 6px; }
.dossier p { margin-bottom: .6em; }

/* The game */
.facts { margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.facts dt { font: 700 1rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 4px 0 0; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery a { display: block; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lightbox { padding: 0; border: 1px solid var(--line); background: #000; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-height: 94vh; width: auto; }
.lightbox button { position: absolute; top: 8px; right: 8px; background: var(--panel); color: var(--text); border: 1px solid var(--line); font-size: 1.5rem; line-height: 1; width: 40px; height: 40px; cursor: pointer; }

/* Support, credits and privacy */
.faq { margin: 0 0 30px; }
.faq div { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq dt { font: 700 1.5rem/1.2 var(--display); color: var(--accent); }
.faq dd { margin: 4px 0 0; color: var(--muted); }
.about { text-align: center; margin-bottom: 34px; }
.about img { width: min(520px, 100%); margin: 0 auto 14px; }
.about p { margin: 0 0 .6em; }
.credits { list-style: none; padding: 0; margin: 0; }
.credits li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.credits b { color: var(--text); margin-right: 8px; }
.prose h2 { font-size: 1.9rem; margin: 1.3em 0 .35em; color: var(--accent); }
.prose p { color: var(--muted); }

/* The footer */
.site-foot { background: #0d1319; border-top: 1px solid var(--line); padding-block: 30px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.studio { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.studio img { width: 74px; }
.studio span { display: grid; }
.studio small { color: var(--muted); font-size: .95rem; }
.site-foot nav { display: flex; gap: 20px; margin-bottom: 6px; }

@media (max-width: 1200px) {
  .captains { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .captains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .groups, .groups.five { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .js .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 12px 20px; background: #0d1319; border-bottom: 1px solid var(--line); }
  .js .site-nav.open { display: flex; }
  html:not(.js) .site-nav { display: none; }
  .stage { transform: translate(-66%, -50%); }
  .hero-front { left: 20px; right: 20px; width: auto; top: 16px; text-align: center; align-items: center; }
  .logo { width: min(100%, 520px); }
  .menu-plaques { justify-content: center; }
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) img { order: 0; }
  .premise-body { margin-top: 24px; }
}
@media (max-width: 620px) {
  .facts-grid, .gallery, .captains { grid-template-columns: minmax(0, 1fr); }
  .groups, .groups.five { grid-template-columns: 1fr; }
  .brand-logo { height: 36px; }
  .clipboard { width: min(340px, 100%); }
  .dossier { font-size: 1.1rem; }
}
