/* Red Brick House Press · site styles */
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/ebgaramond-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/ebgaramond-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/ebgaramond-bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #0f0f0f;
  --cream: #f3efe6;
  --paper: #faf7f0;
  --muted: #5f5b55;
  --rule: #d9d2c4;
  --brick: #8e3b2e;
  --brick-light: #d08a76;
  --measure: 36rem;
  --wide: 74rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
button.btn { font-size: 0.86rem; line-height: 1.2; letter-spacing: 0.22em; text-transform: uppercase; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.6;
  hyphens: none; -webkit-hyphens: none;
  font-kerning: normal; font-variant-ligatures: common-ligatures;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }
cite { font-style: italic; }
h1, h2, h3, .tag, .pull p, .lede, .hook, .quote-card p { text-wrap: balance; }
p { text-wrap: pretty; }
.nowrap { white-space: nowrap; }

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

/* spaced capitals, like POEMS & CONFESSIONS on the cover */
.caps { text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.82rem; }

/* ---------------- header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-header .inner { max-width: var(--wide); margin: 0 auto; padding: 1.6rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 0.75rem; color: var(--ink); text-decoration: none; }
.wordmark .brick { width: 1.35rem; height: 0.85rem; background: var(--brick); display: inline-block; }
.wordmark .caps { font-size: 1rem; letter-spacing: 0.32em; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1.1rem, 2.6vw, 2.4rem); flex-wrap: wrap; }
nav.main a { color: var(--ink); text-decoration: none; font-size: 1.2rem; padding: 0.3rem 0; border-bottom: 1px solid transparent; }
nav.main a:hover { color: var(--brick); }
nav.main a[aria-current="page"] { color: var(--brick); border-bottom-color: var(--brick); }
@media (max-width: 760px) {
  .site-header .inner { justify-content: center; padding: 1.3rem var(--gutter); }
  nav.main ul { justify-content: center; gap: 0.6rem 1.3rem; }
  nav.main a { font-size: 1.05rem; }
}
@media (max-width: 520px) { nav.main li:first-child { display: none; } nav.main ul { gap: 0.5rem 1.1rem; } }

/* ---------------- buttons */
.btn { display: inline-block; padding: 1.05rem 2rem 0.95rem; border: 1px solid var(--ink); background: var(--ink); color: var(--cream); text-decoration: none; font-size: 0.86rem; line-height: 1.2; letter-spacing: 0.22em; text-transform: uppercase; text-align: center; }
.btn:hover { background: var(--brick); border-color: var(--brick); color: var(--cream); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn.light { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn.light:hover { background: var(--brick); border-color: var(--brick); color: var(--cream); }
.btn.is-pending { background: transparent; color: var(--muted); border-color: var(--rule); cursor: default; }
.section.dark .btn.is-pending { color: #b9b3a8; border-color: #b9b3a8; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.actions.center { justify-content: center; }

/* ---------------- hero: two exactly equal halves, like the cover */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: min(86vh, 54rem); }
.hero .half { display: flex; align-items: center; justify-content: center; padding: clamp(3rem, 7vw, 6rem) var(--gutter); }
.hero .dark { background: var(--ink); }
.hero .light { background: var(--cream); }
.hero .cover { width: min(100%, 22rem); }
.hero .cover img { box-shadow: 0 1.6rem 3rem rgba(0, 0, 0, 0.55); outline: 1px solid rgba(243, 239, 230, 0.14); }
.hero .text { width: min(100%, 32rem); text-align: center; }
.hero .actions { justify-content: center; }
.hero .actions .btn { white-space: nowrap; }
.hero .eyebrow { color: var(--brick); margin: 0 0 1.2rem; }
.hero h1 { margin: 0; font-weight: 700; line-height: 1; font-size: clamp(2.8rem, 5.6vw, 4.9rem); letter-spacing: -0.01em; }
.hero h1 span { display: block; }
.hero h1 em { font-weight: 400; }
.hero .sub { margin: 1.4rem 0 0; color: var(--muted); font-style: italic; }
.hero .by { margin: 0.9rem 0 0; font-size: 1.3rem; font-style: italic; letter-spacing: 0.08em; }
.hero .hook { margin: 1.8rem 0 0; font-size: 1.4rem; line-height: 1.45; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero .light { order: 1; }
  .hero .dark { order: 2; }
  .hero .cover { width: min(70%, 18rem); }
}

/* ---------------- sections */
main { display: block; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); }
.section .inner { max-width: var(--wide); margin: 0 auto; }
.narrow, .section .inner.narrow { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.section.cream { background: var(--cream); }
.section.dark { background: var(--ink); color: var(--cream); }
.section.dark a:not(.btn) { color: var(--brick-light); }
.eyebrow { color: var(--brick); margin: 0 0 1rem; }
.section.dark .eyebrow { color: var(--brick-light); }
.section.brick { background: var(--brick); color: var(--cream); }
.section.brick .pull footer { color: #f0d9cf; }
.section.brick .btn.light:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.section .kicker { text-align: center; margin: 1.6rem 0 0; font-size: 1.15rem; opacity: 0.85; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); line-height: 1.15; margin: 0 0 1.3rem; font-weight: 700; }
h3 { font-size: 1.4rem; margin: 0 0 0.5rem; font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1.1rem; }
.lede { font-size: 1.42rem; line-height: 1.5; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* page title band for inner pages */
.page-title { background: var(--ink); color: var(--cream); padding: clamp(3.5rem, 9vw, 6rem) var(--gutter); text-align: center; }
.page-title .caps { color: var(--brick-light); margin: 0 0 1rem; }
.page-title h1 { margin: 0 auto; max-width: 52rem; font-size: clamp(2.2rem, 6.5vw, 4.4rem); line-height: 1.05; font-weight: 700; }
.page-title h1 .l { display: block; }
@media (min-width: 761px) { .page-title h1 .l.join { display: inline; } }
.page-title .tag { margin: 1.2rem auto 0; max-width: 38rem; color: #d8d3c8; font-style: italic; font-size: 1.35rem; }

/* book feature: cover beside text */
.feature { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.feature .cover img { box-shadow: 0 1.4rem 2.6rem rgba(15, 15, 15, 0.28); }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature .cover { max-width: 16rem; margin: 0 auto; } }

/* ---------------- quotes */
blockquote { margin: 0; }
.pull { max-width: 46rem; margin: 0 auto; text-align: center; }
.pull p { font-style: italic; font-size: clamp(1.6rem, 3.6vw, 2.35rem); line-height: 1.35; margin: 0 0 0.35rem; }
.pull footer { margin-top: 1.4rem; }
.quote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2rem); }
@media (max-width: 760px) { .quote-grid { grid-template-columns: 1fr; } }
.quote-card { background: var(--cream); border-left: 4px solid var(--brick); padding: 1.8rem 1.8rem 1.6rem; }
.quote-card p { font-style: italic; font-size: 1.38rem; line-height: 1.45; margin: 0; }
.quote-card footer { margin-top: 1rem; color: var(--muted); font-size: 1rem; }
.quote-card footer cite { font-style: normal; }

/* details list */
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.8rem; margin: 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; }

/* parts of the book */
ol.parts { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.6rem; }
ol.parts li { border-top: 2px solid var(--ink); padding-top: 1rem; }
ol.parts .num { color: var(--brick); margin: 0 0 0.4rem; }
@media (min-width: 1000px) { ol.parts h3 { min-height: 2.5em; } }
ol.parts .ages { color: var(--muted); font-size: 1rem; margin: 0.4rem 0 0; }

/* excerpt */
.excerpt .first { font-size: 1.5rem; font-style: italic; }

/* author: text left, photo right */
.author-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); gap: clamp(2.5rem, 7vw, 6rem); align-items: center; max-width: 62rem !important; }
.author-grid .frame { position: relative; padding: 0 0.9rem 0.9rem 0; }
.author-grid .frame::before { content: ""; position: absolute; inset: 0.9rem 0 0 0.9rem; border: 1px solid var(--brick); }
.author-grid .frame picture { position: relative; display: block; }
.author-grid .photo img { width: 100%; }
.author-grid .photo figcaption { position: relative; margin-top: 1.4rem; color: var(--muted); font-size: 0.95rem; font-style: italic; }
.author-grid .photo { margin: 0; }
@media (max-width: 860px) { .author-grid { grid-template-columns: 1fr; } .author-grid .photo { order: -1; width: min(70%, 16rem); margin: 0 auto; } .author-grid .photo figcaption { text-align: center; } }
.closer { font-style: italic; font-size: 1.35rem; margin-top: 1.6rem; }

/* shop cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.6rem; }
.card { background: var(--paper); border: 1px solid var(--rule); padding: 2rem; display: flex; flex-direction: column; }
.card .caps { color: var(--brick); margin: 0; }
.card h3 { margin-top: 0.8rem; font-size: 1.6rem; }
.card .grow { flex: 1; }
.card .btn { align-self: stretch; margin-top: 1.2rem; }

/* ---------------- footer */
.site-footer { background: var(--ink); color: #cfc9bd; padding: 3.5rem var(--gutter) 2.8rem; font-size: 1.05rem; }
.site-footer .inner { max-width: var(--wide); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1.8rem 3rem; justify-content: space-between; align-items: flex-start; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--brick-light); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer .small { color: #9d978c; font-size: 0.95rem; margin: 0.6rem 0 0; }
.site-footer .wordmark { color: var(--cream); }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }

@media (prefers-reduced-motion: no-preference) { a, .btn { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; } }

/* ---------------- Finish the line (home hero) */
.btn.ghost-light { background: transparent; color: var(--cream); border-color: rgba(243, 239, 230, 0.7); }
.btn.ghost-light:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.game { width: min(100%, 31rem); color: var(--cream); }
.game .eyebrow { color: var(--brick-light); }
.g-setup { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.3; font-style: italic; margin: 0 0 0.8rem; text-wrap: balance; }
.g-end { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.3; font-style: italic; color: var(--brick-light); margin: 0 0 1.1rem; text-wrap: balance; }
.g-src { font-size: 0.98rem; color: #b9b3a8; margin: 0; }
.g-src cite { font-style: normal; }
.g-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.g-nudge { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid rgba(243, 239, 230, 0.2); }
.g-nudge p { color: #d8d3c8; font-size: 1.12rem; margin: 0 0 1.2rem; }
.is-game .g-end, .is-game .g-src { opacity: 0; transform: translateY(0.4rem); visibility: hidden; }
.is-game.is-revealed .g-end, .is-game.is-revealed .g-src { opacity: 1; transform: none; visibility: visible; }
@media (prefers-reduced-motion: no-preference) { .is-game .g-end, .is-game .g-src { transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s; } }
.hero .text { text-align: center; }
.hero-cover { width: min(100%, 17rem); margin: 0 auto 1.8rem; }
.hero-cover img { box-shadow: 0 1.2rem 2.4rem rgba(15, 15, 15, 0.3); }
@media (max-width: 860px) { .hero-cover { width: min(60%, 14rem); } }
