/* דף ההצטרפות לקבוצת הווטסאפ — אותה שפה כמו דף הכרטיס (public/card/card.css), רכה יותר */
:root {
  --gold-500: #F7B500;
  --plum-900: #02132A;
  --plum-600: #55617A;
  --grey-300: #C4C5D4;
  --grey-200: #DCDCE6;
  --grey-100: #F2F2F7;
  --beige-100: #F7EFD9;
  --cream: #FFF8E9;
  --white: #FFFFFF;
  --green-500: #34AE6C;
  --wa-700: #1F7A47; /* ירוק ווטסאפ כהה — לבן עליו עובר ניגודיות AA */
  --pink-600: #B83A63;
  --pink-100: #FBE6EE;
  --gold-100: #FFF3D6;
  /* גוונים לכרטיסי ההטבות — מהפלטה של FINcat */
  --sky: #E9EEFB;
  --lavender: #EFEEF7;
  --mint: #E4F6EC;

  --font: "Heebo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --focus-ring: 0 0 0 3px rgba(247, 181, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--plum-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* גריד נקודות אפור עדין */
  background-color: var(--white);
  background-image: radial-gradient(var(--grey-200) 1px, transparent 1.2px);
  background-size: 22px 22px;
  min-height: 100vh;
}

/* ── פריסה: טור אחד בנייד; בדסקטופ פתיח+טופס מימין, מה-בקבוצה משמאל ── */
.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "intro" "panel" "show" "legal";
  column-gap: 64px;
}
.top { grid-area: top; }
.intro { grid-area: intro; }
.panel { grid-area: panel; }
.showcase { grid-area: show; min-width: 0; }
.legal { grid-area: legal; }

@media (min-width: 560px) {
  .page { max-width: 560px; }
}
@media (min-width: 920px) {
  .page {
    max-width: 1000px;
    padding: 28px 32px 56px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    grid-template-areas:
      "top   top"
      "intro show"
      "panel show"
      "legal legal";
    align-items: start;
  }
  .showcase { position: sticky; top: 40px; margin-top: 0; }
}

/* כניסה אחת רכה בטעינה, וזהו */
.intro, .panel, .showcase { animation: rise 700ms var(--ease) both; }
.panel { animation-delay: 80ms; }
.showcase { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ── ראש ─────────────────────────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--grey-200);
  margin-bottom: 28px;
}
.logo { height: 26px; width: auto; display: block; }
.partner { font-size: 13px; font-weight: 500; color: var(--plum-600); }

/* ── פתיח ────────────────────────────────────────────────────────────── */
h1 {
  font-weight: 900;
  font-size: clamp(2rem, 7vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
h1 .w { display: inline-block; animation: word-in 800ms calc(var(--i) * 110ms + 100ms) var(--ease) both; }
/* "ברוכים הבאים": קו מצויר מתחת ושלושה קווי ניצוץ — פעם אחת, אחרי שהמילים עלו */
h1 .hi { position: relative; display: inline-block; }
.swoosh {
  position: absolute;
  inset-inline: -4px;
  bottom: -0.16em;
  width: calc(100% + 8px);
  height: 0.28em;
  overflow: visible;
}
.swoosh path {
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 900ms 650ms var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.burst {
  position: absolute;
  inset-inline-start: -0.5em; /* RTL: מעל תחילת "ברוכים" */
  top: -0.36em;
  width: 0.6em;
  height: 0.6em;
  transform: rotate(35deg);
}
.burst path {
  fill: none;
  stroke: var(--plum-900);
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: 20px 20px;
  animation: burst 600ms 1350ms var(--ease) both;
}
@keyframes burst { from { opacity: 0; transform: scale(0.3); } }
@keyframes word-in { from { opacity: 0.12; transform: translateY(10px); } }
.lede { font-size: 1.0625rem; color: var(--plum-600); max-width: 40ch; }

/* ── הטופס ───────────────────────────────────────────────────────────── */
.panel { margin-top: 28px; }
form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; } /* בלי זה ה-fieldset נמתח לרוחב התוכן שלו במסכים צרים */

.optin {
  border: 0;
  min-width: 0;
  background: var(--sky);
  border-radius: 20px;
  padding: 18px 18px 16px;
}
.optin > * + * { margin-top: 14px; }
.optin-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0; float: right; width: 100%; }
.optin-head + * { clear: both; } /* legend צף — כדי שיתנהג כמו שורה רגילה בתוך ה-grid */
.optin-title { font-size: 1.125rem; font-weight: 900; line-height: 1.3; flex: 1; min-width: 0; }
.env {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gold-500);
  animation: env-in 700ms 500ms var(--ease) both;
}
.env svg { width: 20px; height: 20px; fill: none; stroke: var(--plum-900); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@keyframes env-in { from { transform: rotate(-12deg) scale(0.6); opacity: 0; } }
.optin-sub { font-size: 14px; line-height: 1.55; color: var(--plum-600); padding-top: 6px; }
.optin-head + .optin-sub { margin-top: 0; }
.optional {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--plum-600);
  background: var(--white);
  border-radius: 6px;
  padding: 1px 8px;
}
.optin:has(input[name="consent"]:checked) .env { animation: env-yes 500ms var(--ease); }
@keyframes env-yes { 40% { transform: translateY(-4px) rotate(-6deg); } }

.consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}
.consent input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; }
.consent .box {
  width: 22px; height: 22px;
  border: 1.5px solid var(--grey-300);
  border-radius: 6px;
  background: var(--white);
  display: grid; place-items: center;
  margin-top: 1px;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}
.consent .box svg { width: 14px; height: 14px; fill: none; stroke: var(--plum-900); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.consent input:checked + .box { background: var(--gold-500); border-color: var(--gold-500); }
.consent input:checked + .box svg { opacity: 1; }
.consent input:focus-visible + .box { box-shadow: var(--focus-ring); }
.consent input[aria-invalid="true"] + .box { border-color: var(--pink-600); }
.consent-text { font-size: 14px; line-height: 1.55; color: var(--plum-600); }
.fields { display: grid; gap: 12px; }
@media (min-width: 520px) { .fields { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.field .hint { font-weight: 400; color: var(--plum-600); }
.field input {
  font: inherit;
  font-size: 16px; /* פחות מ-16 = זום אוטומטי באייפון */
  color: var(--plum-900);
  background: var(--white);
  border: 1.5px solid var(--grey-300);
  border-radius: 17px;
  padding: 12px 16px;
  min-height: 48px;
  width: 100%;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder { color: var(--grey-300); }
.field input:focus { outline: none; border-color: var(--plum-900); box-shadow: var(--focus-ring); }
.field input[aria-invalid="true"],
.field input[aria-invalid="true"]:focus { border-color: var(--pink-600); }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.error {
  font-size: 14px;
  font-weight: 500;
  color: var(--pink-600);
  background: var(--pink-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

/* כפתור — אותו כפתור של דף הכרטיס */
.cta {
  display: flex;
  width: 100%;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.cta > span {
  border: 1.5px solid var(--plum-900);
  border-radius: 17px;
  background: var(--plum-900);
  color: var(--white);
  transition: background 420ms var(--ease), color 420ms var(--ease), border-color 420ms var(--ease);
}
.cta .t {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 700 1.0625rem/1.2 var(--font);
  padding: 18px 20px;
  text-align: center;
  text-wrap: balance;
}
@media (max-width: 420px) { .cta .t { padding-inline: 12px; gap: 8px; } .cta .a { width: 52px; } }
.cta .wa-ico { flex: none; width: 20px; height: 20px; color: var(--green-500); transition: color 420ms var(--ease); }
.cta .a {
  width: 58px;
  flex: none;
  display: grid;
  place-items: center;
  transition: transform 1400ms var(--ease), color 1400ms var(--ease), background 420ms var(--ease), border-color 420ms var(--ease);
}
@media (hover: hover) {
  .cta:hover { gap: 0; }
  .cta:hover > span { background: transparent; color: var(--plum-900); border-color: transparent; }
  .cta:hover .a { transform: translateX(-14px); color: var(--gold-500); }
}
.cta:focus-visible { outline: none; }
.cta:focus-visible .t { box-shadow: var(--focus-ring); }
.cta .a { animation: nudge 900ms 1400ms var(--ease) 2; } /* פעמיים אחרי הטעינה, וזהו */
.cta[aria-busy="true"] { cursor: progress; }
.cta[aria-busy="true"] .a { animation: nudge 900ms var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(-8px); } }

.fallback { font-size: 14px; color: var(--plum-600); text-align: center; }
.fallback a { color: var(--plum-900); font-weight: 700; text-underline-offset: 3px; }


/* ── ככה זה נראה בקבוצה: סליידר הטבות ────────────────────────────────── */
.showcase { margin-top: 44px; position: relative; }
.show-head, .track, .show-nav, .perks, .tiles { position: relative; z-index: 1; }
.deco { position: absolute; inset: 0 -20px; overflow: hidden; pointer-events: none; } /* עד קצה המסך, לא מעבר — בלי גלילה לצדדים */
.deco .sq {
  position: absolute;
  width: 180px; height: 180px;
  left: -14px; top: 40px;
  border-radius: 36px;
  background: var(--gold-500);
  opacity: 0.18;
  transform: rotate(14deg);
  animation: deco-in 1200ms 300ms var(--ease) both;
}
.deco .dot {
  position: absolute;
  width: 64px; height: 64px;
  right: 6px; bottom: 150px;
  border-radius: 50%;
  background: var(--pink-100);
  animation: deco-in 1200ms 450ms var(--ease) both;
}
@keyframes deco-in { from { opacity: 0; transform: rotate(0deg) scale(0.7); } }
.show-head h2 { font-size: 1.375rem; font-weight: 900; line-height: 1.2; }
.show-head p { font-size: 14px; color: var(--plum-600); margin-top: 2px; }

.track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  padding: 18px 20px 8px;
  margin: 0 -20px; /* נמתח עד קצה המסך בנייד */
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to left, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
          mask-image: linear-gradient(to left, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(247, 181, 0, 0.45); border-radius: var(--radius-lg); }

.deal {
  flex: none;
  width: min(250px, 72vw);
  scroll-snap-align: start;
  border-radius: var(--radius-lg);
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  transform-origin: right center;
  transition: transform 500ms var(--ease), opacity 500ms var(--ease), box-shadow 500ms var(--ease);
}
/* הכרטיס הנוכחי בגודל מלא ומורם; השאר מעט קטנים וחיוורים */
.track.ready .deal { transform: scale(0.94); opacity: 0.75; }
.track.ready .deal.is-on { transform: none; opacity: 1; box-shadow: 0 14px 30px -18px rgba(2, 19, 42, 0.35); }
.deal.enter { animation: card-in 700ms calc(var(--i) * 90ms) var(--ease) backwards; }
@keyframes card-in { from { opacity: 0; transform: translateX(-24px) scale(0.94); } }
.deal.skel { height: 340px; }
.t-0 { background: var(--sky); }
.t-1 { background: var(--gold-100); }
.t-2 { background: var(--pink-100); }
.t-3 { background: var(--mint); }
.t-4 { background: var(--lavender); }
.t-5 { background: var(--beige-100); }

.deal .img {
  background: var(--white);
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.deal .img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.deal .cat {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--plum-600);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  padding: 1px 8px;
  margin: 14px 4px 0;
}
.deal h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 4px 0;
  min-height: 2.6em; /* שתי שורות — כל הכרטיסים באותו גובה */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deal .price {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 4px 0;
  padding-top: 12px;
  border-top: 1px solid rgba(2, 19, 42, 0.08);
}
.deal .save { display: grid; line-height: 1; }
.deal .save b { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.deal .save small { font-size: 12px; font-weight: 500; color: var(--plum-600); margin-top: 4px; }
.deal .nums { text-align: left; font-size: 13px; color: var(--plum-600); line-height: 1.35; }
.deal .nums b { display: block; font-size: 1.0625rem; font-weight: 700; color: var(--plum-900); }

.deal.fin h3 { min-height: 2.6em; margin-top: 14px; }
.deal .img.fit-cover img { object-fit: cover; padding: 0; }
.deal .fin-desc { font-size: 14px; color: var(--plum-600); line-height: 1.45; margin: 4px 4px 0; min-height: 2.9em; }
.deal.fin .price { align-items: center; margin-top: auto; }
.deal .fin-tag { font-size: 13px; font-weight: 900; color: var(--plum-900); background: var(--gold-500); border-radius: 8px; padding: 3px 10px; }
.deal .fin-more { font-size: 13px; color: var(--plum-600); }

.show-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.nav-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1.5px solid var(--grey-200);
  border-radius: 50%;
  background: var(--white);
  color: var(--plum-900);
  cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease);
}
.nav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn:hover { border-color: var(--plum-900); }
.nav-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dots { display: flex; gap: 6px; }
.dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--grey-300); transition: background 300ms var(--ease); }
.dots span.on { width: 18px; background: var(--plum-900); }

.perks { list-style: none; display: grid; gap: 10px; margin-top: 22px; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--plum-600); }
.perks svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: var(--mint); fill: none; stroke: var(--plum-900); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 920px) {
  .track { margin: 0 -8px; padding-inline: 8px; scroll-padding-inline: 8px; }
  .deal { width: 250px; }
  .showcase { margin-top: 0; }
}

/* ── דף הקהילה: ווטסאפ ראשון, גדול וירוק; ניוזלטר קטן אחריו ──────────── */
.wa-first { gap: 14px; }
.cta-big > span { background: var(--wa-700); border-color: var(--wa-700); }
.cta-big .t { padding: 12px 16px; gap: 10px; }
.cta-big .wa-ico { color: var(--white); }
.cta-big .stack { display: grid; gap: 3px; text-align: right; }
.cta-big .cta-label { font-size: 1.0625rem; font-weight: 900; }
.cta-big .cta-sub { font-size: 11.5px; font-weight: 500; opacity: 0.85; }
.cta-big .a { width: 50px; }
@media (hover: hover) {
  .cta-big:hover > span { background: transparent; color: var(--wa-700); border-color: transparent; }
  .cta-big:hover .wa-ico { color: var(--wa-700); }
}
.cta-big[aria-busy="true"] .cta-sub { visibility: hidden; }
@media (max-width: 420px) {
  .cta-big .t { padding: 12px 12px; gap: 9px; }
  .cta-big .a { width: 46px; }
  .cta-big .cta-label { font-size: 1rem; }
}

.optin-small { margin-top: 18px; padding: 16px; background: var(--white); border: 1.5px solid var(--grey-200); }
.optin-small .optin-title { font-size: 1rem; }
.optin-small .env { width: 30px; height: 30px; border-radius: 10px; }
.optin-small .env svg { width: 17px; height: 17px; }
.optin-small .optin-sub { font-size: 13px; }
.nl-form { display: grid; gap: 12px; }
.nl-form[hidden] { display: none; }
.nl-btn {
  justify-self: start;
  font: 700 15px/1 var(--font);
  color: var(--plum-900);
  background: var(--white);
  border: 1.5px solid var(--plum-900);
  border-radius: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.nl-btn:hover { background: var(--plum-900); color: var(--white); }
.nl-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.nl-btn[aria-busy="true"] { cursor: progress; opacity: 0.7; }
.nl-done { font-size: 15px; font-weight: 700; color: var(--wa-700); background: var(--mint); border-radius: 12px; padding: 12px 14px; }

/* ── /community: ארבע משבצות צבעוניות במקום סליידר ────────────────────── */
.tiles { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.tile {
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 170px;
  animation: card-in 700ms calc(var(--i) * 110ms + 250ms) var(--ease) backwards;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
}
.tile:hover { transform: translateY(-3px) rotate(-0.6deg); box-shadow: 0 14px 30px -20px rgba(2, 19, 42, 0.35); }
.tile .ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--white);
  margin-bottom: 8px;
}
.tile .ico svg { width: 24px; height: 24px; fill: none; stroke: var(--plum-900); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile b { font-size: 1.0625rem; font-weight: 900; line-height: 1.25; }
.tile > span:last-child { font-size: 14px; color: var(--plum-600); line-height: 1.45; }

/* בדף הקהילה הריבוע בוורוד — הזהב שלו נבלע במשבצת החול */
.showcase:has(.tiles) .deco .sq { background: var(--pink-600); opacity: 0.16; }

/* חתול מתחת למשבצות, מיושר לצד השמאלי; נכנס אחרי המשבצות */
.showcase .cat {
  position: relative;
  z-index: 1;
  display: block;
  width: 170px;
  height: auto;
  margin: 10px auto 0 0;
  animation: cat-in 800ms 800ms var(--ease) backwards;
}
@keyframes cat-in { from { opacity: 0; transform: translateY(14px); } }

/* ── משפטי ───────────────────────────────────────────────────────────── */
.legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--grey-200);
  font-size: 12px;
  line-height: 1.6;
  color: var(--plum-600);
  display: grid;
  gap: 8px;
}
.legal nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
.legal a { color: var(--plum-900); text-underline-offset: 3px; }
.legal a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .swoosh path { stroke-dashoffset: 0; }
}
.perks li:nth-child(2) svg { background: var(--pink-100); }
.perks li:nth-child(3) svg { background: var(--lavender); }
