:root {
  color-scheme: light;
  --ink: #1f1d1a;
  --muted: #77716a;
  --paper: #ffffff;
  --paper-deep: #f8f6f2;
  --cream: #ffffff;
  --sage: #9d968a;
  --sage-dark: #5f574d;
  --clay: #aa8a5f;
  --rose: #efe7dc;
  --success: #6f7d65;
  --present: #c5a56e;
  --error: #aa5f5f;
  --line: rgba(31, 29, 26, 0.1);
  --shadow: 0 28px 90px rgba(31, 29, 26, 0.08);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(239, 231, 220, 0.7), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #ffffff 52%, var(--paper-deep) 100%);
  color: var(--ink);
  font-size: 15px;
  font-family: var(--sans);
  line-height: 1.7;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(31, 29, 26, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 29, 26, 0.02) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, black, transparent 58%);
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-scale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes tile-pop {
  50% {
    transform: scale(1.035);
  }
}

@keyframes tile-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-7px);
  }

  40% {
    transform: translateX(7px);
  }

  60% {
    transform: translateX(-5px);
  }

  80% {
    transform: translateX(5px);
  }
}

@keyframes tile-correct {
  0% {
    transform: translateY(-2px) scale(1);
  }

  55% {
    opacity: 1;
    transform: translateY(-12px) scale(1.05);
  }

  100% {
    opacity: 0;
    transform: translateY(-24px) scale(0.92);
  }
}

@keyframes letter-fade {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cell-flip {
  0% {
    transform: rotateX(0);
  }

  50% {
    transform: rotateX(90deg);
  }

  100% {
    transform: rotateX(0);
  }
}

@keyframes celebration-pop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }

  55% {
    opacity: 1;
    transform: translateY(-4px) scale(1.04);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes crown-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }

  45% {
    transform: translateY(-8px) rotate(8deg);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 2rem), 1120px);
  padding: 0.68rem 0.75rem 0.68rem 1rem;
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 45px rgba(31, 29, 26, 0.055);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
  transition:
    background 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.14rem;
  min-width: 3.5rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
}

.amp {
  color: var(--clay);
  font-style: italic;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.8vw, 1.3rem);
  color: rgba(31, 29, 26, 0.68);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-nav a {
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--sage-dark);
}

.nav-rsvp {
  padding: 0.58rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 9rem 1.25rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 1rem;
  z-index: -1;
  overflow: hidden;
  border: 1px solid rgba(31, 29, 26, 0.07);
  border-radius: 2.2rem;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.98), transparent 0 16rem),
    radial-gradient(circle at 78% 36%, rgba(239, 231, 220, 0.72), transparent 0 20rem),
    linear-gradient(135deg, #ffffff 0%, #fbfaf7 46%, #f2eee7 100%);
  box-shadow: var(--shadow);
}

.hero-bg::before,
.hero-bg::after {
  position: absolute;
  width: 34rem;
  height: 34rem;
  border: 1px solid rgba(170, 138, 95, 0.16);
  border-radius: 38% 62% 52% 48%;
  content: "";
}

.hero-bg::before {
  top: 8%;
  left: 5%;
  transform: rotate(-18deg);
}

.hero-bg::after {
  right: -7%;
  bottom: -5%;
  transform: rotate(25deg);
}

.hero-content {
  max-width: 860px;
  text-align: center;
  animation: fade-up 900ms ease both;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--clay);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 0.88;
}

h1 {
  margin-bottom: 1.8rem;
  font-size: clamp(3.75rem, 8.4vw, 8.8rem);
}

.name-lockup {
  display: inline-grid;
  justify-items: center;
  gap: clamp(0.05em, 0.8vw, 0.12em);
  min-width: min(100%, 9.6em);
  overflow: visible;
}

.name-line {
  display: block;
  line-height: 0.82;
  white-space: nowrap;
}

.hero-amp {
  display: block;
  color: rgba(170, 138, 95, 0.72);
  font-family: var(--serif);
  font-size: 0.56em;
  font-style: italic;
  font-weight: 300;
  line-height: 0.55;
  pointer-events: none;
  animation: soft-scale 900ms ease 180ms both;
}

h2 {
  margin-bottom: 1.35rem;
  font-size: clamp(2.45rem, 5.7vw, 5.45rem);
}

h3 {
  margin-bottom: 0.8rem;
  font-size: 1.08rem;
  line-height: 1.2;
}

.hero-date {
  margin: 0 auto 2.8rem;
  color: rgba(31, 29, 26, 0.66);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2vw, 1.65rem);
  font-weight: 300;
  letter-spacing: 0.01em;
}

.hero-actions,
.registry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.registry-actions {
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.78rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 18px 42px rgba(31, 29, 26, 0.14);
}

.button-secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
}

.countdown-card {
  position: absolute;
  right: clamp(1.4rem, 5vw, 4rem);
  bottom: clamp(1.4rem, 5vw, 4rem);
  width: min(22rem, calc(100% - 2.8rem));
  padding: 1.35rem;
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 55px rgba(31, 29, 26, 0.07);
  backdrop-filter: blur(16px);
  animation: fade-up 900ms ease 260ms both;
}

.countdown-card p {
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.countdown span {
  padding: 0.7rem 0.45rem;
  border-radius: 1rem;
  background: rgba(248, 246, 242, 0.7);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.countdown strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}

.section-pad {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(5.5rem, 12vw, 10rem) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.8fr);
  gap: 2rem;
}

.intro-card,
.registry-card,
.rsvp-panel {
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.intro-card {
  padding: clamp(2rem, 5vw, 4.2rem);
}

.intro-card p:last-child,
.section-heading p:last-child,
.story-copy p:last-child,
.travel-grid p,
.registry-card p,
.rsvp-panel p {
  margin-bottom: 0;
}

.intro-card p,
.section-heading p,
.story-copy p,
.travel-grid p,
.registry-card p,
.rsvp-panel p,
.accordion p {
  color: var(--muted);
  font-size: 0.94rem;
}

.detail-grid {
  display: grid;
  gap: 1.25rem;
}

.detail-grid article,
.travel-grid article,
.event-card {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 50px rgba(31, 29, 26, 0.055);
}

.detail-grid article {
  display: grid;
  align-content: center;
  padding: 1.65rem;
}

.detail-grid span,
.event-day,
.event-time {
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-grid strong {
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
}

.invite-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(18rem, 0.78fr) minmax(19rem, 0.68fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid rgba(143, 134, 158, 0.14);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 4% 3%, rgba(204, 223, 237, 0.34), transparent 0 16rem),
    radial-gradient(circle at 100% 82%, rgba(204, 223, 237, 0.34), transparent 0 18rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(251, 250, 248, 0.92));
  box-shadow: 0 28px 90px rgba(143, 134, 158, 0.12);
}

.invite-section::before,
.invite-section::after {
  position: absolute;
  z-index: 0;
  width: 24rem;
  height: 24rem;
  border-radius: 46% 54% 50% 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(126, 117, 140, 0.08), transparent 0 3rem),
    radial-gradient(ellipse at 38% 42%, rgba(207, 226, 238, 0.54), transparent 0 7rem),
    radial-gradient(ellipse at 62% 58%, rgba(222, 232, 240, 0.48), transparent 0 8rem);
  content: "";
  opacity: 0.76;
  pointer-events: none;
}

.invite-section::before {
  top: -9rem;
  left: -8rem;
  transform: rotate(-18deg);
}

.invite-section::after {
  right: -8rem;
  bottom: -8rem;
  transform: rotate(24deg) scale(1.12);
}

.invite-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  color: #7e758c;
}

.invite-copy p {
  color: #7e758c;
  font-size: 0.96rem;
}

.invite-copy .eyebrow {
  color: #8b819a;
}

.invite-copy h2 {
  color: #8b819a;
  font-family: "Pinyon Script", var(--serif);
  font-size: clamp(3.5rem, 8vw, 6.8rem);
  letter-spacing: 0;
  line-height: 0.82;
}

.invite-details {
  display: grid;
  gap: 0;
  margin: 2.4rem 0 0;
  border-top: 1px solid rgba(143, 134, 158, 0.2);
}

.invite-details div {
  display: grid;
  grid-template-columns: minmax(6rem, 0.28fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(143, 134, 158, 0.2);
}

.invite-details dt {
  color: #8b819a;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.invite-details dd {
  margin: 0;
  color: #6f687c;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 300;
  line-height: 1.15;
}

.invite-art {
  margin: 0;
  justify-self: center;
  width: min(100%, 24rem);
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 1.6rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: clamp(0.55rem, 1.4vw, 0.9rem);
}

.invite-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

.digital-invite {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(100%, 31rem);
  min-height: 46.5rem;
  overflow: hidden;
  padding: clamp(2.7rem, 5vw, 3.8rem) clamp(1.75rem, 4vw, 2.9rem);
  border: 6px solid #897498;
  border-radius: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(200, 220, 236, 0.5), transparent 0 11rem),
    radial-gradient(circle at 84% 72%, rgba(200, 220, 236, 0.5), transparent 0 13rem),
    #fffefe;
  box-shadow:
    inset 0 0 0 1.5rem #fffefe,
    inset 0 0 0 calc(1.5rem + 2px) #897498,
    0 28px 90px rgba(116, 98, 130, 0.18);
  color: #7c708b;
  text-align: center;
}

.digital-invite::before {
  position: absolute;
  inset: 1rem;
  z-index: 2;
  border: 2px solid #897498;
  content: "";
  pointer-events: none;
}

.digital-invite > :not(.digital-flower) {
  position: relative;
  z-index: 1;
}

.digital-invite p {
  margin: 0;
}

.digital-flower {
  position: absolute;
  z-index: 0;
  width: 19rem;
  height: 19rem;
  border-radius: 50% 44% 52% 46%;
  background:
    radial-gradient(circle at 52% 50%, rgba(124, 112, 139, 0.1), transparent 0 2rem),
    radial-gradient(ellipse at 35% 40%, rgba(199, 220, 236, 0.54), transparent 0 5.4rem),
    radial-gradient(ellipse at 63% 39%, rgba(221, 231, 239, 0.52), transparent 0 5.8rem),
    radial-gradient(ellipse at 45% 68%, rgba(210, 226, 238, 0.5), transparent 0 6.2rem);
  filter: blur(0.4px);
  opacity: 0.86;
  pointer-events: none;
}

.digital-flower-one {
  top: -4.2rem;
  left: -4.4rem;
  transform: rotate(-12deg);
}

.digital-flower-two {
  right: -4.8rem;
  bottom: -4rem;
  transform: rotate(20deg) scale(1.2);
}

.hebrew-blessing {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  font-family: "Noto Serif Hebrew", serif;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.hebrew-verse,
.hebrew-name,
.hebrew-date {
  font-family: "Noto Serif Hebrew", serif;
  font-weight: 300;
}

.hebrew-verse {
  margin-top: 0.45rem;
  margin-bottom: 2.9rem;
  color: #7c708b;
  font-size: clamp(1.05rem, 2.7vw, 1.42rem);
  letter-spacing: 0.34em;
}

.family-script,
.script-name,
.digital-date,
.digital-venue {
  font-family: "Pinyon Script", var(--serif);
  font-weight: 400;
}

.family-script {
  margin-bottom: 0;
  color: #8d7f9d;
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  line-height: 1;
}

.invite-small-caps {
  color: #756a83;
  font-family: Georgia, serif;
  font-size: clamp(0.72rem, 1.65vw, 0.93rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.18;
  text-transform: uppercase;
}

.digital-names {
  display: grid;
  gap: 0;
  margin: clamp(1.9rem, 4.5vw, 2.9rem) 0 2.35rem;
}

.name-translation-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: center;
  margin: 0.25rem 0 1.25rem;
}

.name-translation-row > span {
  color: #756a83;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.script-name {
  color: #8d7f9d;
  font-size: clamp(4rem, 10.5vw, 6.1rem);
  line-height: 0.76;
}

.script-name-hailey {
  margin-bottom: 0.2rem;
}

.script-name-jessie {
  margin-top: 0.1rem;
}

.hebrew-name {
  margin: 0;
  color: #7c708b;
  font-size: 0.92rem;
  letter-spacing: 0.32em;
}

.digital-date {
  margin-top: 2.15rem;
  color: #8d7f9d;
  font-size: clamp(1.65rem, 4vw, 2.28rem);
  line-height: 1;
}

.hebrew-date {
  margin: 0.2rem 0 0.65rem;
  color: #756a83;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
}

.digital-venue {
  margin-top: 2.75rem;
  color: #8d7f9d;
  font-size: clamp(1.55rem, 3.8vw, 2.18rem);
  line-height: 1;
}

.invite-dress {
  margin-top: 3.25rem;
  color: #756a83;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 3rem;
}

.centered {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.story-image {
  position: relative;
  margin: 0;
  width: 100%;
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 16rem 16rem 2rem 2rem;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.story-image::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.3);
  content: "";
  pointer-events: none;
}

.story-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  max-height: clamp(24rem, 52vw, 34rem);
  object-fit: cover;
}

.story-copy {
  padding: clamp(1.5rem, 4vw, 3.25rem);
}

.story-copy p {
  font-size: clamp(1rem, 1.45vw, 1.22rem);
}

.photo-moments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
}

.photo-card {
  position: relative;
  margin: 0;
  width: 100%;
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 0.55rem;
}

.photo-card::after {
  position: absolute;
  inset: 0.55rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.3);
  content: "";
  pointer-events: none;
}

.photo-card-tall {
  transform: translateY(2rem);
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  object-fit: cover;
}

.photo-caption {
  text-align: center;
}

.photo-caption p:last-child {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--muted);
}

.timeline,
.travel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.event-card,
.travel-grid article {
  padding: 1.85rem;
}

.event-card {
  min-height: 22rem;
}

.event-card.featured {
  border-color: rgba(170, 138, 95, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 246, 242, 0.88)),
    var(--paper);
  color: var(--ink);
}

.event-card.featured p,
.event-card.featured .event-day,
.event-card.featured .event-time {
  color: var(--muted);
}

.event-card a {
  display: inline-flex;
  margin-top: 1rem;
  color: inherit;
  font-weight: 800;
}

.travel {
  width: min(1180px, calc(100% - 2rem));
}

.travel-grid article {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 246, 242, 0.55)),
    var(--paper);
}

.registry-card {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem);
  text-align: center;
}

.faq {
  max-width: 900px;
}

.accordion {
  display: grid;
  gap: 1rem;
}

details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.84);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.45rem;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  width: 1.7rem;
  height: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--sage-dark);
  content: "+";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

details[open] summary::after {
  content: "-";
}

details p {
  padding: 0 1.45rem 1.45rem;
}

.rsvp-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1fr);
  gap: clamp(2.25rem, 6vw, 5rem);
  padding: clamp(2.25rem, 5.5vw, 4.8rem);
}

.rsvp-form {
  display: grid;
  gap: 1.2rem;
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
  padding: 0.95rem 1rem;
  text-transform: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(82, 99, 74, 0.55);
  box-shadow: 0 0 0 4px rgba(123, 138, 112, 0.16);
}

.rsvp-form .button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.form-note {
  min-height: 1.5rem;
  color: var(--sage-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
  font-weight: 800;
}

.games-body {
  background:
    radial-gradient(circle at top right, rgba(239, 231, 220, 0.58), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #ffffff 40%, var(--paper-deep) 100%);
}

.games-hero {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(9rem, 16vw, 13rem) 0 clamp(3rem, 7vw, 6rem);
  text-align: center;
}

.games-hero h1 {
  max-width: 780px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(3rem, 7vw, 7rem);
}

.games-hero p:last-child {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
}

.game-switcher {
  position: relative;
  z-index: 4;
  display: flex;
  gap: 0.65rem;
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto clamp(1rem, 4vw, 2rem);
  padding: 0.45rem;
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 46px rgba(31, 29, 26, 0.065);
  backdrop-filter: blur(18px);
}

.game-switcher button {
  flex: 1;
  min-height: 2.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  padding: 0.8rem 1rem;
  text-transform: uppercase;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.game-switcher button:hover,
.game-switcher button:focus-visible {
  color: var(--ink);
  transform: translateY(-1px);
}

.game-switcher button.is-active {
  background: var(--ink);
  color: var(--cream);
}

.game-suite {
  padding-top: clamp(3rem, 8vw, 7rem);
  animation: fade-up 520ms ease both;
}

.game-suite[hidden] {
  display: none;
}

.game-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 0.7fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  margin-bottom: 2rem;
}

.game-heading h2 {
  margin-bottom: 0;
}

.game-heading > p {
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.game-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.game-tabs button {
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.72rem 1rem;
  text-transform: uppercase;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.game-tabs button.is-active {
  background: var(--ink);
  color: var(--cream);
}

.game-tabs button:hover,
.game-tabs button:focus-visible {
  border-color: rgba(170, 138, 95, 0.38);
  color: var(--ink);
  transform: translateY(-1px);
}

.game-tabs button.is-active:hover,
.game-tabs button.is-active:focus-visible {
  color: var(--cream);
}

.game-card {
  position: relative;
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 3rem);
  animation: fade-up 650ms ease both;
}

.game-celebration {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 0.32rem;
  width: min(20rem, calc(100% - 2rem));
  padding: 1.25rem;
  border: 1px solid rgba(170, 138, 95, 0.24);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 60px rgba(31, 29, 26, 0.14);
  color: var(--ink);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: celebration-pop 560ms ease both;
}

.game-celebration-crown {
  display: block;
  font-size: 2.15rem;
  line-height: 1;
  animation: crown-bounce 780ms ease 220ms both;
}

.game-celebration strong {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1;
}

.game-celebration span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-card-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.game-card-header h3 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
}

.game-card-header p {
  max-width: 30rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.game-actions,
.wordle-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.connections-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  width: 100%;
}

.connection-tile {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 4.8rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f9f7f3;
  color: var(--ink);
  cursor: pointer;
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.12;
  overflow-wrap: anywhere;
  padding: 0.35rem;
  text-align: center;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.connection-tile.is-selected {
  border-color: rgba(170, 138, 95, 0.55);
  background: var(--rose);
  box-shadow: 0 12px 28px rgba(170, 138, 95, 0.12);
  color: var(--ink);
  transform: translateY(-2px);
}

.connection-tile:hover,
.connection-tile:focus-visible {
  border-color: rgba(170, 138, 95, 0.34);
  transform: translateY(-2px);
}

.connection-tile.is-wrong {
  border-color: rgba(170, 95, 95, 0.42);
  background: rgba(170, 95, 95, 0.13);
  animation: tile-shake 420ms ease both;
}

.connection-tile.is-correct {
  border-color: rgba(111, 125, 101, 0.42);
  background: rgba(111, 125, 101, 0.18);
  color: var(--ink);
  animation: tile-correct 520ms ease both;
}

.solved-groups {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.solved-group {
  border: 1px solid rgba(170, 138, 95, 0.22);
  border-radius: 1rem;
  background: rgba(239, 231, 220, 0.56);
  padding: 0.95rem;
  text-align: center;
  animation: soft-scale 260ms ease both;
}

.solved-group strong,
.solved-group span {
  display: block;
}

.solved-group strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.solved-group span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wordle-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(2.8rem, 4.1rem));
  gap: 0.45rem;
  justify-content: center;
}

.wordle-cell {
  display: grid;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #fbfaf7;
  color: var(--ink);
  font-size: clamp(1.1rem, 4vw, 1.65rem);
  font-weight: 800;
  place-items: center;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.wordle-cell.is-filled {
  animation: letter-fade 260ms ease both;
}

.wordle-cell.correct {
  background: var(--success);
  color: #ffffff;
  animation:
    letter-fade 240ms ease both,
    cell-flip 420ms ease 170ms both;
}

.wordle-cell.present {
  background: var(--present);
  color: #ffffff;
  animation:
    letter-fade 240ms ease both,
    cell-flip 420ms ease 170ms both;
}

.wordle-cell.absent {
  background: #d7d2ca;
  color: #ffffff;
  animation:
    letter-fade 240ms ease both,
    cell-flip 420ms ease 170ms both;
}

.wordle-keyboard {
  display: grid;
  gap: 0.45rem;
  width: min(100%, 32rem);
  margin: 1rem auto 0;
}

.wordle-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.wordle-key {
  display: grid;
  min-width: 2.35rem;
  min-height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: #f9f7f3;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  place-items: center;
  text-transform: uppercase;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.wordle-key:hover,
.wordle-key:focus-visible {
  border-color: rgba(170, 138, 95, 0.34);
  transform: translateY(-1px);
}

.wordle-key-wide {
  min-width: 3.6rem;
}

.wordle-form {
  justify-content: center;
}

.wordle-form input {
  max-width: 12rem;
  text-align: center;
  text-transform: uppercase;
}

.crossword-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 0.8fr) minmax(16rem, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.crossword-grid {
  display: grid;
  grid-template-columns: repeat(var(--crossword-size), minmax(0, 1fr));
  width: min(100%, 26rem);
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}

.crossword-cell {
  display: grid;
  aspect-ratio: 1;
  background: #ffffff;
}

.crossword-cell.is-black {
  background: #eee9e1;
}

.crossword-cell input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(1rem, 4vw, 1.45rem);
  font-weight: 800;
  padding: 0;
  text-align: center;
  text-transform: uppercase;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.crossword-cell input.is-right {
  background: rgba(111, 125, 101, 0.18);
  box-shadow: inset 0 0 0 2px rgba(111, 125, 101, 0.24);
}

.crossword-cell input.is-wrong {
  background: rgba(170, 95, 95, 0.16);
  box-shadow: inset 0 0 0 2px rgba(170, 95, 95, 0.22);
}

.crossword-clues {
  display: grid;
  gap: 1.4rem;
}

.crossword-clues h4 {
  margin: 0 0 0.6rem;
  color: var(--clay);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.crossword-clues button {
  display: block;
  width: 100%;
  margin-bottom: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
  padding: 0.75rem 0.9rem;
  text-align: left;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.crossword-clues button:hover,
.crossword-clues button:focus-visible {
  border-color: rgba(170, 138, 95, 0.34);
  background: rgba(239, 231, 220, 0.4);
  color: var(--ink);
  transform: translateX(2px);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    border-radius: 1.4rem;
  }

  .primary-nav {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
  }

  .primary-nav a:not(.nav-rsvp) {
    display: none;
  }

  .primary-nav a[href="games.html"],
  .primary-nav a[aria-current="page"] {
    display: inline;
  }

  .hero {
    min-height: 92svh;
    place-items: start center;
    padding-top: 9.5rem;
  }

  .countdown-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 2rem;
  }

  .intro,
  .invite-section,
  .story-layout,
  .photo-moments,
  .timeline,
  .travel-grid,
  .rsvp-panel,
  .game-heading,
  .crossword-layout {
    grid-template-columns: 1fr;
  }

  .game-card-header {
    display: block;
  }

  .game-card-header p {
    margin-top: 0.6rem;
    text-align: left;
  }

  .story-image {
    width: min(100%, 30rem);
    justify-self: center;
  }

  .story-image img {
    max-height: none;
  }

  .photo-card-tall {
    transform: none;
  }

  .invite-art {
    width: min(100%, 30rem);
  }

  .digital-invite {
    width: min(100%, 31rem);
  }
}

@media (max-width: 560px) {
  .games-body main {
    display: grid;
    align-content: center;
    min-height: 100svh;
    padding: 5.25rem 0 1rem;
  }

  .games-body .site-footer,
  .games-hero {
    display: none;
  }

  .hero-bg {
    inset: 0.5rem;
    border-radius: 1.4rem;
  }

  h1 {
    font-size: clamp(3.15rem, 15.5vw, 5.2rem);
  }

  .name-lockup {
    min-width: 0;
    gap: 0.12em;
  }

  h2 {
    font-size: clamp(2.8rem, 16vw, 4.2rem);
  }

  .hero-actions,
  .registry-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .digital-invite {
    min-height: 44rem;
  }

  .story-image,
  .photo-card {
    width: min(100%, 22rem);
    justify-self: center;
  }

  .photo-moments {
    justify-items: center;
  }

  .hebrew-verse {
    letter-spacing: 0.16em;
  }

  .name-translation-row {
    gap: 0.6rem;
  }

  .script-name {
    font-size: clamp(3rem, 17vw, 4.25rem);
  }

  .hebrew-name {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
  }

  .game-switcher {
    gap: 0.35rem;
    width: min(calc(100% - 1rem), 28rem);
    margin-bottom: 0.55rem;
    border-radius: 999px;
    padding: 0.32rem;
  }

  .game-switcher button {
    min-height: 2.25rem;
    padding: 0.55rem 0.35rem;
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

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

  .game-suite {
    display: grid;
    align-content: center;
    width: min(calc(100% - 1rem), 34rem);
    padding: 0;
  }

  .game-heading {
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    text-align: center;
  }

  .game-heading h2 {
    font-size: clamp(2.2rem, 10vw, 3.1rem);
  }

  .game-heading > p,
  .game-card-header p {
    display: none;
  }

  .game-tabs {
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
  }

  .game-tabs button {
    min-height: 2rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.58rem;
    letter-spacing: 0.05em;
  }

  .game-card {
    padding: 0.8rem;
    border-radius: 1.2rem;
  }

  .game-celebration {
    width: min(18rem, calc(100% - 1rem));
    padding: 1rem;
  }

  .game-celebration-crown {
    font-size: 1.8rem;
  }

  .game-celebration strong {
    font-size: 1.45rem;
  }

  .game-card-header {
    margin-bottom: 0.6rem;
    text-align: center;
  }

  .connections-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.28rem;
  }

  .connection-tile {
    aspect-ratio: 1;
    min-height: 0;
    border-radius: 0.7rem;
    padding: 0.18rem;
    font-size: clamp(0.5rem, 2.25vw, 0.62rem);
    letter-spacing: 0.01em;
  }

  .wordle-board {
    grid-template-columns: repeat(5, minmax(2.1rem, 2.6rem));
    gap: 0.3rem;
  }

  .wordle-keyboard {
    gap: 0.28rem;
    width: 100%;
    margin-top: 0.65rem;
  }

  .wordle-keyboard-row {
    gap: 0.18rem;
  }

  .wordle-key {
    min-width: 1.78rem;
    min-height: 2.35rem;
    border-radius: 0.52rem;
    font-size: 0.62rem;
  }

  .wordle-key-wide {
    min-width: 2.65rem;
  }

  .game-actions,
  .wordle-form {
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.7rem;
  }

  .wordle-form .button,
  .game-actions .button {
    width: auto;
    min-height: 2.25rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.58rem;
  }

  .wordle-form input {
    max-width: 9.5rem;
    min-height: 2.25rem;
    padding: 0.55rem 0.8rem;
  }

  .crossword-layout {
    gap: 0.65rem;
  }

  .crossword-grid {
    justify-self: center;
    width: min(100%, 18rem);
  }

  .crossword-clues {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .crossword-clues h4 {
    margin-bottom: 0.25rem;
    font-size: 0.58rem;
  }

  .crossword-clues button {
    margin-bottom: 0.25rem;
    padding: 0.42rem 0.5rem;
    font-size: 0.64rem;
    line-height: 1.2;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
