/*
  HiddenVoices standalone visual system: warm paper, near-black editorial type,
  restrained recording-orange accents, and simple responsive compositions.
*/

:root {
  --paper: #f4f1ea;
  --paper-deep: #e7e0d5;
  --ink: #171715;
  --muted: #6f6b64;
  --line: rgba(23, 23, 21, 0.2);
  --accent: #b63b1f;
  --accent-dark: #8e2914;
  --white: #fffdf8;
  --shadow: 0 24px 60px rgba(34, 24, 16, 0.14);
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 10%, rgba(182, 59, 31, 0.05), transparent 24rem),
    var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.site-footer,
#main-content {
  width: min(calc(100% - 3rem), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.5rem;
  border-top: 0.45rem solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.wordmark,
.site-footer strong {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
  text-decoration: none;
}

.header-email,
.site-footer a {
  font-size: 0.8rem;
  font-weight: 700;
  text-underline-offset: 0.25rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.65fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 39rem;
  padding: 5rem 0;
  border-bottom: 1px solid var(--ink);
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(182, 59, 31, 0.12);
}

.hero h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(4rem, 8.4vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.82;
}

.hero h1 em {
  color: var(--accent);
  font-weight: 900;
}

.hero-copy {
  max-width: 40rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.primary-button,
.email-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  margin-top: 2rem;
  padding: 0.85rem 1.4rem;
  border: 0;
  color: var(--white);
  background: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-button:hover,
.email-button:hover,
.play-button:hover {
  background: var(--accent);
}

.primary-button:active,
.email-button:active,
.play-button:active {
  transform: scale(0.97);
}

.hero-art {
  position: relative;
  aspect-ratio: 0.88;
  overflow: hidden;
  border-radius: 0.35rem;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 17%, var(--accent) 17.5% 18.5%, transparent 19% 25%, rgba(255, 255, 255, 0.2) 25.5% 26%, transparent 26.5% 33%, rgba(182, 59, 31, 0.65) 33.5% 34%, transparent 34.5%),
    linear-gradient(145deg, #060606 0%, #1d1510 65%, #6f210f 120%);
  box-shadow: var(--shadow);
}

.hero-art::after {
  content: "HIDDENVOICES CATALOG";
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.catalog-section {
  padding: 6rem 0 7rem;
}

.section-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 3rem;
}

.section-intro h2,
.detail-title {
  margin: 0;
  font-size: clamp(3rem, 6.5vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.section-intro p {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.35fr);
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.field input,
.field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.32);
}

.results-summary {
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem 1.25rem;
}

.book-card {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.book-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle, transparent 0 22%, currentColor 22.5% 23.5%, transparent 24% 31%, rgba(255, 255, 255, 0.28) 31.5% 32%, transparent 32.5%),
    linear-gradient(145deg, hsl(var(--hue) 45% 11%), hsl(var(--hue) 58% 28%));
  transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 180ms ease;
}

.book-card:hover .book-cover {
  transform: translateY(-0.35rem);
  box-shadow: 0 18px 38px rgba(30, 20, 12, 0.16);
}

.cover-number {
  position: absolute;
  right: 0.85rem;
  top: 0.75rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.cover-mark {
  font-size: clamp(1.7rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.book-category {
  margin: 0.8rem 0 0.35rem;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.load-more {
  display: block;
  margin: 3rem auto 0;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.load-more:hover {
  color: var(--white);
  background: var(--ink);
}

.empty-state,
.loading-state {
  min-height: 50vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.detail-page {
  min-height: calc(100vh - 11rem);
  padding: 4rem 0 7rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 5rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-underline-offset: 0.3rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: start;
}

.detail-art {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--white);
  background:
    radial-gradient(circle, transparent 0 22%, currentColor 22.5% 23.5%, transparent 24% 31%, rgba(255, 255, 255, 0.26) 31.5% 32%, transparent 32.5%),
    linear-gradient(145deg, hsl(var(--hue) 45% 10%), hsl(var(--hue) 58% 29%));
  box-shadow: var(--shadow);
}

.detail-art span {
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.detail-description {
  max-width: 48rem;
  margin: 2rem 0 0;
  color: #45413c;
  font-size: 1.05rem;
  line-height: 1.75;
}

.metadata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.metadata dt {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metadata dd {
  margin: 0;
  font-weight: 700;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.category-tag {
  padding: 0.35rem 0.55rem;
  color: var(--accent-dark);
  background: rgba(182, 59, 31, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
}

.play-button {
  background: var(--accent);
}

.play-button::before {
  content: "▶";
}

.membership-dialog {
  width: min(calc(100% - 2rem), 35rem);
  padding: 0;
  border: 0;
  background: transparent;
}

.membership-dialog::backdrop {
  background: rgba(12, 11, 10, 0.72);
  backdrop-filter: blur(5px);
}

.membership-card {
  position: relative;
  padding: clamp(2rem, 7vw, 4rem);
  border-top: 0.45rem solid var(--accent);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.membership-card h2 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.membership-book {
  margin: 1rem 0 0;
  color: var(--muted);
}

.dialog-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 2rem;
  align-items: center;
  min-height: 8rem;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer strong {
  color: var(--ink);
}

@media (max-width: 900px) {
  .hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 3rem;
  }

  .hero-art {
    width: min(100%, 30rem);
  }

  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-art {
    width: min(100%, 30rem);
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  #main-content {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .site-header {
    min-height: 4.5rem;
  }

  .wordmark {
    font-size: 1rem;
  }

  .header-email {
    font-size: 0.65rem;
  }

  .hero {
    min-height: 0;
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 18vw, 5.2rem);
  }

  .catalog-section {
    padding: 4rem 0 5rem;
  }

  .section-intro,
  .catalog-tools,
  .metadata,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .section-intro {
    gap: 1.25rem;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 0.8rem;
  }

  .detail-page {
    padding-top: 2rem;
  }

  .back-link {
    margin-bottom: 3rem;
  }

  .site-footer {
    padding: 2rem 0;
    gap: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
