/* Option C, The Diary. After thebloggess.com and an author's Substack page:
   the blog is the home page, the newest post reads nearly in full, every
   entry shows its hearts and comments, and the book rides along in a
   column beside it (a pinned bar on phones). Literata at 20px on cream.
   Motion dose: level 1. One signature moment, the pen stroke under "Free". */
@font-face { font-family: "Literata"; src: url(../fonts/Literata.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Literata"; src: url(../fonts/Literata-Italic.woff2) format("woff2"); font-style: italic; font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url(../fonts/Inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #fffcf6;
  --paper-2: #f5efe4;
  --ink: #1d1b18;
  --ink-soft: #5b544b;
  --line: #e9e1d3;
  --red: #b5432f;
  --red-ink: #933422;
  --mark: #ffd98a;
  --out-expo: cubic-bezier(.22, 1, .36, 1);
  --r-bg: var(--paper); --r-ink: var(--ink); --r-accent: var(--red); --r-on-accent: #fff; --r-soft: var(--paper-2); --r-line: var(--line);
  --r-head: "Literata", Georgia, serif; --r-body: "Literata", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 20px/1.7 "Literata", Georgia, serif; overflow-x: hidden; padding-bottom: 76px; }
@media (min-width: 1000px) { body { padding-bottom: 0; } }
h1, h2, h3 { font-family: "Literata", Georgia, serif; line-height: 1.15; margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--red-ink); }
.ph { background: color-mix(in srgb, var(--mark) 60%, transparent); border-radius: 3px; padding: 0 .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.small { font: 14px/1.5 "Inter", system-ui, sans-serif; color: var(--ink-soft); }
.meta { font: 600 13px "Inter", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 8px; }

.draft-bar { background: var(--ink); color: #eee; font: 13px "Inter", system-ui, sans-serif; text-align: center; padding: 8px 16px; }
.draft-bar a { color: var(--mark); }

/* Masthead */
.mast { text-align: center; padding: clamp(40px, 7vw, 80px) 16px 0; border-bottom: 1px solid var(--line); }
.by { font: 600 14px "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 8px; }
.mast h1 { font-size: clamp(56px, 11vw, 112px); font-weight: 800; line-height: .95; margin: 0 0 18px; }
.free { position: relative; display: inline-block; font-style: italic; color: var(--red); }
.free svg { position: absolute; left: -2%; bottom: -.1em; width: 104%; height: .28em; overflow: visible; }
.free path { fill: none; stroke: var(--mark); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 0; }
.anim .free path { stroke-dashoffset: 340; animation: draw 1200ms var(--out-expo) 500ms forwards; }
.free svg { z-index: -1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tag { font-style: italic; color: var(--ink-soft); margin: 0 auto 26px; max-width: 40ch; }
.mast nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 26px; padding: 14px 0; border-top: 1px solid var(--line); font: 600 15px "Inter", sans-serif; }
.mast nav a { color: var(--ink); text-decoration: none; }

/* Two columns on desktop */
.layout { display: grid; gap: 40px; max-width: 1180px; margin: 0 auto; padding: 40px 16px 60px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 64px; padding: 56px 40px 80px; } }
.feed-col { max-width: 700px; width: 100%; justify-self: center; }

.entry .social { margin-top: 16px; }
.lead { padding-bottom: 36px; }
.lead .post-img { display: block; border-radius: 10px; overflow: hidden; margin-bottom: 22px; max-height: 460px; }
.lead h2 { font-size: clamp(34px, 5.4vw, 48px); }
.lead h2 a { color: inherit; text-decoration: none; }
.lead .body p { margin: 0 0 1em; }
.lead .clamp { max-height: 19em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.more { font: 700 16px "Inter", sans-serif; }
.rule { display: flex; align-items: center; gap: 14px; font: 700 13px "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 26px 0 8px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.entries { list-style: none; padding: 0; margin: 0; }
.entries .entry { display: grid; grid-template-columns: 1fr auto; column-gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.entries .entry > * { grid-column: 1; }
.entries .thumb { grid-column: 2; grid-row: 1 / span 3; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; display: block; }
.entries h3 { font-size: 27px; margin: 0 0 6px; }
.entries h3 a { color: inherit; text-decoration: none; }
.entries h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.entries .entry p:not(.meta) { margin: 0; color: var(--ink-soft); font-size: 18px; }
span.heart-btn { pointer-events: none; opacity: .6; }
.entry .social span:not(.heart-btn) { font: 15px "Inter", sans-serif; color: var(--ink-soft); }

.pieces { margin-top: 40px; }
.clips { display: grid; gap: 18px; margin-top: 18px; align-items: start; }
@media (min-width: 640px) { .clips { grid-template-columns: 1fr 1fr; } }
.clip { margin: 0; padding: 26px 24px; background: var(--paper-2); border-left: 4px solid var(--red); border-radius: 4px 12px 12px 4px; }
.clip blockquote { margin: 0 0 12px; font-style: italic; font-size: 21px; line-height: 1.5; }
.clip .q-link { color: inherit; text-decoration: none; }
.clip figcaption { font: 600 13px "Inter", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.clip figcaption:not(:empty)::before { content: "Chapter "; }

/* Side column */
.side-in { display: grid; gap: 22px; }
@media (min-width: 1000px) { .side-in { position: sticky; top: 24px; } }
.book-box { text-align: center; padding: 26px 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cover { position: relative; overflow: hidden; width: 170px; aspect-ratio: 2 / 3; margin: 0 auto; padding: 22px 16px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; color: #fff8ec; background: linear-gradient(170deg, #c9573f, #7e2617); border-radius: 2px 6px 6px 2px; box-shadow: -5px 0 0 -2px #5c1a0f inset, 0 26px 40px -24px rgba(80, 30, 15, .7); }
.c-title { position: relative; z-index: 1; font-size: 32px; font-weight: 800; line-height: .95; }
.c-sun { position: absolute; left: 50%; top: 52%; width: 120px; height: 120px; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle, var(--mark), transparent 65%); opacity: .8; }
.c-author { position: relative; z-index: 1; font: 600 10px "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.stand-in { font: 12px "Inter", sans-serif; color: var(--ink-soft); margin: 10px 0 14px; }
.pitch { font-size: 18px; margin: 0 0 16px; }
.btn { display: inline-flex; justify-content: center; align-items: center; width: 100%; background: var(--red); color: #fff; text-decoration: none; font: 700 17px "Inter", sans-serif; padding: 15px 20px; border-radius: 10px; border: 0; cursor: pointer; transition: background 160ms; }
.btn:hover { background: var(--red-ink); }
.btn.line { background: var(--ink); }
.formats { font: 15px "Inter", sans-serif; color: var(--ink-soft); margin: 12px 0 0; }
.about-box { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; font-size: 17px; line-height: 1.55; }
.about-box p { margin: 0; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: repeating-linear-gradient(135deg, var(--paper-2) 0 8px, var(--line) 8px 16px); display: grid; place-items: center; font: 11px "Inter", sans-serif; color: var(--ink-soft); }
.sub-box { display: grid; gap: 10px; padding: 22px; background: var(--paper-2); border-radius: 14px; }
.sub-box h3 { font-size: 22px; margin: 0; }
.sub-box p { margin: 0; font-size: 17px; }
.sub-box input { font: 17px "Inter", sans-serif; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }

/* Pinned buy bar on phones */
.sticky-buy { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; background: var(--ink); color: #fff; border-radius: 14px; text-decoration: none; font: 600 16px "Inter", sans-serif; box-shadow: 0 16px 34px -12px rgba(0,0,0,.5); }
.sticky-buy b { margin-left: auto; background: var(--red); padding: 10px 14px; border-radius: 9px; white-space: nowrap; }
.mini-cover { width: 28px; height: 42px; border-radius: 2px 4px 4px 2px; background: linear-gradient(170deg, #c9573f, #7e2617); flex: none; }
@media (min-width: 1000px) { .sticky-buy { display: none; } }

.foot { border-top: 1px solid var(--line); padding: 36px 16px 50px; text-align: center; font: 15px "Inter", sans-serif; color: var(--ink-soft); }
.foot p { margin: 6px 0; }
@media (prefers-reduced-motion: reduce) { .anim .free path { animation: none; stroke-dashoffset: 0; } }
