/* ============================================================
   HUMBOLTON PRESS — STYLESHEET
   Theme tokens live in :root. Change five values, retheme site.
   ============================================================ */

:root {
  --ink: #0e0b09;          /* page background — warm near-black   */
  --espresso: #1a1410;     /* raised surfaces                     */
  --coffee: #241b15;       /* cards                               */
  --bone: #ece1cd;         /* primary text                        */
  --bone-dim: #b0a48f;     /* secondary text                      */
  --brass: #d3a04b;        /* primary accent — molten gold        */
  --brass-soft: rgba(211,160,75,.16);
  --oxblood: #a13327;      /* secondary accent — ember red        */
  --line: rgba(236,225,205,.12);

  --display: "Gloock", Georgia, serif;
  --body: "Hanken Grotesk", -apple-system, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;

  --max: 1200px;
  --pad: clamp(20px, 5vw, 56px);
}

/* spine palette — jewel tones for typographic covers */
:root {
  --sp-oxblood: #7e2318; --sp-brass: #8a6420; --sp-moss: #3d5230;
  --sp-indigo: #2e3560;  --sp-plum: #4d2645;  --sp-slate: #37424d;
  --sp-ember: #8c3d1c;   --sp-teal: #1f4f4a;  --sp-rose: #7c3a4b;
  --sp-night: #1d2233;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

a { color: inherit; }
img { max-width: 100%; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

::selection { background: var(--brass); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

/* ---------------- typography ---------------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: .01em; }
h1 { font-size: clamp(46px, 9vw, 108px); }
h2 { font-size: clamp(34px, 5.5vw, 64px); }
h3 { font-size: clamp(22px, 3vw, 30px); }
h2 em, h1 em { font-style: italic; color: var(--brass); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
}
.lede { color: var(--bone-dim); font-size: clamp(17px, 2vw, 20px); max-width: 58ch; }

/* ---------------- header / nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14,11,9,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--max); margin: 0 auto; padding: 14px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand-mark { font-family: var(--display); font-size: 24px; color: var(--bone); }
.brand-mark .amp { color: var(--brass); font-style: italic; padding: 0 2px; }
.brand-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--bone-dim); }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 600;
  color: var(--bone-dim);
  padding: 9px 15px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--bone); background: rgba(236,225,205,.07); }
.nav-links a.active { color: var(--ink); background: var(--brass); }
.nav-links a.nav-cta {
  color: var(--brass); border: 1px solid var(--brass);
}
.nav-links a.nav-cta:hover { background: var(--brass); color: var(--ink); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 10px; color: var(--bone); font-size: 22px;
  width: 44px; height: 44px; cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(14,11,9,.97); border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; font-size: 16px; }
}

/* ---------------- hero ---------------- */
.hero { padding: clamp(64px, 10vw, 130px) 0 0; position: relative; }
.hero-inner { display: grid; gap: 40px; }
.hero .eyebrow { margin-bottom: 18px; display: inline-block; }
.hero h1 { max-width: 12ch; }
.hero .lede { margin: 26px 0 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 15px 28px; border-radius: 999px;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--brass); color: var(--ink); }
.btn-gold:hover { background: #e5b45f; }
.btn-ghost { border: 1px solid var(--line); color: var(--bone); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-blood { background: var(--oxblood); color: var(--bone); }
.btn-blood:hover { background: #bf4030; }

/* the shelf — signature element */
.shelf {
  display: flex; align-items: flex-end; gap: 8px;
  height: clamp(220px, 32vw, 360px);
  padding: 0 var(--pad) 0;
  max-width: var(--max); margin: 30px auto 0;
  border-bottom: 3px solid var(--brass);
  overflow: hidden;
}
.spine {
  flex: 1 1 0; min-width: 0;
  border-radius: 6px 6px 0 0;
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 18px;
  box-shadow: inset -6px 0 14px rgba(0,0,0,.45), inset 2px 0 4px rgba(255,255,255,.06);
  transform: translateY(105%);
  animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards;
  transition: transform .25s;
  cursor: default;
}
.spine:hover { transform: translateY(-14px) !important; }
.spine .label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--display); font-size: clamp(12px, 1.6vw, 19px);
  color: rgba(255,248,235,.92); letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-height: 85%;
}
@keyframes rise { to { transform: translateY(0); } }
.spine:nth-child(1) { animation-delay: .05s; height: 92%; }
.spine:nth-child(2) { animation-delay: .12s; height: 78%; }
.spine:nth-child(3) { animation-delay: .19s; height: 99%; }
.spine:nth-child(4) { animation-delay: .26s; height: 84%; }
.spine:nth-child(5) { animation-delay: .33s; height: 95%; }
.spine:nth-child(6) { animation-delay: .40s; height: 73%; }
.spine:nth-child(7) { animation-delay: .47s; height: 90%; }
.spine:nth-child(8) { animation-delay: .54s; height: 81%; }
@media (max-width: 700px) { .spine:nth-child(n+6) { display: none; } }

/* ---------------- genre ticker ---------------- */
.ticker-wrap {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--espresso);
  overflow: hidden; padding: 16px 0; margin-top: 0;
}
.ticker {
  display: flex; gap: 48px; width: max-content;
  animation: scroll 36s linear infinite;
  font-family: var(--mono); font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--bone-dim); white-space: nowrap;
}
.ticker span::after { content: "✦"; color: var(--brass); margin-left: 48px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------------- sections ---------------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.section-sub { color: var(--bone-dim); max-width: 46ch; }
.alt-band { background: var(--espresso); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------------- book cards ---------------- */
.book-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.book-card {
  background: var(--coffee);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.book-card:hover {
  transform: translateY(-6px);
  border-color: rgba(211,160,75,.5);
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.book-cover {
  aspect-ratio: 2 / 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px;
  position: relative;
  box-shadow: inset 0 -40px 60px rgba(0,0,0,.35);
  overflow: hidden;
}
.cover-img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
  background: inherit;
}
.buy-row { display: flex; gap: 18px; flex-wrap: wrap; }
.book-cover .cover-title {
  font-family: var(--display);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.1; color: rgba(255,248,235,.95);
}
.book-cover .cover-series {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,248,235,.65); margin-bottom: 8px;
}
.badge {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
}
.badge-new { background: var(--brass); color: var(--ink); }
.badge-adult { background: rgba(0,0,0,.55); color: var(--bone); border: 1px solid var(--line); }
.book-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.book-meta { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }
.book-authors { font-weight: 700; font-size: 15px; }
.book-blurb { color: var(--bone-dim); font-size: 14.5px; flex: 1; }
.book-buy {
  align-self: flex-start;
  text-decoration: none; font-weight: 700; font-size: 14px;
  color: var(--brass); border-bottom: 1px solid rgba(211,160,75,.4);
  padding-bottom: 2px; transition: color .2s;
}
.book-buy:hover { color: #e5b45f; }

/* spine + cover colors */
.sp-oxblood { background: linear-gradient(160deg, var(--sp-oxblood), #4a130c); }
.sp-brass   { background: linear-gradient(160deg, var(--sp-brass), #4e3810); }
.sp-moss    { background: linear-gradient(160deg, var(--sp-moss), #22301a); }
.sp-indigo  { background: linear-gradient(160deg, var(--sp-indigo), #191d38); }
.sp-plum    { background: linear-gradient(160deg, var(--sp-plum), #2b1426); }
.sp-slate   { background: linear-gradient(160deg, var(--sp-slate), #1e2429); }
.sp-ember   { background: linear-gradient(160deg, var(--sp-ember), #4c1f0d); }
.sp-teal    { background: linear-gradient(160deg, var(--sp-teal), #102c29); }
.sp-rose    { background: linear-gradient(160deg, var(--sp-rose), #451f29); }
.sp-night   { background: linear-gradient(160deg, var(--sp-night), #0f1120); }

/* ---------------- filters ---------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter-pill {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase;
  background: none; border: 1px solid var(--line); color: var(--bone-dim);
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  transition: all .2s;
}
.filter-pill:hover { border-color: var(--brass); color: var(--brass); }
.filter-pill.active { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.search-box {
  width: 100%; max-width: 420px;
  background: var(--coffee); border: 1px solid var(--line); border-radius: 999px;
  color: var(--bone); font-family: var(--body); font-size: 15px;
  padding: 13px 22px; margin-bottom: 22px;
}
.search-box::placeholder { color: var(--bone-dim); }
.search-box:focus { outline: none; border-color: var(--brass); }
.empty-note { color: var(--bone-dim); font-style: italic; padding: 30px 0; }

/* ---------------- author cards ---------------- */
.author-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.author-card {
  background: var(--coffee); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px; position: relative; overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.author-card:hover { transform: translateY(-6px); border-color: rgba(211,160,75,.5); }
.author-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.author-card.ac-oxblood::before { background: var(--sp-oxblood); }
.author-card.ac-brass::before   { background: var(--brass); }
.author-card.ac-indigo::before  { background: #4956a3; }
.author-card.ac-slate::before   { background: #5d7286; }
.author-card.ac-rose::before    { background: #b0596f; }
.author-card.ac-plum::before    { background: #7e4273; }
.author-name { font-family: var(--display); font-size: 27px; }
.author-cred { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--brass); text-transform: uppercase; }
.author-tag { font-style: italic; color: var(--bone-dim); margin: 10px 0 14px; font-size: 15px; }
.author-bio { color: var(--bone-dim); font-size: 14.5px; }
.author-count { margin-top: 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); }

/* ---------------- music ---------------- */
.music-hero { text-align: left; }
.wave {
  display: flex; align-items: flex-end; gap: 5px; height: 90px; margin: 40px 0 10px;
}
.wave i {
  flex: 1; background: linear-gradient(to top, var(--oxblood), var(--brass));
  border-radius: 4px 4px 0 0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.wave i:nth-child(odd) { animation-duration: 1.8s; }
.wave i:nth-child(3n) { animation-duration: 1.1s; }
.wave i:nth-child(5n) { animation-duration: 2.2s; }
.music-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.music-card {
  background: var(--coffee); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px; transition: transform .25s, border-color .25s;
}
.music-card:hover { transform: translateY(-6px); border-color: rgba(211,160,75,.5); }
.music-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.music-links a {
  text-decoration: none; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  color: var(--bone-dim); transition: all .2s;
}
.music-links a:hover { color: var(--brass); border-color: var(--brass); }

/* ---------------- big CTA bands ---------------- */
.cta-band {
  text-align: center;
  padding: clamp(70px, 10vw, 130px) var(--pad);
  background:
    radial-gradient(60% 120% at 50% 120%, rgba(211,160,75,.14), transparent 70%),
    var(--espresso);
  border-top: 1px solid var(--line);
}
.cta-band h2 { margin-bottom: 20px; }
.cta-band .lede { margin: 0 auto 34px; }

/* ---------------- forms ---------------- */
.form-grid { display: grid; gap: 16px; max-width: 620px; }
.form-grid label { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.form-grid input, .form-grid textarea, .form-grid select {
  background: var(--coffee); border: 1px solid var(--line); border-radius: 10px;
  color: var(--bone); font-family: var(--body); font-size: 16px;
  padding: 14px 16px; width: 100%;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus { outline: none; border-color: var(--brass); }
.contact-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 50px; }
.contact-card { background: var(--coffee); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.contact-card h3 { font-size: 20px; margin-bottom: 8px; }
.contact-card a { color: var(--brass); text-decoration: none; }
.contact-card p { color: var(--bone-dim); font-size: 14.5px; }

/* ---------------- footer ---------------- */
footer { background: #0a0806; border-top: 1px solid var(--line); padding: 60px 0 34px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-mark { font-family: var(--display); font-size: 26px; }
.footer-mark .amp { color: var(--brass); font-style: italic; }
.footer-tagline { color: var(--bone-dim); margin-top: 8px; max-width: 34ch; font-size: 14.5px; }
footer h3 { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); margin-bottom: 16px; }
footer ul { list-style: none; display: grid; gap: 10px; }
footer ul a { text-decoration: none; color: var(--bone-dim); font-size: 14.5px; transition: color .2s; }
footer ul a:hover { color: var(--brass); }
.footer-bottom {
  margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: rgba(236,225,205,.4); text-transform: uppercase;
}

/* ---------------- scroll reveal ---------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- page hero (inner pages) ---------------- */
.page-hero { padding: clamp(56px, 8vw, 100px) 0 clamp(30px, 4vw, 50px); }
.page-hero h1 { font-size: clamp(40px, 7vw, 82px); }
.page-hero .lede { margin-top: 20px; }

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spine { animation: none; transform: none; }
  .ticker { animation: none; }
  .wave i { animation: none; transform: scaleY(.6); }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}
