/* Page for "סודות של ג׳ובניק". Builds on styles.css (same tokens, type and form components);
   only what this page adds is here. Deliberately quieter than the launch page: no hero motion,
   no brick-red display type, one primary button. */

/* ---------- Title: cover + text ---------- */
.title {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px clamp(32px, 7vw, 120px);
  align-items: start;
  padding-block: clamp(32px, 5vw, 72px) var(--section);
}
.title__book { margin: 0; width: 100%; max-width: 420px; justify-self: center; position: sticky; top: 32px; }
.book--plain::after { display: none; }
.book--plain img { box-shadow: 0 18px 40px -24px rgba(20, 22, 26, 0.55); }

/* Front/back cover: click the cover to switch sides, or pick a side below (cover.js).
   A crossfade, not a 3D flip: Safari mirrors the front face instead of hiding it in a 3D flip. */
.cover__flip {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cover__flip:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.cover__card { display: grid; }
.cover__face {
  display: block; grid-area: 1 / 1;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}
.cover__face img { display: block; height: auto; }
.cover__face--back,
.cover[data-side="back"] .cover__face--front {
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
.cover[data-side="back"] .cover__face--back { opacity: 1; visibility: visible; transition: opacity 0.35s ease, visibility 0s; }
.cover__switch { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.cover__switch button {
  font: inherit; font-size: var(--fs-meta); color: var(--graphite);
  padding: 6px 12px; border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer;
}
.cover__switch button:hover { color: var(--ink); }
.cover__switch button[aria-pressed="true"] { color: var(--ink); border-color: var(--rule-strong); }
.cover__switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .cover__face { transition: none !important; } }

/* Homepage hero: a full turn on scroll (cover.js). One card rotates; the visible face swaps
   at 90°/270°, and the back is pre-mirrored so it reads correctly once the card is turned. */
.cover--spin .cover__flip { perspective: 1600px; }
.cover--spin .cover__card { transform-origin: 50% 50%; will-change: transform; }
.cover--spin .cover__face { transition: none; }
.cover--spin .cover__face--back { transform: scaleX(-1); }

.title__text { display: grid; gap: 22px; max-width: 36em; }
.title__text .eyebrow { margin-bottom: 2px; }
.title__name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem); line-height: 1.04; letter-spacing: -0.01em;
}
.title__lede { font-size: var(--fs-lede); line-height: 1.5; }
.title__body { display: grid; gap: 14px; }
.title__fine { font-size: 0.9375rem; color: var(--graphite); }
.audience { margin: 4px 0 0; display: grid; gap: 10px; }
.audience > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; }
.audience dt { font-family: var(--display); font-size: 1.0625rem; }
.audience dd { margin: 0; color: var(--graphite); line-height: 1.5; }
.title__note { font-size: 0.875rem; color: var(--graphite); }

.facts { margin: 6px 0 0; border-top: 1px solid var(--rule-strong); }
.facts > div {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding-block: 12px; border-bottom: 1px solid var(--rule);
}
.facts dt { font-family: var(--mono); font-size: var(--fs-meta); color: var(--graphite); }
.facts dd { margin: 0; }

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 10px; }
.price { display: flex; align-items: baseline; gap: 10px; }
.price__amount { font-family: var(--display); font-size: 2.25rem; line-height: 1; }
.price__note { color: var(--graphite); }

/* ---------- Link back to the flagship book ---------- */
.other { display: grid; gap: 10px; padding-block: clamp(56px, 7vw, 96px); }
.other__link {
  justify-self: start; color: var(--ink); text-decoration: none;
  font-family: var(--display); font-size: clamp(1.5rem, 1.15rem + 1.3vw, 2.25rem); line-height: 1.2;
  border-bottom: 1px solid var(--rule-strong);
}
.other__link:hover { border-bottom-color: var(--ink); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .title { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 20px; }
  .title__book { position: static; max-width: min(78vw, 340px); }
  .buy { flex-direction: column; align-items: stretch; }
  .buy .btn { width: 100%; }
}
