/* store.css — one book standing upright on the same dark wood table. */

body.store {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.table.store-table {
  position: fixed;
  inset: 0;
  background-image: var(--wood-url), linear-gradient(180deg, #0c0805 0%, #1d120a 46%, #241710 60%, #150d07 100%);
  background-color: var(--bg);
  background-size: 480px, cover;
  background-blend-mode: normal;
}

/* the wall above the table falls to near-black */
.table.store-table::before {
  content: "";
  position: absolute;
  inset: 0 0 55%;
  background: linear-gradient(180deg, rgba(8, 6, 6, 0.96), rgba(8, 6, 6, 0.55));
}

.lamp {
  position: fixed;
  inset: 0;
  background: radial-gradient(56% 44% at 50% 30%, rgba(255, 205, 130, 0.14), rgba(255, 190, 110, 0.04) 55%, transparent 75%);
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 22vmax 7vmax rgba(4, 3, 2, 0.9);
  pointer-events: none;
}

.site-head.slim { padding-top: 26px; }
.site-head.slim .brand { font-size: clamp(18px, 2.4vw, 24px); }

.store-main {
  position: relative;
  z-index: 3;
  flex: 1;
  width: min(1060px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(30px, 6vw, 84px);
  padding: 3vh 0 6vh;
}

@media (max-width: 840px) {
  .store-main { grid-template-columns: 1fr; gap: 20px; padding-top: 1vh; }
}

/* ------------------------------------------------------------- 3D mockup */
.mock-stage {
  perspective: 1300px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 380px;
  position: relative;
}

.mock-shadow {
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 78%;
  height: 60px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3) 55%, transparent 75%);
  pointer-events: none;
}

.mock {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-21deg) rotateX(3deg);
  transition: transform 0.25s ease-out;
}

.mock .mf {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mock .m-front {
  background-size: cover;
  border-radius: 2px 5px 5px 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* lamp rim-light on the cover (gradient, not filter) */
.mock .m-front::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(115deg, rgba(255, 226, 160, 0.16), transparent 34%),
    linear-gradient(295deg, rgba(0, 0, 0, 0.28), transparent 40%);
  pointer-events: none;
}

.mock .m-back {
  background-size: cover;
  border-radius: 5px 2px 2px 5px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.mock .m-spine {
  background-size: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset -3px 0 6px rgba(0, 0, 0, 0.5), inset 2px 0 2px rgba(255, 230, 190, 0.14);
}

.mock .m-spine span {
  writing-mode: vertical-rl;
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: #ecd9a8;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.mock .m-pages {
  background: repeating-linear-gradient(180deg, #eadfc9 0 2px, #d5c6a2 2px 3.4px);
  box-shadow: inset 0 0 10px rgba(96, 74, 40, 0.55);
}

.mock .m-top {
  background: repeating-linear-gradient(90deg, #eadfc9 0 2px, #d5c6a2 2px 3.4px);
  box-shadow: inset 0 0 8px rgba(96, 74, 40, 0.5);
}

/* ------------------------------------------------------------- copy side */
.store-copy { position: relative; z-index: 2; max-width: 560px; }

.store-copy .series-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gilt);
  margin: 0 0 12px;
}

.store-copy h2 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.04;
  margin: 0 0 14px;
  color: var(--ink);
}

.store-copy .meta-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 22px;
}

.store-copy .blurb p {
  font-size: 16.5px;
  line-height: 1.72;
  color: #cfc8bd;
  margin: 0 0 1em;
  text-wrap: pretty;
}

.store-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

/* format icons inside CTA buttons (reader / ebook / paperback / audiobook) */
.store-cta a svg {
  width: 15px;
  height: 15px;
  margin-right: 9px;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cross-link {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.cross-link a { color: var(--gilt); text-decoration: none; border-bottom: 1px dotted rgba(200, 160, 75, 0.45); }
.cross-link a:hover { color: var(--gold); }

@media (max-width: 840px) {
  .mock-stage { min-height: 320px; margin-top: 10px; }
  .store-copy { text-align: center; margin: 0 auto; }
  .store-cta { justify-content: center; }
}

/* ============================================================ storefront */
body.storefront {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 560px at 50% 10%, rgba(217, 161, 59, 0.09), transparent 70%),
    var(--bg);
}

.sf-main {
  flex: 1;
  width: min(920px, 92vw);
  margin: 0 auto;
  padding: 2vh 0 6vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.sf-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: clamp(26px, 4vw, 44px);
  align-items: center;
  background: linear-gradient(180deg, #161009, #100a06);
  border: 1px solid #2c2118;
  border-radius: 4px;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 34px 70px -22px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 225, 170, 0.05);
}

.sf-card .store-copy h2 { font-size: clamp(26px, 3.4vw, 36px); }
.sf-card .blurb p { font-size: 15.5px; }
.sf-card .store-cta { margin-top: 20px; gap: 12px; }
.sf-card .store-cta .btn-gold, .sf-card .store-cta .btn-ghost { padding: 11px 20px; font-size: 11px; }
.sf-card .store-cta a svg { width: 13px; height: 13px; margin-right: 7px; }

.sf-cover {
  display: block;
  perspective: 900px;
  text-decoration: none;
}

.sf-cover img {
  display: block;
  width: 100%;
  border-radius: 2px 5px 5px 2px;
  transform: rotateY(-13deg) rotateX(1.5deg);
  box-shadow:
    -10px 0 0 -6px rgba(234, 223, 201, 0.85),
    -14px 0 0 -8px rgba(90, 70, 40, 0.7),
    18px 30px 50px -14px rgba(0, 0, 0, 0.85);
  transition: transform 0.3s;
}

.sf-cover:hover img { transform: rotateY(-7deg) rotateX(1deg); }

.sf-intro, .sf-free-note {
  text-align: center;
  color: var(--dim);
  font-style: italic;
  font-size: 15.5px;
  margin: 8px 0;
}

.sf-free-note a { color: var(--gilt); text-decoration: none; border-bottom: 1px dotted rgba(200, 160, 75, 0.45); }
.sf-free-note a:hover { color: var(--gold); }

@media (max-width: 620px) {
  .sf-card { grid-template-columns: 1fr; text-align: center; }
  .sf-cover { width: min(200px, 60vw); margin: 0 auto; }
  .sf-card .store-cta { justify-content: center; }
}
