/* Pikett landing page.
 *
 * The same paper, ink and marker yellow as the console, and the same three faces, so the page
 * somebody reads before signing up and the screen they land on after are one product. Yellow is
 * spent in three places only: the mark, one word of the headline, and one full-bleed band.
 * No script, no third-party request: the faces are served from this directory.
 */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/plex-sans-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/plex-mono-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Michroma';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/michroma-latin.woff2) format('woff2');
}

:root {
  color-scheme: light dark;

  --body: -apple-system, BlinkMacSystemFont, "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --label: "Michroma", "Eurostile", ui-sans-serif, system-ui, sans-serif;

  --step--1: 0.8125rem;
  --step-0:  1rem;
  --step-1:  1.1875rem;
  --step-2:  1.625rem;
  --step-3:  2.25rem;
  --step-4:  3.25rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 14px;
  --space-4: 22px;
  --space-5: 34px;
  --space-6: 56px;
  --space-7: 96px;

  --radius:     12px;
  --radius-btn: 8px;
  --shell: 1120px;
  --gutter: 22px;

  --ground:   #f2f1ed;
  --deck:     #ffffff;
  --raised:   #f8f7f4;
  --line:     #e4e2db;
  --line-2:   #cdc9bf;
  --paper:    #14140f;
  --haze:     #5f5c55;
  --haze-dim: #8b877e;

  --mark:    #f2f200;
  --on-mark: #14140f;

  --p1:  #d0021b;
  --ack: #0f7a4f;

  --accent:    #14140f;
  --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:   #121210;
    --deck:     #1b1b18;
    --raised:   #232320;
    --line:     #2f2f2b;
    --line-2:   #42423c;
    --paper:    #f0efe9;
    --haze:     #9b978d;
    --haze-dim: #6d6a63;

    --p1:  #ff4b3e;
    --ack: #43c98a;

    --accent:    #f0efe9;
    --on-accent: #14140f;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--ground);
  color: var(--paper);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: var(--step-3); line-height: 1.1; }
h3 { font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.005em; }
p  { margin: 0; }

a { color: var(--paper); text-underline-offset: 0.18em; }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-accent);
  padding: var(--space-2) var(--space-3);
}
.skip:focus { left: var(--gutter); top: var(--space-2); z-index: 2; }

/* ── the top row ─────────────────────────────────────────────────────────── */
.top {
  display: flex; align-items: center; gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  font-family: var(--label);
  font-size: var(--step-1);
  letter-spacing: 0.04em;
  color: var(--paper);
  text-decoration: none;
}
.wordmark svg { width: 28px; height: 28px; flex: 0 0 auto; }
.top-links {
  display: flex; align-items: center; gap: var(--space-4);
  margin-left: auto;
}
.top-links a {
  color: var(--haze);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex; align-items: center;
}
.top-links a:hover { color: var(--paper); }
.top-links a.btn { color: var(--on-accent); }
.top-links .on-page { display: none; }

/* ── the one button ──────────────────────────────────────────────────────── */
.btn {
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover { opacity: 0.86; }
.btn-large { min-height: 52px; padding: 0 28px; font-size: var(--step-1); }
.btn-on-mark { background: var(--on-mark); color: #ffffff; }

/* ── opening ─────────────────────────────────────────────────────────────── */
.opening {
  display: grid;
  gap: var(--space-6);
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
}
.opening h1 {
  font-size: clamp(2rem, 1.2rem + 3.6vw, var(--step-4));
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 17ch;
}
/* The marker sits behind one word, the way the console's own signed-out pages mark theirs. */
.opening h1 mark {
  background: var(--mark);
  color: var(--on-mark);
  padding: 0 0.12em;
  margin: 0 -0.06em;
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--haze);
  max-width: 46ch;
  margin-top: var(--space-4);
}
.actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-5);
}
.hint {
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--haze);
  max-width: 46ch;
  margin-top: var(--space-3);
}

/* ── one page, start to finish ───────────────────────────────────────────
 * The picture the page opens with is the product's own record of one alert: a
 * timeline in mono, the way the console writes one. It is an example and says so.
 */
.trace {
  margin: 0;
  background: var(--deck);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-self: start;
}
.trace figcaption {
  display: flex; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--haze);
}
.trace ol { list-style: none; margin: 0; padding: var(--space-2) 0; }
.trace li {
  display: grid;
  grid-template-columns: 4.6em 1fr;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  position: relative;
}
.trace li + li { border-top: 1px solid var(--line); }
.trace time {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  color: var(--haze-dim);
  padding-top: 2px;
}
.trace b { display: block; font-weight: 700; line-height: 1.3; }
.trace span { display: block; color: var(--haze); font-size: 0.9375rem; line-height: 1.4; margin-top: 2px; }
.trace .is-open b::before,
.trace .is-acked b::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 0.04em;
}
.trace .is-open b::before  { background: var(--p1); }
.trace .is-acked b::before { background: var(--ack); }

/* ── sections ────────────────────────────────────────────────────────────── */
.band { border-top: 1px solid var(--line-2); }
.band > .shell { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.band h2 { max-width: 20ch; }
.band-lede {
  color: var(--haze);
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 58ch;
  margin-top: var(--space-3);
}

/* Three steps, and they are a sequence, so they are numbered. */
.steps {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-5);
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 3px solid var(--paper); padding-top: var(--space-3); }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--label);
  font-size: var(--step-2);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.steps p { color: var(--haze); margin-top: var(--space-2); max-width: 44ch; }

/* What can send alerts: a name on the left, what is true about it on the right. */
.senders { margin: var(--space-5) 0 0; }
.senders > div {
  display: grid;
  gap: var(--space-1) var(--space-5);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--line);
}
.senders dt { font-weight: 700; font-size: var(--step-1); line-height: 1.25; letter-spacing: -0.005em; }
.senders dd { margin: 0; color: var(--haze); max-width: 68ch; }
.senders dd p + p { margin-top: var(--space-2); }
.senders .names { color: var(--paper); }

/* What you get: plain entries in two columns, no boxes. */
.gets {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-5) var(--space-6);
}
.gets p { color: var(--haze); margin-top: var(--space-2); max-width: 48ch; }

/* The one full-bleed yellow ground. Yellow takes ink on top, in both themes. */
.moving { background: var(--mark); color: var(--on-mark); }
.moving > .shell { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.moving h2 { max-width: 20ch; }
.moving p { max-width: 62ch; margin-top: var(--space-3); font-size: var(--step-1); line-height: 1.45; }
.moving ul { margin: var(--space-4) 0 0; padding: 0; list-style: none; max-width: 62ch; }
.moving li { padding: var(--space-2) 0; border-top: 1px solid rgb(20 20 15 / 0.22); }
.moving li code { font-size: 0.875rem; }
.moving a { color: var(--on-mark); }
.moving a:focus-visible { outline-color: var(--on-mark); }
.moving .btn-on-mark { color: #ffffff; }
.moving .actions { margin-top: var(--space-5); }

/* ── foot ────────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line-2); }
.foot > .shell {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-3) var(--space-5);
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
}
.foot ul {
  list-style: none; margin: 0 0 0 auto; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
}
.foot a { color: var(--haze); font-size: 0.9375rem; min-height: 44px; display: inline-flex; align-items: center; }
.foot a:hover { color: var(--paper); }
.foot .wordmark { color: var(--paper); font-size: var(--step-0); }

/* ── the two placeholder pages ───────────────────────────────────────────── */
.plain { padding-top: var(--space-6); padding-bottom: var(--space-7); min-height: 50vh; }
.plain h1 { font-size: var(--step-3); line-height: 1.06; }
.plain p { margin-top: var(--space-3); color: var(--haze); font-size: var(--step-1); }

/* ── wider than a phone ──────────────────────────────────────────────────── */
@media (min-width: 720px) {
  :root { --gutter: 34px; }
  .top-links .on-page { display: inline-flex; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .gets { grid-template-columns: repeat(2, 1fr); }
  .senders > div { grid-template-columns: 15rem 1fr; }
  .band > .shell, .moving > .shell { padding-top: var(--space-7); padding-bottom: var(--space-7); }
}
@media (min-width: 980px) {
  .opening {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    padding-top: var(--space-6);
    padding-bottom: var(--space-7);
  }
}
/* On a phone the top row keeps the name and the way in; the button is a thumb's reach below. */
@media (max-width: 479px) {
  .top-links .btn { display: none; }
  .trace li { grid-template-columns: 3.9em 1fr; padding-left: var(--space-3); padding-right: var(--space-3); }
  .trace figcaption { padding-left: var(--space-3); padding-right: var(--space-3); }
  .foot ul { margin-left: 0; }
}
