/* troytaliancich.com — shared styles
   Palette: river fog paper, slate ink, brass links, pool-water buttons. */

:root {
  --paper: #e8ebe7;
  --paper-2: #dde2dc;
  --ink: #19222c;
  --muted: #56616a;
  --rule: #c3cac2;
  --brass: #7a5a24;
  --water: #23565a;
  --water-ink: #f2f5f1;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "Spectral", Georgia, serif;
  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121a21;
    --paper-2: #18222b;
    --ink: #e3e7e1;
    --muted: #9aa4a9;
    --rule: #2d3943;
    --brass: #cfa868;
    --water: #7fb2b2;
    --water-ink: #0f171d;
  }
}
:root[data-theme="dark"] {
  --paper: #121a21;
  --paper-2: #18222b;
  --ink: #e3e7e1;
  --muted: #9aa4a9;
  --rule: #2d3943;
  --brass: #cfa868;
  --water: #7fb2b2;
  --water-ink: #0f171d;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.62;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
}

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

a { color: var(--brass); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

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

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: 1.25rem; padding-bottom: 1.25rem;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .98rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; color: var(--brass); }

/* ---------- home hero ---------- */
.hero { padding-top: clamp(2rem, 8vw, 6rem); padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero-name {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(4.25rem, 19vw, 12.5rem);
  line-height: .82; letter-spacing: -.005em;
  margin: 0;
}
.hero-name span { display: block; }
.hero-name span + span { color: var(--water); }
.hero-line {
  max-width: 30rem; margin: 1.75rem 0 0;
  font-size: clamp(1.2rem, 1rem + 1vw, 1.55rem); line-height: 1.4; font-style: italic;
}
.shelf {
  display: flex; align-items: flex-end; gap: clamp(.6rem, 2vw, 1.25rem);
  margin-top: clamp(2rem, 6vw, 3.5rem);
  overflow: hidden;
}
.shelf a { flex: 0 1 auto; display: block; }
.shelf img {
  height: clamp(9rem, 30vw, 17rem); width: auto;
  box-shadow: 0 1px 0 var(--rule), 6px 8px 0 -2px var(--paper-2);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-name span { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero-name span + span { animation-delay: .12s; }
  @keyframes rise { from { opacity: 0; transform: translateY(.18em); } to { opacity: 1; transform: none; } }
}

/* ---------- sections ---------- */
.section { padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: clamp(2.5rem, 7vw, 4.5rem); border-top: 1px solid var(--rule); }
.section-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); line-height: 1; margin: 0 0 2rem;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- book rows (home) ---------- */
.book {
  display: grid; gap: 1.25rem 2.5rem;
  grid-template-columns: 1fr;
  padding: 2.25rem 0;
}
.book + .book { border-top: 1px solid var(--rule); }
.book-cover { max-width: 13rem; }
.book-cover img { width: 100%; }
@media (min-width: 46rem) {
  .book { grid-template-columns: 13rem 1fr; align-items: start; }
}
.book h3 {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  line-height: 1; margin: 0 0 .35rem;
}
.book h3 a { color: var(--ink); text-decoration: none; }
.book h3 a:hover { color: var(--brass); }
.book .facts { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; }
.book .hook { font-style: italic; font-size: 1.15em; margin: 0 0 .75rem; max-width: var(--measure); }
.book .desc { margin: 0 0 1.25rem; max-width: var(--measure); }

.trilogy-row { display: flex; gap: .5rem; max-width: 13rem; }
.trilogy-row img { width: 33.333%; }

/* ---------- buy links ---------- */
.buy { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.buy a {
  display: inline-block; padding: .5rem .95rem; font-size: .95rem; line-height: 1.2;
  border: 1px solid var(--water); border-radius: 3px; color: var(--water); text-decoration: none;
}
.buy a:hover { background: var(--water); color: var(--water-ink); }
.buy li:first-child a { background: var(--water); color: var(--water-ink); }
.buy li:first-child a:hover { background: transparent; color: var(--water); }
.more { font-size: .98rem; }

/* ---------- next book ---------- */
.next {
  background: var(--paper-2); padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 4px;
  max-width: 44rem;
}
.next h3 { font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; margin: 0 0 .5rem; }
.next p { margin: 0; }

/* ---------- mailing list ---------- */
/* The form reads like a line in a ledger: the address is written on a rule,
   in the book face, and the button is set in the same display type as the titles. */
.signup-form {
  max-width: 36rem; margin: 2rem 0 1.25rem;
  background: var(--paper-2); border-radius: 4px;
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 4vw, 2.25rem);
}
.signup-form label { display: block; font-style: italic; color: var(--muted); font-size: .98rem; }
.signup-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.5rem; }
.signup-row input {
  flex: 1 1 15rem; min-width: 0;
  font-family: var(--text); font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); line-height: 1.3;
  color: var(--ink); background: transparent;
  padding: .45rem 0 .3rem; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
  appearance: none;
}
.signup-row input::placeholder { color: var(--muted); opacity: .7; font-style: italic; }
.signup-row input:focus { outline: none; border-bottom: 2px solid var(--brass); padding-bottom: calc(.3rem - 1px); }
.signup-row button {
  flex: 0 0 auto;
  font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1; letter-spacing: .01em;
  padding: .6rem 1.2rem .55rem; cursor: pointer;
  border: 1px solid var(--water); border-radius: 3px;
  background: var(--water); color: var(--water-ink);
}
.signup-row button:hover { background: transparent; color: var(--water); }
.signup-row button[disabled] { opacity: .6; cursor: progress; }
.signup-status { min-height: 1.6em; margin: .9rem 0 0; font-style: italic; font-size: 1rem; }
.signup-status:empty { min-height: 0; margin: 0; }
.signup-status.is-error { color: #a23b2a; }
:root[data-theme="dark"] .signup-status.is-error { color: #e48f7c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .signup-status.is-error { color: #e48f7c; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.small { font-size: .9rem; color: var(--muted); }

/* ---------- book pages ---------- */
.book-hero {
  display: grid; gap: 2rem 3rem; grid-template-columns: 1fr;
  padding-top: clamp(1.5rem, 5vw, 3.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 52rem) {
  .book-hero { grid-template-columns: minmax(16rem, 22rem) 1fr; align-items: center; }
}
.book-hero .cover { max-width: 22rem; }
.book-hero .cover img { width: 100%; box-shadow: 8px 10px 0 -2px var(--paper-2); }
.book-hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 2rem + 6vw, 6.5rem); line-height: .88; margin: 0 0 1rem;
}
.book-hero .hook { font-size: clamp(1.15rem, 1rem + .8vw, 1.45rem); font-style: italic; line-height: 1.4; margin: 0 0 1.5rem; max-width: 32rem; }
.book-hero .facts { color: var(--muted); font-size: .92rem; margin: 0; }

.excerpt { max-width: var(--measure); }
.excerpt .where { color: var(--muted); font-style: italic; margin: -1.25rem 0 1.75rem; }
.excerpt p { margin: 0 0 1em; text-indent: 1.5em; }
.excerpt p:first-of-type, .excerpt .where + p, .excerpt .dateline + p { text-indent: 0; }
.excerpt .dateline { font-variant: small-caps; letter-spacing: .03em; color: var(--muted); text-indent: 0; }

.series { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .series { grid-template-columns: repeat(3, 1fr); } }
.series article img { width: 100%; max-width: 15rem; margin-bottom: 1rem; }
.series h3 { font-family: var(--display); font-weight: 700; font-size: 1.8rem; line-height: 1; margin: 0 0 .25rem; }
.series .place { color: var(--muted); font-size: .95rem; margin: 0 0 .75rem; }
.series p { margin: 0 0 1rem; }
.series .note { font-style: italic; }

.boxset { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 46rem) { .boxset { grid-template-columns: 1fr 16rem; } }
.boxset img { max-width: 16rem; }

.facts-list { list-style: none; padding: 0; margin: 1.5rem 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding-top: 2rem; padding-bottom: 3rem; color: var(--muted); font-size: .9rem; }
.site-foot p { margin: 0 0 .4rem; }
.site-foot a { color: var(--muted); }
