/* ==========================================================
   Bar Mitsvah — Matan Benhamou
   Charte : crème #F4EDE2 · sable #E6DFD1 · or #C9A45C
            brun cuivré #A57E6A · olive #4F5A2B · sauge #B5C4B1
   ========================================================== */

:root {
  --cream: #F4EDE2;
  --cream-hi: #FBF7F0;
  --sand: #E6DFD1;
  --gold: #C9A45C;
  --gold-deep: #9C7A36;
  --gold-hi: #F3E3B6;
  --copper: #A57E6A;
  --copper-deep: #7E5B49;
  --olive: #4F5A2B;
  --olive-deep: #3A431F;
  --sage: #B5C4B1;
  --blue: #4A7FA8;
  --ink: #4A3F35;

  --u: min(1vw, 5.6px);                 /* unité fluide, plafonnée sur grand écran */
  --f-fr: "Cormorant Garamond", "Times New Roman", serif;
  --f-he: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --f-ui: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f: var(--f-he);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-door: cubic-bezier(.76, 0, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
html[lang="fr"] { --f: var(--f-fr); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
html[lang="fr"] body { font-size: 21px; font-weight: 500; font-variant-numeric: lining-nums; }
body.is-locked { overflow: hidden; height: 100dvh; }
img { max-width: 100%; height: auto; display: block; }
p, h1, h2, h3, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.sprite { position: absolute; }
[hidden] { display: none !important; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
html.no-js .intro, html.no-js .fab-bar, html.no-js #dust { display: none; }
html.no-js body.is-locked { overflow: visible; height: auto; }

html[lang="he"] .fr-only { display: none !important; }

.wrap { width: 100%; max-width: 560px; margin-inline: auto; padding-inline: 22px; position: relative; }

/* transition douce au changement de langue */
.i18n { transition: opacity .24s ease; }
body.lang-fading .i18n, body.lang-fading .fr-only { opacity: 0 !important; }

.logo { display: block; overflow: visible; }

/* ---------- poussière d'or ---------- */
#dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ==========================================================
   BOUTONS
   ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; text-decoration: none;
  font-family: var(--f); font-weight: 600; line-height: 1.2;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn-gold {
  min-height: 60px; padding: 14px 34px; font-size: 22px; color: var(--olive-deep);
  background: linear-gradient(135deg, #B8903F 0%, #D9BC7C 38%, #F1DFAE 52%, #D2B26B 68%, #B8903F 100%);
  box-shadow: 0 10px 26px -10px rgba(120, 88, 30, .65), inset 0 0 0 1px rgba(255, 255, 255, .45);
}
html[lang="he"] .btn-gold { font-weight: 700; }
.btn-gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%);
  transform: translateX(-120%); animation: sweep 3.6s ease-in-out infinite;
}
@keyframes sweep { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.btn-waze {
  min-height: 48px; padding: 9px 22px; margin-top: 18px; font-size: 18px; color: var(--olive);
  background: transparent; border: 1.5px solid var(--gold);
}
.btn-waze svg { width: 20px; height: 20px; fill: none; stroke: var(--gold-deep); stroke-width: 1.7; }
.btn-waze:active { background: rgba(201, 164, 92, .16); }

.btn-outline {
  min-height: 56px; padding: 13px 28px; font-size: 19px; letter-spacing: .04em;
  color: var(--gold-hi); border: 1.5px solid var(--gold); background: rgba(201, 164, 92, .1);
}
html[lang="fr"] .btn-outline { text-transform: uppercase; font-size: 17px; letter-spacing: .12em; font-weight: 700; }

/* ---------- bascule de langue ---------- */
.lang-switch {
  display: inline-flex; direction: rtl; padding: 4px; gap: 2px; border-radius: 999px;
  background: rgba(251, 247, 240, .82); border: 1px solid var(--gold);
  box-shadow: 0 6px 18px -8px rgba(90, 70, 30, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lang-switch button {
  min-width: 52px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent;
  font-family: var(--f-ui); font-size: 17px; font-weight: 500; color: var(--olive); letter-spacing: .03em;
  transition: background .3s var(--ease), color .3s var(--ease);
  touch-action: manipulation;
}
.lang-switch button.is-active { background: var(--olive); color: var(--cream-hi); }

.fab-bar {
  position: fixed; z-index: 60; top: calc(10px + var(--safe-t)); inset-inline: 12px;
  display: flex; justify-content: space-between; align-items: center; pointer-events: none;
  opacity: 0; transform: translateY(-16px); transition: opacity .8s ease 1.4s, transform .8s var(--ease) 1.4s;
}
.fab-bar > * { pointer-events: auto; }
body.is-open .fab-bar { opacity: 1; transform: none; }
body.is-locked .fab-bar { visibility: hidden; }

.music-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--gold);
  background: rgba(251, 247, 240, .82); display: grid; place-items: center;
  box-shadow: 0 6px 18px -8px rgba(90, 70, 30, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.eq { display: flex; align-items: flex-end; gap: 3px; height: 20px; direction: ltr; }
.eq i { width: 3px; height: 5px; border-radius: 2px; background: var(--olive); transition: height .3s; }
.music-btn.is-playing .eq i { animation: eq 1s ease-in-out infinite; }
.music-btn.is-playing .eq i:nth-child(2) { animation-delay: -.35s; }
.music-btn.is-playing .eq i:nth-child(3) { animation-delay: -.7s; }
.music-btn.is-playing .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 20px; } }
.music-btn:not(.is-playing)::after {
  content: ""; position: absolute; width: 30px; height: 1.5px; background: var(--copper); transform: rotate(-45deg);
}
.music-btn { position: relative; }

/* ==========================================================
   POP-UP D'OUVERTURE
   ========================================================== */
.intro { position: fixed; inset: 0; z-index: 100; height: 100dvh; overflow: hidden; direction: ltr; }   /* portes indépendantes du sens de lecture */
html[dir="rtl"] .intro-inner { direction: rtl; }
.door { position: absolute; top: 0; bottom: 0; width: 50.2%; overflow: hidden; transition: transform 1.7s var(--ease-door) .75s; will-change: transform; }
.door-l { left: 0; }
.door-r { right: 0; }
.door-bg {
  position: absolute; top: 0; bottom: 0; width: 100vw;
  background: #FAEBDD url("assets/jerusalem-full.jpg") 80% 100% / cover no-repeat;
}
.door-l .door-bg { left: 0; }
.door-r .door-bg { right: 0; }
.door::after {            /* liseré intérieur */
  content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, var(--gold) 20%, var(--gold) 80%, transparent); opacity: 0;
  transition: opacity .5s ease .3s;
}
.door-l::after { right: 0; } .door-r::after { left: 0; }
.door::before {           /* voile crème pour la lisibilité */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 90% 46% at 50% 44%, rgba(250, 240, 228, .9), rgba(250, 240, 228, 0) 100%);
  width: 100vw;
}
.door-l::before { left: 0; } .door-r::before { left: auto; right: 0; }

.seam {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; z-index: 3;
  background: linear-gradient(transparent, #fff 15%, var(--gold-hi) 50%, #fff 85%, transparent);
  box-shadow: 0 0 22px 6px rgba(243, 227, 182, .9); transform: scaleY(0); opacity: 0;
}

.intro-inner {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: calc(24px + var(--safe-t)) 24px calc(28px + var(--safe-b)); text-align: center;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  transition: opacity .6s ease, transform .9s var(--ease);
}
.intro-inner::before, .intro-inner::after { content: ""; flex: 1 0 0; }   /* centre vertical, mais défilable si l'écran est trop bas */
.intro-logo { position: relative; width: min(52vw, 230px); animation: introLogo 1.6s var(--ease) .15s both; }
.intro-logo .logo { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(140, 105, 40, .28)); }
.halo {
  position: absolute; inset: -38%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 235, .95) 0%, rgba(255, 244, 214, .5) 38%, transparent 68%);
  animation: halo 5s ease-in-out infinite;
}
@keyframes halo { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes introLogo { from { opacity: 0; transform: scale(.82) translateY(14px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }

.intro-bird { width: min(22vw, 96px); margin-bottom: -6px; margin-inline-start: 46%; animation: birdIn 1.8s var(--ease) .6s both, float 5s ease-in-out 2.4s infinite; }
@keyframes birdIn { from { opacity: 0; transform: translate(60px, -50px) rotate(12deg); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-9px) rotate(-3deg); } }

.intro-over {
  margin-top: 20px; font-size: 21px; color: var(--copper-deep); letter-spacing: .12em;
  animation: rise 1s var(--ease) .7s both;
}
html[lang="fr"] .intro-over { text-transform: uppercase; letter-spacing: .32em; font-size: 17px; font-weight: 600; }
.intro-name { font-size: clamp(34px, 10vw, 46px); line-height: 1.15; color: var(--olive); font-weight: 500; animation: rise 1s var(--ease) .85s both; }
html[lang="fr"] .intro-name { font-weight: 600; letter-spacing: .04em; }
.intro-actions { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 18px; animation: rise 1s var(--ease) 1.05s both; }
.intro-actions .btn-gold { min-width: min(78vw, 300px); animation: pulse 2.8s ease-in-out 2.2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 26px -10px rgba(120, 88, 30, .65), inset 0 0 0 1px rgba(255, 255, 255, .45), 0 0 0 0 rgba(201, 164, 92, .5); }
  50% { box-shadow: 0 10px 26px -10px rgba(120, 88, 30, .65), inset 0 0 0 1px rgba(255, 255, 255, .45), 0 0 0 14px rgba(201, 164, 92, 0); }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (max-height: 640px) {
  .intro-logo { width: min(34vh, 190px); }
  .intro-bird { width: 64px; margin-bottom: -12px; }
  .intro-over { margin-top: 12px; }
  .intro-name { font-size: 32px; }
  .intro-actions { margin-top: 18px; gap: 12px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .intro-inner { padding-top: calc(12px + var(--safe-t)); padding-bottom: calc(12px + var(--safe-b)); }
  .intro-bird { display: none; }
  .intro-logo { width: min(30vh, 130px); }
  .intro-over { margin-top: 8px; font-size: 16px; }
  .intro-name { font-size: 28px; }
  .intro-actions { flex-direction: row; justify-content: center; margin-top: 14px; }
  .intro-actions .btn-gold { min-width: 0; }
}

/* ouverture */
.intro.is-opening .intro-inner { opacity: 0; transform: scale(1.12); pointer-events: none; }
.intro.is-opening .seam { animation: seam 1.5s ease .1s both; }
.intro.is-opening .door::after { opacity: 1; }
.intro.is-opening .door-l { transform: translateX(-101%); }
.intro.is-opening .door-r { transform: translateX(101%); }
@keyframes seam { 0% { transform: scaleY(0); opacity: 0; } 35% { transform: scaleY(1); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1) scaleX(8); opacity: 0; } }

/* ==========================================================
   SECTION 1 — FAIRE-PART
   ========================================================== */
.hero { position: relative; padding-top: calc(84px + var(--safe-t)); text-align: center; overflow: hidden; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 30% at 50% 22%, rgba(255, 252, 244, .9), transparent 70%);
}
.hero-leaves {
  position: absolute; pointer-events: none;
  background: url("assets/leaves-gold.webp") top right / contain no-repeat;
  width: calc(var(--u) * 62); aspect-ratio: 558 / 520;
}
.hero-leaves--a {
  top: 0; right: calc(50% - var(--u) * 50);
  transform-origin: 100% 0; animation: sway 9s ease-in-out infinite;
}
.hero-leaves--b {
  top: calc(var(--u) * 150); left: calc(50% - var(--u) * 52); opacity: .5; width: calc(var(--u) * 44);
  transform: scaleX(-1) rotate(-8deg);
}
@keyframes sway { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2.4deg); } }

html.js .h-anim { opacity: 0; }
html.js body.is-open .h-anim { opacity: 1; animation: heroIn 1.25s var(--ease) backwards; animation-delay: calc(var(--d) * 170ms + 1150ms); }
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }

.hero-logo { width: calc(var(--u) * 34); min-width: 120px; margin: 0 auto 30px; }
.hero-logo .logo { width: 100%; height: auto; filter: drop-shadow(0 5px 12px rgba(140, 105, 40, .22)); }

.grands { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.gp { flex: 1 1 0; font-size: clamp(16px, calc(var(--u) * 4.7), 23px); line-height: 1.25; color: var(--copper-deep); font-weight: 500; white-space: nowrap; }
html[lang="fr"] .gp { font-weight: 600; font-size: clamp(15.5px, calc(var(--u) * 4.5), 23px); }
.gp span { display: block; }
.gp-pat { text-align: start; }
.gp-mat { text-align: end; }
.gp-sep { flex: 0 0 auto; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }

.parents { margin-top: 26px; }
.parents-names { font-size: clamp(27px, calc(var(--u) * 7.6), 38px); line-height: 1.2; color: var(--olive); font-weight: 500; }
html[lang="fr"] .parents-names { font-weight: 600; }
.brother { font-size: clamp(23px, calc(var(--u) * 6.2), 31px); color: var(--olive); margin-top: 2px; }

.invite { margin-top: 26px; font-size: clamp(20px, calc(var(--u) * 5.3), 26px); line-height: 1.4; color: var(--ink); }
html[lang="fr"] .invite { font-style: italic; font-size: clamp(21px, calc(var(--u) * 5.6), 27px); }
.barmitsva + .invite { margin-top: 14px; }

.barmitsva {
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: clamp(34px, calc(var(--u) * 9.6), 50px); line-height: 1.15; font-weight: 700; color: var(--olive);
}
html[lang="fr"] .barmitsva { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: clamp(28px, calc(var(--u) * 7.8), 42px); }
.rule { flex: 1 1 0; max-width: 60px; height: 1px; background: linear-gradient(to left, var(--gold), transparent); }
.rule:last-child { background: linear-gradient(to right, var(--gold), transparent); }
html[dir="rtl"] .rule { background: linear-gradient(to right, var(--gold), transparent); }
html[dir="rtl"] .rule:last-child { background: linear-gradient(to left, var(--gold), transparent); }

.name { margin-top: 10px; font-weight: 400; line-height: 1; }
.name-main { display: block; direction: inherit; font-family: var(--f); font-weight: 700; font-size: clamp(110px, calc(var(--u) * 36), 200px); line-height: 1.12; }
html[lang="fr"] .name-main { font-weight: 600; font-size: clamp(72px, calc(var(--u) * 21), 118px); letter-spacing: .1em; margin-inline-end: -.1em; line-height: 1.1; }
.ch {
  display: inline-block; color: var(--gold-deep);
  background: linear-gradient(120deg, #9C7A36 0%, #C9A45C 30%, #F1DFAE 48%, #C9A45C 62%, #9C7A36 100%) 0 0 / 260% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
body.is-open .ch { animation: letterIn 1.1s var(--ease) backwards, shimmer 6s ease-in-out infinite; animation-delay: calc(var(--i) * 130ms + var(--base, 2350ms)), calc(var(--i) * 180ms); }
@keyframes letterIn { from { opacity: 0; transform: translateY(40px) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.name-he { display: block; font-family: var(--f-he); font-size: clamp(44px, calc(var(--u) * 13), 72px); color: var(--olive); font-weight: 500; line-height: 1.1; }

/* ---------- portrait dans la couronne d'olivier ---------- */
.portrait { position: relative; z-index: 2; margin-top: 22px; display: flex; justify-content: center; }
.portrait-frame { position: relative; flex: 0 0 auto; width: calc(var(--u) * 117); aspect-ratio: 1300 / 1038; animation: breathe 9s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: rotate(-.5deg); } 50% { transform: rotate(.5deg); } }
.portrait-photo {
  position: absolute; left: 28.2%; top: 19.6%; width: 43.6%; height: 69.2%; overflow: hidden;
  border-radius: 4px; background: var(--olive-deep);
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 5px var(--cream-hi), 0 0 0 6px var(--copper), 0 26px 40px -22px rgba(60, 45, 20, .7);
}
.portrait-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: kenburns 16s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.14) translateY(-2%); } }
.portrait-photo::after {        /* reflet doré qui passe */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 240, 200, .38) 50%, transparent 60%);
  transform: translateX(-130%); animation: sweep 7s ease-in-out 4s infinite;
}
.portrait-wreath { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(60, 50, 20, .18)); }

.hills {
  position: relative; z-index: 1; height: calc(var(--u) * 58); margin-top: calc(var(--u) * -30);
  background: url("assets/jerusalem-hills.webp") center bottom / cover no-repeat;
}

/* ==========================================================
   APPARITION AU SCROLL
   ========================================================== */
html.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--rd, 0ms); }
html.js .reveal.in { opacity: 1; transform: none; }

.eyebrow { font-size: 20px; color: var(--olive-deep); letter-spacing: .08em; }
html[lang="fr"] .eyebrow { text-transform: uppercase; letter-spacing: .26em; font-size: 16px; font-weight: 700; }
.title { font-size: clamp(34px, calc(var(--u) * 9.4), 48px); line-height: 1.2; color: var(--olive); font-weight: 500; }
html[lang="fr"] .title { font-weight: 600; }

/* ==========================================================
   SECTION 2 — DÉCOMPTE
   ========================================================== */
.count {
  position: relative; z-index: 3; text-align: center; padding: 64px 0 76px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0, rgba(255, 255, 255, .35), transparent 70%),
    linear-gradient(180deg, #BDCBB9 0%, var(--sage) 55%, #A9BAA5 100%);
  box-shadow: 0 -1px 0 var(--gold), 0 1px 0 var(--gold);
}
.count::before, .count::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: rgba(255, 255, 255, .55); }
.count::before { top: 6px; } .count::after { bottom: 6px; }
.count-bird { position: absolute; top: -50px; right: max(7%, calc(50% - 250px)); width: 86px; animation: float 5.5s ease-in-out infinite; }
html[dir="ltr"] .count-bird { transform-origin: center; }
.count .title { color: var(--olive-deep); }
.countdown { margin-top: 30px; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2.6vw, 14px); }
.cd {
  position: relative; padding: 16px 2px 12px; border-radius: 90px 90px 12px 12px;
  background: linear-gradient(180deg, #FFFDF8, var(--cream)); border: 1px solid var(--gold);
  box-shadow: 0 16px 28px -18px rgba(50, 60, 30, .6), inset 0 0 0 4px var(--cream-hi), inset 0 0 0 5px rgba(165, 126, 106, .45);
}
.cd-num {
  display: block; font-family: var(--f-fr); font-weight: 600; font-size: clamp(36px, 11.5vw, 58px); line-height: 1.05; color: var(--olive);
  font-variant-numeric: lining-nums tabular-nums; direction: ltr;
}
.cd-num.tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: .2; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.cd-lab { display: block; margin-top: 2px; font-size: clamp(15px, 4.2vw, 18px); color: var(--copper-deep); }
html[lang="fr"] .cd-lab { font-size: clamp(14px, 4.2vw, 18px); font-weight: 700; letter-spacing: 0; }
.count-done { margin-top: 26px; font-size: 34px; color: var(--olive-deep); font-weight: 700; }

/* ==========================================================
   SECTIONS 3·4·5 — ÉVÉNEMENTS
   ========================================================== */
.events { padding: 84px 0 40px; text-align: center; position: relative; }
.card {
  position: relative; margin: 0 auto 78px; padding: 96px 22px 40px; max-width: 470px;
  background: linear-gradient(180deg, #FFFDF9 0%, var(--cream-hi) 100%);
  border: 1px solid var(--copper); border-radius: 240px 240px 18px 18px;
  box-shadow: 0 34px 50px -34px rgba(90, 65, 40, .55);
}
.card::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid var(--gold); border-radius: 232px 232px 12px 12px; pointer-events: none;
}
.card-sprig { position: absolute; top: -50px; left: 50%; width: 112px; margin-left: -60px; animation: float 6s ease-in-out infinite; }
.card-garland { position: absolute; top: -62px; left: 50%; width: 340px; max-width: 98%; transform: translateX(-50%); }
.card--shabbat { padding-top: 108px; }
.card-title { font-size: clamp(33px, calc(var(--u) * 9), 44px); line-height: 1.15; color: var(--olive); font-weight: 700; }
html[lang="fr"] .card-title { font-weight: 600; }
.card-title::after { content: ""; display: block; width: 54px; height: 1px; margin: 14px auto 0; background: var(--gold); box-shadow: 0 3px 0 -0.5px rgba(201, 164, 92, .0); }
.card-date { margin-top: 16px; font-size: 21px; color: var(--copper-deep); font-weight: 500; letter-spacing: .03em; }
html[lang="fr"] .card-date { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 18px; }
.card-time {
  margin: 8px 0 6px; display: flex; align-items: center; justify-content: center; gap: 14px;
  font-family: var(--f-fr); font-weight: 600; font-size: 58px; line-height: 1.1; color: var(--gold-deep); font-variant-numeric: lining-nums; direction: ltr;
}
.card-time::before, .card-time::after { content: ""; width: 34px; height: 1px; background: var(--gold); }
.card-time--sm { font-size: 46px; }
.card-place { font-size: 25px; line-height: 1.3; color: var(--olive); font-weight: 700; text-wrap: balance; }
html[lang="fr"] .card-place { font-size: 26px; }
.card-he { margin-top: 4px; font-family: var(--f-he); font-size: 22px; line-height: 1.35; color: var(--olive); }
.card-he--gold { color: var(--gold-deep); font-size: 24px; margin-top: 0; }
.card-addr { margin-top: 6px; font-size: 20px; color: var(--ink); text-wrap: balance; }
.card-paracha { margin-top: 12px; font-size: 25px; color: var(--gold-deep); font-weight: 500; }
html[lang="fr"] .card-paracha { font-style: italic; font-weight: 600; }
.sub { margin-top: 26px; }
.sub-what { margin-top: 6px; font-size: 22px; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.sub-div { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 32px; }
.sub-div span { width: 64px; height: 1px; background: var(--gold); }
.sub-div i { width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); }

/* ==========================================================
   SECTION 6 — RSVP
   ========================================================== */
.rsvp { position: relative; padding: 56px 0 calc(var(--u) * 46 + 40px); text-align: center; background: linear-gradient(180deg, var(--cream) 0, var(--sand) 160px); }
.rsvp-ribbon { width: min(100%, 440px); margin: 0 auto 10px; }
.rsvp .title { margin-bottom: 28px; text-wrap: balance; }

.form {
  text-align: start; padding: 26px 18px 28px; border-radius: 22px; background: var(--cream-hi);
  border: 1px solid var(--copper); box-shadow: inset 0 0 0 6px var(--cream-hi), inset 0 0 0 7px rgba(201, 164, 92, .7), 0 30px 50px -34px rgba(90, 65, 40, .55);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: block; margin-bottom: 18px; }
.field-lab { display: block; margin-bottom: 7px; font-size: 20px; font-weight: 700; color: var(--olive); padding: 0; }
html[lang="fr"] .field-lab { font-size: 21px; }
.field input, .field textarea, .sel select {
  width: 100%; min-height: 56px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #CDBFA9; background: #fff;
  font-family: var(--f-ui); font-size: 19px; color: #33302a; outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .sel select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 164, 92, .28); }
.field input.is-invalid { border-color: #B4533A; box-shadow: 0 0 0 4px rgba(180, 83, 58, .16); }

.choices { margin-bottom: 20px; }
.choices legend { margin-bottom: 10px; }
.choice { border: 1.5px solid #D9CDB9; border-radius: 16px; background: #fff; margin-bottom: 10px; transition: border-color .3s, background .3s, box-shadow .3s; }
.choice.is-on { border-color: var(--gold); background: #FFFCF4; box-shadow: 0 10px 22px -16px rgba(120, 90, 30, .7); }
.choice--no.is-on { border-color: var(--copper); background: #FBF4EF; }
.check { display: flex; align-items: center; gap: 14px; padding: 14px 14px; min-height: 64px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--copper); background: #fff; position: relative; transition: background .25s, border-color .25s; }
.box::after {
  content: ""; position: absolute; left: 10px; top: 4px; width: 8px; height: 15px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0); transition: transform .3s var(--ease);
}
.check input:checked + .box { background: var(--olive); border-color: var(--olive); }
.check input:checked + .box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(201, 164, 92, .4); }
.check-txt b { display: block; font-size: 21px; line-height: 1.25; color: var(--olive-deep); font-weight: 700; }
.check-txt small { display: block; font-size: 17px; color: var(--copper-deep); margin-top: 1px; }
html[lang="fr"] .check-txt small { font-size: 18px; font-weight: 600; }

.guests { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.choice.is-on .guests { grid-template-rows: 1fr; }
.guests-in { overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 14px; opacity: 0; transition: opacity .35s ease, padding .45s var(--ease); }
.choice.is-on .guests-in { opacity: 1; padding-bottom: 16px; }
.sel { display: block; }
.sel > span { display: block; margin-bottom: 5px; font-size: 18px; font-weight: 500; color: var(--copper-deep); }
html[lang="fr"] .sel > span { font-weight: 700; }
.sel select {
  min-height: 52px; text-align: center; text-align-last: center; font-size: 20px; font-weight: 500; padding-inline: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%239C7A36' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 13px; background-position: left 13px center;
}
html[dir="ltr"] .sel select { background-position: right 13px center; }

.form-error { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #FBEDE7; color: #8C3A24; font-size: 18px; font-weight: 500; text-align: center; }
.btn-send { width: 100%; }
.btn-send[disabled] { opacity: .65; pointer-events: none; }

.thanks {
  padding: 44px 22px 40px; border-radius: 22px; background: var(--cream-hi); border: 1px solid var(--copper); outline: none;
  box-shadow: inset 0 0 0 6px var(--cream-hi), inset 0 0 0 7px rgba(201, 164, 92, .7), 0 30px 50px -34px rgba(90, 65, 40, .55);
  animation: thanksIn 1s var(--ease) both;
}
@keyframes thanksIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.thanks-check { width: 84px; height: 84px; margin: 0 auto 14px; display: block; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.thanks-check circle { stroke-dasharray: 183; stroke-dashoffset: 183; animation: draw 1s var(--ease) .2s forwards; }
.thanks-check path { stroke: var(--olive); stroke-width: 3.4; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s var(--ease) .9s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.thanks-title { font-size: 40px; line-height: 1.2; color: var(--olive); font-weight: 700; }
.thanks-txt { margin-top: 10px; font-size: 22px; line-height: 1.45; text-wrap: balance; }
.thanks-sign { margin-top: 16px; font-size: 22px; color: var(--gold-deep); font-weight: 500; }
html[lang="fr"] .thanks-sign { font-style: italic; font-weight: 600; }

/* ==========================================================
   SECTION 7 — FOOTER
   ========================================================== */
.footer { position: relative; padding: 56px 0 calc(34px + var(--safe-b)); text-align: center; color: var(--cream); background: linear-gradient(180deg, var(--olive) 0%, var(--olive-deep) 100%); border-top: 1px solid var(--gold); }
.footer-hills {
  position: absolute; left: 0; right: 0; bottom: 100%; height: calc(var(--u) * 54); max-height: 320px; pointer-events: none;
  background: url("assets/jerusalem-hills.webp") center bottom / cover no-repeat;
}
.footer-logo { width: 104px; height: auto; margin: 0 auto 24px; }
.footer-q { font-size: 25px; line-height: 1.3; font-weight: 700; color: #FBF4E4; text-wrap: balance; }
html[lang="fr"] .footer-q { font-weight: 600; font-size: 26px; }
.footer-s { margin: 6px 0 24px; font-size: 21px; color: #E4E0CC; text-wrap: balance; }
.qdb { display: block; width: 104px; padding: 6px; margin: 38px auto 0; opacity: .8; }
.qdb img { width: 100%; filter: invert(1) sepia(.25) brightness(1.05); }

/* ==========================================================
   CONFORT
   ========================================================== */
@media (max-width: 350px) {
  .wrap { padding-inline: 16px; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .card-time { font-size: 50px; }
}
@media (min-width: 700px) {
  .hero-leaves--a { right: calc(50% - 330px); }
  .hero-leaves--b { left: calc(50% - 330px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
  #dust { display: none; }
}
