/*
 * The front door's own stylesheet.
 *
 * Not `error.css`, which is generated by `@shuttering/error-pages` and excluded
 * from lint by name in `biome.json`. Linking it here would put the marketing root's
 * appearance behind a version bump of a package this repository does not own, and
 * would extend a lint exemption written for one generated file to cover the styling
 * of a page somebody actually authors.
 *
 * Not an inline `<style>` either: both distributions send `style-src 'self'`, which
 * drops one. An external sheet is the only form that renders.
 *
 * The palette is eucalyptus, matching what the error-page generator emits, so the
 * two are one product rather than two. The values are restated rather than imported
 * because `@import` costs a second serial round trip and is the thing a strict CSP
 * most often blanks.
 */
:root {
  color-scheme: light dark;
  --background: #fafafa;
  --foreground: #191a1b;
  --muted-foreground: #64656b;
  --border: #e6e6e8;
  --primary: #3f7d6c;
  --primary-foreground: #ffffff;
  --primary-on-tint: #386f60;
  --radius: 0.1875rem;
  --font-sans: system-ui, -apple-system, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0b0b0d;
    --foreground: #ededf0;
    --muted-foreground: #9a9aa2;
    --border: rgba(255, 255, 255, 0.08);
    --primary: #6fae9a;
    --primary-foreground: #0b0b0d;
    --primary-on-tint: #7cbaa6;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/*
 * `svh`, behind a feature query rather than as a second `min-height` on the same
 * rule. On mobile Safari `vh` resolves against the viewport with the toolbars
 * retracted, so a page sized to it is taller than what is on screen and the call
 * to action lands below the fold — on the one page whose whole job is to be opened
 * from a link somebody tapped.
 *
 * The duplicate-declaration spelling is the common one and is indistinguishable
 * from a mistake to `lint/suspicious/noDuplicateProperties`. `error.css` carries
 * that spelling and is excluded from lint by name because it is generated output;
 * this file is authored, so it says what it means instead of inheriting an
 * exemption written for somebody else's generator.
 */
@supports (min-height: 100svh) {
  body {
    min-height: 100svh;
  }
}

main {
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.button:hover {
  background: var(--primary-on-tint);
}

/*
 * Focus is styled rather than left to the browser, because `background` is set on
 * the button and several browsers draw the default ring in a colour chosen against
 * the page rather than against the control. `:focus-visible` keeps it off a mouse
 * click and on for a keyboard.
 */
.button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

footer a {
  color: inherit;
}

/*
 * The prose pages — privacy, about, contact.
 *
 * They share this sheet rather than getting one each: the front door and the
 * pages linked from it are one document set, and a second stylesheet is a second
 * place for the palette to drift. `main` is centred as a single column above, so
 * `.prose` widens it and turns off the centring rather than restating the layout.
 */
.prose {
  max-width: 44rem;
  gap: 0;
  place-self: start center;
  padding-block: 3rem;
}

.prose h1 {
  margin-bottom: 1.5rem;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--foreground);
  text-wrap: balance;
}

.prose p,
.prose li,
.prose dd {
  margin-bottom: 0.875rem;
}

/* The opening sentence carries the page. Sized between the h1 and body text. */
.prose .lede {
  font-size: 1.0625rem;
  color: var(--foreground);
  margin-bottom: 2rem;
}

.prose .eyebrow a {
  color: inherit;
  text-decoration: none;
}

.prose ul {
  margin: 0 0 0.875rem;
  padding-left: 1.25rem;
  color: var(--muted-foreground);
}

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

/*
 * A retention period and the sentence explaining it are a term and its
 * definition, so they are marked up as one — a screen reader announces the pairing
 * rather than a heading followed by an unrelated paragraph.
 */
.terms {
  margin: 0 0 0.875rem;
}

.terms dt {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.terms dd {
  margin-left: 0;
  color: var(--muted-foreground);
}

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

.prose a {
  color: var(--primary-on-tint);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--primary);
}
