:root {
  --bg: #f3efe3;
  --card: #ffffff;
  --text: #3b352d;
  --muted: #8a837a;
  --accent: #a98945;
  --accent-dark: #8e7237;
  --border: #e3dbcc;
  --rsvp-separator: #e6e2da;
  --rsvp-separator-soft: #efebe4;
  --topbar-height: 74px;
  --hero-logo-size: clamp(104px, 12vw, 170px);
}

@font-face {
  font-family: "TheSeasonsItalicLocal";
  src: url("./the-seasons-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 8px);
}

body {
  margin: 0;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  background: url("./background.jpg") center / cover no-repeat fixed;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-loading {
  overflow: hidden;
}

body.pre-invitation {
  overflow: hidden;
}

body.pre-invitation main {
  margin-bottom: 0;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  background: #f3eee5;
  transition: opacity 1.05s ease, visibility 1.05s ease, transform 1.05s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader.is-cloud-fade {
  pointer-events: none;
  animation: loaderCloudOut 3s ease forwards;
}

.site-loader-content {
  text-align: center;
  position: relative;
  width: 100vw;
  height: 100vh;
  display: block;
}

.site-loader-logo {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
  animation: none;
}

.site-loader-counter {
  position: absolute;
  left: 50%;
  top: 88%;
  transform: translateX(-50%);
  margin: 0;
  color: #7d6948;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(255, 255, 255, 0.9);
}

.site-loader.is-cloud-fade .site-loader-logo {
  animation: loaderCloudImageOut 3s ease forwards;
}

.site-loader.is-cloud-fade .site-loader-counter {
  animation: loaderCloudCounterOut 2.7s ease forwards;
}

@keyframes loaderCloudOut {
  0% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(10px);
  }
}

@keyframes loaderCloudImageOut {
  0% {
    transform: scale(1);
    filter: blur(0) brightness(1);
  }
  100% {
    transform: scale(1.03);
    filter: blur(18px) brightness(1.12);
  }
}

@keyframes loaderCloudCounterOut {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

body::before,
body::after {
  display: none;
}

.topbar {
  width: min(1020px, 92%);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(170, 147, 106, 0.28);
  border-radius: 14px;
  padding: 10px 14px;
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(248, 244, 236, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(83, 70, 49, 0.09);
}

.logo-mark {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.site-header-logo {
  display: block;
  width: 34px;
  height: auto;
}

.top-nav {
  display: flex;
  gap: 26px;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  flex-shrink: 0;
  text-decoration: none;
  color: #5a5249;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-nav a:hover {
  color: var(--accent);
}

.bh {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0;
  color: #9e927f;
  direction: rtl;
}

.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lang-switch a {
  color: #7f6b4b;
  text-decoration: none;
  border: 1px solid #d7c6a8;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.78);
}

.lang-switch a.active {
  background: rgba(169, 137, 69, 0.22);
  border-color: #b08c4b;
  color: #6f562f;
}

.photos-nav {
  margin-inline-start: 4px;
}

.photos-nav.is-active {
  background: rgba(169, 137, 69, 0.22);
  border-color: #b08c4b;
  color: #6f562f;
}

main {
  width: min(1020px, 92%);
  margin: 0 auto 64px;
  padding-top: 0;
  display: grid;
  gap: 28px;
}

.slide {
  min-height: 100svh;
}

#invitationContent {
  display: grid;
  gap: 26px;
  padding-top: var(--topbar-height);
}

#invitationContent[hidden] {
  display: none !important;
}

.hero {
  text-align: center;
  min-height: 100svh;
  height: 100svh;
  padding-top: var(--topbar-height);
  padding-bottom: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  position: relative;
  overflow-x: clip;
  container-type: inline-size;
  container-name: hero;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(86vw, 760px);
  height: min(86vw, 760px);
  left: 50%;
  top: calc(var(--topbar-height) + (100svh - var(--topbar-height)) / 2);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.72) 0 43%, transparent 70%),
    radial-gradient(circle at 50% 50%, rgba(188, 156, 98, 0.18) 0 52%, transparent 76%);
  z-index: -1;
}

.hero-logo {
  width: var(--hero-logo-size);
  height: auto;
  margin: 0 auto 8px;
  display: block;
  object-fit: contain;
  opacity: 1;
  filter: none;
  position: relative;
  z-index: 1;
}

.hero.is-leaving {
  pointer-events: none;
  animation: heroInvitationExit 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes heroInvitationExit {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.02);
    filter: blur(2px);
  }
}

.kicker {
  margin: 0 0 8px;
  color: #7d7468;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.names {
  margin: 0;
  font-family: "TheSeasonsItalicLocal", "The Seasons", "Parisienne", "Great Vibes", cursive;
  font-size: clamp(2.6rem, 14vw, 6.8rem);
  font-weight: 400;
  font-style: italic;
  color: #aa9270;
  letter-spacing: 0.02em;
  line-height: 1.02;
  white-space: nowrap;
}

.names span {
  display: inline-block;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(1.4rem, 6vw, 2.6rem);
  color: #b9aa8f;
  line-height: 1;
  margin: 0 0.18em;
  font-style: normal;
  vertical-align: middle;
  position: relative;
  top: -0.04em;
}

/* Save-the-date hero only: scale Sarah & Eitan to the screen width on a single line. */
.hero .names {
  margin-inline: auto;
  max-width: 100%;
  padding-inline: clamp(6px, 2vw, 16px);
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 0.18em;
  white-space: nowrap;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  font-size: clamp(2.6rem, 15cqw, 7rem);
}

.hero .names span {
  font-size: clamp(1.2rem, 6cqw, 2.6rem);
  margin-inline: 0.12em;
}

.hero .he-hero-secondary-names {
  font-size: clamp(0.78rem, 3.6cqw, 1rem);
  letter-spacing: 0.04em;
}

/* Fallback when container queries are unavailable (older mobile browsers). */
@supports not (font-size: 1cqw) {
  .hero .names {
    font-size: clamp(2.6rem, 15vw, 7rem);
  }

  .hero .names span {
    font-size: clamp(1.2rem, 6vw, 2.6rem);
  }

  .hero .he-hero-secondary-names {
    font-size: clamp(0.78rem, 3.6vw, 1rem);
  }
}

.hero-date {
  margin: 10px 0 0;
  font-size: 2rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-secondary-names {
  margin: 2px 0 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #8f877c;
}

/* Hebrew-only name layout overrides (isolated from FR). */
.he-hero-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.18em;
  white-space: normal;
  line-height: 1.12;
  font-size: clamp(2.35rem, 7.2vw, 4.2rem);
}

.he-hero-names > span {
  margin: 0 6px;
}

.he-full-name {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.02em;
}

.he-first-name,
.he-second-name {
  display: inline-block;
  font-family: "TheSeasonsItalicLocal", "Noto Serif Hebrew", "Times New Roman", serif;
  font-weight: 400;
  color: #aa9270;
}

.he-second-name {
  font-size: 0.86em;
}

.he-hero-ampersand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.7em;
}

.he-hero-secondary-names {
  margin-top: 6px;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.hero .he-hero-secondary-names {
  margin-inline: auto;
  max-width: 100%;
  padding-inline: clamp(8px, 2.5vw, 16px);
}

.hero-hebrew-date {
  margin: 2px 0 0;
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: 1.5rem;
  color: #8d7f67;
  direction: rtl;
}

.hero-place {
  margin: 6px 0 0;
  color: #8f877c;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.countdown {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 14px;
  width: min(700px, 100%);
  margin-inline: auto;
}

.count-item {
  border: 1px solid rgba(171, 148, 108, 0.35);
  border-radius: 14px;
  padding: 14px 10px 10px;
  background: rgba(255, 251, 243, 0.6);
  box-shadow: 0 6px 16px rgba(124, 103, 71, 0.08);
}

.count-item p {
  margin: 0;
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1;
}

.count-item span {
  color: #857c71;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cta-link {
  justify-self: center;
  margin-top: 20px;
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(169, 137, 69, 0.55);
  background: rgba(255, 255, 255, 0.48);
  color: #5f4d2e;
  letter-spacing: 0.08em;
  transition: 0.2s ease;
}

.cta-link:hover {
  background: rgba(169, 137, 69, 0.15);
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 28px rgba(76, 63, 48, 0.04);
  margin-bottom: 0;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  position: relative;
  overflow: hidden;
}

/* Safari/iOS: fixed background attachment often renders differently than Chrome. */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
  }
}

.invitation-card {
  scroll-margin-top: 24px;
}

.section-title {
  margin: 0 0 14px;
  font-size: 1.55rem;
  font-weight: 500;
}

.invitation-line {
  margin: 8px 0;
  line-height: 1.6;
}

.route-link {
  display: inline-block;
  margin-top: 12px;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: #4d4031;
  background: #fdfaf5;
  transition: 0.2s ease;
}

.route-link:hover {
  background: #f4ecdf;
}

.response-card {
  margin-top: 22px;
  scroll-margin-top: 24px;
  background: #f2efe9;
  border: 1px solid #ddd3c1;
}

.rsvp-head {
  text-align: center;
  margin-bottom: 16px;
}

.rsvp-head h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  color: #8f7a56;
  letter-spacing: 0.08em;
}

.rsvp-head p {
  margin: 8px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #9b8d77;
  font-size: 0.82rem;
}

.ceremony-card {
  scroll-margin-top: 24px;
}

.ceremony-paper {
  position: relative;
  overflow: visible;
  border-radius: 10px;
  border: 1px solid #d8cebb;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  padding: 30px 30px 34px;
  background: linear-gradient(180deg, #f8f5ea 0%, #f3ede0 100%);
  box-shadow: none;
}

.ceremony-hebrew-arc {
  margin: 0 0 12px;
}

.hebrew-arc-line {
  width: min(200px, 22%);
  margin: 0 auto;
  min-height: 0;
  position: relative;
}

.hebrew-arc-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.ceremony-center-logo {
  width: clamp(74px, 10vw, 98px);
  height: auto;
  opacity: 1;
  filter: none;
}

@media (max-width: 640px) {
  .ceremony-hebrew-arc {
    margin-bottom: 14px;
  }
}

@media (max-width: 640px) {
  .hebrew-arc-image {
    transform: scale(1.12);
    transform-origin: top center;
  }
}

@media (max-width: 420px) {
  .hebrew-arc-image {
    transform: scale(1);
    transform-origin: top center;
  }
}

.ceremony-families {
  margin: 0 auto 18px;
  max-width: 820px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px 14px;
  color: #6d6357;
  font-size: 1.05rem;
  align-items: center;
}

.family-column {
  padding: 0 14px;
}

.ceremony-logo-title {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 1.2rem;
  color: rgba(111, 86, 47, 0.85);
  font-family: "Libre Baskerville", "Cormorant Garamond", "Playfair Display", Georgia, serif;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  padding: 0 10px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.ceremony-logo-title-left {
  justify-self: end;
}

.ceremony-logo-title-right {
  justify-self: start;
}

.ceremony-logo-title-amp {
  letter-spacing: 0;
  margin: 0 0.25em;
}

.he-ceremony-logo-title {
  grid-template-columns: auto auto auto;
  justify-content: center;
  column-gap: 0.32em;
  text-align: center;
}

.he-ceremony-logo-title .ceremony-logo-title-left,
.he-ceremony-logo-title .ceremony-logo-title-right {
  justify-self: center;
}

.ceremony-header {
  display: grid;
  justify-items: center;
  margin: 0 0 22px;
  position: relative;
}

.ceremony-card#ceremonie .ceremony-header {
  margin-top: -6px;
}

.ceremony-card#ceremonie .ceremony-center-logo {
  width: clamp(86px, 12vw, 120px);
  position: relative;
  z-index: 1;
}

.ceremony-card#ceremonie .ceremony-logo-title {
  font-size: clamp(0.9rem, 1.6vw, 1.15rem);
  letter-spacing: 0.22em;
  z-index: 2;
}

.ceremony-card#ceremonie .ceremony-text {
  max-width: 720px;
  margin: 0 auto;
}

.ceremony-card#ceremonie .ceremony-couple {
  margin: 4px auto 14px;
  padding: 10px 0 6px;
}

.ceremony-card#ceremonie .ceremony-intro {
  margin: 0 auto 18px;
  max-width: 560px;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: #6b5b47;
}

.ceremony-card#ceremonie .ceremony-date {
  margin-top: 14px;
  margin-bottom: 6px;
}

.ceremony-card#ceremonie .ceremony-hebrew-date-line {
  margin: 0 0 10px;
}

.ceremony-card#ceremonie .ceremony-time {
  margin: 10px 0 0;
}

.ceremony-card#ceremonie .ceremony-time bdi {
  unicode-bidi: isolate;
}

.ceremony-card#ceremonie .ceremony-time-follow {
  margin: 0 0 6px;
}

.ceremony-card#ceremonie .ceremony-location {
  margin: 14px 0 0;
}

.ceremony-card#ceremonie .ceremony-attire {
  margin: 20px auto 0;
  max-width: 620px;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: #6c5c47;
}

.ceremony-families p {
  margin: 0;
  line-height: 1.45;
  font-family: "Libre Baskerville", "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(0.5rem, 1.55vw, 1.24rem);
  color: #6c5c47;
}

.ceremony-families strong {
  font-family: "Libre Baskerville", "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-weight: 600;
}

.tribute-card {
  scroll-margin-top: 24px;
}

.tribute-paper {
  text-align: center;
  padding: 35px 5px 35px;
  border-radius: 12px;
  border: 1px solid #d8cebb;
  background: linear-gradient(180deg, #f8f4ea 0%, #f1ebdf 100%);
  font-family: "Libre Baskerville", "Cormorant Garamond", "Playfair Display", Georgia, serif;
}

.tribute-intro {
  margin: 0 0 10px;
  font-size: clamp(0.9rem, 1.55vw, 1.24rem);
  color: #6c5c47;
  line-height: 1.45;
}

.tribute-name-line {
  margin: 0;
  font-size: clamp(0.9rem, 1.55vw, 1.24rem);
  color: #6c5c47;
  line-height: 1.45;
}

.tribute-grandparents {
  margin-top: 18px;
}

.tribute-grandparents .tribute-name-line,
.tribute-grandparents .tribute-intro {
  font-size: clamp(0.74rem, 1.1vw, 0.94rem);
  font-style: italic;
  line-height: 1.35;
}

.ceremony-text {
  text-align: center;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  line-height: 1.42;
  color: #655643;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow-x: clip;
}

.ceremony-script-line {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  line-height: 1.12;
  margin: 8px 0;
}

.ceremony-detail {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 2.7vw, 2.15rem);
  line-height: 1.28;
  margin: 6px 0;
}

.ceremony-hebrew-date-line {
  margin: -2px 0 4px;
  text-align: center;
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: clamp(1.7rem, 2.7vw, 2.15rem);
  color: #7e705a;
  direction: rtl;
}

.ceremony-couple {
  margin: 8px auto 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.4em;
  padding: 14px 0 8px;
}

.couple-name-block {
  display: grid;
  justify-items: center;
  min-width: 0;
}

.couple-latin-name {
  margin: 0;
  font-family: "TheSeasonsItalicLocal", "The Seasons", "Parisienne", "Great Vibes", cursive;
  font-size: clamp(2.4rem, 13cqw, 6.4rem);
  color: #aa9270;
  line-height: 1;
  font-weight: 400;
  font-style: italic;
  white-space: nowrap;
}

/* Invitation (faire-part, Houppa & Réception): Sarah / Eitan fill the card width on one line. */
#invitationContent .ceremony-text {
  container-type: inline-size;
  container-name: invitation-text;
}

#invitationContent .tribute-paper,
#invitationContent .ceremony-paper {
  overflow-x: clip;
}

#invitationContent .ceremony-couple:not(.he-ceremony-couple) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-inline: clamp(4px, 2vw, 12px);
  gap: clamp(6px, 2.4cqw, 18px);
  overflow-x: clip;
  flex-wrap: nowrap;
}

#invitationContent .ceremony-couple:not(.he-ceremony-couple) .couple-name-block {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 45%;
}

#invitationContent .ceremony-couple:not(.he-ceremony-couple) .couple-latin-name {
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(2rem, 13.5cqw, 6.4rem);
}

#invitationContent .ceremony-couple:not(.he-ceremony-couple) .couple-ampersand {
  flex-shrink: 0;
  font-size: clamp(1.1rem, 5cqw, 2.6rem);
  margin: 0.4em 0 0;
}

#invitationContent .ceremony-couple:not(.he-ceremony-couple) .couple-hebrew-name {
  font-size: clamp(0.95rem, 4.2cqw, 1.6rem);
  white-space: nowrap;
}

/* Fallback when container queries are unsupported. */
@supports not (font-size: 1cqw) {
  #invitationContent .ceremony-couple:not(.he-ceremony-couple) .couple-latin-name {
    font-size: clamp(2rem, 13.5vw, 6.4rem);
  }

  #invitationContent .ceremony-couple:not(.he-ceremony-couple) .couple-ampersand {
    font-size: clamp(1.1rem, 5vw, 2.6rem);
  }

  #invitationContent .ceremony-couple:not(.he-ceremony-couple) .couple-hebrew-name {
    font-size: clamp(0.95rem, 4.2vw, 1.6rem);
  }
}

.couple-hebrew-name {
  margin: 4px 0 0;
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-size: clamp(1rem, 4cqw, 1.6rem);
  color: #7f715e;
  direction: rtl;
  line-height: 1.2;
}

.he-ceremony-couple {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
}

.he-couple-ampersand {
  align-self: center;
  margin: 0 2px;
}

.he-primary-name {
  font-family: "Noto Serif Hebrew", "Times New Roman", serif;
  font-style: normal;
  font-size: clamp(2.4rem, 6.8vw, 4.2rem);
  line-height: 1.06;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.02em;
}

.he-secondary-name {
  direction: ltr;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.ceremony-attire {
  margin: 10px 0 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: #6c5c47;
}

.ceremony-text strong {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-weight: 500;
}

.couple-ampersand {
  margin: 18px 0 0;
  color: #b9aa8f;
  font-size: clamp(1.6rem, 3.1vw, 2.3rem);
  line-height: 1;
}

.place-wrap--shabbat-hatan {
  margin-top: 18px;
}

.place-wrap {
  margin: 0;
  padding: 44px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #efebe3 0%, #f7f4ed 100%);
  border: 1px solid #e4dccf;
  position: relative;
  overflow: visible;
}

.place-card {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(204, 190, 165, 0.7);
  border-radius: 16px;
  padding: 36px 28px 30px;
  box-shadow: 0 12px 28px rgba(101, 84, 58, 0.08);
}

.place-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #a48754;
  font-size: 0.78rem;
}

.place-title {
  margin: 0 0 8px;
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 500;
  color: #6d5836;
  line-height: 1;
}

.place-desc {
  margin: 6px auto 10px;
  color: #6a5f52;
  font-size: 1.2rem;
  max-width: 630px;
}

.place-address {
  margin: 0;
  color: #83796d;
  font-size: 1.2rem;
}

.place-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5ddcf;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.place-btn {
  text-decoration: none;
  padding: 11px 19px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.82rem;
  text-align: center;
}

.secondary-btn {
  color: #93763f;
  border: 1px solid #dbcaa8;
  background: #fbf8f1;
}

.primary-btn {
  color: #fff;
  border: 1px solid #a37f39;
  background: #b08a3f;
}

form {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 10px;
}

label {
  font-size: 0.82rem;
  color: #9b8d77;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #c8baa2;
  border-radius: 0;
  padding: 9px 2px 8px;
  font-size: 1.15rem;
  font-family: inherit;
  background: transparent;
  color: #544c41;
}

.counter {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
}

.counter-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #c8baa2;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #7d6a49;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}

.counter-btn:hover {
  background: rgba(169, 137, 69, 0.16);
}

.counter input[type="number"] {
  text-align: center;
  font-size: 1.22rem;
}

textarea {
  min-height: 70px;
  resize: vertical;
  border: 1px solid #d9cfbf;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.switches {
  display: grid;
  gap: 8px;
  padding: 14px 12px;
  border-top: 1px solid #d8cebc;
  border-bottom: 1px solid #d8cebc;
  background: transparent;
}

.mini-title {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #9b8d77;
  font-size: 0.78rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: #766b5d;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.rsvp-section-divider {
  border: none;
  border-top: 2px solid var(--rsvp-separator);
  margin: 1.35rem 0;
}

.rsvp-attendance + .rsvp-attendance {
  margin-top: 1.1rem;
}

.rsvp-attendance {
  display: grid;
  gap: 10px;
  padding: 18px 14px;
  border-top: 1px solid var(--rsvp-separator);
  border-bottom: 1px solid var(--rsvp-separator);
  background: rgba(255, 252, 247, 0.45);
}

.rsvp-attendance-options {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.rsvp-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: #766b5d;
  cursor: pointer;
}

.rsvp-radio input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.rsvp-guests.is-hidden {
  display: none;
}

.rsvp-guests:not(.is-hidden) {
  margin-top: 1.1rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--rsvp-separator);
}

.rsvp-event-guests {
  margin-top: 1.1rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--rsvp-separator);
}

.rsvp-event-guests + .rsvp-event-guests {
  margin-top: 1.35rem;
}

.rsvp-transit {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--rsvp-separator-soft);
}

.rsvp-transit-note {
  margin: 0 0 10px;
  color: #8a7a62;
  font-size: 0.95rem;
  line-height: 1.4;
}

.rsvp-transit-count {
  margin-top: 0.85rem;
}

.rsvp-transit-count.is-hidden {
  display: none;
}

.rsvp-guests-title {
  margin: 0 0 4px;
  color: #6d5836;
  font-size: 1.05rem;
}

.rsvp-guests-subtitle {
  margin: 0 0 12px;
  color: #8a7a62;
  font-size: 0.95rem;
}

#rsvpFields > .field + .rsvp-guests,
#rsvpFields > .field + .rsvp-event-guests {
  margin-top: 1.25rem;
}

#rsvpChildrenField.is-hidden,
#rsvpWeddingChildrenField.is-hidden,
#rsvpShabbatChildrenField.is-hidden {
  display: none;
}

.field:has(#message) {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 2px solid var(--rsvp-separator);
}

[dir="rtl"] .rsvp-attendance-options {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .rsvp-radio {
  flex-direction: row-reverse;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  justify-content: center;
}

.rsvp-form-error {
  flex-basis: 100%;
  width: 100%;
  margin: 4px 0 0;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #9b2c2c;
  background: rgba(255, 244, 244, 0.92);
  border: 1px solid #e8b4b4;
  border-radius: 10px;
  padding: 10px 12px;
}

.rsvp-form-error[hidden] {
  display: none !important;
}

.rsvp-field-invalid {
  outline: 2px solid #d85c5c;
  outline-offset: 4px;
  border-radius: 10px;
}

.rsvp-field-invalid input:not([type="radio"]),
.rsvp-field-invalid textarea {
  border-bottom-color: #d85c5c;
}

.rsvp-field-invalid .counter {
  box-shadow: inset 0 0 0 2px #d85c5c;
  border-radius: 8px;
  padding: 4px;
}

.site-credit {
  text-align: center;
  margin: 0 auto;
  max-width: min(1020px, 94%);
  padding: 20px 16px 28px;
}

.site-credit p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(120, 110, 98, 0.5);
  font-weight: 400;
}

.site-credit-trigger {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgb(103 103 76);
  font-weight: 400;
  text-transform: none !important;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  width: auto;
  border-radius: 0;
}

.site-credit-trigger:hover {
  color: rgba(95, 83, 66, 0.9);
}

.contact-actions {
  margin-top: 8px;
  display: inline-flex;
  flex-direction: row;
  direction: ltr;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.contact-actions[hidden] {
  display: none !important;
}

.contact-actions:not([hidden]) {
  display: inline-flex !important;
}

.contact-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #d2bd97;
  color: #6f5835;
  background: #fffdf8;
}

.contact-icon svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-icon:hover {
  background: #f7f0e3;
}

.contact-icon-whatsapp {
  color: #1f8a4d;
}

.contact-icon-phone {
  color: #8b6a2d;
}

.contact-icon-mail {
  color: #7b4e2f;
}

.contact-icon-website {
  color: #3a5f8c;
}

.thank-you-message {
  margin: 18px auto 4px;
  max-width: 640px;
  text-align: center;
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  color: #6f5d43;
  background: rgba(255, 251, 243, 0.82);
  border: 1px solid #dcccae;
  border-radius: 12px;
  padding: 14px 16px;
}

button {
  border-radius: 4px;
  padding: 11px 16px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: 0.2s ease;
  font-family: inherit;
}

.primary {
  text-decoration: none;
  padding: 11px 19px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.82rem;
  text-align: center;
  color: #fff;
  border: 1px solid #a37f39;
  background: #b08a3f;
}

.primary:hover {
  background: #9c7835;
}

.hero-entry-btn {
  margin-top: 18px;
  white-space: nowrap;
  width: fit-content;
  max-width: 100%;
  justify-self: center;
}

#invitationContent.is-zoom-entering {
  animation: invitationZoomIn 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: center top;
}

@keyframes invitationZoomIn {
  0% {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.primary:disabled {
  background: #b7afa1;
  color: #f3efe7;
  cursor: not-allowed;
  border-color: #b7afa1;
}

.secondary {
  background: #eee5d9;
  color: #4d4031;
}

.secondary:hover {
  background: #e4d7c7;
}

.notice {
  margin-top: 10px;
  color: #9b8d77;
  font-size: 0.85rem;
}

[dir="rtl"] .topbar {
  direction: rtl;
}

[dir="rtl"] .lang-switch {
  direction: ltr;
}

[dir="rtl"] .field label {
  text-align: right;
  letter-spacing: 0.04em;
}

[dir="rtl"] .field input,
[dir="rtl"] .field select,
[dir="rtl"] .field textarea {
  text-align: right;
}

[dir="rtl"] .counter input[type="number"] {
  text-align: center;
}

[dir="rtl"] .checkbox {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  :root {
    --hero-logo-size: clamp(92px, 15vw, 136px);
  }

  .topbar {
    width: min(1020px, 94%);
    top: 6px;
  }

  main {
    width: min(1020px, 94%);
  }

  .top-nav {
    gap: 16px;
  }

  .top-nav a {
    font-size: 0.95rem;
  }

  .hero {
    min-height: 100svh;
    padding: 18px 0;
  }

  .hero-logo {
    margin-bottom: 10px;
  }

  .hero-date {
    font-size: 1.55rem;
    letter-spacing: 0.11em;
  }

  .hero-hebrew-date {
    font-size: 1.2rem;
  }

  .hero-place {
    font-size: 0.92rem;
    letter-spacing: 0.12em;
  }

  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 640px;
    margin-inline: auto;
  }

  .ceremony-paper {
    padding: 26px 18px;
  }

  .ceremony-text {
    font-size: 1.4rem;
  }

  .ceremony-script-line {
    font-size: 2rem;
  }

  .ceremony-detail {
    font-size: 1.32rem;
  }

  .place-desc {
    font-size: 1.12rem;
  }

  .place-address {
    font-size: 1.02rem;
  }
}

@media (max-width: 640px) {
  :root {
    --hero-logo-size: clamp(84px, 26vw, 122px);
    --topbar-height: 118px;
  }

  .topbar {
    width: 100%;
    left: 0;
    transform: none;
    top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 10px 12px 8px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }

  .top-nav {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 14px;
    padding: 6px 4px 4px;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    justify-content: flex-start;
  }

  .top-nav a {
    white-space: nowrap;
    font-size: 0.86rem;
    letter-spacing: 0.06em;
  }

  main {
    width: 100%;
    margin: 0 0 44px;
    padding: 0 12px;
    gap: 18px;
  }

  #invitationContent {
    gap: 18px;
    padding-top: var(--topbar-height);
  }

  .hero {
    min-height: 100svh;
    height: 100svh;
    gap: 6px;
    padding: var(--topbar-height) 10px 0;
    justify-items: center;
    align-content: center;
  }

  .hero::before {
    width: min(108vw, 560px);
    height: min(108vw, 560px);
    top: calc(var(--topbar-height) + (100svh - var(--topbar-height)) / 2);
  }

  .hero-logo {
    margin-bottom: 2px;
  }

  .slide {
    min-height: 100svh;
  }

  .kicker {
    margin: 0 0 6px;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
  }

  .he-hero-names {
    font-size: clamp(1.95rem, 9.6vw, 2.7rem);
    letter-spacing: 0;
    line-height: 1.13;
    white-space: nowrap;
    max-width: 92vw;
    margin-inline: auto;
    gap: 0.12em;
  }

  .he-hero-names .he-full-name {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.02em;
  }

  .he-hero-ampersand {
    margin-inline: 0.04em;
  }

  .hero-entry-btn {
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    margin-top: 12px;
  }

  .hero-date {
    margin-top: 6px;
    font-size: 1.16rem;
    letter-spacing: 0.08em;
  }

  .hero-hebrew-date {
    font-size: 1rem;
  }

  .hero-place {
    font-size: 0.84rem;
    letter-spacing: 0.07em;
  }

  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 18px;
    width: min(360px, 96%);
  }

  .count-item {
    padding: 9px 6px 7px;
  }

  .count-item p {
    font-size: 1.35rem;
  }

  .count-item span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .cta-link {
    margin-top: 12px;
    padding: 8px 14px;
    font-size: 0.84rem;
  }

  .card {
    padding: 3px;
    border-radius: 14px;
  }

  .section-title {
    font-size: 1.32rem;
  }

  .ceremony-families {
    grid-template-columns: 1fr auto 1fr;
    gap: 6px 0px;
    text-align: center;
    font-size: 0.98rem;
  }

  .family-column {
    padding: 0 4px;
  }

  .ceremony-center-logo {
    width: 130px;
  }

  .ceremony-text {
    font-size: 1.15rem;
    line-height: 1.28;
  }

  .ceremony-script-line {
    font-size: 1.2rem;
  }

  .ceremony-detail {
    font-size: 1.06rem;
  }

  .ceremony-couple:not(.he-ceremony-couple) {
    gap: clamp(4px, 1.5vw, 10px);
    padding-inline: 2px;
  }

  .he-ceremony-couple {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 0 6px;
  }

  .he-ceremony-couple .couple-ampersand {
    margin: 2px 0;
    font-size: 1.3rem;
  }

  .he-couple-ampersand {
    align-self: center;
    margin: 0;
  }

  .he-primary-name {
    font-size: clamp(1.75rem, 9vw, 2.25rem);
    line-height: 1.04;
  }

  .he-secondary-name {
    font-size: 0.84rem;
    margin-top: 2px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .place-wrap {
    padding: 26px 10px;
  }

  .place-card {
    padding: 24px 16px;
  }

  .place-actions {
    flex-direction: column;
  }

  .place-btn {
    width: 100%;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  button.site-credit-trigger {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 420px) {
  .logo-mark {
    padding: 3px 5px;
  }

  .site-header-logo {
    width: 30px;
  }

  .bh {
    font-size: 0.72rem;
  }

  .hero-date {
    font-size: 1rem;
    letter-spacing: 0.06em;
  }

  .hero-hebrew-date {
    font-size: 0.9rem;
  }

  .hero-place {
    font-size: 0.78rem;
  }

  .place-title {
    font-size: 2rem;
  }

  .place-kicker {
    font-size: 0.78rem;
  }
}

#bgMusic {
  display: none;
}

.music-fallback {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 10000;
  width: 48px;
  height: 48px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(244, 235, 220, 0.96));
  color: #6f5d43;
  border: 1px solid rgba(199, 172, 122, 0.55);
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(122, 103, 72, 0.2);
  opacity: 0.95;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.music-fallback:hover {
  background: linear-gradient(180deg, rgba(255, 252, 246, 1), rgba(244, 235, 220, 1));
  opacity: 1;
}

.music-fallback::before,
.music-fallback::after {
  content: "";
  position: absolute;
  transition: all 0.2s ease;
}

.music-fallback::before {
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #8f7542;
  transform: translate(-38%, -50%);
}

.music-fallback::after {
  display: none;
}

.music-fallback.is-playing::before,
.music-fallback.is-playing::after {
  display: block;
  top: 50%;
  width: 5px;
  height: 18px;
  border: none;
  border-radius: 2px;
  background: #8f7542;
  transform: translateY(-50%);
}

.music-fallback.is-playing::before {
  left: calc(50% - 5px);
}

.music-fallback.is-playing::after {
  left: calc(50% + 4px);
}

@media (max-width: 420px) {
  .music-fallback {
    right: 12px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }
}
