/* ==========================================================================
   kellybclancy.com — "7b / Rule" design system
   Pure black & white. One hairline rule between blocks.
   Jost (light) for display, DM Mono for labels & credits.
   Tokens and desktop values are final per the approved spec; responsive
   rules per handoff (≥1180 / 720–1179 / <720).
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --body-grey: #444444;
  --muted-grey: #888888;
  --label-grey: #999999;
  --hairline-grey: #e2e2e2;
  --gutter: 40px;

  /* Single accent, pulled from the book jacket. Swap this one value to
     re-theme every colored element on the site. */
  --accent: #1a46c8;
  --accent-deep: #12329a;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Jost", sans-serif;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; }

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; }

/* Accessibility: skip link, visually hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  font: 400 12px "DM Mono", monospace;
  letter-spacing: 0.12em;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 26px var(--gutter) 0;
}

.wordmark {
  font: 400 22px "Jost", sans-serif;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 26px;
  font: 400 12px "DM Mono", monospace;
  letter-spacing: 0.12em;
}

.site-nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); }

/* --------------------------------------------------------------------------
   Shared type components
   -------------------------------------------------------------------------- */

.eyebrow {
  font: 400 12px "DM Mono", monospace;
  letter-spacing: 0.24em;
  color: var(--label-grey);
  margin: 0 0 24px;
}

.label {
  font: 400 11px "DM Mono", monospace;
  letter-spacing: 0.18em;
  color: var(--label-grey);
  margin: 0;
}

.tag-link {
  font: 400 11px "DM Mono", monospace;
  letter-spacing: 0.16em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}

.tag-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 13px 26px;
  font: 400 14px "Jost", sans-serif;
}

.btn-secondary {
  display: inline-block;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 12px 25px;
  font: 400 14px "Jost", sans-serif;
}

/* --------------------------------------------------------------------------
   Hero (homepage)
   -------------------------------------------------------------------------- */

.hero {
  padding: 56px var(--gutter) 52px;
  text-align: center;
}

.hero h1 {
  font: 300 46px/1.16 "Jost", sans-serif;
  letter-spacing: -0.005em;
  margin: 0 auto;
  max-width: 640px;
  text-wrap: balance;
}

/* Interior pages: page title block, same rhythm as hero but left-aligned */
.page-head {
  padding: 52px var(--gutter) 48px;
}

.page-head h1 {
  font: 300 46px/1.16 "Jost", sans-serif;
  letter-spacing: -0.005em;
  margin: 0;
  max-width: 860px;
  text-wrap: balance;
}

.page-head .eyebrow { margin-bottom: 20px; }

/* Quieter page-head variant: long intro sentences set at pull-quote scale,
   not hero scale */
.page-head--quiet h1 {
  font-size: 27px;
  line-height: 1.42;
}

/* --------------------------------------------------------------------------
   Book block (homepage) & two-column sections
   -------------------------------------------------------------------------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
}

.two-col > .col-text {
  padding: 44px var(--gutter);
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.two-col > .col-figure {
  padding: 44px var(--gutter);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Figure-first variant (e.g. /about): the vertical rule sits on the figure
   column; the text column carries no rule of its own */
.two-col--figure-first > .col-figure { border-right: 1px solid var(--ink); }
.two-col--figure-first > .col-text { border-right: none; }

.book-title {
  font: 300 42px/1.06 "Jost", sans-serif;
  letter-spacing: -0.005em;
  margin: 0;
}

.book-subtitle {
  font: 300 20px/1.4 "Jost", sans-serif;
  color: var(--body-grey);
  margin: 0;
  max-width: 440px;
}

.logline {
  font: 300 18px/1.6 "Jost", sans-serif;
  color: var(--body-grey);
  margin: 0;
  max-width: 440px;
}

.ribbon {
  font: 400 12px/1.7 "DM Mono", monospace;
  letter-spacing: 0.04em;
  color: var(--muted-grey);
  margin: 0;
  max-width: 420px;
}

/* Book cover: swap the placeholder div for an <img class="book-cover"> when
   the jacket asset arrives. Same border, same dimensions. */
.book-cover,
.cover-placeholder {
  width: 250px;
  border: 1px solid var(--ink);
}

.cover-placeholder {
  height: 375px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 11px "DM Mono", monospace;
  color: #bbb;
  letter-spacing: 0.1em;
}

/* Larger cover on /book */
.book-cover-lg,
.cover-placeholder-lg { width: 320px; }
.cover-placeholder-lg { height: 480px; }

/* Author photo on /about — landscape 3:2, no border per Kelly */
.author-photo {
  width: 100%;
  max-width: 520px;
  height: auto;
}

.photo-placeholder {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--ink);
}

.photo-placeholder {
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 11px "DM Mono", monospace;
  color: #bbb;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Praise / pull quotes
   -------------------------------------------------------------------------- */

.praise {
  border-top: 1px solid var(--ink);
  padding: 56px var(--gutter);
  text-align: center;
}

.praise blockquote {
  font: 300 27px/1.42 "Jost", sans-serif;
  margin: 0 auto;
  max-width: 860px;
  text-wrap: pretty;
}

.praise blockquote + blockquote { margin-top: 44px; }

.attribution {
  font: 400 11px "DM Mono", monospace;
  letter-spacing: 0.18em;
  color: var(--label-grey);
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Essay lists
   -------------------------------------------------------------------------- */

.essay-list {
  border-top: 1px solid var(--ink);
  padding: 44px var(--gutter) 52px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.section-head h2,
.section-head h1 {
  font: 400 30px "Jost", sans-serif;
  margin: 0;
}

.essay-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  column-gap: 32px;
  row-gap: 8px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--hairline-grey);
}

.essay-title {
  font: 300 29px/1.16 "Jost", sans-serif;
  transition: color 120ms ease;
}

/* Color reveals on interaction: resting page stays austere black/white */
.essay-row:hover { opacity: 1; }
.essay-row:hover .essay-title { color: var(--accent); }

.essay-outlet {
  font: 400 12px "DM Mono", monospace;
  letter-spacing: 0.08em;
  color: var(--muted-grey);
  text-transform: uppercase;
}

.essay-dek {
  grid-column: 1;
  font: 300 16px/1.5 "Jost", sans-serif;
  color: var(--body-grey);
  max-width: 640px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Prose sections (book description, science, about)
   -------------------------------------------------------------------------- */

.prose-section {
  border-top: 1px solid var(--ink);
  padding: 44px var(--gutter) 52px;
}

.prose-section .label { margin-bottom: 20px; }

.prose {
  max-width: 640px;
}

.prose p {
  font: 300 18px/1.6 "Jost", sans-serif;
  color: var(--body-grey);
  margin: 0 0 20px;
}

.prose p:last-child { margin-bottom: 0; }

.prose-lede {
  font: 300 27px/1.42 "Jost", sans-serif;
  color: var(--ink);
  max-width: 860px;
  margin: 0 0 28px;
  text-wrap: pretty;
}

.prose a {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

.prose a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}

/* Accolade rows on /book */
.accolade-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  column-gap: 32px;
  align-items: baseline;
  padding: 24px 0;
  border-top: 1px solid var(--hairline-grey);
}

.accolade-row:first-of-type { border-top: none; }

.accolade-list {
  font: 300 20px/1.7 "Jost", sans-serif;
  margin: 0;
}

.accolade-list a {
  border-bottom: 1px solid var(--hairline-grey);
  padding-bottom: 1px;
}

.accolade-list a:hover { color: var(--accent); border-bottom-color: var(--accent); opacity: 1; }

/* Video embed on /book */
.video-frame {
  max-width: 860px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ink);
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Order links on /book */
.order-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Small print (Sloan credit) */
.small-print {
  font: 400 12px/1.7 "DM Mono", monospace;
  letter-spacing: 0.04em;
  color: var(--muted-grey);
  margin: 0;
}

/* Liftable third-person bio on /about */
.liftable {
  border: 1px solid var(--ink);
  padding: 32px 36px;
  max-width: 720px;
}

.liftable .label { margin-bottom: 18px; }

.liftable p {
  font: 300 17px/1.6 "Jost", sans-serif;
  color: var(--ink);
  margin: 0;
}

/* Contact list on /about */
.contact-list {
  margin: 0;
  max-width: 640px;
}

.contact-list > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  column-gap: 32px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--hairline-grey);
}

.contact-list > div:first-child { border-top: none; }

.contact-list dt {
  font: 400 11px "DM Mono", monospace;
  letter-spacing: 0.18em;
  color: var(--label-grey);
}

.contact-list dd {
  margin: 0;
  font: 300 18px/1.6 "Jost", sans-serif;
}

.contact-list dd a {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

.contact-list dd a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--ink);
  padding: 26px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 400 12px "DM Mono", monospace;
  letter-spacing: 0.1em;
  color: var(--muted-grey);
}

.footer-links {
  display: flex;
  gap: 24px;
}

/* Footer links go blue on hover; nav is the only place with no hover color */
.footer-links a:hover { color: var(--accent); opacity: 1; }

.site-footer .email {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}

/* --------------------------------------------------------------------------
   Responsive — 720–1179px
   -------------------------------------------------------------------------- */

@media (max-width: 1179px) {
  :root { --gutter: 32px; }
  .hero h1, .page-head:not(.page-head--quiet) h1 { font-size: 40px; }
  .book-title { font-size: 36px; }
}

/* --------------------------------------------------------------------------
   Responsive — <720px
   -------------------------------------------------------------------------- */

@media (max-width: 719px) {
  :root { --gutter: 24px; }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  /* Nav collapses to a wrapped row of the same mono links — no hamburger */
  .site-nav {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .hero { padding: 44px var(--gutter) 40px; }
  .hero h1, .page-head:not(.page-head--quiet) h1 { font-size: 32px; }
  .page-head--quiet h1 { font-size: 22px; }

  /* Book block stacks: text first, cover below; the vertical rule becomes
     a horizontal one */
  .two-col { grid-template-columns: 1fr; }

  .two-col > .col-text {
    border-right: none;
    border-bottom: 1px solid var(--ink);
  }

  /* Figure-first variant stacks figure above text: the rule moves to the
     bottom of the figure, and the text column closes the section unruled */
  .two-col--figure-first > .col-figure {
    border-right: none;
    border-bottom: 1px solid var(--ink);
  }
  .two-col--figure-first > .col-text { border-bottom: none; }

  .book-cover, .cover-placeholder,
  .book-cover-lg, .cover-placeholder-lg { width: 220px; }
  .cover-placeholder { height: 330px; }
  .cover-placeholder-lg { height: 330px; }

  .book-title { font-size: 32px; }

  .praise { padding: 44px var(--gutter); }
  .praise blockquote { font-size: 22px; }

  /* Essay rows stack: title, then outlet on its own line */
  .essay-row { grid-template-columns: 1fr; row-gap: 6px; }
  .essay-title { font-size: 24px; }
  .essay-outlet { font-size: 11px; }
  .essay-dek { grid-column: auto; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .accolade-row { grid-template-columns: 1fr; row-gap: 10px; }
  .accolade-list { font-size: 18px; }

  .contact-list > div { grid-template-columns: 1fr; row-gap: 6px; }

  .liftable { padding: 24px 22px; }

  .prose-lede { font-size: 22px; }

  /* Footer stacks into two lines */
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-links { flex-wrap: wrap; gap: 12px 24px; }
}
