/* ══════════════════════════════════════════════════════════════
   עמית ותמיר · 27.9.26
   ══════════════════════════════════════════════════════════════ */

:root {
  /* צבעים נלקחו ישירות מקובץ ההזמנה */
  --olive:      #5b633c;
  --olive-soft: #6f7850;
  --sage:       #848a6e;
  --sage-pale:  #b6bba6;
  --blush:      #e4b8c5;
  --rose:       #c98ba0;
  --paper:      #f8f7f4;
  --paper-warm: #f2f0ea;
  --ink:        #3f4430;

  --wrap: 640px;
  --r: 14px;
  --shadow: 0 18px 50px -28px rgba(91, 99, 60, .45);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

/* גובר על display של הרכיבים עצמם (‎.field‎ הוא grid) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper) url('../img/paper.jpg') repeat;
  background-size: 420px;   /* אריח ממוראה – ללא תפרים */
  overflow-x: clip;   /* קישוטים חורגים לא יגררו גלילה אופקית ב-RTL */
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { font-weight: 300; margin: 0; line-height: 1.25; }

b, strong { font-weight: 600; }

::selection { background: var(--blush); color: #fff; }

/* ─────────────────────────── עזרים ─────────────────────────── */

.section {
  position: relative;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(56px, 11vw, 96px) 22px;
}
.section--tight { padding-block: clamp(40px, 8vw, 64px); }

.section__head { text-align: center; margin-bottom: clamp(28px, 6vw, 44px); }

.eyebrow {
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--sage);
}

.section__title {
  font-size: clamp(1.7rem, 5.6vw, 2.4rem);
  font-weight: 200;
  letter-spacing: .04em;
  color: var(--olive);
}

.section__sub { margin: 10px 0 0; color: var(--sage); font-size: .98rem; }

.divider {
  width: min(320px, 62%);
  margin: clamp(26px, 6vw, 40px) auto;
  mix-blend-mode: multiply;
  opacity: .95;
}

.card {
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(132, 138, 110, .16);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 32px);
}

/* ─────────────────────────── כפתורים ─────────────────────────── */

.btn {
  --bg: transparent;
  --fg: var(--olive);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid rgba(132, 138, 110, .5);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .2s var(--ease);
}
.btn:hover { border-color: var(--olive); background: rgba(132, 138, 110, .09); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.btn--solid {
  --bg: var(--olive);
  --fg: #fdfdfb;
  border-color: var(--olive);
}
.btn--solid:hover { background: var(--olive-soft); border-color: var(--olive-soft); }

.btn--ghost { border-color: rgba(132, 138, 110, .3); color: var(--sage); }

.btn--block { width: 100%; }

.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

/* ═══════════════════════════ ניווט ═══════════════════════════ */

.nav {
  position: fixed;
  z-index: 30;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
}

.nav__menu {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(250, 249, 246, .82);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(132, 138, 110, .18);
  border-radius: 15px;
  box-shadow: 0 16px 40px -30px rgba(63, 68, 48, .5);
}

.nav__menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 10px;
  color: var(--sage);
  font-size: .82rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav__menu svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav__menu a:hover { color: var(--olive); background: rgba(132, 138, 110, .1); }
.nav__menu a.is-active {
  color: var(--olive);
  background: rgba(132, 138, 110, .15);
  font-weight: 600;
}

/* התוויות מוצגות רק כשיש מקום בשוליים של עמודת התוכן (640px + ניווט) */
@media (max-width: 900px) {
  .nav__menu a { padding: 9px; }
  .nav__menu a span {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .nav__menu svg { width: 19px; height: 19px; }
}

/* ═══════════════════════════ פתיח ═══════════════════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(64px, 14vw, 110px) 22px clamp(88px, 16vw, 120px);
  overflow: hidden;
  isolation: isolate;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  text-align: center;
}

/* multiply מנטרל את ההילה הלבנה שנשארה בקצוות החיתוך של קובצי ה-PNG */
.hero__floral {
  position: absolute;
  z-index: 0;
  mix-blend-mode: multiply;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}
/* אותה פריסה כמו בהזמנה המקורית: זר עליון מימין, זר תחתון משמאל */
.hero__floral--top {
  top: -1%;
  right: -6%;
  width: min(48vw, 320px);
  aspect-ratio: 760 / 1536;
  background-image: url('../img/floral-top.png');
  background-image: image-set(url('../img/floral-top.webp') type('image/webp'),
                              url('../img/floral-top.png') type('image/png'));
}
.hero__floral--bottom {
  bottom: -2%;
  left: -8%;
  width: min(62vw, 400px);
  aspect-ratio: 900 / 526;
  background-position: bottom left;
  background-image: url('../img/floral-bottom.png');
  background-image: image-set(url('../img/floral-bottom.webp') type('image/webp'),
                              url('../img/floral-bottom.png') type('image/png'));
}

.hero__eyebrow {
  /* letter-spacing מוסיף רווח גם אחרי האות האחרונה — ב-RTL הוא נופל משמאל
     ומזיז את הטקסט הממורכז ימינה. margin-inline-end שלילי מקזז אותו בדיוק. */
  margin: 0 0 clamp(20px, 5vw, 30px);
  margin-inline-end: -.42em;
  font-size: clamp(1.15rem, 4.6vw, 1.5rem);
  font-weight: 300;
  letter-spacing: .42em;
  color: var(--sage);
}

.hero__names { margin: 0 auto clamp(10px, 2.5vw, 16px); width: min(88%, 420px); }
.hero__names img { width: 100%; }

.hero__invite,
.hero__when { margin: 0; color: var(--olive); font-size: clamp(1.02rem, 3.6vw, 1.18rem); }
.hero__invite { margin-bottom: .3em; white-space: pre-line; }

.hero__date {
  margin: .35em 0 .1em;
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--olive);
}

.hero__venue { margin: 0; color: var(--olive); font-size: clamp(1rem, 3.5vw, 1.14rem); }

.hero__hours { margin: 0 0 clamp(26px, 6vw, 34px); color: var(--sage); font-size: .98rem; line-height: 1.9; }
.hero__hours p { margin: 0; }
.hero__hours b { color: var(--olive); font-weight: 600; }

.hero__cta { min-width: 200px; margin-top: clamp(14px, 3vw, 20px); }

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 1px solid rgba(132, 138, 110, .45);
  border-radius: 999px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  translate: -50% 0;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--sage);
  animation: cue 1.9s var(--ease) infinite;
}
@keyframes cue {
  0%, 12%   { opacity: 0; transform: translateY(0); }
  40%       { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(16px); }
}

/* ═══════════════════════════ ספירה לאחור ═══════════════════════════ */

.countdown { text-align: center; }

.countdown__grid {
  direction: ltr;            /* ימים → שניות משמאל לימין */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2.4vw, 16px);
  max-width: 460px;
  margin: 26px auto 0;
  padding: 0;
  list-style: none;
}
.countdown__grid li {
  padding: 14px 4px 12px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(132, 138, 110, .16);
  border-radius: 12px;
}
.countdown__grid b {
  display: block;
  font-size: clamp(1.5rem, 6.5vw, 2.1rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
}
.countdown__grid span {
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--sage);
}
.countdown__done { font-size: 1.3rem; color: var(--olive); }

/* ═══════════════════════════ סדר הערב ═══════════════════════════ */

.schedule__list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  max-width: 420px;
  margin-inline: auto;
}
.schedule__list::before {
  content: '';
  position: absolute;
  inset-block: 22px;
  right: 27px;
  width: 1px;
  background: linear-gradient(var(--sage-pale), rgba(182, 187, 166, .15));
}
.schedule__item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.schedule__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--paper-warm);
  border: 1px solid rgba(132, 138, 110, .25);
}
.schedule__dot svg { width: 24px; height: 24px; fill: none; stroke: var(--sage); stroke-width: 1.4; }
.schedule__time,
.schedule__title { display: block; }
.schedule__time {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--olive);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.schedule__title { color: var(--sage); font-size: .98rem; }

/* ═══════════════════════════ מקום ═══════════════════════════ */

.venue { text-align: center; overflow: hidden; padding-top: clamp(20px, 4vw, 34px); }

.venue__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 26px;
}
.venue__actions .btn { padding-inline: 17px; font-size: .9rem; }

.venue__map {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid rgba(132, 138, 110, .2);
  aspect-ratio: 16 / 11;
  background: var(--paper-warm);
}
.venue__map iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(.85); }

/* ═══════════════════════════ טופס ═══════════════════════════ */

.form { display: grid; gap: 18px; }

.field { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }

.field > label,
.field legend {
  font-size: .9rem;
  font-weight: 500;
  color: var(--olive);
  letter-spacing: .02em;
  padding: 0;
}
.field em { font-style: normal; color: var(--sage-pale); font-size: .85em; }
.field span[aria-hidden] { color: var(--rose); }

input[type=text],
input[type=tel],
input[type=number],
textarea {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(132, 138, 110, .3);
  border-radius: 10px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
input::placeholder, textarea::placeholder { color: #b9bcae; }
input:focus, textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(132, 138, 110, .12);
  outline: none;
}
textarea { resize: vertical; min-height: 84px; }

.field--invalid input,
.field--invalid textarea { border-color: var(--rose); }

.field__err { margin: 0; font-size: .82rem; color: var(--rose); min-height: 0; }
.field__err:empty { display: none; }

.field__hint { margin: 0; font-size: .82rem; color: var(--sage); padding-inline-start: 30px; }

/* בחירה */
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.choice span {
  display: block;
  padding: 13px 16px;
  border: 1px solid rgba(132, 138, 110, .3);
  border-radius: 10px;
  background: rgba(255, 255, 255, .6);
  font-size: .97rem;
  transition: all .25s var(--ease);
}
.choice input:checked + span {
  border-color: var(--olive);
  background: rgba(132, 138, 110, .13);
  color: var(--olive);
  font-weight: 500;
}
.choice input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }

/* מונה אורחים */
.stepper {
  direction: ltr;            /* − מימין ל+ , כמו בכל מונה */
  justify-self: center;
  display: inline-grid;
  grid-template-columns: 48px 76px 48px;
  align-items: center;
  border: 1px solid rgba(132, 138, 110, .3);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .85);
}
.stepper__btn {
  height: 48px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  color: var(--olive);
  cursor: pointer;
  transition: background .2s var(--ease);
}
.stepper__btn:hover { background: rgba(132, 138, 110, .1); }
.stepper input {
  border: 0;
  border-inline: 1px solid rgba(132, 138, 110, .22);
  border-radius: 0;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--olive);
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .97rem; }
.check input { width: 20px; height: 20px; accent-color: var(--olive); flex: none; }

/* מצב שליחה */
#rsvp-submit { position: relative; }
.btn__spinner {
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: spin .7s linear infinite;
}
.is-sending .btn__label { opacity: 0; }
.is-sending .btn__spinner { opacity: 1; }
.is-sending { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form__status { margin: 0; text-align: center; font-size: .9rem; min-height: 0; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--rose); }

/* אישור */
.rsvp__done { text-align: center; }
.rsvp__done h3 { font-size: 1.5rem; color: var(--olive); margin-bottom: 6px; }
.rsvp__done p { margin: 0 0 20px; color: var(--sage); }
.rsvp__check { width: 66px; margin: 0 auto 14px; }
.rsvp__check svg { width: 100%; fill: none; stroke: var(--olive); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rsvp__check circle { stroke: var(--sage-pale); stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .6s var(--ease) forwards; }
.rsvp__check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s var(--ease) .45s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ═══════════════════════════ מתנה ═══════════════════════════ */

.gift { text-align: center; }

.bank { max-width: 340px; margin: 4px auto 0; }

.bank__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: .88rem;
  color: var(--sage);
}
.bank__or::before,
.bank__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(132, 138, 110, .25);
}

.bank__details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0 0 18px;
  text-align: start;
  font-size: .95rem;
}
.bank__details dt { color: var(--sage); }
.bank__details dd {
  margin: 0;
  color: var(--olive);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════ סיום ═══════════════════════════ */

.footer {
  position: relative;
  text-align: center;
  padding: clamp(6px, 2vw, 14px) 22px calc(clamp(40px, 8vw, 60px) + env(safe-area-inset-bottom));
}
.footer__closing { margin: 0; font-size: 1.3rem; color: var(--olive); letter-spacing: .06em; }
.footer__names { margin: 6px 0 0; color: var(--sage); letter-spacing: .18em; font-size: .95rem; }
.footer__date { margin: 2px 0 22px; color: var(--sage-pale); letter-spacing: .3em; font-size: .8rem; }

.footer__contacts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 22px; }
.footer__contacts a { color: var(--olive); text-decoration: none; font-size: .95rem; border-bottom: 1px solid rgba(132, 138, 110, .35); }

/* ═══════════════════════════ CTA צף ═══════════════════════════ */

.sticky-cta {
  position: fixed;
  z-index: 20;
  inset-inline: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 999px;
  background: var(--olive);
  color: #fdfdfb;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: .06em;
  box-shadow: 0 12px 30px -12px rgba(63, 68, 48, .6);
  opacity: 0;
  translate: 0 90px;
  pointer-events: none;
  transition: opacity .35s var(--ease), translate .35s var(--ease);
}
.sticky-cta.is-visible { opacity: 1; translate: 0 0; pointer-events: auto; }

@media (min-width: 700px) {
  .sticky-cta { inset-inline: auto 28px; width: 200px; }
}

/* ═══════════════════════════ אנימציות כניסה ═══════════════════════════ */

.reveal {
  opacity: 0;
  translate: 0 22px;
  transition: opacity .8s var(--ease), translate .8s var(--ease);
}
.reveal.is-in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; translate: none; }
}
