/* Pruph — calm by default. Black, white, space. The only ornament is a
   barcode, and it is a real one: Code 128 encoding "PRUPH", generated with
   CoreImage and confirmed to decode with Vision before it was turned into
   these gradient stops. */

:root {
  /* Tells the browser this page handles both schemes itself, so it does not
     apply its own auto-darkening on top and scrollbars match. */
  color-scheme: light dark;

  --ink: #111111;
  --ink-soft: #6b6b6b;
  /* Darker than --ink-soft. Fine for a one-line blurb, too light for a policy
     somebody has to read to the end. 10.5:1 against white. */
  --ink-body: #3f3f3f;
  --paper: #ffffff;
  /* Light enough to stay quiet, dark enough that the perforation's 3px dots
     actually register on white. #d9d9d9 disappeared entirely. */
  --rule: #c4c4c4;

  /* The barcode's two tones, so it can invert cleanly in dark mode. */
  --bar: #111111;
  --gap: #ffffff;

  --measure: 34rem;
  --step: clamp(2.5rem, 8vh, 5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f2f2;
    --ink-soft: #8f8f8f;
    --ink-body: #c9c9c9;
    --paper: #0d0d0d;
    --rule: #3d3d3d;
    --bar: #f2f2f2;
    --gap: #0d0d0d;
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Generous gutters that shrink gracefully rather than at a breakpoint. */
.page {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 6vw, 3rem);
}

/* ---- masthead ---- */

.masthead {
  padding-block: var(--step);
}

.wordmark {
  display: inline-block;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

/* ---- the one thing on the page ---- */

.hero {
  flex: 1 1 auto;
  padding-bottom: var(--step);
}

/* Sized so "Without the panic." holds one line from 320px up to the measure —
   the break belongs after "Your proof.", not in the middle of the second half. */
.tagline {
  margin: 0;
  font-size: clamp(2rem, 1rem + 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.tagline .line {
  display: block;
}

.blurb {
  max-width: 28rem;
  margin: clamp(1.75rem, 4vh, 2.75rem) 0 0;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ---- prose, for the privacy page ----
   This carries a full policy, not a few lines, so it is set for sustained
   reading: darker body text than the landing page's blurb, headings that are
   sized rather than shouted, and clause paragraphs that hang their (a) in the
   margin. */

.prose h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.prose h2 {
  margin: clamp(2.75rem, 6vh, 3.75rem) 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.prose p,
.prose li {
  color: var(--ink-body);
}

.prose p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Lettered clauses: (a) sits in the margin, the text block stays aligned. */
.clause {
  padding-left: 1.75rem;
  text-indent: -1.75rem;
}

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

/* Long scopes and URLs must be able to break, or they push the page wide. */
.prose code {
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.prose a {
  color: inherit;
  text-decoration-color: var(--rule);
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-color: currentColor;
}

.updated {
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* ---- the tear line ---- */

.perforation {
  height: 3px;
  /* All four margins, not just the block ones: an <hr> gets margin-inline:auto
     from the UA sheet, and auto inline margins stop a flex item from
     stretching, which collapsed this to zero width. */
  margin: 0;
  width: 100%;
  flex: none;
  border: 0;
  background-image: radial-gradient(circle at 1.5px 50%, var(--rule) 1.5px, transparent 1.6px);
  background-size: 9px 3px;
  background-repeat: repeat-x;
}

/* ---- footer, sitting on the stub ---- */

.footer {
  padding-block: clamp(1.5rem, 4vh, 2.25rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.875rem;
}

/* Each page links to the two it isn't, so the set is reachable from anywhere
   without a nav bar competing with the tagline. */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

.footer a:hover,
.footer a:focus-visible {
  border-bottom-color: currentColor;
}

.reference {
  font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---- the barcode ----
   Real Code 128 data reading PRUPH: generated with CoreImage, decoded back
   with Vision to confirm the pattern, then written out as gradient stops.
   90 modules at 2px each = a 180px tile, so bars land on whole pixels.

   The tile repeats seamlessly, with no quiet zone between symbols, which is
   what makes it read as one continuous band instead of a row of stamps. That
   also means the strip is a texture, not something a scanner can read. Adding
   a 10-module quiet zone to each side of the tile makes every repeat
   individually scannable, at the cost of a visible gap every 220px. */

.barcode {
  height: clamp(1.75rem, 5vw, 2.75rem);
  background-color: var(--gap);
  background-repeat: repeat-x;
  background-size: 180px 100%;
  background-image: linear-gradient(90deg,
    var(--bar) 0.0000% 2.2222%, var(--gap) 2.2222% 3.3333%, var(--bar) 3.3333% 4.4444%,
    var(--gap) 4.4444% 6.6667%, var(--bar) 6.6667% 7.7778%, var(--gap) 7.7778% 12.2222%,
    var(--bar) 12.2222% 15.5556%, var(--gap) 15.5556% 16.6667%,
    var(--bar) 16.6667% 20.0000%, var(--gap) 20.0000% 21.1111%,
    var(--bar) 21.1111% 23.3333%, var(--gap) 23.3333% 24.4444%,
    var(--bar) 24.4444% 26.6667%, var(--gap) 26.6667% 30.0000%,
    var(--bar) 30.0000% 31.1111%, var(--gap) 31.1111% 32.2222%,
    var(--bar) 32.2222% 35.5556%, var(--gap) 35.5556% 36.6667%,
    var(--bar) 36.6667% 38.8889%, var(--gap) 38.8889% 40.0000%,
    var(--bar) 40.0000% 43.3333%, var(--gap) 43.3333% 44.4444%,
    var(--bar) 44.4444% 47.7778%, var(--gap) 47.7778% 48.8889%,
    var(--bar) 48.8889% 52.2222%, var(--gap) 52.2222% 53.3333%,
    var(--bar) 53.3333% 56.6667%, var(--gap) 56.6667% 57.7778%,
    var(--bar) 57.7778% 60.0000%, var(--gap) 60.0000% 61.1111%,
    var(--bar) 61.1111% 63.3333%, var(--gap) 63.3333% 66.6667%,
    var(--bar) 66.6667% 67.7778%, var(--gap) 67.7778% 68.8889%,
    var(--bar) 68.8889% 70.0000%, var(--gap) 70.0000% 73.3333%,
    var(--bar) 73.3333% 74.4444%, var(--gap) 74.4444% 76.6667%,
    var(--bar) 76.6667% 77.7778%, var(--gap) 77.7778% 80.0000%,
    var(--bar) 80.0000% 84.4444%, var(--gap) 84.4444% 85.5556%,
    var(--bar) 85.5556% 87.7778%, var(--gap) 87.7778% 91.1111%,
    var(--bar) 91.1111% 94.4444%, var(--gap) 94.4444% 95.5556%,
    var(--bar) 95.5556% 96.6667%, var(--gap) 96.6667% 97.7778%,
    var(--bar) 97.7778% 100.0000%
  );
}

@media (forced-colors: active) {
  .barcode,
  .perforation {
    display: none;
  }
}
