:root {
  color-scheme: light;
  font-family: 'Manrope', sans-serif;
  background: #efe8de;
  color: #2a2723;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  perspective: 1200px;
  transform-style: preserve-3d;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 219, 180, 0.45), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(200, 172, 129, 0.24), transparent 30%),
    linear-gradient(140deg, #fffaf4 0%, #f1e6d8 50%, #ece2d8 100%);
}

.page-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.hero {
  position: relative;
  padding: 3.2rem 2rem;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(170, 138, 96, 0.28);
  box-shadow: 0 26px 90px rgba(58, 44, 19, 0.12);
  backdrop-filter: blur(8px);
  margin-bottom: 2rem;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.hero::before {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 223, 201, 0.75), transparent 58%);
  top: -50px;
  left: -50px;
  animation: floatBlob 10s ease-in-out infinite;
}

.hero::after {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(211, 183, 156, 0.26), transparent 60%);
  bottom: -90px;
  right: -90px;
  animation: floatBlob 12s ease-in-out infinite reverse;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 1.2fr);
  gap: 2rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: grid;
  justify-items: stretch;
}

.hero-photo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.photo-frame {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 5;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(188, 156, 116, 0.75);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 241, 229, 0.92));
  box-shadow: 0 30px 60px rgba(92, 65, 34, 0.2);
  display: grid;
  place-items: center;
  cursor: default;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: var(--photo-x, 50%) var(--photo-y, 34%);
  transform: scale(1.1);
  transition: transform 300ms ease;
}

.photo-frame:hover img {
  transform: scale(1.28);
}

.photo-caption {
  margin: 0;
  color: #614b38;
  font-size: 0.95rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: #a67c52;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hero h1 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(2.7rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.hero-title {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.08em;
}

.hero-title-line {
  display: flex;
  justify-content: center;
  gap: 0.01em;
}

.hero-title-separator {
  display: inline-block;
  font-size: 0.42em;
  line-height: 1;
  color: #9b7856;
  transform: translateY(-0.02em);
}

.hero-letter {
  display: inline-block;
  opacity: 0;
  min-width: 0.2em;
  animation:
    heroLetterIn 0.72s cubic-bezier(0.2, 0.9, 0.2, 1) forwards,
    textJiggleSoft 5.8s ease-in-out calc(var(--letter-delay, 0ms) + 1s) infinite;
  animation-delay: var(--letter-delay, 0ms), calc(var(--letter-delay, 0ms) + 1s);
}

.hero p {
  margin: 1rem 0 0;
  max-width: 100%;
  color: #4e4a44;
  font-size: 1rem;
}

.audio-card {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  width: 100%;
  border-radius: 18px;
  background: rgba(255, 248, 238, 0.92);
  border: 1px solid rgba(190, 158, 123, 0.4);
  box-shadow: 0 8px 28px rgba(109, 83, 57, 0.12);
  text-align: center;
  animation: cardLift 6.5s ease-in-out infinite;
}

.audio-label {
  margin: 0 0 0.6rem;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #8f6840;
  animation: textJiggleSoft 7s ease-in-out infinite;
}

.wedding-audio {
  width: min(100%, 360px);
  height: 44px;
}

.audio-start-btn {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.62rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(191, 149, 98, 0.55);
  background: linear-gradient(160deg, rgba(255, 251, 245, 0.98), rgba(252, 236, 213, 0.94));
  color: #4f331a;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(130, 93, 56, 0.16);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.audio-start-btn:hover,
.audio-start-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(130, 93, 56, 0.22);
}

.audio-help {
  margin: 0.6rem 0 0;
  color: #675440;
  font-size: 0.9rem;
}

.main-content {
  display: grid;
  gap: 1.75rem;
}

.site-footer {
  margin-top: 2rem;
  padding: 1rem 0 0.5rem;
  text-align: center;
  color: #725c46;
}

.site-footer p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.invite-card,
.family-card,
.countdown-card,
.rsvp-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(179, 148, 111, 0.33);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(51, 36, 19, 0.1);
  padding: 1.75rem;
}

.invite-card,
.family-card {
  text-align: center;
}

.countdown-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 221, 186, 0.45), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(188, 146, 96, 0.18), transparent 48%),
    rgba(255, 255, 255, 0.9);
}

.countdown-card::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 172, 126, 0.22), transparent 65%);
  filter: blur(1px);
  animation: haloMove 9s ease-in-out infinite;
  pointer-events: none;
}

.countdown-grid {
  margin-top: 1.3rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  perspective: 900px;
}

.countdown-box {
  position: relative;
  padding: 1rem 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(193, 154, 110, 0.42);
  background: linear-gradient(165deg, rgba(255, 253, 250, 0.98), rgba(253, 240, 224, 0.95));
  box-shadow:
    0 10px 22px rgba(124, 93, 58, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  text-align: center;
  transform-style: preserve-3d;
  animation: countdownFloat 5.8s ease-in-out infinite;
}

.countdown-box:nth-child(2) {
  animation-delay: 0.35s;
}

.countdown-box:nth-child(3) {
  animation-delay: 0.7s;
}

.countdown-box:nth-child(4) {
  animation-delay: 1.05s;
}

.countdown-value {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1;
  color: #6f4d2b;
  text-shadow: 0 3px 12px rgba(194, 154, 106, 0.35);
}

.countdown-label {
  margin: 0.45rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  font-weight: 700;
  color: #8d6947;
}

.countdown-date {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: #6a553f;
}

.calendar-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.calendar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: #4f331a;
  border: 1px solid rgba(191, 149, 98, 0.55);
  background: linear-gradient(160deg, rgba(255, 251, 245, 0.98), rgba(252, 236, 213, 0.94));
  box-shadow: 0 8px 18px rgba(130, 93, 56, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.calendar-btn:hover,
.calendar-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(130, 93, 56, 0.22);
}

.invitation-link-wrap {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.invitation-link-btn {
  min-width: 220px;
}

.section-header h2 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.9rem;
  animation: textJiggleSoft 6.8s ease-in-out infinite;
}

.section-header p {
  margin: 0.6rem 0 0;
  color: #5f5f5f;
}

.section-header {
  text-align: center;
  display: grid;
  justify-items: center;
}

.info-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-box {
  padding: 1.3rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffaf1 0%, #fff5e8 100%);
  border: 1px solid rgba(226, 202, 173, 0.8);
  transition: transform 220ms ease, box-shadow 220ms ease;
  animation: cardLift 7.2s ease-in-out infinite;
  text-align: center;
}

.invite-card .info-box,
.family-card .family-box,
.venue-map-card {
  text-align: center !important;
}

.invite-card .info-box h3,
.invite-card .info-box p,
.invite-card .info-box li,
.family-card .family-box h3,
.family-card .family-box p,
.venue-map-card h3,
.venue-map-card p {
  text-align: center;
}

.info-grid .info-box:nth-child(2) {
  animation-delay: 0.6s;
}

.info-grid .info-box:nth-child(3) {
  animation-delay: 1.2s;
}

.info-grid .info-box:nth-child(4) {
  animation-delay: 1.8s;
}

.info-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(125, 96, 61, 0.12);
}

.info-box h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.info-box p,
.info-box li {
  margin: 0.45rem 0;
  color: #555;
}

.info-box ul {
  padding-left: 0;
  margin: 0;
  list-style-position: inside;
}

.venue-map-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.venue-map-card {
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 233, 208, 0.7), transparent 42%),
    linear-gradient(165deg, rgba(255, 251, 245, 0.98), rgba(250, 238, 220, 0.96));
  border: 1px solid rgba(219, 189, 152, 0.72);
  box-shadow: 0 18px 40px rgba(93, 68, 39, 0.12);
  text-align: center;
}

.venue-map-card p,
.venue-map-card h3 {
  text-align: center;
}

.venue-map-card::before {
  content: '';
  position: absolute;
  inset: auto -40px -50px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 154, 106, 0.2), transparent 68%);
  pointer-events: none;
}

.venue-map-card-accent {
  background:
    radial-gradient(circle at top left, rgba(226, 211, 185, 0.62), transparent 40%),
    linear-gradient(165deg, rgba(255, 250, 242, 0.98), rgba(244, 231, 211, 0.98));
}

.venue-map-copy {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.venue-map-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #916840;
}

.venue-map-copy h3 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-size: 1.45rem;
  color: #3f3124;
}

.venue-map-copy p:last-child {
  margin: 0.55rem 0 0;
  color: #5b5248;
}

.venue-map-frame {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(198, 162, 120, 0.46);
  box-shadow: 0 14px 30px rgba(99, 72, 43, 0.16);
  background: #f4ede3;
}

.venue-map-frame iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.family-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.family-box {
  padding: 1.25rem;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 250, 241, 0.98), rgba(253, 240, 223, 0.95));
  border: 1px solid rgba(221, 189, 149, 0.55);
  box-shadow: 0 10px 24px rgba(114, 83, 47, 0.1);
  transition: transform 220ms ease, box-shadow 220ms ease;
  animation: cardLift 7.6s ease-in-out infinite;
  text-align: center;
}

.family-box p,
.family-box h3 {
  text-align: center;
}

.family-grid .family-box:nth-child(2) {
  animation-delay: 0.8s;
}

.family-grid .family-box:nth-child(3) {
  animation-delay: 1.4s;
}

.family-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(114, 83, 47, 0.16);
}

.family-role {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #906946;
}

.family-box h3 {
  margin: 0.45rem 0 0;
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  line-height: 1.2;
  color: #3f3124;
  animation: textJiggleSoft 8s ease-in-out infinite;
}

.rsvp-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: #40372f;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(209, 190, 163, 0.9);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  background: #fff;
  color: #2c2c2c;
  outline: none;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #b87f44;
  box-shadow: 0 0 0 4px rgba(184, 127, 68, 0.12);
}

textarea {
  resize: vertical;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #bb7b35 0%, #c8985d 45%, #a86a2a 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn-submit:hover,
.btn-submit:focus {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(184, 127, 68, 0.18);
}

.hero-photo,
.invite-card,
.countdown-card,
.family-card,
.rsvp-card {
  animation: cardLift 9s ease-in-out infinite;
}

.photo-caption {
  animation: textJiggleSoft 7.4s ease-in-out infinite;
}

.form-message {
  margin: 0;
  color: #2d6a4f;
  min-height: 1.2rem;
}

.storage-note {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: #5a4d3d;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, -140px) rotateX(9deg) scale(0.9);
  transform-origin: center bottom;
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
}

@keyframes floatBlob {
  0% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(12px) scale(1.04);
  }
  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes textJiggle {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  20% {
    transform: translate3d(0.4px, -0.2px, 0) rotate(-0.35deg);
  }
  40% {
    transform: translate3d(-0.4px, 0.2px, 0) rotate(0.35deg);
  }
  60% {
    transform: translate3d(0.3px, -0.1px, 0) rotate(-0.2deg);
  }
  80% {
    transform: translate3d(-0.3px, 0.1px, 0) rotate(0.2deg);
  }
}

@keyframes heroLetterIn {
  0% {
    opacity: 0;
    transform: translate3d(0, -28px, 0) scale(0.88) rotate(-6deg);
    filter: blur(8px);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, 7px, 0) scale(1.04) rotate(1.5deg);
    filter: blur(0);
  }
  82% {
    transform: translate3d(0, -3px, 0) scale(0.995) rotate(-0.5deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes textJiggleSoft {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(0.35px, -0.2px, 0);
  }
  50% {
    transform: translate3d(-0.35px, 0.2px, 0);
  }
  75% {
    transform: translate3d(0.2px, -0.1px, 0);
  }
}

@keyframes cardLift {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes countdownFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotateX(0deg);
  }
  50% {
    transform: translate3d(0, -6px, 10px) rotateX(4deg);
  }
}

@keyframes haloMove {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-18px, 10px, 0) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .hero-letter,
  .audio-card,
  .audio-label,
  .section-header h2,
  .info-box,
  .family-box,
  .family-box h3,
  .hero-photo,
  .invite-card,
  .family-card,
  .rsvp-card,
  .photo-caption,
  .countdown-card,
  .countdown-box {
    animation: none !important;
  }

  .calendar-btn {
    transition: none !important;
  }
}

@media (max-width: 720px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

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

  .venue-map-grid {
    grid-template-columns: 1fr;
  }

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

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero {
    padding: 2.2rem 1.2rem;
  }

  .photo-frame {
    max-width: 380px;
  }

  .wedding-audio {
    width: 100%;
  }

  .venue-map-frame iframe {
    height: 280px;
  }
}
