/* IseeBlack
   One family (Literata, self-hosted, OFL), black ground, ivory type.
   The one bold moment is the hero specimen: a literal line struck through, then the published line. */

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("/fonts/literata-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #000000;
  --ivory: #ece4d2;
  --paper: #b8b0a1;
  --ash: #8a8275;
  --rule: #2c2925;
  --card-ink: #1a1815;

  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --side: 13rem;
  --measure: 40rem;
  --gutter: clamp(2rem, 6vw, 5.5rem);
  --pad: clamp(1.25rem, 5vw, 3rem);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ivory);
  color: var(--ink);
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--ash);
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--ivory);
  outline-offset: 4px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--side) + var(--gutter) + var(--measure) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--ivory);
  color: var(--ink);
  text-decoration: none;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

/* Masthead */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ivory);
}

.mark {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--ivory);
  flex: none;
}

.masthead ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
}

.masthead nav a {
  color: var(--paper);
  text-decoration-color: transparent;
  font-size: 1rem;
}

.masthead nav a:hover {
  color: var(--ivory);
  text-decoration-color: currentColor;
}

/* Hero */

.hero {
  padding-block: clamp(3.5rem, 11vh, 7.5rem) clamp(4rem, 10vw, 7rem);
}

.hero h1 {
  max-width: 19ch;
  font-size: clamp(2.35rem, 6.2vw, 4.75rem);
  font-weight: 300;
  line-height: 1.07;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.lede {
  max-width: 37rem;
  margin-top: 2rem;
  color: var(--paper);
  font-size: clamp(1.1rem, 1.8vw, 1.28rem);
  line-height: 1.6;
}

.hero-links {
  margin-top: 3rem;
  color: var(--paper);
}

.hero-links a {
  color: var(--ivory);
}

/* Specimen: literal line, struck, then the published line */

.specimen {
  margin-top: clamp(3rem, 7vw, 4.75rem);
  max-width: 52rem;
  display: grid;
  gap: 1.1rem;
}

.specimen-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
}

.specimen-tag {
  color: var(--ash);
  font-size: 0.9rem;
  font-style: italic;
}

.specimen .literal p {
  color: var(--ash);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  line-height: 1.35;
}

.specimen .published p {
  color: var(--ivory);
  font-size: clamp(1.65rem, 4.2vw, 3.1rem);
  font-style: italic;
  font-weight: 350;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.specimen s {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 100% 1.5px;
}

.specimen figcaption {
  margin-top: 0.75rem;
  margin-left: calc(6.5rem + 1rem);
  max-width: 34rem;
  color: var(--ash);
  font-size: 0.95rem;
}

.sect-body > .specimen-small {
  margin-top: 3.5rem;
}

.specimen-small .published p {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

@media (prefers-reduced-motion: no-preference) {
  .hero .literal {
    animation: fade-in 0.7s ease-out 0.2s both;
  }

  .hero .struck {
    animation: strike 0.8s cubic-bezier(0.6, 0, 0.3, 1) 1s both;
  }

  .hero .published {
    animation: fade-in 0.9s ease-out 1.85s both;
  }

  .hero figcaption {
    animation: fade-in 0.9s ease-out 2.3s both;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes strike {
  from {
    background-size: 0% 1.5px;
  }
  to {
    background-size: 100% 1.5px;
  }
}

/* Sections: side heads in the margin, text in a single measure */

.sect {
  display: grid;
  grid-template-columns: var(--side) minmax(0, var(--measure));
  column-gap: var(--gutter);
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  position: relative;
}

.sect::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  border-top: 1px solid var(--rule);
}

.sect h2 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.005em;
  align-self: start;
  position: sticky;
  top: 2rem;
  padding-top: 0.35rem;
}

.sect-body > * + * {
  margin-top: 1.5rem;
}

.lead {
  font-size: clamp(1.3rem, 2.3vw, 1.6rem);
  font-weight: 350;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.sect-body > p:not(.lead):not(.email):not(.status) {
  color: var(--paper);
}

/* Record: table-of-contents ledger */

.ledger-group {
  margin-top: 3rem;
}

.ledger-group h3 {
  color: var(--paper);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.ledger > div {
  display: flex;
  align-items: baseline;
  padding-block: 0.55rem;
}

.ledger dt {
  display: flex;
  align-items: baseline;
  flex: 1;
  min-width: 0;
}

.ledger dt::after {
  content: "";
  flex: 1;
  min-width: 1.5rem;
  margin-inline: 0.75rem;
  border-bottom: 1px dotted var(--ash);
  transform: translateY(-0.3em);
}

.ledger dd {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Method: a real sequence, so it is numbered */

.steps {
  counter-reset: step;
  margin-top: 2.5rem;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--rule);
}

.steps li:last-child {
  border-bottom: 1px solid var(--rule);
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  color: var(--ash);
  font-size: 1.15rem;
  font-variant-numeric: oldstyle-nums;
  line-height: 1.5;
}

.steps h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
}

.steps p {
  color: var(--paper);
  margin-top: 0.2rem;
}

/* System */

.parts {
  margin-top: 2.5rem;
}

.parts dt {
  font-weight: 600;
  margin-top: 1.6rem;
}

.parts dt:first-child {
  margin-top: 0;
}

.parts dd {
  color: var(--paper);
  margin-top: 0.25rem;
}

.card {
  margin-top: 3.5rem;
  background: var(--ivory);
  color: var(--card-ink);
  padding: clamp(1.4rem, 4vw, 2.25rem);
  border-radius: 3px;
}

.card figcaption {
  font-size: 0.92rem;
  font-style: italic;
  color: #5d574d;
  margin-bottom: 1.25rem;
}

.card dl > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.6rem;
  border-top: 1px solid #cfc6b3;
}

.card dt {
  font-size: 0.95rem;
  color: #5d574d;
}

.card dd {
  font-size: 1.02rem;
  line-height: 1.5;
}

.flag {
  margin-top: 1.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--ivory);
}

.flag-label {
  color: var(--ash);
  font-size: 0.95rem;
  font-style: italic;
}

.flag p + p {
  margin-top: 0.35rem;
}

.sect-body > .status {
  margin-top: 2.5rem;
  color: var(--ash);
  font-style: italic;
}

/* Channels */

.channels {
  margin-top: 2.5rem;
}

.channels li {
  border-top: 1px solid var(--rule);
}

.channels li:last-child {
  border-bottom: 1px solid var(--rule);
}

.channels a {
  display: block;
  padding-block: 1.4rem;
  text-decoration: none;
}

.channel-name {
  display: block;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s ease;
}

.channels a:hover .channel-name,
.channels a:focus-visible .channel-name {
  text-decoration-color: currentColor;
}

.channel-desc {
  display: block;
  margin-top: 0.4rem;
  color: var(--paper);
}

/* Contact */

.email {
  font-size: clamp(1.5rem, 4.2vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2.5rem 3rem;
  position: relative;
  color: var(--ash);
  font-size: 0.95rem;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  border-top: 1px solid var(--rule);
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

/* 404 */

.notfound {
  padding-block: clamp(5rem, 18vh, 10rem);
}

.notfound h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.1;
}

.notfound p {
  margin-top: 1.5rem;
  color: var(--paper);
}

/* Narrow screens */

@media (max-width: 52rem) {
  .sect {
    grid-template-columns: minmax(0, 1fr);
  }

  .sect h2 {
    position: static;
    margin-bottom: 1.5rem;
    color: var(--paper);
  }
}

@media (max-width: 34rem) {
  body {
    font-size: 1.0625rem;
  }

  .specimen-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .specimen figcaption {
    margin-left: 0;
  }

  .card dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .masthead ul {
    gap: 0.4rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .masthead nav,
  .skip {
    display: none;
  }
}
