/* Simply Design Life
   Washi paper, sumi ink, aizome indigo, smoked oak. */

@font-face { font-family: "Jost"; src: url(/fonts/jost-latin-300-normal.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/fonts/jost-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url(/fonts/jost-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F4F4F1;
  --panel: #E7E6E1;
  --ink: #1F2328;
  --stone: #5F6360;
  --indigo: #34445E;
  --indigo-deep: #26324A;
  --oak: #8B7358;
  --hair: #D6D5CF;

  --sans: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;

  /* modular scale, ratio 1.25 from 18px */
  --s-1: 0.889rem;
  --s0: 1.125rem;
  --s1: 1.406rem;
  --s2: 1.758rem;
  --s3: 2.197rem;
  --s4: 2.747rem;
  --s5: clamp(2.4rem, 4.6vw, 3.9rem);

  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wide: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--s0)/1.7 var(--serif);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--indigo-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* Masthead */
.masthead {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.6rem var(--gutter) 1.4rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.wordmark {
  font: 300 1.6rem/1 var(--sans);
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}
.masthead ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.masthead nav a {
  font: 400 1rem/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  padding-bottom: .25rem;
  border-bottom: 1px solid transparent;
}
.masthead nav a:hover, .masthead nav a[aria-current="page"] { border-bottom-color: var(--ink); }

main { min-height: 60vh; }

/* Hero: an asymmetric two-panel split, like a shoji screen */
.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 0;
  align-items: stretch;
}
.hero-image { display: block; position: relative; background: var(--panel); min-height: min(78vh, 44rem); }
.hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-text {
  background: var(--panel);
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 6px solid var(--paper);
}
.hero-text h1 { font-size: clamp(2.1rem, 3.3vw, 3.1rem); line-height: 1.1; margin-bottom: 1.6rem; }
.hero-text p { margin: 0 0 1rem; max-width: 34ch; color: var(--ink); }
.hero-link { font-family: var(--sans); font-size: 1rem; margin-top: .6rem !important; color: var(--stone) !important; }

/* Series band */
.series-band {
  max-width: var(--wide);
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 2rem 4rem;
}
.series-band-head h2 { font-size: var(--s3); margin-bottom: 1rem; }
.series-band-head p { margin: 0; color: var(--stone); max-width: 30ch; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.steps li { border-bottom: 1px solid var(--hair); }
.steps a {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  padding: 1.4rem 0;
  text-decoration: none;
  color: var(--ink);
}
.step-n { grid-row: 1 / 3; font: 300 var(--s4)/1 var(--sans); color: var(--oak); }
.step-title { font: 400 var(--s1)/1.25 var(--sans); }
.step-desc { color: var(--stone); font-size: var(--s-1); line-height: 1.55; margin-top: .35rem; max-width: 60ch; }
.steps a:hover .step-title { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

/* Section heads */
.latest, .topics, .follow, .listing, .more {
  max-width: var(--wide);
  margin: clamp(4rem, 9vw, 7rem) auto 0;
  padding: 0 var(--gutter);
}
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: .9rem; margin-bottom: .5rem; }
.section-head h2 { font-size: var(--s3); }
.section-head a { font-family: var(--sans); font-size: 1rem; }

/* Index list: a catalogue, not a card grid */
.index { list-style: none; margin: 0; padding: 0; }
.index-item a {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 1.5rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--hair);
  text-decoration: none;
  color: var(--ink);
}
.index-item img { grid-row: 1 / 3; width: 7.5rem; aspect-ratio: 4 / 5; object-fit: cover; background: var(--panel); }
.index-cat { font: 400 .875rem/1.4 var(--sans); color: var(--oak); align-self: end; }
.index-title { font: 300 var(--s1)/1.25 var(--sans); margin-top: .2rem; }
.index-item a:hover .index-title { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }

.index-large { columns: 2; column-gap: 4rem; }
.index-large .index-item { break-inside: avoid; }

/* Topics */
.topics h2, .follow h2 { font-size: var(--s3); margin-bottom: 1.2rem; }
.topics ul, .topics-inline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.topics a, .topics-inline a {
  display: inline-block;
  font: 400 1rem/1 var(--sans);
  padding: .7rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}
.topics a:hover, .topics-inline a:hover { background: var(--ink); color: var(--paper); }
.count { color: var(--stone); margin-left: .3rem; }
.topics a:hover .count { color: var(--panel); }
.topics-inline { margin: 0 0 1.5rem; }

/* Follow */
.follow { margin-bottom: 2rem; }
.follow h2 { border-top: 1px solid var(--ink); padding-top: clamp(2rem, 4vw, 3rem); }
.follow p { max-width: 52ch; color: var(--stone); margin: 0 0 1.4rem; }
.follow-links { display: flex; gap: .8rem; flex-wrap: wrap; }
.button {
  display: inline-block;
  font: 400 1rem/1 var(--sans);
  padding: .95rem 1.4rem;
  background: var(--indigo);
  color: var(--paper);
  text-decoration: none;
}
.button:hover { background: var(--indigo-deep); color: var(--paper); }
.button-quiet { background: transparent; color: var(--indigo); box-shadow: inset 0 0 0 1px var(--indigo); }
.button-quiet:hover { background: var(--indigo); }

/* Article */
.post, .page { padding: 0 var(--gutter); }
.post-head, .page-head { max-width: 50rem; margin: clamp(2.5rem, 6vw, 5rem) auto 2.5rem; }
.listing .page-head { margin-left: 0; margin-top: 0; }
.post-meta { font: 400 .9375rem/1.4 var(--sans); color: var(--stone); margin: 0 0 1.2rem; }
.post-meta a { color: var(--oak); text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }
.sep { display: inline-block; width: 1.4rem; height: 1px; background: var(--hair); vertical-align: middle; margin: 0 .6rem; }
.post-head h1, .page-head h1 { font-size: var(--s5); line-height: 1.08; }
.post-standfirst { font-size: var(--s1); line-height: 1.5; color: var(--stone); margin: 1.2rem 0 0; max-width: 40ch; }
.crumb { font: 400 .9375rem/1 var(--sans); margin: 0 0 1rem; }

.post-hero { max-width: 64rem; margin: 0 auto 3rem; }
.post-hero img { width: 100%; max-height: 68vh; object-fit: cover; background: var(--panel); }

.prose { max-width: var(--measure); margin: 0 auto; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-size: var(--s3); margin-top: 2.4em; margin-bottom: .2em; }
.prose h3 { font-size: var(--s2); margin-top: 2em; margin-bottom: .2em; }
.prose h4 { font-size: var(--s1); margin-top: 1.8em; }
.prose h1 { font-size: var(--s3); margin-top: 2em; }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  margin: 2em 0;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--oak);
  font-style: italic;
  font-size: var(--s1);
  line-height: 1.5;
}
.prose img { margin: 2.2em auto; background: var(--panel); }
.prose p > img { margin: 2.2em auto 0; }
.prose em:only-child { display: block; font-size: var(--s-1); color: var(--stone); }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 3em 0; }
.prose .video { position: relative; aspect-ratio: 16 / 9; margin: 2em 0; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.disclosure {
  font: 400 .9375rem/1.5 var(--sans);
  color: var(--stone);
  border-left: 2px solid var(--hair);
  padding-left: 1rem;
  margin-bottom: 2rem !important;
}

.series {
  background: var(--panel);
  padding: 1.4rem 1.6rem;
  margin: 0 0 2.5rem;
  font-family: var(--sans);
}
.series-title { font-size: 1rem; color: var(--stone); margin: 0 0 .6rem !important; }
.series ol { margin: 0; padding-left: 1.2em; font-size: 1.0625rem; line-height: 1.5; }
.series [aria-current] { font-weight: 500; }

.more { max-width: 50rem; }
.more h2 { font-size: var(--s2); border-bottom: 1px solid var(--ink); padding-bottom: .9rem; }

.page .prose > img:first-child, .page .prose > p:first-child > img { max-width: 22rem; margin-top: 0; }

/* Footer */
.colophon { margin-top: clamp(5rem, 10vw, 8rem); background: var(--ink); color: var(--panel); }
.colophon-inner { max-width: var(--wide); margin: 0 auto; padding: 3.5rem var(--gutter) 3rem; font-family: var(--sans); }
.colophon-mark { font: 300 var(--s3)/1 var(--sans); margin: 0 0 .8rem; color: var(--paper); }
.colophon-line { margin: 0 0 2rem; color: #B9BBB8; }
.colophon-links { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; gap: 1.6rem; flex-wrap: wrap; }
.colophon a { color: var(--paper); }
.colophon-small { font-size: .875rem; color: #9FA29F; margin: 0; }

/* Responsive */
@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; padding: 0; }
  .hero-image { min-height: 0; aspect-ratio: 4 / 4.2; max-height: 70vh; }
  .hero-text { border-left: 0; padding: 2rem var(--gutter) 2.5rem; }
  .series-band { grid-template-columns: 1fr; }
  .index-large { columns: 1; }
}
@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  .masthead { padding-top: 1.2rem; }
  .masthead ul { gap: 1.1rem; }
  .index-item a { grid-template-columns: 5.5rem 1fr; column-gap: 1rem; }
  .index-item img { width: 5.5rem; }
  .index-title { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
