/* ===== HOME BUNDLE — showcase, floating pill, dialog =====
   Used on couples-checkup.html (inside the result) and apps.html (pill +
   dialog). Evening palette from evening.css; falls back to fixed values so
   it never renders unstyled. Markup: bundle-offer.js. */

.hb {
  --hb-night: var(--night, #1A1630);
  --hb-night-2: var(--night-2, #221C3D);
  --hb-line: var(--line, rgba(185, 174, 214, 0.18));
  --hb-candle: var(--candle, #FFF3E4);
  --hb-haze: var(--haze, #B9AED6);
  --hb-ember: var(--ember, #FFB066);
  --hb-serif: var(--serif, "Frank Ruhl Libre", Georgia, serif);
  --hb-sans: var(--sans, "Rubik", system-ui, sans-serif);
  color: var(--hb-candle);
  font-family: var(--hb-sans);
}

/* ---------- Header ---------- */
.hb-head { text-align: center; margin-bottom: 1.4rem; }
.hb-kicker {
  margin: .9rem 0 .35rem; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--hb-ember);
}
.hb-h {
  margin: 0 auto .6rem; max-width: 22ch;
  font-family: var(--hb-serif); font-weight: 400; line-height: 1.1;
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.5rem); color: var(--hb-candle); text-wrap: balance;
}
.hb-sub { margin: 0 auto; max-width: 34rem; color: var(--hb-haze); font-size: 1rem; line-height: 1.6; }

/* Four overlapping app icons */
.hb-stack { display: inline-flex; align-items: center; }
.hb-stack img {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover;
  box-shadow: 0 0 0 2px var(--hb-night, #1A1630), 0 6px 14px -6px rgba(0, 0, 0, .6);
  background: #fff;
}
.hb-stack img + img { margin-inline-start: -9px; }
.hb-stack-lg img { width: 58px; height: 58px; border-radius: 15px; }
.hb-stack-lg img + img { margin-inline-start: -14px; }
.hb-stack-lg img:nth-child(1) { transform: rotate(-8deg) translateY(4px); }
.hb-stack-lg img:nth-child(2) { transform: rotate(-3deg); }
.hb-stack-lg img:nth-child(3) { transform: rotate(3deg); }
.hb-stack-lg img:nth-child(4) { transform: rotate(8deg) translateY(4px); }

/* ---------- App cards with phone screenshots ---------- */
.hb-apps {
  list-style: none; margin: 0 0 1.4rem; padding: .25rem .1rem 1rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: .8rem;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(185, 174, 214, .35) transparent;
}
@media (max-width: 720px) { .hb-apps { grid-auto-columns: 78%; } }
.hb-app {
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: .7rem;
  padding: .9rem .9rem 1rem; border-radius: 22px;
  background: var(--hb-night-2); border: 1px solid var(--hb-line);
}
.hb-app.is-lead { border-color: rgba(255, 176, 102, .5); box-shadow: 0 18px 40px -26px rgba(255, 160, 80, .7); }
.hb-phones {
  position: relative; aspect-ratio: 1 / 1.18; margin: 2px 0 4px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.hb-phone {
  position: absolute; top: 9%; inset-inline-start: 3%; width: 56%;
  aspect-ratio: 9 / 16; overflow: hidden; border-radius: 16px; background: #0d0b18;
  box-shadow: 0 0 0 4px #0d0b18, 0 0 0 5px rgba(255, 255, 255, .1), 0 18px 30px -12px rgba(0, 0, 0, .85);
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), filter .4s ease;
}
.hb-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* Front card: fully visible, tilted left. Back card: half of it shows on the
   other side, tilted right. Hover (mouse) or tap swaps them. */
.hb-phone.is-front { z-index: 2; transform: rotate(-9deg); }
.hb-phone.is-back  { z-index: 1; transform: translateX(68%) translateY(3%) rotate(10deg); filter: brightness(.82); }
.hb-phones.is-swapped .is-front { z-index: 1; transform: translateX(68%) translateY(3%) rotate(10deg); filter: brightness(.82); }
.hb-phones.is-swapped .is-back  { z-index: 2; transform: rotate(-9deg); filter: none; }
[dir="rtl"] .hb-phone.is-front,
[dir="rtl"] .hb-phones.is-swapped .is-back { transform: rotate(9deg); }
[dir="rtl"] .hb-phone.is-back,
[dir="rtl"] .hb-phones.is-swapped .is-front { transform: translateX(-68%) translateY(3%) rotate(-10deg); }
.hb-app-meta { display: flex; align-items: center; gap: .6rem; }
.hb-app-icon { width: 40px; height: 40px; border-radius: 11px; flex: none; }
.hb-app-meta strong { display: block; font-family: var(--hb-serif); font-weight: 400; font-size: 1.2rem; color: var(--hb-candle); line-height: 1.15; }
.hb-app-role { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--hb-ember); }
.hb-app p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--hb-haze); }

/* ---------- Value + price ---------- */
.hb-worth {
  text-align: center; margin: 0 auto 1rem; padding: 1.1rem 1rem; max-width: 36rem;
  border-radius: 18px; background: rgba(255, 176, 102, .07); border: 1px solid rgba(255, 176, 102, .22);
}
.hb-worth-q { margin: 0 0 .3rem; font-family: var(--hb-serif); font-size: 1.35rem; line-height: 1.25; color: var(--hb-candle); }
.hb-worth-a { margin: 0; font-size: .95rem; color: var(--hb-haze); }
.hb-was { text-align: center; margin: 0 0 .8rem; font-size: .95rem; color: var(--hb-haze); }
.hb-was s { opacity: .85; }
.hb-plans { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; max-width: 36rem; margin: 0 auto; }
@media (max-width: 480px) { .hb-plans { grid-template-columns: 1fr; } }
.hb-plan {
  position: relative; display: block; text-align: center; text-decoration: none;
  padding: 1.15rem 1rem 1rem; border-radius: 18px; color: var(--hb-candle);
  background: var(--hb-night-2); box-shadow: 0 0 0 1px rgba(185, 174, 214, .36) inset;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hb-plan:hover { transform: translateY(-2px); }
.hb-plan strong { display: block; font-size: 1.2rem; font-weight: 600; margin-bottom: .2rem; }
.hb-plan span { font-size: .88rem; color: var(--hb-haze); }
.hb-plan.is-main {
  color: #2A1406; background: linear-gradient(180deg, #FFC488, var(--hb-ember));
  box-shadow: 0 0 0 1px rgba(255, 196, 136, .5) inset, 0 12px 34px -12px rgba(255, 160, 80, .8);
}
.hb-plan.is-main span { color: rgba(42, 20, 6, .78); }
.hb-plan .hb-best {
  position: absolute; top: -.7rem; inset-inline-start: 50%; transform: translateX(-50%);
  padding: .18rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  background: var(--hb-candle); color: #2A1406; white-space: nowrap;
}
[dir="rtl"] .hb-plan .hb-best { transform: translateX(50%); }
.hb-fine { text-align: center; margin: .9rem auto 0; max-width: 36rem; font-size: .85rem; line-height: 1.5; color: var(--hb-haze); }

/* ---------- Quiet teaser (Check-Up result) ---------- */
.hb-teaser {
  width: 100%; display: flex; align-items: center; gap: .9rem; text-align: start; cursor: pointer;
  padding: .9rem 1rem; border-radius: 18px; font: inherit; color: var(--candle, #FFF3E4);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line, rgba(185, 174, 214, .18));
  transition: border-color .2s ease, background .2s ease;
}
.hb-teaser:hover { border-color: rgba(255, 176, 102, .4); background: rgba(255, 176, 102, .05); }
/* Teaser: the four icons as a neat 2×2 grid, clear of the text. */
.hb-teaser .hb-stack {
  flex: none; display: grid; grid-template-columns: repeat(2, 26px); gap: 4px;
}
.hb-teaser .hb-stack img {
  width: 26px; height: 26px; border-radius: 7px; margin: 0; transform: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}
.hb-teaser-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.hb-teaser-text strong { font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 1.08rem; line-height: 1.25; }
.hb-teaser-text span { font-size: .88rem; line-height: 1.45; color: var(--haze, #B9AED6); }
.hb-teaser-text em { font-style: normal; font-size: .86rem; color: var(--ember, #FFB066); margin-top: .1rem; }
@media (max-width: 420px) { .hb-teaser { align-items: flex-start; } .hb-teaser .hb-stack { margin-top: .25rem; } }

/* ---------- Floating pill ---------- */
.hb-pill {
  position: fixed; z-index: 900; inset-inline: 0; bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0 auto; width: min(560px, calc(100% - 24px));
  display: flex; align-items: center;
  border-radius: 999px; background: rgba(34, 28, 61, .94); backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(255, 176, 102, .35), 0 18px 40px -14px rgba(0, 0, 0, .7);
  color: var(--candle, #FFF3E4); font-family: var(--sans, system-ui);
  transform: translateY(140%); opacity: 0; transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s;
}
.hb-pill.is-shown { transform: none; opacity: 1; }
.hb-pill[hidden] { display: none; }
.hb-pill-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem;
  padding: .55rem .55rem .55rem .7rem; background: none; border: 0; color: inherit; cursor: pointer; text-align: start;
}
[dir="rtl"] .hb-pill-open { padding: .55rem .7rem .55rem .55rem; }
.hb-pill .hb-stack img { box-shadow: 0 0 0 2px #221C3D; }
.hb-pill-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.hb-pill-text strong { font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-pill-text span { font-size: .78rem; color: var(--haze, #B9AED6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-pill-cta {
  flex: none; padding: .6rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 600;
  color: #2A1406; background: linear-gradient(180deg, #FFC488, var(--ember, #FFB066));
}
.hb-pill-x {
  flex: none; width: 34px; height: 34px; margin-inline-end: .45rem; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .08); color: var(--haze, #B9AED6); font-size: 1.2rem; line-height: 1; cursor: pointer;
}
@media (max-width: 420px) {
  .hb-pill-open { gap: .5rem; }
  .hb-pill .hb-stack img { width: 24px; height: 24px; border-radius: 7px; }
  .hb-pill .hb-stack img + img { margin-inline-start: -10px; }
  .hb-pill-text strong { white-space: normal; font-size: .84rem; line-height: 1.2; }
  .hb-pill-text span { display: none; }
  .hb-pill-cta { padding: .55rem .75rem; font-size: .82rem; }
  .hb-pill-x { width: 30px; height: 30px; margin-inline-end: .35rem; }
}
/* Keep clear of the cookie banner while it is up. */
body:has(.cookie-banner-visible) .hb-pill { bottom: 150px; }

/* ---------- Dialog ---------- */
.hb-dialog {
  width: min(920px, calc(100% - 20px)); max-height: calc(100dvh - 24px); overflow: auto;
  padding: clamp(1.4rem, 4vw, 2.4rem) clamp(1rem, 3vw, 2rem) 1.6rem;
  border: 1px solid rgba(255, 176, 102, .25); border-radius: 26px;
  background: radial-gradient(80% 50% at 50% 0%, rgba(255, 176, 102, .12), transparent 70%), var(--night, #1A1630);
  color: var(--candle, #FFF3E4);
}
.hb-dialog { scrollbar-width: thin; scrollbar-color: rgba(185, 174, 214, .35) transparent; }
.hb-dialog::backdrop { background: rgba(10, 8, 20, .72); backdrop-filter: blur(4px); }
.hb-dialog-x {
  position: sticky; top: 0; float: inline-end; margin: -.6rem -.4rem 0 0;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: var(--candle, #FFF3E4); font-size: 1.4rem; line-height: 1; z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  .hb-pill, .hb-plan, .hb-phone { transition: none; }
}

/* Approximate shekel amount beside the dollar price (Hebrew only). */
.hb-ils { font-size: .72em; font-weight: 500; opacity: .75; white-space: nowrap; }
