/* Einfall — einfall.co
   Register: plainness at the nouns. Paper notebook by day, deep water by night.
   Tokens lifted verbatim from the Einfall design system v1.1 §2 / §3.
   No webfonts, no external resources, no JavaScript. */

:root {
  color-scheme: light dark;

  /* Light — «paper» */
  --canvas: #faf6ee;          /* paper-0 */
  --canvas-recessed: #f1ebdd; /* paper-1 */
  --hairline: #e6decd;        /* hairline */
  --ink-1: #26211c;           /* bodies · 13.5:1 */
  --ink-2: #6e6357;           /* meta, labels · 5.5:1 */
  --ink-3: #ab9e8b;           /* ghost only, never content */
  --accent-text: #b44309;     /* ember-ink · text-safe amber · 5.6:1 */
  --canvas-image: none;

  /* Words = mono. Machinery = the system sans. Design system §3. */
  --font-words: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Liberation Mono", monospace;
  --font-machinery: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  /* ~65ch of the 15px mono body, expressed absolutely: the `ch` unit resolves
     against each element's own font, which would put the mono prose column and
     the sans footer on different widths and misalign their hairlines. */
  --measure: 37rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark — «deep stream» */
    --canvas: #0a1e33;                          /* stream-0 */
    --canvas-image: linear-gradient(180deg, #0c2440 0%, #0a1e33 55%, #08192c 100%);
    --canvas-recessed: rgba(151, 221, 251, 0.07); /* stream-1: sky @ 7% */
    --hairline: rgba(151, 221, 251, 0.14);        /* hairline-d: sky @ 14% */
    --ink-1: #e9f2fa;                             /* foam-1 · 14:1 */
    --ink-2: rgba(233, 242, 250, 0.62);           /* foam-2 · 7.9:1 */
    --ink-3: rgba(233, 242, 250, 0.38);           /* foam-3 */
    --accent-text: #ffb347;                       /* spark-text · 8.5:1 */
  }
}

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

html {
  background-color: var(--canvas);
  background-image: var(--canvas-image);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.5rem 2rem;
  color: var(--ink-1);
  font-family: var(--font-words);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
}

@media (min-width: 40em) {
  body {
    padding: 4rem 3rem 2.5rem;
  }
}

/* ---- Interactive: the one amber, used nowhere else ---- */

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent-text) 40%, transparent);
  text-underline-offset: 0.2em;
}

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

a:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Header ---- */

.masthead {
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto 3.5rem;
}

.wordmark {
  display: inline-block;
  font-family: var(--font-words);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-1);
  text-decoration: none;
}

.wordmark:hover,
.wordmark:focus-visible {
  color: var(--accent-text);
  text-decoration: none;
}

/* ---- The holding page ---- */

.holding {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 0;
}

.holding .wordmark-hero {
  margin: 0;
  font-family: var(--font-words);
  font-size: clamp(2.25rem, 9vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink-1);
}

.tagline {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  color: var(--ink-2);
}

.rule {
  height: 0;
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.holding p {
  margin: 0 0 1.25rem;
}

.holding p:last-of-type {
  margin-bottom: 0;
}

.holding .gloss {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.holding .contact {
  margin-top: 2rem;
}

/* ---- Prose pages ---- */

.prose {
  flex: 1 1 auto;
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
}

.prose h1 {
  margin: 0;
  font-family: var(--font-words);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.prose h2 {
  margin: 3rem 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-words);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

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

.prose li:last-child {
  margin-bottom: 0;
}

.prose li p {
  margin: 0 0 0.5rem;
}

.prose li p:last-child {
  margin-bottom: 0;
}

.prose ol {
  list-style: decimal;
}

.prose ol > li::marker {
  color: var(--ink-2);
}

.prose ul > li::marker {
  /* ink-2, matching the ol markers: ink-3 is reserved for ghost text that
     never carries information, and a list marker is structural. */
  color: var(--ink-2);
}

.prose strong {
  /* The reviewed privacy/support copy leans on bold lead-ins for structure,
     so emphasis has to read clearly against the mono body. */
  font-weight: 600;
  color: var(--ink-1);
}

.prose .meta {
  margin: 0.75rem 0 0;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.prose .lede {
  margin-top: 2rem;
}

code {
  font-family: var(--font-words);
  font-size: 0.9375em;
  padding: 0.05em 0.3em;
  border-radius: 3px;
  background: var(--canvas-recessed);
  color: var(--ink-1);
}

pre {
  font-family: var(--font-words);
  font-size: 0.875rem;
  line-height: 1.7;
  background: var(--canvas-recessed);
  border-radius: 4px;
  padding: 1em 1.25em;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

/* ---- Footer ---- */

.footer {
  max-width: var(--measure);
  width: 100%;
  margin: 5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-machinery);
  font-size: 0.8125rem;
  line-height: 1.9;
  color: var(--ink-2);
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
}

.footer li + li::before {
  content: "·";
  color: var(--ink-3);
  margin-right: 0.5rem;
}

.footer .small-print {
  margin: 0.75rem 0 0;
  color: var(--ink-2);
}

/* ---- 404 ---- */

.notice {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--measure);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 0;
}

.notice h1 {
  margin: 0 0 1rem;
  font-family: var(--font-words);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
}

.notice p {
  margin: 0;
  color: var(--ink-2);
}
