@font-face {
  font-family: "Junicode";
  src: url("/fonts/Junicode-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #111;
  --ink-soft: #555;
  --rule: #e2e2e2;
  --accent: #4a6fa5;
  --serif: "Junicode", "Iowan Old Style", Georgia, serif;
  --sans: "Ranade", system-ui, sans-serif;
  --side: 340px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background-color: #fff;
  /* White page with a barely-there grain, so it reads as paper up close. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 44px 36px 44px 40px;
  display: flex;
  flex-direction: column;
}

.main {
  padding: 120px 56px 96px 32px;
  max-width: 1040px;
}

/* ---------- menu (Linden's: big italic label, a few tiny words beside it) ---------- */

.name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  width: fit-content;
}

.cats {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cat {
  display: grid;
  grid-template-columns: 128px 120px;
  gap: 14px;
  align-items: baseline;
}

.cat-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.1;
  text-align: right;
  text-transform: uppercase;
  transition: color .15s;
}

.cat-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink-soft);
}

.cat:hover .cat-name,
.cat.is-active .cat-name { color: var(--accent); }

.links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}

.links a { width: fit-content; }
.links a:hover, .links a.is-active { color: var(--accent); }

/* ---------- home + category pages ---------- */

.intro {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  line-height: 1.3;
  max-width: 23em;
  margin: 0 0 72px;
}

/* The homepage is only the intro, sitting in the middle of the page like Linden's greeting. */
.home {
  min-height: calc(100vh - 216px);
  display: flex;
  align-items: center;
}

.home .intro {
  font-size: 36px;
  max-width: 19em;
  margin: 0;
}

.empty {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
}

.page-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 44px;
  margin: 0 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px 28px;
}

/* Bennie and Zaydan's covers: a soft color with just the logo on it. */
.tile {
  aspect-ratio: 16 / 11;
  border-radius: 14px;
  background: #f1f0ed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18%;
  overflow: hidden;
  transition: transform .35s ease;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tile-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  text-align: center;
}

.card:hover .tile { transform: scale(.985); }

.card h3 {
  margin: 14px 0 2px;
  font-weight: 500;
  font-size: 17px;
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34em;
}

/* ---------- case studies ---------- */

.case { max-width: 760px; }

.case h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  margin: 0 0 20px;
}

.lede {
  font-size: 21px;
  line-height: 1.45;
  margin: 0 0 32px;
  max-width: 32em;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  margin: 0 0 48px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.facts dt { font-size: 13px; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-size: 15px; }

.prose h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  margin: 48px 0 12px;
}

.prose p, .prose ul { margin: 0 0 16px; max-width: 36em; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 10px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #bbb; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }

.prose figure { margin: 32px 0; }
.prose figure img { max-height: 75vh; width: auto; border-radius: 10px; }

.about .prose h2 { font-size: 22px; margin-top: 32px; }

.case-foot {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
}

.case-foot a:hover { color: var(--accent); }

/* ---------- phone ---------- */

@media (max-width: 860px) {
  .layout { display: block; }

  .side {
    position: static;
    height: auto;
    padding: 28px 16px 8px;
  }

  .name { font-size: 32px; }

  .cats {
    margin: 28px 0 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 22px;
  }

  .cat { display: block; }
  .cat-name { font-size: 22px; text-align: left; }
  .cat-line { display: none; }

  .links {
    margin-top: 12px;
    padding-left: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px 16px;
  }

  .main { padding: 36px 16px 64px; }

  .intro { font-size: 22px; margin-bottom: 40px; }
  .home { min-height: 0; padding-top: 24px; }
  .home .intro { font-size: 26px; }
  .grid { grid-template-columns: 1fr; gap: 36px; }
  .case h1 { font-size: 40px; }
  .lede { font-size: 18px; }
}
