/* Pelorus — pelorussearch.app
   Five colours plus one band surface, one typeface, one animation. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/InstrumentSans-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --chart:     #EEF1F0; /* page background */
  --chart-2:   #E4E8E7; /* alternating band background */
  --ink:       #101820; /* type; also the dark band */
  --bearing:   #2B4C6F; /* structural linework, links, buttons */
  --mist:      #596A74; /* secondary type, captions (4.5:1 on both light surfaces) */
  --mist-dark: #9AAAB4; /* secondary type inside the dark band only */
  --north:     #B3202E; /* overlap only — bearing diagram, nowhere else */
}

html {
  box-sizing: border-box;
  font-size: 19px;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  background: var(--chart);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.6;
}

/* Container: the page is wide; a text column is one part of it. */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 900px) {
  .container { padding: 0 32px; }
}
.prose { max-width: 640px; }

/* Type */
h1, h2, h3 { font-weight: 500; margin: 0; }
h1 {
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h3 { font-size: 22px; line-height: 1.3; }
@media (min-width: 900px) {
  h1 { font-size: 64px; }
  h2 { font-size: 36px; }
}
p, ul, ol, dl { margin: 0; }
p + p, ul + p, p + ul, dl + p { margin-top: 1.15em; }
strong { font-weight: 500; }
.lead { font-size: 21px; }
.caption {
  font-size: 15px;
  line-height: 1.5;
  color: var(--mist);
}
.mist { color: var(--mist); }

a {
  color: var(--bearing);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
:focus-visible {
  outline: 2px solid var(--bearing);
  outline-offset: 3px;
}

/* Buttons — Bearing, never North. Four on the homepage, all to /download. */
.button {
  display: inline-block;
  padding: 16px 32px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: var(--bearing);
  color: var(--chart);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}
.button:hover { background: var(--ink); color: var(--chart); }
.button-small { padding: 10px 20px; font-size: 16px; }
.button-outline {
  background: transparent;
  border-color: var(--chart);
  color: var(--chart);
}
.button-outline:hover { background: var(--chart); color: var(--ink); }
.cta { margin-top: 36px; }
.cta + .caption { margin-top: 16px; }

/* Header */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  text-decoration: none;
}
.wordmark img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

/* Bands — full viewport width, content in the container. */
.band { padding: 64px 0; }
.band-2 { background: var(--chart-2); }
.band-ink { background: var(--ink); color: var(--chart); }
.band-ink .mist, .band-ink .caption { color: var(--mist-dark); }
.band-ink :focus-visible { outline-color: var(--chart); }
.hero { padding: 48px 0 64px; }
@media (min-width: 900px) {
  .band { padding: 96px 0; }
  .hero { padding: 72px 0 112px; }
}
h2 { margin-bottom: 24px; }
.hero h1 { margin-bottom: 28px; }

/* Two columns from 900px; one column below. */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 64px; }
  .hero-grid { grid-template-columns: 55fr 45fr; }
}
.two-col .shot { justify-self: start; }
@media (min-width: 900px) {
  .two-col .shot { justify-self: center; }
}

/* Centered single columns */
.centered {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.band-ink .centered { max-width: 720px; }
.pricing .centered { max-width: 640px; }
.pricing h2 { font-size: 36px; }
@media (min-width: 900px) {
  .pricing h2 { font-size: 48px; }
}

/* Screenshots — dark screens on light paper. The one place a shadow is allowed. */
figure { margin: 0; }
.shot img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(16, 24, 32, 0.14);
}
.shot-hero img { max-height: 640px; width: auto; }
.shot-wide img { max-height: 480px; width: auto; }
.shot figcaption { margin-top: 16px; }

/* Mode list */
.modes {
  list-style: none;
  padding: 0;
  margin-top: 1.15em;
}
.modes li + li { margin-top: 0.35em; }

/* Feature list: name on its own line, description below. */
.features {
  display: grid;
  gap: 28px;
}
.features dt { font-weight: 500; color: var(--ink); }
.features dd { margin: 0; color: var(--mist); }

/* Bearing diagram — the one bold element on the page, full container width.
   Bars 3px, sight lines 0.75px, both non-scaling. Geometry is generated by
   scripts/build-diagram.py; do not edit the SVG or the label positions by hand. */
.bearing { margin-top: 56px; }
.bearing-plot { position: relative; }
.bearing-plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.bearing-label {
  position: absolute;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  transform: translateY(-100%);
  white-space: nowrap;
}
/* bearing-labels:start */
/* Positions are percentages of the 1200 x 760 viewBox. */
.bearing-label-google { left: 6.67%; top: 8.68%; }
.bearing-label-bing   { left: 65.00%; top: 8.68%; }
.bearing-label-yours  { left: 39.00%; top: 97.11%; transform: none; }
/* bearing-labels:end */
.bar {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}
.bar-rest { stroke: var(--mist); }
.bar-hit  { stroke: var(--north); }
.dot { fill: var(--north); }
.sight {
  fill: none;
  stroke: var(--north);
  stroke-width: 0.75;
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}
/* Draw-on: only with scripting, only once, never for reduced motion. */
.js .sight {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.js .bearing.is-drawn .sight {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.js .bearing.is-drawn .sight:nth-of-type(2) { transition-delay: 0.15s; }
.js .bearing.is-drawn .sight:nth-of-type(3) { transition-delay: 0.30s; }
.js .bearing.is-drawn .sight:nth-of-type(4) { transition-delay: 0.45s; }
@media (prefers-reduced-motion: reduce) {
  .js .sight, .js .bearing.is-drawn .sight {
    stroke-dashoffset: 0;
    transition: none;
  }
}

/* Footer */
.site-footer { padding: 64px 0; }
.site-footer nav a { margin-right: 1.4em; }
.site-footer nav a:last-child { margin-right: 0; }
.site-footer .caption { margin-top: 16px; }

/* Documents: help and the legal pages */
.doc { padding: 64px 0; }
@media (min-width: 900px) { .doc { padding: 96px 0; } }
.doc .prose { max-width: 720px; }
.doc h1 { margin-bottom: 32px; }
.doc h2 { margin-top: 56px; margin-bottom: 16px; }
.doc h3 { margin-top: 40px; margin-bottom: 12px; }
.doc h2 + h3, .doc h1 + h3 { margin-top: 0; }
.doc hr {
  border: 0;
  border-top: 1px solid var(--mist);
  margin: 48px 0;
}
.doc hr + h2, .doc hr + h3 { margin-top: 0; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 0.5em; }
.legal h1 + p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--mist);
}
