/* Include after the site's existing stylesheet. */
.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1762 / 893;
  overflow: hidden;
  background: #091624;
  color: #f4e5c7;
}
.hero .hero-storefront {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero .hero-shade { display: none; }
.hero .store-sign {
  position: absolute;
  z-index: 2;
  top: 10.5%;
  left: 28%;
  width: 47%;
  padding: 0;
  margin: 0;
  transform: none;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
  color: #f4dfb5;
  text-shadow: 0 2px 3px #020a12;
}
.hero .store-sign h1 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(24px, 3.45vw, 72px);
  font-weight: 400;
  letter-spacing: .025em;
  line-height: 1.12;
  text-transform: uppercase;
}
.hero .store-sign p {
  margin: .05em 0 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(18px, 2.4vw, 48px);
  font-style: italic;
  line-height: 1.15;
}
.hero .hero-eyebrow {
  position: absolute;
  top: 23%;
  left: 6.4%;
  margin: 0;
  font: 600 clamp(7px, .53vw, 11px)/1.4 Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero .hero-note {
  position: absolute;
  top: 65.5%;
  right: 5.5%;
  bottom: auto;
  width: 24.5%;
  padding: 1.2vw;
  box-sizing: border-box;
  border: 0;
  background: rgba(5, 15, 25, .82);
  color: #f6f2eb;
}
.hero .hero-note .writer-credit {
  margin: 0 0 1em;
  color: #e9bc7a;
  font: 600 clamp(7px, .5vw, 11px)/1.5 Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero .hero-note > p:not(.writer-credit) {
  margin: 0 0 1em;
  font: 400 clamp(12px, 1.12vw, 23px)/1.45 Georgia, serif;
}
.hero .hero-note a {
  display: flex;
  justify-content: space-between;
  padding-top: 1.4em;
  border-top: 1px solid #ffffff40;
  color: inherit;
  font: 600 clamp(8px, .5vw, 11px)/1.5 Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.hero a:focus-visible { outline: 2px solid #f4dfb5; outline-offset: 5px; }
.cover-reverend { background-color: #15231f; background-position: center; background-size: cover; color: #f4dfb5; }
@media (max-width: 760px) {
  .hero { aspect-ratio: auto; padding-top: 0; overflow: visible; }
  .hero .hero-storefront { position: relative; display: block; height: auto; aspect-ratio: 1762 / 893; object-fit: contain; }
  .hero .store-sign { position: relative; top: auto; left: auto; width: auto; padding: 24px 12px 20px; }
  .hero .store-sign h1 { font-size: clamp(24px, 6vw, 42px); }
  .hero .store-sign p { font-size: clamp(19px, 4.8vw, 30px); }
  .hero .hero-eyebrow { position: relative; top: auto; left: auto; padding: 4px 20px 16px; text-align: center; font-size: 9px; }
  .hero .hero-note { position: relative; top: auto; right: auto; width: auto; padding: 22px 24px 30px; background: transparent; }
  .hero .hero-note .writer-credit { font-size: 9px; }
  .hero .hero-note > p:not(.writer-credit) { font-size: 18px; }
  .hero .hero-note a { font-size: 10px; }
}

/* Homepage navigation overlays the storefront without a white strip. */
main:has(> .hero) { background:#091624; }
main:has(> .hero) > .site-header {
  position:absolute; top:0; left:0; z-index:10; width:100%;
  height:clamp(48px,5.2vw,92px); padding:0 4vw;
  background:transparent; border:0; color:#f4dfb5;
}
/* Keep the storefront header legible over the deep-blue fascia. The base
   markup carries inline fallback colors, so these intentional homepage
   overrides need priority. */
main:has(> .hero) > .site-header .wordmark,
main:has(> .hero) > .site-header nav a,
main:has(> .hero) > .site-header .free-mark {
  color:#f4dfb5 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.55);
}
main:has(> .hero) > .site-header .free-mark { border-color:currentColor; }
main:has(> .hero) > .site-header nav a:after { background:currentColor; }
main:has(> .hero) > .site-header a:focus-visible { outline:2px solid currentColor; outline-offset:5px; }
/* Reset the original hero's flex layout, spacing and image transform. */
.hero { display: block; padding: 0; }
.hero .hero-storefront { transform: none; }
.hero .hero-note { max-width: none; margin-left: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (max-width:760px) {
  main:has(> .hero) > .site-header { position:relative; height:72px; }
  .hero { display:flex; flex-direction:column; align-items:stretch; }
  .hero .store-sign { order:-1; }
  .hero .hero-storefront { flex:none; width:100%; }
  .hero .hero-eyebrow { padding-top:20px; }
  .hero .hero-note { margin:0; }
}

/* Responsive story catalog: every cover stays discoverable while the shared
   detail panel preserves the original hover/flyout experience. */
.catalog-grid {
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:28px 18px;
  width:100%;
}
.catalog-grid .book-card {
  display:block !important;
  min-width:0;
  flex:none;
  align-self:start;
  position:relative;
  top:auto !important;
  margin-top:0 !important;
  transform:none !important;
}
.catalog-grid .cover {
  aspect-ratio:1 / 1 !important;
  background-size:cover;
  background-position:center;
  transition:transform .25s ease, box-shadow .25s ease;
}
.catalog-grid .book-card:focus-visible .cover,
.catalog-grid .book-card.is-active .cover {
  transform:translateY(-7px);
  box-shadow:0 22px 34px #0009;
}
.book-detail .text-link {
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:1.25rem;
  width:auto;
  min-width:220px;
  align-self:flex-start;
  margin-top:1.75rem;
  padding:.95rem .95rem .95rem 1.15rem;
  border:1px solid rgba(244,223,181,.72);
  border-radius:3px;
  background:rgba(9,22,36,.45);
  color:#f4dfb5;
  font-weight:700;
  letter-spacing:.12em;
  text-decoration:none;
  text-transform:uppercase;
  transition:background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.book-detail .text-link span {
  display:grid;
  width:1.8rem;
  height:1.8rem;
  place-items:center;
  border:1px solid rgba(244,223,181,.72);
  border-radius:50%;
  color:#f4dfb5;
  font-size:1rem;
  line-height:1;
  transition:background .2s ease, color .2s ease, transform .2s ease;
}
.book-detail .text-link:hover,
.book-detail .text-link:focus-visible {
  background:#f4dfb5;
  border-color:#f4dfb5;
  color:#091624;
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(0,0,0,.24);
}
.book-detail .text-link:hover span,
.book-detail .text-link:focus-visible span {
  background:#091624;
  border-color:#091624;
  color:#f4dfb5;
  transform:translateX(2px);
}
.catalog-grid .book-card-meta {
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding-top:10px;
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.catalog-wrap { width:100%; }
@media (max-width:900px) {
  .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 14px; }
  .catalog-grid .cover-title { font-size:clamp(22px,5vw,38px); overflow-wrap:anywhere; }
  .book-detail { position:relative; top:auto; margin-top:34px; }
}
@media (max-width:620px) {
  .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
  .catalog-grid .book-card-meta { font-size:9px; letter-spacing:.06em; }
  .catalog-grid .cover-title { font-size:clamp(18px,5.8vw,30px); }
}
