/* Letty & Zach — concept 5a "Formal — Centered Monument"
   Palette and type are taken directly from the design document. */

:root {
  --page: #e7dfcf;
  --card: #f4ecd9;
  --frame: #b3a06a;
  --gold: rgba(162, 130, 60, 0.92);
  --ink: rgba(63, 58, 49, 0.93);
  --ink-rgb: 63, 58, 49;
  --olive: rgba(109, 92, 51, 0.92);
  --bronze: rgba(138, 116, 74, 0.92);
  --hairline: #ddcda2;
  --hairline-soft: #e5dcc0;
  --muted: #93825b;
  --panel-gap: clamp(40px, 5vw, 52px);
  --letterpress-text:
    -0.2px -0.58px 0 rgba(var(--ink-rgb), 0.34),
    0.28px 0.78px 0 rgba(255, 253, 245, 0.84);
  --letterpress-reverse:
    -0.22px -0.58px 0 rgba(10, 9, 7, 0.54),
    0.28px 0.74px 0 rgba(255, 253, 245, 0.2);
  --pressed-rule-shadow:
    -0.24px -0.5px 0 rgba(73, 57, 31, 0.16),
    0.3px 0.64px 0 rgba(255, 253, 245, 0.84);
  --display: 'Bellefair', serif;
  --hebrew: 'Shofar', 'Cormorant Garamond', serif;
  --latin: 'Cormorant Garamond', serif;
  --body-font: var(--hebrew);
}

html[lang="en"], html[lang="pt-BR"] { --body-font: var(--latin); }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
  text-shadow: var(--letterpress-text);
}

a { color: var(--bronze); }
a:hover { color: #c96f4a; }
input, select, button {
  font-family: inherit;
}
input, select {
  text-shadow: none;
}
button {
  text-shadow: var(--letterpress-text);
}

.card {
  max-width: 1180px;
  margin: clamp(24px, 5vw, 64px) auto;
  width: calc(100% - 24px);
  background-color: var(--card);
  background-image:
    linear-gradient(rgba(247, 241, 226, 0.26), rgba(247, 241, 226, 0.26)),
    url('../assets/paper-letterpress-v1.jpg');
  background-repeat: repeat;
  background-size: auto, 900px 900px;
  background-blend-mode: screen, multiply;
  box-shadow:
    0 1px 0 rgba(255, 253, 246, 0.92),
    0 3px 0 rgba(177, 160, 115, 0.16),
    0 26px 64px rgba(47, 42, 32, 0.18);
  padding: 14px;
}

.frame {
  position: relative;
  border: 1px solid rgba(138, 116, 74, 0.72);
  box-shadow: var(--pressed-rule-shadow);
  padding: 8px clamp(12px, 2vw, 20px) 0;
}
.frame::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(138, 116, 74, 0.62);
  box-shadow: var(--pressed-rule-shadow);
  pointer-events: none;
}

/* ---- top bar ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 0;
}
.bsd {
  font: 400 14px var(--hebrew);
  color: var(--bronze);
}
.lang {
  display: flex;
  gap: 4px;
  align-items: center;
  direction: ltr;
}
.lang .sep { color: #c5ad78; }
.lang a {
  font: 600 13px 'Assistant', sans-serif;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  padding: 4px 6px;
  color: var(--olive);
  cursor: pointer;
  text-decoration: none;
}
.lang a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
}

/* ---- content column ---- */
.content {
  text-align: center;
  padding: 10px clamp(20px, 6vw, 70px) 56px;
}

.coin {
  width: 82px;
  height: 82px;
  object-fit: contain;
  opacity: 0.9;
  mix-blend-mode: multiply;
  filter:
    drop-shadow(-0.25px -0.55px 0 rgba(80, 61, 29, 0.32))
    drop-shadow(0.3px 0.72px 0 rgba(255, 253, 245, 0.62));
}

.anchors {
  display: flex;
  gap: clamp(20px, 3.5vw, 34px);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}
.anchors a {
  font: 400 17px var(--display);
  color: var(--olive);
  text-decoration: none;
}

/* ---- hero ---- */
.hero { margin-top: 44px; }

.inscription {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1.12em;
  direction: rtl;
  font: 400 27px 'Noto Sans Phoenician', sans-serif;
  color: var(--gold);
  letter-spacing: 0;
  text-shadow:
    -0.2px -0.58px 0 rgba(91, 70, 31, 0.28),
    0.28px 0.78px 0 rgba(255, 253, 245, 0.72);
}
.paleo-word {
  display: inline-flex;
  align-items: baseline;
  direction: rtl;
  gap: 0.48em;
}
.paleo-glyph {
  display: inline-block;
  line-height: 1;
  transform-origin: 50% 74%;
  -webkit-text-stroke: 0.24px rgba(91, 70, 31, 0.3);
  -webkit-mask-image: radial-gradient(
    circle at 37% 41%,
    rgba(0, 0, 0, 0.62) 0 0.38px,
    #000 1px
  );
  -webkit-mask-size: 7px 9px;
  mask-image: radial-gradient(
    circle at 37% 41%,
    rgba(0, 0, 0, 0.62) 0 0.38px,
    #000 1px
  );
  mask-size: 7px 9px;
}
.paleo-word:nth-child(1) .paleo-glyph:nth-child(1) { transform: translateY(1px) rotate(-2.3deg) scaleX(0.94); }
.paleo-word:nth-child(1) .paleo-glyph:nth-child(2) { transform: translateY(-1px) rotate(1.4deg) scaleY(1.04); }
.paleo-word:nth-child(1) .paleo-glyph:nth-child(3) { transform: translateY(0.5px) rotate(-0.8deg) scaleX(1.05); }
.paleo-word:nth-child(2) .paleo-glyph:nth-child(1) { transform: translateY(-1.5px) rotate(2.1deg) scaleY(1.07); }
.paleo-word:nth-child(3) .paleo-glyph:nth-child(1) { transform: translateY(1.5px) rotate(1.8deg) scaleX(0.96); }
.paleo-word:nth-child(3) .paleo-glyph:nth-child(2) { transform: translateY(-0.5px) rotate(-1.7deg) scaleY(0.97); }
.paleo-word:nth-child(3) .paleo-glyph:nth-child(3) { transform: translateY(1px) rotate(0.9deg) scaleX(1.04); }

.hero h1 {
  font: 400 clamp(56px, 11vw, 104px) var(--display);
  color: var(--ink);
  margin: 8px 0 0;
  line-height: 1.05;
  font-weight: 400;
}

/* Large type: shallow impression; the ink itself blends with the real paper grain. */
.hero h1,
.section h2,
.thanks-title,
.countdown-value {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  -webkit-text-stroke: 0;
  mix-blend-mode: normal;
  text-shadow:
    -0.28px -0.68px 0 rgba(var(--ink-rgb), 0.38),
    0.38px 0.9px 0 rgba(255, 253, 245, 0.88);
}
.hero h1,
.countdown-value {
  text-shadow:
    -0.36px -0.82px 0 rgba(var(--ink-rgb), 0.44),
    0.48px 1.06px 0 rgba(255, 253, 245, 0.92);
}

.latin {
  font: 400 26px var(--display);
  color: var(--ink);
  letter-spacing: 0.14em;
  margin-top: 12px;
}
html[lang="he"] .latin {
  font-size: 22px;
  color: var(--olive);
  margin-top: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 24px;
  justify-content: center;
}
.divider i {
  width: 80px;
  height: 1px;
  background: rgba(162, 130, 60, 0.78);
  box-shadow: var(--pressed-rule-shadow);
}
.divider b {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(162, 130, 60, 0.78);
  box-shadow: var(--pressed-rule-shadow);
  transform: rotate(45deg);
}

.date { font: 400 21px var(--body-font); color: var(--ink); }
html[lang="en"] .date, html[lang="pt-BR"] .date { font-weight: 600; font-size: 20px; }

.venue { font: 400 17px var(--body-font); color: var(--olive); margin-top: 8px; }
html[lang="en"] .venue, html[lang="pt-BR"] .venue { font-weight: 500; font-size: 16px; }

.blessing {
  font: 400 20px var(--display);
  color: var(--bronze);
  margin-top: 18px;
}

.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 14px 58px;
  background: var(--ink);
  color: var(--card);
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 3px;
  font: 400 18px var(--display);
  letter-spacing: 0.26em;
  text-decoration: none;
  text-shadow: var(--letterpress-reverse);
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 245, 0.13),
    inset 0 -2px 0 rgba(17, 15, 11, 0.2),
    0 1px 0 rgba(255, 253, 245, 0.76);
}
.cta:hover { color: var(--card); background: #443c2e; }

/* Hebrew is a genuinely mirrored interface, including both RSVP actions. */
html[dir="rtl"] .cta,
html[dir="rtl"] .submit {
  direction: rtl;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---- immersive hero image ---- */
.hero-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 52px auto 0;
  border: 1px solid var(--gold);
  overflow: hidden;
  background: #d8d6cc;
  box-shadow: 0 20px 48px rgba(47, 42, 32, 0.16);
}
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(250, 246, 232, 0.5), transparent) 17% 0 / 18px 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(250, 246, 232, 0.38), transparent) 71% 100% / 14px 1px no-repeat,
    linear-gradient(0deg, transparent, rgba(250, 246, 232, 0.42), transparent) 0 64% / 1px 13px no-repeat,
    linear-gradient(0deg, transparent, rgba(250, 246, 232, 0.32), transparent) 100% 28% / 1px 11px no-repeat;
  box-shadow:
    inset 1.5px 1.5px 2px rgba(62, 49, 29, 0.27),
    inset -1px -1px 1.5px rgba(255, 252, 241, 0.52),
    inset 0 0 0 0.5px rgba(105, 81, 39, 0.3);
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

/* ---- countdown ---- */
.section.countdown {
  margin-top: clamp(58px, 7vw, 84px);
  padding-top: clamp(38px, 5vw, 54px);
}
.countdown-date {
  margin: 0 0 9px;
  color: var(--bronze);
  font: 400 14px var(--body-font);
  letter-spacing: 0.08em;
}
.section.countdown h2 {
  margin: 0;
  padding: clamp(12px, 2vw, 18px) 0 clamp(28px, 4vw, 38px);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 0 rgba(255, 253, 245, 0.76);
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  direction: ltr;
  max-width: 780px;
  margin: clamp(24px, 4vw, 38px) auto 0;
  padding: clamp(23px, 4vw, 34px) 0 clamp(14px, 2vw, 20px);
  border-top: 1px solid var(--hairline);
}
.countdown-grid[hidden],
.countdown-done[hidden] { display: none; }
.countdown-unit {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
}
.countdown-unit + .countdown-unit {
  border-inline-start: 1px solid var(--hairline-soft);
}
.countdown-value {
  color: var(--ink);
  font: 400 clamp(46px, 8vw, 82px) / 0.82 var(--display);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.025em;
}
.countdown-label {
  color: var(--olive);
  font: 600 12px 'Assistant', sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
html[lang="he"] .countdown-date,
html[lang="he"] .countdown-label {
  letter-spacing: 0;
}
html[lang="he"] .countdown-label {
  direction: rtl;
  font-family: var(--hebrew);
  font-weight: 400;
  unicode-bidi: isolate;
}
.countdown-done {
  margin: 30px auto 0;
  color: var(--gold);
  font: 400 clamp(30px, 5vw, 48px) var(--display);
}

/* ---- sections ---- */
.section {
  position: relative;
  border-top: 0;
  margin-top: 48px;
  padding-top: 36px;
}
.section::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: rgba(179, 160, 106, 0.55);
  box-shadow: var(--pressed-rule-shadow);
}

.section h2 {
  font: 400 32px var(--display);
  color: var(--ink);
  margin: 0 0 14px;
  font-weight: 400;
}
html[lang="en"] .section h2, html[lang="pt-BR"] .section h2 {
  font-size: 30px;
  letter-spacing: 0.06em;
}

.body { font: 400 17px var(--body-font); color: var(--ink); margin: 0; }
.note { font: 400 15px var(--body-font); color: var(--bronze); margin: 8px 0 0; }
html[lang="en"] .body, html[lang="pt-BR"] .body { font-weight: 500; }
html[lang="en"] .note, html[lang="pt-BR"] .note { font-weight: 500; font-style: italic; }

/* schedule */
#schedule h2 { margin-bottom: 26px; }
.sched {
  display: grid;
  gap: 15px;
  max-width: 430px;
  margin: 0 auto;
}
.sched .row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--hairline-soft);
  padding-bottom: 11px;
  box-shadow: 0 1px 0 rgba(255, 253, 245, 0.68);
}
.sched .row.last { border-bottom: none; box-shadow: none; padding-bottom: 0; }
.sched .row div { font: 400 17px var(--body-font); color: var(--ink); text-align: start; }
html[lang="en"] .sched .row div, html[lang="pt-BR"] .sched .row div { font-weight: 500; font-size: 16px; }
.sched .row time { font: 400 20px var(--display); color: var(--gold); white-space: nowrap; }

/* ---- RSVP form ---- */
#rsvp h2 { font-size: 34px; margin-bottom: 26px; }
html[lang="en"] #rsvp h2, html[lang="pt-BR"] #rsvp h2 { font-size: 32px; }

#rsvp-form {
  display: grid;
  gap: 22px;
  max-width: 400px;
  margin: 0 auto;
  text-align: start;
}
#rsvp-form[hidden] { display: none !important; }

.attending-only { display: grid; gap: 22px; }
.attending-only[hidden] { display: none; }

.field label, .field .label {
  font: 400 15px var(--body-font);
  color: var(--olive);
  display: block;
  margin-bottom: 4px;
}
html[lang="en"] .field label, html[lang="pt-BR"] .field label,
html[lang="en"] .field .label, html[lang="pt-BR"] .field .label {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.field input[type="text"], .field select {
  width: 100%;
  padding: 10px 2px;
  border: none;
  border-bottom: 1px solid var(--frame);
  background: transparent;
  border-radius: 0;
  font-size: 16px;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 253, 245, 0.72);
}
html[lang="en"] .field input[type="text"], html[lang="pt-BR"] .field input[type="text"],
html[lang="en"] .field select, html[lang="pt-BR"] .field select { font-size: 17px; }
.field select { width: 120px; }
.field input:focus, .field select:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.choices { display: flex; gap: 26px; flex-wrap: wrap; }
.choices label, .check {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 16px var(--body-font);
  color: var(--ink);
  cursor: pointer;
}
html[lang="en"] .choices label, html[lang="pt-BR"] .choices label,
html[lang="en"] .check, html[lang="pt-BR"] .check { font-weight: 500; }
.check { gap: 10px; }
input[type="radio"] { accent-color: var(--gold); width: 17px; height: 17px; margin: 0; }
input[type="checkbox"] { accent-color: var(--gold); width: 18px; height: 18px; margin: 0; }

.field .label + .choices { margin-top: 8px; }

.submit {
  justify-self: center;
  margin-top: 8px;
  padding: 12px 54px;
  border: 1px solid var(--gold);
  background: var(--ink);
  color: var(--card);
  font: 400 17px var(--display);
  letter-spacing: 0.22em;
  cursor: pointer;
  text-shadow: var(--letterpress-reverse);
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 245, 0.13),
    inset 0 -2px 0 rgba(17, 15, 11, 0.2),
    0 1px 0 rgba(255, 253, 245, 0.76);
}
html[lang="en"] .submit, html[lang="pt-BR"] .submit { font-size: 16px; text-transform: uppercase; }
.submit:hover { background: #443c2e; }

/* per-person attendee rows */
#attendees {
  display: grid;
  gap: var(--panel-gap);
}
.attendee {
  border: 1px solid var(--hairline);
  padding: 14px 16px 20px;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 18px;
  position: relative;
  box-shadow: var(--pressed-rule-shadow);
}
.attendee-title {
  font: 400 15px var(--body-font);
  color: var(--bronze);
  padding: 0 6px;
}
.attendee-title[hidden] { display: none; }
.attendee label > .label { margin-bottom: 4px; }

.add-guest, .remove-guest, .edit-rsvp {
  background: none;
  border: none;
  padding: 2px 0;
  font: 400 15px var(--body-font);
  color: var(--bronze);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.add-guest:hover, .remove-guest:hover, .edit-rsvp:hover { color: #c96f4a; }
.add-guest { justify-self: start; }
.add-guest[hidden] { display: none; }
.remove-guest { position: absolute; top: 10px; inset-inline-end: 12px; font-size: 13px; }
.remove-guest[hidden] { display: none; }
.edit-rsvp { margin-top: 14px; }

.form-error {
  font: 400 15px var(--body-font);
  color: #8a3b2a;
  text-align: center;
  margin: 0;
}
.form-error[hidden] { display: none; }

/* venue block on the (now private) invite page */
.venue-block {
  font: 400 17px var(--body-font);
  color: var(--ink);
  margin: 14px 0 0;
  line-height: 1.7;
}
.venue-block .venue-name { color: var(--olive); }
.venue-block .venue-map { font-size: 15px; }

/* gate page */
.gate-body {
  max-width: 460px;
  margin: 14px auto 0;
  line-height: 1.48;
}
.gate-body + .note { line-height: 1.5; }

/* WhatsApp announcements group (hidden until the couple configures the link) */
.wa-updates {
  font: 400 15px var(--body-font);
  color: var(--bronze);
  margin: 18px 0 0;
  line-height: 1.8;
}
.wa-updates[hidden] { display: none; }
.wa-updates .wa-join { font-size: 15px; }

.thanks {
  border: 1px solid var(--frame);
  padding: 30px;
  max-width: 400px;
  margin: var(--panel-gap) auto 0;
  box-shadow: var(--pressed-rule-shadow);
}
#rsvp-thanks { margin-block-start: var(--panel-gap); }
.thanks[hidden] { display: none !important; }
.thanks-title { font: 400 26px var(--display); color: var(--gold); }
html[lang="en"] .thanks-title, html[lang="pt-BR"] .thanks-title { font-size: 24px; letter-spacing: 0.08em; }
.thanks-body { font: 400 16px var(--body-font); color: var(--ink); margin-top: 8px; }
html[lang="en"] .thanks-body, html[lang="pt-BR"] .thanks-body { font-weight: 500; }

/* ---- footer ---- */
.footer { margin-top: 48px; }
.verse { font: 400 19px var(--display); color: var(--olive); }
.verse-ref { font: 400 13px var(--body-font); color: var(--muted); margin-top: 4px; }
html[lang="en"] .verse-ref, html[lang="pt-BR"] .verse-ref { font-weight: 500; font-style: italic; }

@media (max-width: 560px) {
  .card { width: calc(100% - 16px); padding: 10px; }
  .inscription { gap: 0.9em; font-size: 22px; }
  .paleo-word { gap: 0.4em; }
  .cta { padding: 13px 44px; }
  .choices { gap: 16px 22px; }
  .hero-image {
    aspect-ratio: 4 / 5;
    margin-top: 42px;
  }
  .hero-image img { object-position: 58% 58%; }
  .countdown-grid {
    margin-top: 24px;
    padding-block: 22px 14px;
  }
  .countdown-unit { gap: 8px; }
  .countdown-value { font-size: clamp(38px, 12vw, 50px); }
  .countdown-label {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
}

/* shared-device escape hatch: clears the invite cookie */
.switch-invite {
  display: inline-block;
  margin-top: 18px;
  font: 400 12px var(--body-font);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
