/* site.css — shared chrome + cross-site styles.
   Site-specific blocks live at the bottom (s-powfu, s-unworthy, s-library). */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Safety: italic display text wraps differently than the browser measures
   in some fallback-font situations, causing descender overlap. Add
   defensive padding so the next sibling never collides. */
h1, h2, h3, .display { padding-bottom: 0.1em; }
.lead { padding-bottom: 0.4em; line-height: 1.65; }

body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: var(--grain-url);
  background-size: 160px 160px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-ink, .btn-ghost, .btn-cream, .btn-link-cream { text-decoration: none !important; white-space: nowrap; }
a.btn-ink, a.btn-ghost, a.btn-cream { text-decoration: none !important; }
a.btn-link-cream { text-decoration: underline !important; text-decoration-color: var(--ink-sage) !important; }

.btn-ink {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.02em;
  background: var(--ink-espresso-deep);
  color: var(--ink-cream);
  border: 1px solid var(--ink-espresso-deep);
  padding: 12px 22px;
  border-radius: var(--r-1);
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms, color 200ms, transform 100ms;
}
a.btn-ink, a.btn-ghost, a.btn-cream, a.btn-link-cream { text-decoration: none; }
.btn-ink:hover { background: var(--ink-bone); }
.btn-ink:active { box-shadow: var(--shadow-press); }
.btn-ink:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ink.wide { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.02em;
  background: transparent;
  color: var(--ink-espresso-deep);
  border: 1px solid var(--ink-espresso);
  padding: 11px 22px;
  border-radius: var(--r-1);
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { background: var(--ink-parchment); }

.btn-link {
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-serif); font-size: 15px;
  color: var(--ink-espresso); text-decoration: underline;
  text-decoration-color: var(--ink-sage);
  text-underline-offset: 4px;
  padding: 0;
  white-space: nowrap;
}
.btn-link:hover { color: var(--ink-blood); }

.icon-btn {
  background: transparent; border: 1px solid transparent;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full); color: var(--ink-espresso); cursor: pointer;
  transition: background 160ms, border-color 160ms;
}
.icon-btn:hover { background: var(--ink-parchment); border-color: var(--border); }
.icon-btn.play {
  background: var(--ink-espresso-deep); color: var(--ink-cream);
  width: 36px; height: 36px;
}
.icon-btn.play:hover { background: var(--ink-bone); }

/* ============================================================
   TOP BAR / SITE SWITCHER
   ============================================================ */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 240ms;
}
.top-bar.is-scrolled { box-shadow: 0 1px 0 var(--border-faint), 0 8px 16px -12px rgba(75, 47, 34, 0.15); }
.top-bar-inner {
  max-width: 1320px; margin: 0 auto;
  padding: 14px 32px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
@media (max-width: 900px) {
  .top-bar-inner { padding: 10px 16px; gap: 8px; }
  .top-bar-mark-text { display: none; }
}
.top-bar-mark {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-serif-sc);
  font-size: 13px; letter-spacing: var(--ls-spaced); text-transform: uppercase;
  color: var(--ink-espresso);
}
.top-bar-tabs {
  display: inline-flex; align-items: stretch; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-1);
  background: var(--ink-cream-soft);
  padding: 4px;
}
.tab {
  background: transparent; border: 0; cursor: pointer;
  padding: 8px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  border-radius: var(--r-1);
  font-family: var(--font-serif);
  color: var(--ink-espresso-soft);
  transition: background 220ms, color 220ms;
  min-width: 150px;
  white-space: nowrap;
}
.tab-label, .tab-sub { white-space: nowrap; }
.tab:hover { color: var(--ink-espresso); }
.tab.is-active {
  background: var(--ink-espresso-deep);
  color: var(--ink-cream);
}
.tab-label {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.tab.is-active .tab-label { font-style: italic; }
.tab-sub {
  font-family: var(--font-serif-sc);
  font-size: 9px; letter-spacing: var(--ls-spaced); text-transform: uppercase;
  opacity: 0.7; margin-top: 2px;
}
.cart-btn {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border);
  font-family: var(--font-serif-sc);
  font-size: 13px; letter-spacing: var(--ls-spaced); text-transform: uppercase;
  color: var(--ink-espresso); padding: 8px 14px; cursor: pointer;
  border-radius: var(--r-1);
  transition: background 200ms;
}
.cart-btn:hover { background: var(--ink-parchment); }

/* ============================================================
   PAGE FADER
   ============================================================ */
.page-fader { opacity: 1; transition: opacity 280ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.page-fader.phase-out { opacity: 0; }
.page-fader.phase-in { opacity: 0; animation: fadeIn 560ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   GENERAL LAYOUT HELPERS
   ============================================================ */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }

.eyebrow {
  font-family: var(--font-serif-sc);
  font-size: 12px; letter-spacing: var(--ls-spaced); text-transform: uppercase;
  color: var(--ink-espresso-soft);
}
.eyebrow .dot { color: var(--ink-sage-deep); margin: 0 8px; }

.rule {
  height: 1px; background: var(--border); border: 0; margin: 0;
}

/* Section header with ornament */
.section-head {
  display: flex; flex-direction: column; align-items: stretch; text-align: center;
  margin-bottom: 56px;
  gap: 12px;
}
.section-head > * { width: 100%; }
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 10px; justify-content: center; }
.section-head .eyebrow::before,
.section-head .eyebrow::after { content: ""; display: inline-block; width: 48px; height: 1px; background: var(--ink-sage-deep); opacity: 0.6; }
.section-head h2 { margin: 0; line-height: 1.15; text-wrap: balance; }
.section-head .lead { margin: 4px auto 0; max-width: 560px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  padding: 24px;
}
.card-frame {
  /* the brand's double-frame around imagery */
  box-shadow: var(--shadow-frame);
  display: inline-block;
}

/* ============================================================
   FIELD (form input)
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field-label {
  font-family: var(--font-serif-sc);
  font-size: 11px; letter-spacing: var(--ls-spaced); text-transform: uppercase;
  color: var(--ink-espresso-soft);
}
.field input,
.field textarea {
  font-family: var(--font-serif);
  font-size: 17px;
  background: var(--ink-cream);
  border: 0; border-bottom: 1px solid var(--ink-espresso-soft);
  color: var(--ink-bone);
  padding: 6px 0;
  outline: none;
}
.field input:focus,
.field textarea:focus { border-bottom-color: var(--ink-espresso); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================================
   CART DRAWER
   ============================================================ */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(43, 29, 21, 0.45);
  display: flex; justify-content: flex-end;
  animation: scrimIn 260ms ease forwards;
}
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: 440px; max-width: 92vw;
  background: var(--ink-cream);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
  animation: drawerIn 320ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-faint);
}
.drawer-head .eyebrow { font-size: 13px; }
.drawer-head .icon-btn { font-size: 26px; line-height: 1; }
.drawer-orn { display: block; margin: 18px auto; }
.drawer-body { padding: 0 24px 32px; }
.drawer-body.confirm { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 24px; }
.cart-row {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-faint);
}
.cart-row-meta { min-width: 0; }
.cart-row-title { font-family: var(--font-serif); font-weight: 600; font-size: 17px; color: var(--ink-espresso-deep); }
.cart-row-sub { font-size: 14px; color: var(--ink-espresso-soft); margin-top: 2px; }
.cart-row-price { font-family: var(--font-serif); font-size: 16px; color: var(--ink-espresso-deep); font-weight: 600; }
.qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; }
.qty button {
  background: transparent; border: 1px solid var(--border);
  width: 22px; height: 22px; cursor: pointer;
  border-radius: var(--r-1); color: var(--ink-espresso);
}
.qty button:hover { background: var(--ink-parchment); }
.qty span { min-width: 18px; text-align: center; }
.qty-remove { width: auto !important; border: 0 !important; color: var(--ink-blood) !important; font-style: italic; padding: 0 8px !important; }
.cart-total {
  display: flex; justify-content: space-between;
  font-family: var(--font-serif);
  font-size: 20px; color: var(--ink-espresso-deep);
  padding: 16px 0; border-top: 1px solid var(--border);
  margin-top: 12px;
}
.cart-fineprint { font-size: 13px; color: var(--ink-espresso-soft); font-style: italic; margin-bottom: 16px; }
.empty { text-align: center; padding: 36px 0; }
.ship-actions { display: flex; justify-content: space-between; margin-top: 18px; }

/* ============================================================
   AUDIO BAR
   ============================================================ */
.audio-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--ink-espresso-deep);
  color: var(--ink-cream);
  z-index: 60;
  display: grid;
  grid-template-columns: 280px 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 10px 24px;
  border-top: 1px solid var(--ink-espresso);
  animation: barIn 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes barIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
.audio-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.audio-meta { min-width: 0; }
.audio-title { font-family: var(--font-serif); font-size: 16px; font-weight: 500; font-style: italic; }
.audio-artist { font-family: var(--font-serif-sc); font-size: 11px; letter-spacing: var(--ls-spaced); text-transform: uppercase; color: var(--ink-cream-soft); opacity: 0.75; }
.audio-controls { display: flex; align-items: center; justify-content: center; gap: 10px; }
.audio-controls .icon-btn { color: var(--ink-cream); }
.audio-controls .icon-btn:hover { background: rgba(255, 248, 232, 0.1); border-color: rgba(255, 248, 232, 0.2); }
.audio-controls .icon-btn.play { background: var(--ink-cream); color: var(--ink-espresso-deep); }
.audio-controls .icon-btn.play:hover { background: var(--ink-parchment); }
.audio-progress { display: flex; align-items: center; gap: 12px; }
.audio-time { font-family: var(--font-mono); font-size: 11px; color: var(--ink-cream-soft); opacity: 0.75; min-width: 38px; text-align: center; }
.audio-bar-track { position: relative; flex: 1; height: 22px; cursor: pointer; }
.audio-bar-wave {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1px;
  opacity: 0.35;
}
.audio-bar-wave span {
  display: block; width: 100%;
  min-height: 2px;
  background: var(--ink-cream-soft);
}
.audio-bar-fill {
  position: absolute; left: 0; top: 50%;
  height: 1px; background: var(--ink-cream); transform: translateY(-50%);
  z-index: 1;
}
.audio-bar-fill::after {
  content: ""; position: absolute; right: -4px; top: -3px;
  width: 8px; height: 8px; background: var(--ink-cream); border-radius: 50%;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-scrim {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(43, 29, 21, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  animation: scrimIn 260ms ease forwards;
}
.modal {
  background: var(--ink-cream);
  width: 100%;
  max-width: 800px;
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--ink-espresso);
  box-shadow: var(--shadow-frame);
  border-radius: var(--r-1);
  padding: 56px 64px;
  position: relative;
  animation: modalIn 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.modal-page { max-width: 680px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.modal-close {
  position: absolute; top: 14px; right: 18px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 28px; color: var(--ink-espresso); line-height: 1;
  width: 32px; height: 32px;
}

/* ============================================================
   SEPIA PHOTO
   ============================================================ */
.sepia-photo {
  position: relative;
  overflow: hidden;
  background: var(--ink-espresso-deep);
  display: inline-block;
}
.sepia-photo .sepia-art { width: 100%; height: 100%; display: block; }
.sepia-photo .sepia-grain {
  position: absolute; inset: 0;
  background-image: var(--grain-url);
  background-size: 200px 200px;
  opacity: 0.5; mix-blend-mode: multiply; pointer-events: none;
}
.sepia-photo .sepia-tint {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(255, 248, 232, 0.1), rgba(74, 47, 34, 0.25));
  pointer-events: none;
}
.sepia-photo .sepia-caption {
  position: absolute; bottom: 8px; left: 12px;
  font-family: var(--font-serif-sc);
  font-size: 10px; letter-spacing: var(--ls-spaced); text-transform: uppercase;
  color: var(--ink-cream); padding: 2px 6px;
  background: rgba(43, 29, 21, 0.55);
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
.newsletter.v-library {
  background: var(--ink-espresso-deep);
  color: var(--ink-cream);
  border-color: var(--ink-bone);
}
.newsletter.v-library .newsletter-title,
.newsletter.v-library .lead { color: var(--ink-cream); }
.newsletter.v-library .newsletter-form input {
  background: transparent; color: var(--ink-cream);
  border-bottom-color: var(--ink-cream-soft);
}
.newsletter.v-library .newsletter-form input::placeholder { color: var(--ink-cream-soft); opacity: 0.6; }
.newsletter.v-library .btn-ink { background: var(--ink-cream); color: var(--ink-espresso-deep); border-color: var(--ink-cream); }
.newsletter.v-library .btn-ink:hover { background: var(--ink-parchment); }
.newsletter-wrap { max-width: 560px; margin: 0 auto; padding: 0 32px; text-align: center; }
.newsletter-title { font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); line-height: 1.05; margin: 16px 0 12px; }
.newsletter-form {
  display: flex; gap: 0; max-width: 460px; margin: 24px auto 0;
  border-bottom: 1px solid var(--ink-espresso);
  align-items: center;
}
.newsletter-form input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: var(--font-serif); font-size: 18px; padding: 12px 4px;
  color: inherit;
}
.newsletter-form .btn-ink { border-radius: 0; padding: 10px 16px; font-size: 14px; letter-spacing: var(--ls-spaced); text-transform: uppercase; font-family: var(--font-serif-sc); }
.newsletter-confirm { margin-top: 24px; }

/* ============================================================
   ORNAMENTS / RULES
   ============================================================ */
.section-divider {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 0;
  color: var(--ink-espresso);
}

/* Site-specific styles are loaded as separate <link> tags in index.html. */
