/* Work/Life 2.0 -- paradaice.info
   Fonts are self-hosted on purpose (no third-party requests; see ../GROUND_TRUTH.md). */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque-500-800-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/newsreader-400-500-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-400-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500-normal-latin.woff2") format("woff2");
}

/* Two inks carry the whole idea: highlighter yellow marks the people, ultramarine the agents. */
:root {
  --paper: #eef1f4;
  --paper-raised: #f7f8fa;
  --grid: rgba(22, 32, 43, 0.055);
  --ink: #16202b;
  --muted: #566374;
  --rule: #cdd4dd;
  --agent: #2f41c9;
  --agent-soft: rgba(47, 65, 201, 0.09);
  --human: #f2d64b;
  --human-ink: #16202b;
  --del: #78828f;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --measure: 64ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f141b;
    --paper-raised: #151c25;
    --grid: rgba(230, 234, 240, 0.045);
    --ink: #e6eaf0;
    --muted: #9aa6b5;
    --rule: #2a3440;
    --agent: #9aa7ff;
    --agent-soft: rgba(154, 167, 255, 0.1);
    --human: #e3c843;
    --human-ink: #0f141b;
    --del: #6c7684;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f141b;
  --paper-raised: #151c25;
  --grid: rgba(230, 234, 240, 0.045);
  --ink: #e6eaf0;
  --muted: #9aa6b5;
  --rule: #2a3440;
  --agent: #9aa7ff;
  --agent-soft: rgba(154, 167, 255, 0.1);
  --human: #e3c843;
  --human-ink: #0f141b;
  --del: #6c7684;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  /* Lab-notebook grid, 24px squares. */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1875rem;
  line-height: 1.55;
}

.page {
  max-width: 68rem;
  margin: 0 auto;
  padding-inline: clamp(16px, 5vw, 56px);
  padding-block: 0 48px;
}

a {
  color: inherit;
}
a:focus-visible {
  outline: 2px solid var(--agent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

p {
  margin: 0;
}

.dim {
  color: var(--muted);
}

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

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 28px 0;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark .slash {
  color: var(--agent);
  padding-inline: 0.04em;
}
.wordmark .ver {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8em;
  background: var(--human);
  color: var(--human-ink);
  padding: 0.05em 0.3em;
  letter-spacing: 0;
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.masthead nav a {
  text-decoration: none;
  color: var(--muted);
}
.masthead nav a:hover {
  color: var(--agent);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px 56px;
  align-items: end;
  padding-block: clamp(48px, 9vw, 104px) clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.hero > .eyebrow,
.hero > h1,
.hero > .lede {
  grid-column: 1;
}
.hero > .diff {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: end;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.25rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.agent-ink {
  color: var(--agent);
  font-weight: 600;
}

.lede {
  max-width: var(--measure);
  margin-top: 28px;
  font-size: 1.3125rem;
  line-height: 1.5;
}

/* The one bold device: a changelog diff from 1.0 to 2.0. */
.diff {
  margin: 0;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
}
.diff figcaption {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
}
.diff ol {
  list-style: none;
  margin: 0;
  padding: 10px 0;
}
.diff li {
  display: grid;
  grid-template-columns: 2.25em minmax(0, 1fr);
  padding: 5px 16px 5px 0;
}
.diff .sign {
  text-align: center;
  font-weight: 500;
}
.diff .del {
  color: var(--del);
}
.diff .del .txt {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--del);
}
.diff .add {
  background: var(--agent-soft);
  color: var(--ink);
}
.diff .add .sign {
  color: var(--agent);
}
.diff .add + .del {
  margin-top: 8px;
}

/* On load, the 1.0 lines get crossed out one after another. Resting state is crossed out. */
@media (prefers-reduced-motion: no-preference) {
  .diff .del .txt {
    animation: strike 0.5s ease-out both;
  }
  .diff li:nth-child(1) .txt { animation-delay: 0.35s; }
  .diff li:nth-child(3) .txt { animation-delay: 0.75s; }
  .diff li:nth-child(5) .txt { animation-delay: 1.15s; }
  .diff .add {
    animation: land 0.45s ease-out both;
  }
  .diff li:nth-child(2) { animation-delay: 0.6s; }
  .diff li:nth-child(4) { animation-delay: 1s; }
  .diff li:nth-child(6) { animation-delay: 1.4s; }
}
@keyframes strike {
  from { text-decoration-color: transparent; color: var(--ink); }
  to { text-decoration-color: var(--del); color: var(--del); }
}
@keyframes land {
  from { background-color: transparent; }
  to { background-color: var(--agent-soft); }
}

/* ---------- sections ---------- */

.block {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 20px 56px;
  padding-block: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--rule);
}
.block > h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.block > :not(h2) {
  grid-column: 2;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

/* A real sequence, so it is numbered. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}
.steps li::before {
  content: "step " counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.steps p {
  color: var(--muted);
  font-size: 1.0625rem;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.side {
  padding: 22px 24px 24px;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}
.side-label {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  margin-bottom: 14px;
}
.human .side-label {
  background: var(--human);
  color: var(--human-ink);
}
.agent .side-label {
  background: var(--agent);
  color: var(--paper);
}
.side ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.side li {
  padding-left: 1.2em;
  position: relative;
}
.side li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.55em;
  height: 2px;
}
.human li::before {
  background: var(--human);
}
.agent li::before {
  background: var(--agent);
}

.rules {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
}
.rules dt {
  font-family: var(--display);
  font-weight: 700;
  margin-bottom: 6px;
}
.rules dd {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

.join {
  border-bottom: 0;
}
.join p {
  max-width: var(--measure);
}
.contact {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 24px;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* ---------- narrow screens ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .hero > .diff {
    grid-column: 1;
    grid-row: auto;
  }
  .block {
    grid-template-columns: minmax(0, 1fr);
  }
  .block > :not(h2) {
    grid-column: 1;
  }
  .steps,
  .rules {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1.0625rem;
  }
  .lede {
    font-size: 1.1875rem;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}
