/* Overbuilt: the site's one stylesheet.
   Layout: the game's instrument panel as a spec sheet. Full-bleed key art, then chamfered
   navy plates on a deck ruled in 1 m cells, with teal for light and gold for the one call out.
   Colours and faces follow docs/ART_BIBLE.md (sa_ui's SaColors, Oxanium and IBM Plex Sans).
   One deliberate dark look: the game itself has no light theme. */

:root {
  --space: #040814;      /* the splash's first colour */
  --deck: #070e22;       /* graphite900 */
  --plate: #0f1c40;      /* graphite700 */
  --plate-hi: #15264f;   /* graphite600 */
  --rule: #33508c;       /* graphite400: frames and ticks */
  --ink: #f4f7ff;
  --ink-2: #b4c3e3;
  --ink-3: #8396bf;
  --teal: #3ce8d6;       /* Keel Station's emissive */
  --gold: #ffc53d;
  --gold-deep: #e08a0e;
  --on-gold: #241300;

  --font-display: "Oxanium", "Eurostile", "Bank Gothic", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 65ch;
  --cut: 18px;
  --wordmark-size: 1.25rem;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--deck);
  /* The build grid: one line a cell, barely there. */
  background-image:
    linear-gradient(to right, rgb(51 80 140 / 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(51 80 140 / 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}

h2 {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: 0.01em;
}

h3 {
  font-size: var(--step-1);
  font-weight: 600;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--gold);
  color: var(--on-gold);
  padding: 0.5rem 0.75rem;
}

/* Labels set like the game's: Oxanium capitals, spaced. */
.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  flex: none;
}

/* ---------- The wordmark: one component. ----------
   The Shear Line wordmark (assets/brand/), drawn as a background so every page's markup
   stays as it is; the text inside stays for screen readers. --wordmark-size is its height.
   Headers and footers use the small cut (a wider cut, a shorter slide); the hero uses the
   full one. Each width is the height times the image's width over its height. */
.wordmark {
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  width: calc(var(--wordmark-size) * 6.9647);
  height: var(--wordmark-size);
  background: url("../img/wordmark-small.svg") no-repeat left center / contain;
  text-decoration: none;
}

.wordmark-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Chamfered plates (45° cuts, top left and bottom right). ---------- */
.plate {
  --c: var(--cut);
  position: relative;
  background: var(--rule);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  padding: 1px;
}

.plate > .plate-body {
  background: linear-gradient(180deg, var(--plate-hi), var(--plate));
  clip-path: polygon(calc(var(--c) - 0.4px) 0, 100% 0, 100% calc(100% - var(--c) + 0.4px), calc(100% - var(--c) + 0.4px) 100%, 0 100%, 0 calc(var(--c) - 0.4px));
  height: 100%;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.shot {
  --c: 22px;
  margin: 0;
  display: grid;
  gap: 0.625rem;
}

.shot-frame {
  background: var(--rule);
  padding: 1px;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}

.shot-frame img {
  width: 100%;
  clip-path: polygon(calc(var(--c) - 0.4px) 0, 100% 0, 100% calc(100% - var(--c) + 0.4px), calc(100% - var(--c) + 0.4px) 100%, 0 100%, 0 calc(var(--c) - 0.4px));
  background: var(--space);
}

.shot figcaption {
  font-size: var(--step--1);
  color: var(--ink-3);
  line-height: 1.5;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.25rem;
}

.topnav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topnav a {
  color: var(--ink-2);
  text-decoration: none;
}

.topnav a:hover,
.topnav a[aria-current="page"] {
  color: var(--ink);
}

.topnav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--gold);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--space);
  min-height: clamp(560px, 54vw, 840px);
  display: flex;
  flex-direction: column;
}

.hero-art,
.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-art {
  z-index: -2;
}

.hero-art img {
  object-fit: cover;
  object-position: 62% 50%;
}

/* Wide screens: slide the art right, fading its left edge into space, so the name and
   the hook sit over open sky rather than the ship. */
@media (min-width: 701px) {
  .hero-art img {
    left: 9%;
    width: 91%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%);
    mask-image: linear-gradient(90deg, transparent 0, #000 16%);
  }
}

/* A scrim over the open sky, where the name sits. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgb(4 8 20 / 0.86), rgb(4 8 20 / 0.55) 45%, transparent 75%),
    linear-gradient(to top, rgb(7 14 34 / 0.95), transparent 22%);
}

.hero .topbar {
  justify-content: flex-end;
}

.hero-copy {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  padding-block: clamp(1rem, 5vw, 4.5rem) 3rem;
}

.hero-copy > * {
  max-width: 34rem;
}

.wordmark--hero {
  --wordmark-size: clamp(2.8rem, 8vw, 6.25rem);
  width: calc(var(--wordmark-size) * 6.7257);
  max-width: 100%;
  background-image: url("../img/wordmark.svg");
  filter: drop-shadow(0 2px 24px rgb(4 8 20 / 0.6));
}

.hook {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.75rem);
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
  text-shadow: 0 1px 12px rgb(4 8 20 / 0.8);
}

.status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  width: fit-content;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-gold);
  background: var(--gold);
  padding: 0.6rem 1.1rem 0.6rem 1rem;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.status-sep {
  width: 1px;
  height: 1em;
  background: rgb(36 19 0 / 0.35);
}

/* The splash's thin gold scan bar, at the foot of the art. */
.scanbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-deep) 50%, var(--gold) 80%, transparent);
  transform-origin: left center;
  animation: scan 1.6s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

@keyframes scan {
  from {
    transform: scaleX(0.04);
    opacity: 0.5;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Phones: the name and the hook on the dark, the upright art below them. */
@media (max-width: 700px) {
  .hero {
    min-height: 0;
    background:
      radial-gradient(ellipse 90% 45% at 50% 0%, rgb(61 139 255 / 0.22), transparent 70%),
      var(--space);
  }
  .hero::before {
    display: none;
  }
  .hero-art {
    display: block;
    position: relative;
    inset: auto;
    height: auto;
    z-index: 0;
    order: 3;
    margin-top: -2.5rem;
  }
  .hero-art img {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 4 / 5;
    object-position: 50% 58%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
  }
  .hero .topbar {
    justify-content: center;
  }
  .hero-copy {
    text-align: center;
    justify-items: center;
    padding-block: 0.5rem 0;
    position: relative;
    z-index: 1;
  }
  .status {
    flex-direction: column;
    gap: 0.15rem;
    letter-spacing: 0.1em;
  }
  .status-sep {
    display: none;
  }
}

/* ---------- Sections ---------- */
main > section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-title {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
}

/* What the game is: a short paragraph under the art. */
.intro {
  display: grid;
  gap: 1rem;
}

.intro > * {
  max-width: 44rem;
}

.intro .lede {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
  color: var(--ink);
}

main > .intro {
  padding-bottom: 0;
}

/* Features */
.features {
  display: grid;
  gap: clamp(4rem, 9vw, 7.5rem);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4.5vw, 4rem);
  align-items: center;
}

.feature--flip .shot {
  order: 2;
}

.feature-text {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
}

.feature-text h3 {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  font-weight: 700;
}

/* A short teal rule over each feature's heading, like the game's panel ticks. */
.feature-text h3::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-bottom: 0.9rem;
  background: var(--teal);
  box-shadow: 0 0 12px rgb(60 232 214 / 0.45);
}

.readout {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 2fr) minmax(0, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.gallery-note {
  margin-top: 1.5rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}

/* Coming soon */
.launch {
  text-align: left;
}

.launch-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}

.launch-icon {
  width: clamp(88px, 14vw, 132px);
  height: auto;
  border-radius: 22%;
  box-shadow: 0 0 0 1px var(--rule), 0 12px 40px rgb(61 139 255 / 0.25);
}

.launch-text {
  display: grid;
  gap: 0.75rem;
}

.launch h2 {
  font-size: var(--step-3);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgb(51 80 140 / 0.6);
  background: var(--space);
  padding-block: 2.5rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--ink-2);
}

.site-footer .wordmark {
  --wordmark-size: 1rem;
}

.foot-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

/* ---------- Document pages (privacy, support) ---------- */
.page-head {
  padding-block: clamp(2rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: 1rem;
}

.page-head h1 {
  font-size: var(--step-3);
  font-weight: 700;
}

.doc {
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.prose {
  max-width: var(--measure);
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(51 80 140 / 0.6);
  scroll-margin-top: 1.5rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.125rem;
  margin-top: 1rem;
  scroll-margin-top: 1.5rem;
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.45rem;
}

.prose li::marker {
  color: var(--teal);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--ink);
}

.callout {
  --c: 14px;
}

.callout .plate-body {
  display: grid;
  gap: 0.6rem;
}

.email {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  user-select: all;
  overflow-wrap: anywhere;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature--flip .shot {
    order: 0;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery .shot--wide {
    grid-column: 1 / -1;
    order: 3;
  }
}

@media (max-width: 480px) {
  .launch-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .topnav {
    gap: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanbar {
    animation: none;
  }
}
