/* Ethan's bar mitzvah RSVP: the invitation's look ("בר מצווה מהסרטים"), mobile first. */

@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/heebo-hebrew-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Heebo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/heebo-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --black: #0b0907;
  --ink: #15110c;
  --panel: rgba(24, 19, 13, .78);
  --white: #f4efe2;
  --muted: #bdb29b;
  --gold: #d4a849;
  --gold-hi: #f7e3a3;
  --gold-line: rgba(212, 168, 73, .55);
  --gold-grad: linear-gradient(180deg, #fff4cf 0%, #f7e3a3 22%, #d4a849 52%, #9c6f22 78%, #e8c873 100%);
  --error: #ff9b85;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 42% at 50% -4%, rgba(247, 227, 163, .20), rgba(212, 168, 73, .06) 55%, transparent 75%),
    radial-gradient(ellipse 120% 90% at 50% 40%, #1a140d 0%, var(--black) 70%);
  background-color: var(--black);
  background-attachment: fixed;
  color: var(--white);
  font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.page {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px calc(36px + env(safe-area-inset-bottom));
}

/* ---------- header ---------- */
.hero { position: relative; text-align: center; padding: 18px 0 6px; }
.reel {
  position: absolute;
  top: 0;
  width: 58px;
  height: 58px;
  opacity: .92;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .7));
}
.reel-start { right: -4px; transform: rotate(18deg); }
.reel-end { left: -4px; }

.presents {
  margin: 34px 0 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .32em;
  margin-inline-end: -.32em;
  color: var(--gold);
}
.title { margin: 0; line-height: 1; font-weight: 800; }
.title span { display: block; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title-top { font-size: 30px; font-weight: 700; letter-spacing: .42em; margin-inline-end: -.42em; margin-bottom: 4px; }
.title-main { font-size: 68px; letter-spacing: .01em; padding-bottom: 4px; }
.name { margin: 10px 0 0; font-size: 30px; font-weight: 800; letter-spacing: .02em; color: var(--white); }

.rule { position: relative; height: 14px; margin: 16px auto 0; width: 86%; }
.rule::before {
  content: ''; position: absolute; inset: 6px 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-hi) 50%, var(--gold) 80%, transparent);
}
.rule span {
  position: absolute; top: 2px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px;
  transform: rotate(45deg); background: var(--gold-grad); box-shadow: 0 0 10px rgba(247, 227, 163, .5);
}

/* ---------- event details ---------- */
.details { text-align: center; padding: 14px 0 4px; }
.day { margin: 0; color: var(--gold-hi); font-weight: 500; font-size: 18px; }
.date { margin: 2px 0 8px; font-size: 40px; font-weight: 800; letter-spacing: .04em; line-height: 1.2; }
.facts { margin: 0 auto 16px; display: grid; gap: 4px; }
.facts div { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.facts dt { color: var(--gold); font-weight: 600; }
.facts dt::after { content: ':'; }
.facts dd { margin: 0; font-weight: 600; }
.nav { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- film strip divider ---------- */
.filmstrip {
  height: 26px;
  margin: 30px -18px 26px;
  border-block: 1px solid var(--gold-line);
  background:
    repeating-linear-gradient(90deg, rgba(212, 168, 73, .42) 0 7px, transparent 7px 16px) left 0 top 4px / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, rgba(212, 168, 73, .42) 0 7px, transparent 7px 16px) left 0 bottom 4px / 100% 5px no-repeat,
    linear-gradient(180deg, #1d1710, #0f0c08);
  box-shadow: 0 0 18px rgba(0, 0, 0, .6);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px;
  border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn-outline { color: var(--gold-hi); background: transparent; border: 1.5px solid var(--gold); }
.btn-outline:hover, .btn-outline:focus-visible { background: rgba(212, 168, 73, .12); }
.btn-gold {
  width: 100%; min-height: 56px; margin-top: 8px; font-size: 20px;
  color: var(--black); border: 0; background: var(--gold-grad);
  box-shadow: 0 4px 18px rgba(212, 168, 73, .28), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn-gold:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }

/* ---------- RSVP card ---------- */
.rsvp {
  position: relative;
  padding: 22px 18px 24px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5), inset 0 0 0 4px rgba(11, 9, 7, .9), inset 0 0 0 5px rgba(212, 168, 73, .22);
}
.rsvp h2 {
  margin: 0; text-align: center; font-size: 30px; font-weight: 800;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 6px 0 18px; text-align: center; color: var(--muted); font-size: 15px; }
.loading { text-align: center; color: var(--muted); }

.field { margin-bottom: 16px; }
label, legend, .step-label { font-weight: 600; color: var(--white); }
.field label { display: block; margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 400; font-size: 14px; }
input[type=text], input[type=tel], textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit; font-size: 17px;   /* >= 16px: no iOS zoom */
  color: var(--white);
  background: rgba(11, 9, 7, .7);
  border: 1px solid rgba(212, 168, 73, .45);
  border-radius: 10px;
}
input[type=tel] { text-align: right; }
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus { outline: none; border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(212, 168, 73, .25); }
[aria-invalid=true] { border-color: var(--error) !important; }

.choice { border: 0; padding: 0; margin: 4px 0 16px; }
.choice legend { padding: 0; margin-bottom: 8px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle label { position: relative; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.toggle span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 8px 10px;
  border: 1.5px solid var(--gold-line); border-radius: 999px;
  color: var(--gold-hi); font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s;
}
.toggle input:checked + span { background: var(--gold-grad); color: var(--black); border-color: transparent; }
.toggle input:focus-visible + span { outline: 3px solid var(--gold-hi); outline-offset: 3px; }

.group { margin-bottom: 4px; }
#meals { padding: 4px 12px 2px; margin: -4px 0 12px; border-inline-start: 2px solid var(--gold-line); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; }
.step-ctrl { display: flex; align-items: center; gap: 6px; }
.step-ctrl output { min-width: 44px; text-align: center; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.step {
  width: 48px; height: 48px; border-radius: 50%;
  font: inherit; font-size: 26px; font-weight: 600; line-height: 1;
  color: var(--gold-hi); background: transparent; border: 1.5px solid var(--gold);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.step[data-delta="1"] { background: var(--gold-grad); color: var(--black); border-color: transparent; }
.step:disabled { opacity: .3; cursor: default; }
.total { margin: 6px 0 14px; text-align: center; color: var(--gold-hi); font-size: 18px; }
.total strong { font-size: 22px; }
.hint { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

.field-error, .form-error { margin: 6px 0 0; color: var(--error); font-size: 15px; font-weight: 500; }
.field-error:empty, .form-error:empty { display: none; }
.form-error { text-align: center; margin-bottom: 6px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.thanks { text-align: center; padding: 6px 0; }
.thanks:focus { outline: none; }
.thanks h3 { margin: 4px 0 8px; font-size: 26px; color: var(--gold-hi); }
.thanks p { margin: 0 0 12px; white-space: pre-line; }
.thanks .small { color: var(--muted); font-size: 14px; }

/* ---------- closing ---------- */
.closing { text-align: center; margin-top: 30px; }
.closing p { margin: 0; font-size: 19px; }
.family {
  font-weight: 800; letter-spacing: .3em; margin-inline-end: -.3em; font-size: 20px;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (min-width: 560px) {
  .page { padding-top: 36px; }
  .reel { width: 76px; height: 76px; }
  .title-main { font-size: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
