/* thewrongsin.com — the house style of the Aug 29 duology site (wrong-sin/marketing/sites/_shared.css):
   the ratified cover palette, coal smoke and river mud with one slash of arterial red (marketing/COVER-BRIEF.md).
   The red is spent sparingly: rules, the current nav item, one mark per page. */
@import url(/fonts/fonts.css);

:root {
  --ground: #E4E3DE; --ground-deep: #D8D8D1; --ink: #1C1E1C; --smoke: #585B53;
  --rule: #B7B8B0; --rule-faint: #CFCFC8; --accent: #8E1C13;
  --cover-ground: #1d1b19; --cover-ink: #efe7d6;
  --display: "Instrument Serif", "Hoefler Text", Georgia, serif;
  --body: "Spectral", Georgia, "Times New Roman", serif;
  --label: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 63ch; --gutter: clamp(1rem, 5vw, 4.5rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #141613; --ground-deep: #1B1E1A; --ink: #E0E1D9; --smoke: #9A9D93;
    --rule: #35382F; --rule-faint: #262922; --accent: #E86A55; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #141613; --ground-deep: #1B1E1A; --ink: #E0E1D9; --smoke: #9A9D93;
  --rule: #35382F; --rule-faint: #262922; --accent: #E86A55; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body);
  font-size: clamp(1.06rem, 1rem + .35vw, 1.22rem); line-height: 1.66; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; margin: 0; line-height: 1.08; }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); }
p { margin: 0 0 1.05em; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; text-decoration-color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.wrap.measure { max-width: 74rem; } /* a narrow section keeps the page's left edge */
.wrap.measure > * { max-width: var(--measure); }
.label {
  font-family: var(--label); font-size: .76rem; font-weight: 500; letter-spacing: .15em;
  text-transform: uppercase; color: var(--smoke); margin: 0 0 .9rem;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--ground); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* masthead */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-size: 1.55rem; text-decoration: none; letter-spacing: .01em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .35rem 1.3rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { font-family: var(--label); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: .35rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-nav .listen-link { color: var(--accent); }

/* sections */
main { display: block; }
.section { padding: clamp(3rem, 8vw, 6rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-child { border-bottom: 0; }
.section-deep { background: var(--ground-deep); }
.section h2 { margin-bottom: 1.4rem; }
.lede { font-family: var(--display); font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.1rem); line-height: 1.3; max-width: 36ch; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split > * { min-width: 0; } /* a grid item otherwise refuses to shrink below its image's width */
@media (min-width: 52rem) { .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } .split.flip { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); } }

/* hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0; border-bottom: 1px solid var(--rule); }
.hero h1 { font-size: clamp(3.2rem, 1.8rem + 6.5vw, 7.2rem); line-height: .92; letter-spacing: -.015em; }
.hero .subtitle { font-family: var(--label); font-size: .82rem; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin: 1.1rem 0 2rem; }
.hero .hook { font-family: var(--display); font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.2rem); line-height: 1.25; max-width: 26ch; margin-bottom: 2.2rem; }
.cover { width: 100%; max-width: min(26rem, 100%); margin: 0 auto; box-shadow: 0 1.6rem 3.2rem -1.2rem rgba(0,0,0,.55); border-radius: 2px; }

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: .8rem 1rem; }
.btn {
  display: inline-block; font-family: var(--label); font-size: .8rem; letter-spacing: .13em; text-transform: uppercase;
  text-decoration: none; padding: .95rem 1.35rem; border: 1px solid var(--ink); min-height: 44px;
}
.btn-primary { background: var(--ink); color: var(--ground); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:not(.btn-primary):hover { border-color: var(--accent); }

/* the rule — the one red mark */
.rule-quote { font-family: var(--display); font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.4rem); line-height: 1.16; max-width: 22ch; margin: 0; }
.rule-quote::before { content: ""; display: block; width: 4rem; height: 2px; background: var(--accent); margin-bottom: 1.6rem; }
.cite { font-family: var(--label); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--smoke); margin-top: 1.4rem; }

/* jacket */
.jacket p { max-width: var(--measure); }
.jacket .turn { font-family: var(--display); font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); margin: 1.6rem 0; color: var(--accent); }
.duology { font-style: italic; color: var(--smoke); }

/* people */
.people { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .people { grid-template-columns: 1fr 1fr; } }
.person h3 { margin: 1rem 0 .6rem; }
.portrait { aspect-ratio: 1; object-fit: cover; width: 100%; max-width: min(22rem, 100%); filter: grayscale(.72) sepia(.28) contrast(1.05); }
.emblem { aspect-ratio: 1; width: 100%; max-width: min(22rem, 100%); }

/* facts list */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.5rem; margin: 0; }
.facts dt { font-family: var(--label); font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: var(--smoke); padding-top: .3rem; }
.facts dd { margin: 0; }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .6rem; } }

/* the world */
.cards { display: grid; gap: 1.2rem; }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { border-top: 2px solid var(--ink); padding: 1.2rem 0 .4rem; }
.card h3 { margin-bottom: .6rem; }
.card p { font-size: .98em; }

/* chapters */
.seals { display: grid; gap: 1.6rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); list-style: none; padding: 0; margin: 0; }
.seals li { text-align: center; }
.seals img { width: 100%; max-width: 11rem; margin: 0 auto .5rem; }
.seals .t { font-family: var(--display); font-size: 1.12rem; line-height: 1.2; }

/* sample */
.reading { max-width: var(--measure); }
.reading p { text-indent: 1.4em; margin: 0; }
.reading p.first { text-indent: 0; }
.reading p.first::first-letter { font-family: var(--display); float: left; font-size: 3.6em; line-height: .82; padding: .08em .08em 0 0; color: var(--accent); }
.chapter-head { font-family: var(--label); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--smoke); margin-bottom: .6rem; }
.chapter-title { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); margin-bottom: 2rem; }
.listen-box { border: 1px solid var(--rule); padding: 1.4rem; max-width: var(--measure); background: var(--ground-deep); }
.listen-box audio { width: 100%; margin: .8rem 0 .4rem; }
.small { font-size: .88em; color: var(--smoke); }
.fade-note { margin-top: 2rem; font-style: italic; color: var(--smoke); }

/* author */
.author-photo { max-width: min(20rem, 100%); filter: grayscale(1) contrast(1.05); }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2.4rem 0 3rem; font-size: .92rem; color: var(--smoke); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
