/* Dreaming Cima website styles. */

:root {
  --ink: #302b45;
  --ink-soft: #5d5669;
  --paper: #f5f0e7;
  --paper-deep: #e9dfd0;
  --white: #fffdf8;
  --copper: #99633f;
  --copper-dark: #70462f;
  --line: #d8cbbb;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
}

a {
  color: var(--copper-dark);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
}

a:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  padding: 0.65rem 1rem;
  color: var(--white);
  background: var(--ink);
  font-family: var(--sans);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 3rem));
  min-height: 5.5rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}

.wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-header nav a {
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(300px, 570px);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  justify-content: center;
  width: min(1180px, calc(100% - 3rem));
  min-height: calc(100vh - 12rem);
  margin: 0 auto;
  padding: 4.5rem 0 5.5rem;
}

.cover-wrap {
  position: relative;
}

.cover-wrap::before {
  position: absolute;
  inset: 7% -8% -5% 8%;
  border: 1px solid var(--line);
  content: "";
}

.book-cover {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 24px 55px rgb(48 43 69 / 22%), 0 4px 10px rgb(48 43 69 / 15%);
}

.eyebrow {
  margin: 0 0 1.2rem;
  color: var(--copper-dark);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2 {
  font-weight: 500;
  line-height: 1.08;
}

.hero h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(3rem, 5.5vw, 5.6rem);
  letter-spacing: -0.035em;
}

.hero h1 span {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.47em;
  font-style: italic;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.byline {
  margin: 1.6rem 0 0;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tagline {
  max-width: 28rem;
  margin: 2rem 0 0;
  color: var(--copper-dark);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.5;
}

.intro {
  max-width: 34rem;
  margin: 1.5rem 0 2rem;
  color: var(--ink-soft);
}

.button {
  display: inline-block;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--ink);
  color: var(--white);
  background: var(--ink);
  font-family: var(--sans);
  font-size: 0.83rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  line-height: 1.4;
  text-decoration: none;
}

.button:hover {
  color: var(--ink);
  background: transparent;
}

.site-footer {
  width: min(1180px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.76rem;
}

.reading-page {
  width: min(960px, calc(100% - 3rem));
  margin: 0 auto;
}

.reading-header {
  max-width: 740px;
  padding: 5rem 0 3rem;
}

.reading-header h1 {
  margin: 0 0 1.8rem;
  font-size: clamp(2.8rem, 7vw, 5rem);
  letter-spacing: -0.035em;
}

.reading-header h1 span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.65em;
  font-style: italic;
}

.reading-header > p:not(.eyebrow) {
  max-width: 610px;
}

.reading-header .source-meta {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.6;
}

.category-nav {
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.category-nav h2 {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.category-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-nav a {
  font-family: var(--sans);
  font-size: 0.8rem;
}

.source-category {
  padding: 2.5rem 0 1rem;
}

.source-category h2 {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.source-list {
  margin: 0;
  padding-left: 2rem;
}

.source-list li {
  padding: 0.85rem 0 0.85rem 0.5rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.source-list li::marker {
  color: var(--copper-dark);
  font-family: var(--sans);
  font-size: 0.72rem;
}

.source-list a {
  overflow-wrap: anywhere;
}

.archived-copy {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--sans);
  font-size: 0.78rem;
}

.back-to-top {
  display: inline-block;
  margin: 2.5rem 0 4rem;
  font-family: var(--sans);
  font-size: 0.8rem;
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: minmax(0, 420px);
    gap: 3.5rem;
    min-height: 0;
    padding-top: 3rem;
  }

  .cover-wrap {
    width: calc(100% - 1.5rem);
  }

  .hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .site-header,
  .hero,
  .reading-page,
  .site-footer {
    width: min(100% - 2rem, 1180px);
  }

  .site-header {
    min-height: 4.75rem;
  }

  .wordmark {
    font-size: 1rem;
  }

  .site-header nav a {
    font-size: 0.7rem;
  }

  .hero {
    padding: 2.5rem 0 4rem;
  }

  .reading-header {
    padding: 3.5rem 0 2rem;
  }

  .source-list {
    padding-left: 1.4rem;
  }

  .source-list li {
    padding-left: 0.25rem;
  }
}

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

@media print {
  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .site-header,
  .category-nav,
  .back-to-top,
  .site-footer,
  .skip-link {
    display: none;
  }

  .reading-page {
    width: 100%;
  }

  .reading-header {
    padding-top: 0;
  }

  .source-category {
    break-inside: auto;
  }

  .source-category h2 {
    break-after: avoid;
  }

  .source-list li {
    break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}
