/* Atrium. Warm paper, ink and one accent. Serif for voice, sans for work. */

:root {
  --paper: #f5f2ec;
  --paper-raised: #efebe3;
  --ink: #171512;
  --muted: #4f4a44;            /* 7.6:1 on paper (AAA) */
  --line: rgba(23, 21, 18, 0.14);
  --line-strong: rgba(23, 21, 18, 0.32);
  --accent: #1e3a8a;           /* 9.7:1 on paper */
  --accent-ink: #ffffff;
  --accent-dim: rgba(30, 58, 138, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: clamp(24px, 5vw, 64px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #05080f;
    --paper-raised: #0b111c;
    --ink: #e8eef7;
    --muted: #a7b3c6;
    --line: rgba(148, 176, 214, 0.16);
    --line-strong: rgba(148, 176, 214, 0.36);
    --accent: #8fe0ff;
    --accent-ink: #05080f;
    --accent-dim: rgba(143, 224, 255, 0.10);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1.02; margin-bottom: 24px; max-width: 14ch; }
h2 { font-size: 24px; line-height: 1.2; }
strong { font-weight: 600; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; }

.skip { position: absolute; left: 16px; top: -60px; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; z-index: 10; }
.skip:focus { top: 16px; }

/* Header and footer */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px var(--gutter);
}
.mark { font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; text-decoration: none; }
.bar nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.bar nav > a:not(.btn) { text-decoration: none; color: var(--muted); }
.bar nav > a:not(.btn):hover { color: var(--ink); }

.foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 48px var(--gutter);
  border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.foot .mark { font-size: 18px; color: var(--ink); }

/* Type roles */
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 34em; margin-bottom: 40px; }
.lede strong { color: var(--ink); }
.muted { color: var(--muted); }
.aside { margin-top: 40px; color: var(--muted); font-size: 15px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn:hover { color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(30, 58, 138, 0.22); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: progress; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--ink); background: var(--accent-dim); box-shadow: none; }
.btn-small { padding: 9px 18px; font-size: 14px; }
.wide { width: 100%; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.link:hover { color: var(--accent); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Forms: a line to write on, nothing more */
.form { display: grid; gap: 28px; justify-items: start; }
.field { display: grid; gap: 6px; width: 100%; }
.field label { font-size: 13px; color: var(--muted); }
.field input {
  width: 100%; padding: 10px 0 12px;
  background: transparent; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  font: 400 20px/1.3 var(--sans);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder { color: var(--muted); opacity: .7; }
.field input:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field input[readonly] { color: var(--muted); border-bottom-style: dashed; }

.notice { margin: -16px 0 32px; padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--accent-dim); }
.status { margin-top: 16px; min-height: 1.6em; color: var(--muted); font-size: 15px; }
.callout { margin-bottom: 8px; padding: 24px 28px; background: var(--paper-raised); border-radius: 4px; max-width: 34em; }
.callout .eyebrow { margin-bottom: 8px; }
.or { display: flex; align-items: center; gap: 16px; margin: 32px 0 20px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Layouts */
.hero { padding: clamp(56px, 14vh, 160px) 0 clamp(48px, 10vh, 120px); }
.narrow { max-width: 460px; padding: clamp(48px, 12vh, 140px) 0 96px; }
.narrow h1 { font-size: clamp(40px, 6vw, 64px); }
.page { padding: clamp(48px, 10vh, 120px) 0 96px; }

/* A single point resting on the horizon. */
.horizon { position: relative; margin-top: clamp(64px, 12vh, 128px); border-top: 1px solid var(--line-strong); }
.horizon span { position: absolute; right: 18%; top: -29px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); clip-path: inset(0 0 50% 0); }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding-bottom: 120px; }
.principles article { border-top: 1px solid var(--ink); padding-top: 24px; }
.principles h2 { margin-bottom: 12px; }
.principles p:not(.index) { color: var(--muted); max-width: 30ch; }
.index { font-size: 12px; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 40px; }

.block { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 32px 48px; padding: 40px 0 56px; border-top: 1px solid var(--ink); }
.block > div, .block > form { max-width: 560px; }
.block .muted + form, .block .muted + .actions { margin-top: 20px; }
.danger { margin-top: 32px; }
.danger summary { cursor: pointer; width: fit-content; color: var(--muted); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.danger summary:hover { color: var(--accent); }
.danger p, .danger form { margin-top: 16px; }

.keys { list-style: none; margin-bottom: 32px; }
.keys li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.keys li:first-child { border-top: 1px solid var(--line); }
.key-name { font-family: var(--serif); font-size: 19px; }
.meta { font-size: 14px; color: var(--muted); }
.add-key { display: grid; gap: 20px; justify-items: start; margin-top: 24px; }

@media (max-width: 760px) {
  .bar nav { gap: 18px; }
  .principles, .block { grid-template-columns: 1fr; }
  .principles { gap: 40px; }
  .block { gap: 20px; }
  .horizon span { right: 12%; }
}

/* Arrival: content settles in, quietly. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s var(--ease) both; }
  .d1 { animation-delay: .06s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .18s; }
  .d4 { animation-delay: .24s; } .d5 { animation-delay: .30s; } .d6 { animation-delay: .36s; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
}
