:root {
  --navy: #26473f;
  --navy-soft: #4c6c64;
  --sky: #d8ebe7;
  --ivory: #f7f0e5;
  --paper: #fbf7ef;
  --gold: #b79a4a;
  --gold-soft: #d9c47e;
  --ink: #29463f;
  --muted: #71827d;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 10% 15%, rgba(241,248,244,.92) 0 9%, transparent 28%),
    radial-gradient(ellipse at 82% 8%, rgba(197,225,219,.9) 0 12%, transparent 34%),
    radial-gradient(ellipse at 30% 72%, rgba(105,165,154,.44) 0 7%, transparent 30%),
    radial-gradient(ellipse at 90% 78%, rgba(231,243,239,.8) 0 8%, transparent 30%),
    linear-gradient(135deg, #a7cec6, #dfeeea 48%, #91bbb2);
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
main {
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 0;
  overflow: hidden;
  border: 1px solid rgba(183,154,74,.42);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(38,71,63,.2);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 50%;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 72px);
  color: var(--navy);
  transition: background .3s ease, box-shadow .3s ease;
}
.topbar.scrolled { background: rgba(251,247,239,.94); box-shadow: 0 8px 25px rgba(38,71,63,.1); backdrop-filter: blur(10px); }
.monogram {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(210,154,50,.75);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  font: 20px var(--serif);
}
.topbar nav { display: flex; gap: clamp(18px, 4vw, 38px); font-size: .86rem; }
.topbar nav a { opacity: .85; }
.topbar nav a:hover { opacity: 1; }

.hero {
  min-height: calc(100svh - 56px);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 108px 24px 75px;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 30%, rgba(217,196,126,.16), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(164,204,195,.2), transparent 28%),
    var(--paper);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(183,154,74,.32);
  border-radius: 50%;
}
.hero::before { width: min(77vw, 720px); aspect-ratio: 1; }
.hero::after { width: min(92vw, 880px); aspect-ratio: 1; }
.halo { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .6; }
.halo-one { width: 280px; height: 280px; top: -120px; right: -90px; background: radial-gradient(circle, rgba(217,196,126,.25), transparent 67%); }
.halo-two { width: 420px; height: 420px; bottom: -260px; left: -150px; background: radial-gradient(circle, rgba(135,184,174,.22), transparent 70%); }
.hero-layout {
  position: relative;
  z-index: 2;
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .7fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: center;
}
.hero-inner { max-width: 720px; text-align: center; animation: rise .9s ease both; }
.eyebrow { margin: 0 0 18px; color: var(--gold); text-transform: uppercase; letter-spacing: .28em; font-size: .72rem; font-weight: 600; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { margin: 0; color: var(--navy); font-size: clamp(5rem, 9vw, 8.8rem); line-height: .78; letter-spacing: .05em; text-transform: uppercase; }
h1 span { display: block; margin-bottom: .38em; color: var(--navy-soft); font: italic 400 .34em/1.05 var(--serif); letter-spacing: .02em; text-transform: none; }
.intro { max-width: 520px; margin: 32px auto; color: var(--muted); font-size: clamp(1rem, 2vw, 1.12rem); }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-portrait { margin: 0; position: relative; animation: rise .9s .12s ease both; }
.portrait-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 8px;
  border: 1px solid rgba(183,154,74,.72);
  border-radius: 50%;
  background: rgba(255,255,255,.64);
  box-shadow: 0 24px 58px rgba(38,71,63,.18);
  overflow: hidden;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.56);
  pointer-events: none;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: 50%;
}
.hero-portrait figcaption {
  position: absolute;
  right: -16px;
  bottom: 22px;
  color: #f4e5b4;
  font: italic clamp(1.5rem, 3vw, 2.5rem) var(--serif);
  letter-spacing: .04em;
  text-shadow: 0 3px 12px rgba(0,0,0,.55);
  transform: rotate(-5deg);
}
.button {
  border: 1px solid transparent;
  border-radius: 3px;
  min-height: 50px;
  padding: 13px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.primary { background: var(--gold); color: white; box-shadow: 0 10px 28px rgba(183,154,74,.22); }
.ghost { border-color: rgba(24,59,86,.28); background: rgba(255,255,255,.42); color: var(--navy); }
.ghost:hover { background: rgba(255,255,255,.82); }
.scroll-note { position: absolute; z-index: 2; bottom: 22px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
.scroll-note span { display: inline-block; width: 28px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 8px; }

.program-section { padding: 100px clamp(20px, 6vw, 88px); background: #f5eee3; border-top: 1px solid rgba(183,154,74,.24); }
.section-heading { max-width: 580px; margin: 0 auto 45px; text-align: center; }
.section-heading h2, .rsvp-section h2 { margin: 0; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; color: var(--navy); letter-spacing: .07em; text-transform: uppercase; }
.section-heading > p:last-child { color: var(--muted); }
.event-list { max-width: 920px; margin: 0 auto; display: grid; gap: 14px; }
.event-card { border: 1px solid rgba(183,154,74,.36); border-radius: 4px; background: rgba(251,247,239,.88); overflow: hidden; transition: box-shadow .25s ease, border-color .25s ease; }
.event-card.open { border-color: rgba(183,154,74,.62); box-shadow: 0 14px 38px rgba(38,71,63,.08); }
.event-toggle { width: 100%; border: 0; background: transparent; padding: 24px; display: grid; grid-template-columns: 1fr 28px; gap: 14px; align-items: center; color: var(--ink); text-align: left; cursor: pointer; }
.event-card.has-art .event-toggle { grid-template-columns: 1fr 124px 28px; }
.event-art { width: 116px; height: 108px; object-fit: contain; filter: drop-shadow(0 9px 14px rgba(38,71,63,.16)); }
.torah-art { width: 108px; }
.event-title { display: grid; }
.event-title small { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .13em; }
.event-title strong { font-family: var(--serif); font-size: clamp(1.25rem, 4vw, 1.7rem); font-weight: 400; }
.event-plus { width: 22px; height: 22px; position: relative; }
.event-plus::before, .event-plus::after { content: ""; position: absolute; background: var(--navy); left: 4px; right: 4px; top: 10px; height: 1px; transition: transform .2s ease; }
.event-plus::after { transform: rotate(90deg); }
.event-card.open .event-plus::after { transform: rotate(0); }
.event-details { max-height: 0; opacity: 0; overflow: hidden; padding: 0 24px; transition: max-height .35s ease, opacity .25s ease, padding .35s ease; }
.event-card.open .event-details { max-height: 360px; opacity: 1; padding: 0 24px 26px; }
.event-details > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 20px; border-top: 1px solid rgba(13,27,42,.1); }
.event-details p { margin: 0; }
.event-details p span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .11em; }
.map-link { display: inline-block; margin-top: 7px; color: #92702f; font-size: .82rem; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(146,112,47,.35); text-underline-offset: 3px; }
.map-link:hover { color: var(--navy); text-decoration-color: currentColor; }
.event-note { margin-top: 18px !important; color: var(--muted); }
.accent-card { background: linear-gradient(135deg, #dcebe7, #f5eee3); color: var(--ink); border-color: rgba(183,154,74,.5); }
.accent-card .event-toggle, .accent-card .event-title strong { color: var(--ink); }
.accent-card .event-title small, .accent-card .event-note { color: var(--muted); }
.accent-card .event-plus::before, .accent-card .event-plus::after { background: var(--navy); }
.accent-card .event-details > div { border-color: rgba(24,59,86,.12); }
.accent-card .event-details p span { color: #966719; }
.accent-card .map-link { color: #8a5d14; }
.accent-card .map-link:hover { color: var(--navy); }

.rsvp-section { padding: 80px clamp(24px, 8vw, 110px); color: var(--ink); background: linear-gradient(110deg, #dcebe7, #f5eee3); border-top: 1px solid rgba(183,154,74,.28); display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.rsvp-section h2 { color: var(--navy); }
.rsvp-section > div > p:last-child { color: var(--muted); }
.light { flex: 0 0 auto; background: var(--navy); color: white; box-shadow: 0 12px 28px rgba(24,59,86,.16); }
footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto 28px; padding: 35px 24px; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--navy-soft); background: rgba(251,247,239,.9); border: 1px solid rgba(183,154,74,.42); border-top: 0; border-radius: 0 0 12px 12px; font-size: .85rem; }
.footer-mark { font: 1.3rem var(--serif); color: var(--gold); }

.rsvp-dialog { width: min(94vw, 590px); max-height: 92vh; border: 0; border-radius: 26px; padding: 0; background: var(--paper); box-shadow: 0 40px 100px rgba(0,0,0,.35); }
.rsvp-dialog::backdrop { background: rgba(4,12,19,.72); backdrop-filter: blur(5px); }
.rsvp-dialog[open] { animation: dialogIn .28s ease both; }
.rsvp-dialog form { padding: 30px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.dialog-head h2 { margin: 0; font: 2.3rem/1 var(--serif); }
.close-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #d8d5ce; background: transparent; font-size: 1.7rem; cursor: pointer; }
.field { display: grid; gap: 7px; margin: 18px 0; font-weight: 600; font-size: .9rem; }
.field span { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; border: 1px solid #d7d3ca; border-radius: 12px; padding: 13px 14px; background: white; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(216,181,109,.55); border-color: var(--gold); }
fieldset { border: 0; padding: 0; margin: 20px 0; }
legend { margin-bottom: 10px; font-size: .9rem; font-weight: 600; }
.choice { display: flex; gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid #ece8df; }
.choice input { width: 20px; height: 20px; accent-color: var(--navy); }
.form-hint { font-size: .8rem; color: var(--muted); }
.whatsapp { width: 100%; background: var(--navy); color: white; }
.whatsapp:disabled { cursor: wait; opacity: .65; transform: none; }
.honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toast { position: fixed; z-index: 30; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--navy); color: white; border-radius: 999px; padding: 12px 20px; transition: .25s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }

@media (max-width: 700px) {
  main { width: calc(100% - 16px); margin-top: 8px; border-radius: 8px; }
  .topbar { width: calc(100% - 16px); }
  footer { width: calc(100% - 16px); margin-bottom: 8px; }
  .topbar nav a:first-child { display: none; }
  .hero { min-height: 100svh; padding: 104px 20px 76px; }
  .hero::before { width: 104vw; }
  .hero::after { width: 128vw; }
  .hero-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-inner { text-align: center; }
  h1 { font-size: clamp(4.8rem, 24vw, 7rem); }
  .intro { margin: 24px auto; }
  .hero-portrait { width: min(72vw, 310px); margin: 0 auto; }
  .hero-portrait figcaption { right: -10px; bottom: 15px; }
  .hero-actions { display: grid; }
  .event-toggle { padding: 20px 16px; grid-template-columns: 1fr 22px; gap: 10px; }
  .event-card.has-art .event-toggle { grid-template-columns: 1fr 86px 22px; }
  .event-art { width: 82px; height: 82px; }
  .torah-art { width: 78px; }
  .event-card.open .event-details { padding: 0 18px 22px; }
  .event-details > div { grid-template-columns: 1fr; gap: 11px; }
  .rsvp-section { text-align: center; flex-direction: column; }
  .light { width: 100%; }
  .rsvp-dialog form { padding: 24px 19px; }
}

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