/* =============================================================
   your-book.css — personalised sales page (additions)
   Loads AFTER order.css and speaks the same visual language.
   Only new pieces live here; shared components come from order.css.
   ============================================================= */

/* name injected by render() (%N%) — blends into the copy, never highlighted */
.yb-name { color: inherit; font-weight: inherit; font-family: inherit; }

/* ===== S01 · Personal greeting — intimate, direct, "cameras off" ===== */
.greet { background: var(--cream); text-align: start; padding-block: clamp(30px, 5vw, 54px) clamp(16px, 2.4vw, 28px); padding-inline: var(--gutter); }
.greet__inner { max-width: 600px; margin: 0 auto; position: relative; z-index: 2; }
.greet__hi {
  font-family: var(--f-hand);
  font-weight: 400;
  font-size: clamp(29px, 3.6vw, 48px);
  line-height: 1.2;
  color: var(--brown-ink);
  margin: 0 0 clamp(12px, 1.6vw, 18px);
  text-wrap: balance;
}
.greet__lead {
  font-size: clamp(16px, 1.4vw, 18.5px);
  line-height: 1.8;
  color: var(--brown);
  margin: 0;
  max-width: none;
  text-align: start;
  text-wrap: pretty;
}
.greet__lead .yb-type { font-weight: 600; color: var(--brown-ink); }
.greet__cue {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: clamp(18px, 2.2vw, 26px);
  font-family: var(--f-hand); font-size: clamp(16px, 1.5vw, 20px); color: var(--blush);
}
.greet__cue svg { width: 16px; height: 20px; color: var(--gold-deep); animation: cueBounce 1.8s var(--ease) infinite; }
@media (prefers-reduced-motion: reduce) { .greet__cue svg { animation: none; } }

/* the gift chapter reuses .flip (brown). tighten its top since greet precedes it */
.flip--gift { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 9vw, 120px); }

/* ===== S02 · Type-matched hero — the real hero: sharp, hierarchical ===== */
.thero { background: var(--cream); text-align: center; padding-bottom: clamp(22px, 2.8vw, 40px); padding-inline: var(--gutter); }
.thero__inner { max-width: 740px; margin: 0 auto; }
.thero__eyebrow { color: var(--accent); }
/* opening hook — Savyon hand script, up to the first name */
.thero__hook {
  font-family: var(--f-hand);
  color: var(--brown-ink);
  font-size: clamp(28px, 3.6vw, 50px);
  line-height: 1.22;
  margin: 0 auto clamp(18px, 2.2vw, 28px);
  max-width: 22ch;
  text-wrap: balance;
}
.thero__hook em { font-style: normal; color: var(--accent-deep); }
.thero__p {
  font-size: clamp(16px, 1.35vw, 18.5px);
  line-height: 1.75;
  color: var(--brown);
  margin: 0 auto clamp(14px, 1.7vw, 22px);
  max-width: 58ch;
  text-wrap: pretty;
}
.thero__p em { font-style: normal; color: var(--accent-deep); font-weight: 600; }
.thero__p b { color: var(--brown-ink); font-weight: 600; }
.thero__close {
  font-family: var(--f-hand);
  font-size: clamp(26px, 3.4vw, 46px);
  color: var(--accent-deep);
  margin: clamp(6px, 1vw, 12px) 0 0;
  line-height: 1.2;
}

/* ===== S03 · Offer strip ("הנה מה שתקבלי") — cream so it reads apart from the sand bug/feature section ===== */
.offer { background: var(--cream); padding-top: clamp(24px, 3vw, 44px); padding-inline: var(--gutter); }
/* checkout inner needs side padding on small screens (it doesn't use .wrap) */
.form-sec__inner { padding-inline: var(--gutter); }
.offer__inner {
  max-width: 720px; margin: 0 auto;
  background: var(--cream); border: 1px solid var(--line);
  padding: clamp(30px, 4vw, 52px) clamp(24px, 3.4vw, 46px);
  text-align: center; position: relative;
}
.offer__inner::before { content: ""; position: absolute; inset: 12px -12px -12px 12px; border: 1px solid var(--line-soft); z-index: -1; }
.offer__title { font-family: var(--f-display); font-size: clamp(24px, 2.8vw, 36px); color: var(--brown-ink); margin: 0 0 clamp(22px, 2.6vw, 30px); line-height: 1.14; text-wrap: balance; }
.offer__list { list-style: none; margin: 0 auto clamp(26px, 3vw, 36px); padding: 0; display: inline-flex; flex-direction: column; gap: 14px; text-align: start; max-width: 42ch; }
.offer__list li { display: flex; gap: 13px; align-items: flex-start; font-size: clamp(15px, 1.3vw, 17.5px); line-height: 1.5; color: var(--brown); }
.offer__list li::before { content: ""; flex: none; width: 9px; height: 9px; margin-top: 7px; transform: rotate(45deg); border: 1px solid var(--accent); }
.offer__price { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: clamp(22px, 2.6vw, 30px); }
.offer__amount { font-family: var(--f-display); font-size: clamp(48px, 6vw, 74px); line-height: 0.9; color: var(--brown-ink); }
.offer__cur { font-family: var(--f-display); font-size: clamp(20px, 2.2vw, 28px); color: var(--accent-deep); }
.offer__cta { display: flex; justify-content: center; }

/* ===== S05 · "What is HD" editorial intro (above the layers) ===== */
.hdintro { background: var(--cream); }
.hdintro__inner { max-width: 760px; margin: 0 auto; }
.hdintro__q { font-family: var(--f-display); font-size: clamp(26px, 3.4vw, 44px); line-height: 1.14; color: var(--brown-ink); margin: 0 0 clamp(18px, 2.2vw, 26px); text-wrap: balance; text-align: center; }
.hdintro__p { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.85; color: var(--brown); margin: 0 auto clamp(18px, 2vw, 24px); max-width: 62ch; text-wrap: pretty; }
.hdintro__p .yb-tok { color: var(--brown-ink); font-weight: 600; }
.hdintro__turn {
  font-family: var(--f-hand);
  font-size: clamp(22px, 2.6vw, 34px);
  color: var(--accent-deep);
  text-align: center;
  margin: clamp(24px, 3vw, 38px) auto clamp(6px, 1vw, 12px);
  max-width: 46ch; line-height: 1.3;
  text-wrap: balance;
}

/* headings: never leave a single word orphaned on a line */
.h2, .greet__lead { text-wrap: balance; }

/* flipbook: generic full-width CTA banner on the final page (desktop-sized) */
.flip__btn--bar { top: auto; bottom: clamp(20px, 5.5%, 52px); width: 86%; filter: drop-shadow(0 10px 22px rgba(61,45,28,0.28)); }
.flip__btn--bar:hover { transform: translateX(-50%) translateY(-3px); }

/* distinct sectors: "About" reads apart from the checkout above it */
.about { background: var(--cream); }
.faq { background: var(--sand); }

/* ===== S05b · layers CTA ===== */
.layers__cta { display: flex; justify-content: center; margin-top: clamp(38px, 4.6vw, 60px); }

/* ===== S07 · Checkout — product summary + birth note ===== */
.co__product {
  background: linear-gradient(180deg, #FFFBF2 0%, #FBF3E2 100%);
  border: 1px solid var(--gold-deep);
  padding: clamp(22px, 2.8vw, 32px);
  margin-bottom: clamp(28px, 3.4vw, 40px);
}
.co__product-name { font-family: var(--f-display); font-size: clamp(21px, 2.2vw, 28px); color: var(--brown-ink); margin: 0 0 14px; line-height: 1.18; }
.co__product-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.co__product-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--brown); }
.co__product-list li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; transform: rotate(45deg); border: 1px solid var(--gold-deep); }
.co__product-rule { height: 1px; background: rgba(216,174,106,0.4); margin: 4px 0 16px; }
.co__product-price { display: flex; align-items: baseline; gap: 7px; }
.co__product-price .amt { font-family: var(--f-display); font-size: clamp(38px, 4.4vw, 56px); line-height: 0.9; color: var(--brown-ink); }
.co__product-price .cur { font-family: var(--f-display); font-size: clamp(18px, 2vw, 24px); color: var(--gold-deep); }
.co__product-price .tag { margin-inline-start: auto; align-self: center; font-family: var(--f-body); font-weight: 600; font-size: 12px; letter-spacing: 0.08em; color: var(--accent-deep); }
.co__product.is-decode { border-color: var(--accent); }
.co__product.is-decode .co__product-decode { display: flex; }
.co__product-decode {
  display: none; align-items: center; gap: 9px;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--accent);
  font-family: var(--f-body); font-weight: 600; font-size: 13.5px; color: var(--accent-deep);
}
.co__product-decode::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); flex: none; }

.co__birth-note {
  font-size: 14px; line-height: 1.6; color: var(--brown-ink); font-weight: 600;
  margin: -6px 0 18px; display: flex; gap: 9px; align-items: flex-start;
}
.co__birth-note::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; transform: rotate(45deg); background: var(--gold-deep); }

/* ===== Upsell popup ===== */
.upsell {
  position: fixed; inset: 0; z-index: 120;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.upsell.is-open { display: flex; }
.upsell__backdrop { position: absolute; inset: 0; background: rgba(61,45,28,0.62); backdrop-filter: blur(3px); }
.upsell__panel {
  position: relative; z-index: 1;
  width: min(560px, 100%);
  background: var(--cream);
  border: 1px solid var(--gold-deep);
  padding: clamp(30px, 4vw, 50px) clamp(24px, 3.4vw, 46px) clamp(26px, 3.4vw, 40px);
  box-shadow: 0 40px 100px -30px rgba(61,45,28,0.6);
  max-height: 92vh; overflow-y: auto;
  transform: translateY(14px) scale(0.98); opacity: 0;
  transition: transform var(--med) var(--ease-out), opacity var(--med) var(--ease);
}
.upsell.is-open .upsell__panel { transform: none; opacity: 1; }
.upsell__panel::before { content: ""; position: absolute; inset: 10px 10px auto 10px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-deep), transparent); opacity: 0.5; }
.upsell__eyebrow { font-family: var(--f-hand); font-size: clamp(19px, 2vw, 26px); color: var(--accent-deep); display: block; margin-bottom: 12px; }
.upsell__title { font-family: var(--f-display); font-size: clamp(23px, 2.6vw, 34px); color: var(--brown-ink); line-height: 1.16; margin: 0 0 clamp(14px, 1.8vw, 20px); text-wrap: balance; }
.upsell__title b { color: var(--brown-ink); font-weight: 700; }
.upsell__body { font-size: clamp(15px, 1.3vw, 17px); line-height: 1.75; color: var(--brown); margin: 0 0 clamp(16px, 2vw, 22px); text-wrap: pretty; }
.upsell__body em { font-style: italic; color: var(--brown-ink); }
.upsell__price-line {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 0 0 clamp(22px, 2.8vw, 30px); padding: 16px 20px;
  background: var(--cream-2); border: 1px solid var(--line);
}
.upsell__price-was { font-family: var(--f-display); font-size: 20px; color: var(--blush); text-decoration: line-through; }
.upsell__price-now { font-family: var(--f-display); font-size: clamp(30px, 3.4vw, 42px); color: var(--brown-ink); line-height: 1; }
.upsell__price-now .cur { font-size: 0.5em; color: var(--gold-deep); margin-inline-start: 3px; }
.upsell__price-tag { margin-inline-start: auto; font-family: var(--f-body); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; color: var(--accent-deep); align-self: center; }
.upsell__actions { display: flex; flex-direction: column; gap: 12px; }
.upsell__decline {
  background: none; border: 0; padding: 8px; cursor: pointer;
  font-family: var(--f-body); font-size: 14.5px; color: var(--blush);
  text-align: center; transition: color var(--fast);
}
.upsell__decline:hover { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }
.upsell__close {
  position: absolute; top: 12px; inset-inline-end: 12px;
  width: 34px; height: 34px; border: 0; background: none; cursor: pointer;
  color: var(--brown); display: inline-flex; align-items: center; justify-content: center;
  transition: color var(--fast);
}
.upsell__close:hover { color: var(--accent-deep); }
.upsell__close svg { width: 16px; height: 16px; }

/* ===== dev/simulate panel (for Michal — verify without the widget) ===== */
.devkit { position: fixed; inset-block-end: 16px; inset-inline-end: 16px; z-index: 90; font-family: var(--f-body); }
.devkit__tab { background: var(--brown-ink); color: var(--cream); border: 0; padding: 9px 16px; font-size: 12.5px; letter-spacing: 0.06em; cursor: pointer; box-shadow: 0 10px 30px rgba(61,45,28,0.3); }
.devkit__panel { display: none; position: absolute; inset-block-end: 44px; inset-inline-end: 0; width: 260px; background: var(--cream); border: 1px solid var(--line); padding: 16px; box-shadow: 0 30px 70px -20px rgba(61,45,28,0.4); }
.devkit.is-open .devkit__panel { display: block; }
.devkit.is-open .devkit__tab { background: var(--accent-deep); }
.devkit__x { position: absolute; top: 8px; inset-inline-end: 10px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--blush); cursor: pointer; }
.devkit__title { font-family: var(--f-display); font-size: 16px; color: var(--brown-ink); margin: 0 0 12px; }
.devkit__row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.devkit__row label { font-size: 11px; letter-spacing: 0.06em; color: var(--blush); }
.devkit__row select, .devkit__row input { border: 1px solid var(--line); background: var(--cream); padding: 7px 8px; font-family: var(--f-body); font-size: 13px; color: var(--brown-ink); }
.devkit__actions { display: flex; gap: 8px; margin-top: 4px; }
.devkit__actions .btn { flex: 1; padding: 9px 10px; font-size: 12.5px; }

/* ===== S01b · Gift chapter — bigger book on desktop, click-to-page ===== */
@media (min-width: 821px) {
  .flip--gift .phone { width: clamp(340px, 42vw, 470px); }
  .flip--gift .phone__screen { cursor: pointer; }
}

/* ===== S05 · What is HD — small bites, not a wall of text ===== */
.hdintro__intro-lead { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.75; color: var(--brown); margin: 0; }
.hdintro__bites { list-style: none; margin: clamp(12px, 1.4vw, 16px) 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hdintro__bites li { position: relative; padding-inline-start: 26px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--brown-ink); }
.hdintro__bites li::before { content: ""; position: absolute; inset-inline-start: 0; top: 9px; width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--accent); }
.hdintro__note { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.75; color: var(--brown); margin: 0; text-wrap: pretty; }
.hdintro__note b { color: var(--brown-ink); font-weight: 600; }

.hdintro__part2 { margin-top: clamp(52px, 6vw, 90px); }
.hdintro__turnblock { max-width: 700px; margin: 0 auto clamp(28px, 3.4vw, 42px); text-align: center; }
.hdintro__turnblock .h2 { margin-bottom: 14px; }
.hdintro__turnblock .lede { margin-inline: auto; max-width: 50ch; }
.hdintro__promise { max-width: 620px; margin: 0 auto clamp(30px, 3.8vw, 46px); text-align: center; }
.hdintro__promise-lead { font-family: var(--f-display); font-size: clamp(22px, 2.6vw, 34px); line-height: 1.28; color: var(--brown-ink); margin: 0 0 14px; text-wrap: balance; }
.hdintro__promise-lead s { color: var(--blush); text-decoration-color: var(--terra); text-decoration-thickness: 1.5px; }
.hdintro__promise .body { margin-inline: auto; max-width: 54ch; }

/* ===== S07 · Checkout product card — horizontal, price to the side ===== */
.co__product { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 2.2vw, 24px); }
.co__product-name { margin: 0 0 14px; }
.co__product-list { margin: 0; }
.co__product-aside { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.co__product-price { display: flex; align-items: baseline; gap: 6px; }
.co__product-price .amt { font-family: var(--f-display); font-size: clamp(42px, 5vw, 62px); line-height: 0.9; color: var(--brown-ink); }
.co__product-price .cur { font-family: var(--f-display); font-size: clamp(19px, 2vw, 26px); color: var(--gold-deep); }
.co__product-tag { font-family: var(--f-body); font-weight: 600; font-size: 12.5px; letter-spacing: 0.04em; color: var(--accent-deep); }
.co__product-tag:empty { display: none; }
.co__product.is-decode { border-color: var(--accent); }
@media (min-width: 721px) {
  .co__product { grid-template-columns: 1fr auto; align-items: center; }
  .co__product-aside { align-items: flex-end; text-align: end; min-width: 148px; padding-inline-start: clamp(22px, 2.6vw, 34px); border-inline-start: 1px solid rgba(216,174,106,0.5); }
}

/* ===== S04 · authority card — "this is yours" tag ===== */
.bf-auth-tag {
  position: absolute; top: clamp(12px, 1.6vw, 18px); left: 50%; transform: translateX(-50%);
  z-index: 8; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 15px; white-space: nowrap; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--brown-ink); border: 1px solid var(--gold-deep);
  font-family: var(--f-body); font-weight: 500; font-size: clamp(11px, 1vw, 13px); letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(216,174,106,0.4);
}
.bf-auth-tag b { font-weight: 700; }

/* B · transition block */
.hdintro__turn-wrap { margin-top: clamp(52px, 6.5vw, 96px); }
.hdintro__pull { margin: clamp(22px, 2.6vw, 32px) auto 0; font-family: var(--f-display); font-size: clamp(21px, 2.4vw, 30px); line-height: 1.3; color: var(--brown-ink); max-width: 30ch; text-wrap: balance; }
.hdintro__pull s { color: var(--blush); text-decoration-color: var(--terra); text-decoration-thickness: 1.5px; }

/* C · three layers as a clean editorial index */
.hdlayers { max-width: 900px; margin: clamp(44px, 5.5vw, 76px) auto 0; }
.hdlayers__head { text-align: center; margin-bottom: clamp(28px, 3.4vw, 46px); }
.hdlayers__kicker { display: block; font-family: var(--f-hand); font-size: clamp(20px, 2.2vw, 28px); color: var(--accent-deep); margin-bottom: 8px; }
.hdlayers__title { font-family: var(--f-display); font-size: clamp(20px, 2.1vw, 27px); color: var(--brown-ink); margin: 0 auto; line-height: 1.25; max-width: 32ch; text-wrap: balance; }

/* C · three layers — compact accordion (clearly choosable, low scroll) */
.hdlayers__list { border-top: 1px solid var(--line); }
.hdlayer { border-bottom: 1px solid var(--line); }
.hdlayer__row { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: clamp(14px, 2.2vw, 28px); align-items: center; padding: clamp(18px, 2.4vw, 28px) 4px; transition: padding-inline-start var(--fast) var(--ease); }
.hdlayer__row::-webkit-details-marker { display: none; }
.hdlayer__row:hover { padding-inline-start: 10px; }
.hdlayer__num { font-family: var(--f-display); font-size: clamp(30px, 3.6vw, 48px); line-height: 0.85; color: var(--blush); direction: ltr; transition: color var(--fast); }
.hdlayer[open] .hdlayer__num { color: var(--accent); }
.hdlayer__head { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hdlayer__label { font-family: var(--f-body); font-weight: 600; font-size: 12px; letter-spacing: 0.05em; color: var(--accent-deep); }
.hdlayer__name { font-family: var(--f-display); font-size: clamp(20px, 2.2vw, 28px); color: var(--brown-ink); line-height: 1.15; }
.hdlayer__chev { width: 22px; height: 22px; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; transition: transform var(--med) var(--ease); }
.hdlayer__chev svg { width: 14px; height: 14px; }
.hdlayer[open] .hdlayer__chev { transform: rotate(180deg); }
.hdlayer__panel { overflow: hidden; }
.hdlayer__desc { font-size: clamp(15px, 1.3vw, 17px); line-height: 1.8; color: var(--brown); margin: 0; padding: 0 calc(clamp(30px, 3.6vw, 48px) + clamp(14px, 2.2vw, 28px)) clamp(20px, 2.4vw, 28px) 4px; max-width: 74ch; }
.hdlayer__desc b { color: var(--brown-ink); font-weight: 600; }
.hdintro__resolve { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.75; color: var(--brown); margin: clamp(16px, 2vw, 22px) auto 0; max-width: 56ch; text-wrap: pretty; }

/* running body paragraphs — one consistent size across the whole page */
.hdintro__intro-lead, .hdintro__note, .hdintro__resolve, .hdintro__turnblock .lede { font-size: clamp(16px, 1.4vw, 18px); line-height: 1.8; color: var(--brown); }
/* checkout: note under the contact heading (self only) */
.co__contact-note { font-size: 14px; line-height: 1.6; color: var(--accent-deep); font-weight: 600; margin: -8px 0 18px; }

/* final CTA — hold to three lines, don't cramp */
.final__title { max-width: none; align-items: stretch; }
.final__hand { font-size: clamp(22px, 2.8vw, 40px); font-weight: 400; }
.final__statement { font-size: clamp(23px, 3.2vw, 46px); text-wrap: normal !important; align-self: stretch; }

/* flipbook cover — planted full name; page-9 panel CTA */
.phone__screen { container-type: inline-size; }
.flip__name { position: absolute; top: 11.6%; left: 0; right: 0; z-index: 3; pointer-events: none; text-align: center; padding: 0 5%; font-family: var(--f-display); font-weight: 400; font-size: 10cqw; line-height: 1.08; color: #6f6656; text-wrap: balance; }
.flip__btn--panel { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; }
.flip__btn--panel:hover { transform: translateY(-3px); }

/* testimonials: breathing room between heading and lead */
.voices__head .h2 { margin-bottom: clamp(12px, 1.6vw, 18px); }

/* ===== responsive tweaks ===== */
@media (max-width: 760px) {
  .greet { min-height: auto; }
  .upsell__panel { padding: 28px 20px 24px; }
  /* mobile typography pass — headings & running text readable */
  .h2 { font-size: 36px; }
  .greet__hi { font-size: 38px; }
  .thero__hook { font-size: 36px; }
  .thero__close { font-size: 32px; }
  .hdintro__pull { font-size: 29px; }
  .hdlayers__kicker { font-size: 31px; }
  .hdlayers__title { font-size: 26px; }
  .hdlayer__name { font-size: 24px; }
  .hdlayer__num { font-size: 44px; }
  .hdintro__intro-lead, .hdintro__note, .hdintro__resolve, .hdintro__turnblock .lede { font-size: 17px; }
  .final__hand { font-size: 33px; }
  .final__statement { font-size: 36px; }
}
